Shooting Arrows - Nonlinear Spring Problem

In summary, the person asked for help on their first year physics homework, and the expert provided a summary of the content. They attempted to solve the problem but ran into difficulties with nonlinear functions. They implemented a solution using the Leapfrog algorithm, and it worked.
  • #1
TheBlenderer
3
0
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

Homework Statement



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.

Homework Equations



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

Other equations I've used:

[tex]E_{pot}=E_{kin}=1/2*mv^2[/tex]
[tex]v_{terminal}=sqrt{(2*E_{pot})/m_{arrow}}[/tex]

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:
%% First I let MATLAB calculate the initial x:

solve('-390*x-115*x*exp(2.3*x^2)=350','x');

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

%% Now for the numerical stuff

k1=390;
k2=115;
c=2.3;
Fmax=350;

x=-0.620:0.01:0;    
% 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:
F=-k1.*x-k2.*x.*exp(c.*x.^2);

% 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:

a=(-k1.*x-k2.*x.*exp(c.*x.^2))/m;

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!
 

Attachments

  • problem.jpg
    problem.jpg
    55.6 KB · Views: 408
  • graph_force_x.png
    graph_force_x.png
    1.8 KB · Views: 472
Last edited:
Physics news on Phys.org
  • #2
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.
 
  • #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!
 
  • #4
TheBlenderer said:
Thanks for your reply gneill! I see, so there is no analytical method of converting distance into time when working with a nonlinear system?
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.

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 get a different value when I find the root of the function. In particular, I find x = -0.559 m.

I'll try to implement this Frogleap integration method, thanks again!
Sounds like a plan!
 
  • #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 modeled 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:
%% Now attempting a Leapfrog integration
dt=0.001;
t=0:dt:0.013;
x_in=-0.620;
x_t=zeros(1,length(t));
v_t=zeros(1,length(t));
a_t=zeros(1,length(t));
x_t(1)=x_in;
v_t(1)=0;
a_t(1)=(-k1.*x_in-k2.*x_in.*exp(c.*x_in.^2))/m;


i=2;
while x_t(i-1)<0
    
    x_t(i)=x_t(i-1)+v_t(i-1)*dt+0.5*a_t(i-1)*dt^2;
    a_t(i)=(-k1*x_t(i)-k2*x_t(i).*exp(c*x_t(i).^2))/m;
    v_t(i)=v_t(i-1)+0.5*(a_t(i-1)+a_t(i)).*dt;
    i=i+1;
end

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 :)
 

Attachments

  • graph_accelvelocdist.png
    graph_accelvelocdist.png
    3.4 KB · Views: 430

1. What is the concept behind the "Shooting Arrows - Nonlinear Spring Problem"?

The "Shooting Arrows - Nonlinear Spring Problem" is a mathematical model that describes the motion of an arrow as it is launched from a bow with a non-linear spring. It takes into account factors such as the elasticity of the bow, the initial velocity of the arrow, and the force of gravity.

2. How is the problem solved?

The problem is typically solved using numerical methods, such as the Euler or Runge-Kutta methods, to approximate the solution to the differential equations that describe the motion of the arrow. These methods break the problem down into smaller, simpler steps that can be easily calculated and combined to get an overall solution.

3. What are some real-world applications of this problem?

The "Shooting Arrows - Nonlinear Spring Problem" has applications in fields such as physics, engineering, and sports. It can be used to model the trajectory of projectiles, such as arrows or bullets, in various scenarios. It can also be applied to the design and optimization of bow and arrow systems.

4. How does the non-linearity of the spring affect the arrow's trajectory?

The non-linearity of the spring can significantly impact the arrow's trajectory. As the spring is compressed, its force increases at a non-linear rate, which can result in a faster initial acceleration of the arrow. This can cause the arrow to have a different trajectory compared to if the spring had a linear behavior.

5. Are there any limitations or simplifications in this model?

Like any mathematical model, there are limitations and simplifications in the "Shooting Arrows - Nonlinear Spring Problem." For example, it assumes that the arrow is launched in a vacuum with no air resistance. It also does not take into account factors such as wind, the weight of the arrow, or the curvature of the Earth. These simplifications can affect the accuracy of the model in real-world scenarios.

Similar threads

  • Introductory Physics Homework Help
Replies
3
Views
368
  • Introductory Physics Homework Help
Replies
29
Views
927
  • Introductory Physics Homework Help
Replies
3
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
2K
  • Introductory Physics Homework Help
Replies
8
Views
1K
  • Introductory Physics Homework Help
Replies
7
Views
3K
  • Introductory Physics Homework Help
Replies
6
Views
2K
  • Introductory Physics Homework Help
Replies
14
Views
5K
  • Introductory Physics Homework Help
Replies
5
Views
4K
  • Introductory Physics Homework Help
Replies
5
Views
2K
Back
Top