1. PF Contest - Win "Conquering the Physics GRE" book! Click Here to Enter
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Shooting Arrows - Nonlinear Spring Problem

  1. Oct 17, 2013 #1
    Hello awesome physics people!

    Someone asked me for help on their first year physics homework, and I couldn't really solve it. This kept bugging me, because I should know how this works by now :P

    1. The problem statement, all variables and given/known data

    See attachment for the full problem statement. Basically, a bow is strung with an arrow, and what they want to know is, among other things, the graph for the velocity with respect to time.

    2. Relevant equations

    The given equation is [tex]F(x)=-k_1x-k_2xe^{cx^2}[/tex].

    Other equations I've used:


    3. The attempt at a solution

    I've come as far as the calculation of the terminal velocity of the arrow, however, after that I need to come up with an equation of velocity with respect to time, whilst I have only the acceleration with respect to distance from the equilibrium position of the bow. If it were linear I would be able to use a constant acceleration, but seeing as the acceleration is dependent on the distance from equilibrium, I don't really know what to do.

    I've implemented my partial solution in MATLAB, here is my code:

    Code (Text):
    %% First I let MATLAB calculate the initial x:


    % The outcome of this: xin=-0.62035062944153550757039658657226, or -0,620m

    %% Now for the numerical stuff


    % This is the x-vector, I initialized it from the initial x until x=0, when
    % the arrow leaves the string.

    dt=0.01;        % This is the timestep
    t=0:dt:5;       % Here I construct a vector t from 0 to 5 with steps of dt
    m=34*10^-3;     % This is the mass of the arrow

    % The following is the given formula:

    % To get the energy stored up in the spring, we need only to integrate F
    % over x:

    Epot=trapz(F,x);            % This gives Epot = 146.4474 J

    % As all of the potential energy will be transferred into kinetic energy of
    % the arrow, according to Epot = Ekin = 1/2*mv^2, we can calculate the
    % terminal velocity of the arrow:

    vterm=sqrt((2*Epot)/m);      % This gives vterm = 92.8146 m/s

    % Assuming all of the force gets transferred to the arrow, and because
    % F=m*a, we can calculate the acceleration of the arrow as function of x
    % simply by dividing by the mass of the arrow:


    figure, plot(x,F,'g')
    title('Force with respect to x')

    I've included the plot as another attachment.

    I guess my problem can be stated another way:

    How do I parametrize from x to t?

    Thanks in advance!!

    Attached Files:

    Last edited: Oct 17, 2013
  2. jcsd
  3. Oct 17, 2013 #2


    User Avatar

    Staff: Mentor

    Your value shown for xin looks a bit suspicious. Verify your solution.

    For the V vs T plot you're going to have to do a numerical integration of the trajectory. Use whatever algorithm you think appropriate, such as the Leapfrog method, or Euler's method, or Verlet, or even Runge-Kutta (probably overkill). Some web time will fill you in on those.

    They all boil down to using the force at a given position to determine an acceleration to apply over the next small time interval. Use it to update the velocity and position, rinse, repeat.
  4. Oct 17, 2013 #3
    Thanks for your reply gneill! I see, so there is no analytical method of converting distance into time when working with a nonlinear system?

    My x_initial doesn't seem suspicious to me, loading a bow by pulling back 62 cm is plausible, right? The minus sign is explicable by the definition of the x-axis in the problem statement.

    I'll try to implement this Frogleap integration method, thanks again!
  5. Oct 17, 2013 #4


    User Avatar

    Staff: Mentor

    It depends upon the functions involved. If you run into a transcendental function you're basically hosed :smile: In this case the x2 in the exponent of the exponential is a major stumbling block for a solution involving the normal basis set of functions that we're used to.

    I get a different value when I find the root of the function. In particular, I find x = -0.559 m.

    Sounds like a plan!
  6. Oct 19, 2013 #5
    Yay, it worked!

    I implemented the Leapfrog algorithm, and it worked! At first I got a sine wave (which isn't strange seeing as I basically modelled a spring), so I made the calculation stop as soon as x became positive. A bit of a hack solution, also because the rest of the vectors are zeros after that (that explains the sudden straight line in the graphs), but I didn't feel like polishing the code. I also used the erroneous value of -0.62 for x_initial, as it didn't really matter for this implementation (but thanks for checking anyways!)

    Here's my code:

    Code (Text):

    %% Now attempting a Leapfrog integration

    while x_t(i-1)<0

    hold all
    subplot(2,2,1), plot(t,v_t,'b'), title('Velocity with respect to time')
    subplot(2,2,2), plot(t,x_t,'r'), title('Distance with respect to time')
    subplot(2,2,3), plot(t,a_t,'g'), title('Acceleration with respect to time')
    And my graphs are attached. Cheers gneill :)

    Attached Files:

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Threads - Shooting Arrows Nonlinear Date
What angle to shoot the arrow at? Sep 23, 2014
Shoot arrow in sky - Free fall Sep 13, 2012
Shooting Arrow: Is It A Plane? Dec 14, 2008
Shooting An Arrow: The Final Velocity Dec 14, 2008
Projectile Motion (shooting an arrow) Oct 29, 2007