Jump to content
Science Forums

Physics Math Problem for Spring Launcher


Recommended Posts

Posted

I'm writing a program for my TI-83 to calculate the angle for launch for a spring shooter I built for a project. I've got the initial velocity and I'll be able to get the x and y distances. The equation I'm planning on using is:

 

y=x*tan(theta) - ( (gx^2) / (2v^2) ) * tan^2 (theta) +1

 

x= horizontal distance

y= vertical distance

g= gravity (9.81 m/s/s)

v= initial velocity

theta= angle in degrees

 

(If that can be followed.)

 

Conclusion: I'm trying to solve that equation for theta. I got it to a quadratic and solved for the roots, but I'm stuck there and not even sure that's the right thing to do. Any help would be greatly appreciated.

Posted

Im not sure how you want this program to work. Yes you want to find the angle to shoot - but for what? do you want to find the angle needed to shoot x distance or y height?

 

Im guessing you want an equation for the former. In which case, I will start with the two equations below because Im not sure where you got yours from yet.. :)

 

[math]t=\frac{2v\sin{\theta}}{g}[/math]

that is the time the projectile is in the air

 

[math]x=v\cos{(\theta)}t[/math]

 

combining:

 

[math]x=vcos{(\theta)}\frac{2v\sin{\theta}}{g}[/math]

 

or

 

[math]x=\frac{2v^{2}cos{(\theta)}\sin{(\theta)}}{g}[/math]

 

using a double angle forumla:

 

[math]x=\frac{v^{2}\sin{2\theta}}{g}[/math]

 

then rearranging for theta..

 

[math]\theta=\arcsin{\frac{xg}{v^{2}}[/math]

 

Now do you know how to program that into your Ti-83?

Posted

Jay-qu’s approach is correct, but appears to have a minor algebra mistake in the last step

[math]x=frac{v^{2}sin{2theta}}{g}[/math]

 

then rearranging for theta..

 

[math]theta=arcsin{frac{xg}{v^{2}}[/math]

Should end

 

[math]2 \theta = \arcsin{\frac{xg}{v^2}}[/math]

 

[math]\theta = \frac{\arcsin{\frac{xg}{v^2}}}2[/math]

 

Although this gives a correct solution [math]\theta[/math]to the problem for a given [math]x,v[/math] pair, it only gives 1 solution. The problem usually has 2 solutions, which can be solved for as follows, using only minimal trigonometry. I tend to use minimal trig, since I remember only the most basic trig identities, and need lots of time to derive the less basic ones – I would have been stuck for hours on the step in Jay’s algebra where he used the double-angle formula! :)

 

Starting with the basic equations for constant motion and motion under constant acceleration,

[math]x= v_x t[/math]

[math]y= \frac{g/2} t^2 +v_y t = 0[/math]

[math]v= \sqrt{v_x^2 +v_y^2}[/math]

Solving for [math]t[/math]

[math]t= \frac{x}{\sqrt{v^2 - v_y^2}}[/math]

Substituting back into the equation for [math]y = 0[/math],

[math]0 = \frac{g}2 \frac{x^2}{v^2 -v_y^2} +Vy \frac{x}{\sqrt{v^2 -v_y^2}}[/math]

Rearranging,

[math]0= -(v_y^2)^2 +v^2 v_y^2 -\left( \frac{g}2 \right)^2 x^2[/math]

Which can be solved for [math]v_y^2[/math] via the quadratic formula,

[math](v_y^2)^2 = \frac{v^2 \pm \sqrt{v^4 -4 \left( \frac{g}2 \right)^2 x^2}}2[/math]

Using a very basic trig identity, this gives solutions

[math]\theta = \arcsin \left( \sqrt{\frac{v^2 \pm \sqrt{v^4 -4 \left( \frac{g}2 \right)^2 x^2}}{2 v^2}} \right)[/math]

 

Interestingly, this formula give one solution exactly matching Jay-qu’s

[math]\theta = \frac{\arcsin{\frac{xg}{v^2}}}2[/math]

, and another of

[math]\theta= \frac{\Pi}2 -\frac{\arcsin{\frac{xg}{v^2}}}2[/math]

 

Of course, what fun is coming up will all these equations if we don’t actually stick them into a program and crank out some results? :) Via a simple 1-line MUMPS program, here some are, in radians and degrees:

f  R "x:",x," v:",v,! s g=-9.8,bd=(V**4-(g/2*x**2*4)**.5) f b=V**2+bd/2,V**2-bd/2  s vy=b**.5,a=(vy/v) w a," (",(a/*180,0,2),") ",v*(a)," ",vy,!
x:10 v:100
1.565896248358840118 (89.72)
.004900078436056539349 (0.28)
x:100 v:100
1.521717553207395267 (87.19)
.04907877358750135491 (2.81)
x:500 v:100
1.314751450327822736 (75.33)
.2560448764670738849 (14.67)
x:1020.4081632 v:100
.7854038202516979228 (45.00)
.7853925065431986966 (45.00)

All this points out an interesting, everyday ballistic characteristic – except for the case of the maximum range of a spring-launcher, cannon, hand toss, or whatever, there are two, and only two, possible trajectories to a target – a low one and a high one.

Posted

:wave2: forgot to carry the 2 :wave2:

 

I am having trouble visualising how it has 2 solutions, I see it mathematically ..

 

I would love to make a flash applet that would simulate projectile motion and the user being able to set some basic parameters, initial speed & angle - but I have no idea where to start with flash :(

Posted
I am having trouble visualising how it has 2 solutions, I see it mathematically ..
It’s pretty easy to grasp intuitively if you have handy something like a bow and arrow, or less ideally, a nerf gun (a lot more distracting air drag with the latter), which thow projectiles at fairly constant initial speeds. Put a target on the ground, and shoot ‘til you hit the target aiming at is as directly as possible. Then note that you can hit it by shooting high into the air – though this is harder, and usually takes more trys.

 

Attached is a quick & ugly graph of one of the examples from my post, the 75.33° and 14.67° one. Note that both trajectories have an initial projectile speed of 100 m/s, and hit a target 500 m away.

Posted

Jay don't feel too bad.

 

I once heard a very bright individual say after making a simple math error:

"I'm not a Mathematician, I'm an Arithmetician!"

 

... it mighta been PyroTex now that I think about it...

Posted
Jay don't feel too bad.

 

I once heard a very bright individual say after making a simple math error:

"I'm not a Mathematician, I'm an Arithmetician!"

 

... it mighta been PyroTex now that I think about it...

Thanks mate :interesting:

 

Yeah Craig after thinking about it that is what I suspected, shooting something at an angle of 45 degrees makes for max distance, one degree less or one degree more will shorten the horizontal distance but make for a higher or lower vertical distance :computerkeys:

Posted
...I once heard a very bright individual say after making a simple math error:

"I'm not a Mathematician, I'm an Arithmetician!"... it mighta been PyroTex now that I think about it...

Symbo,

 

I'll meet you out back. Bring the calculator of your choice.

 

And bring fresh batteries. You're gonna need 'em, pilgrim. :Exclamati

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...