Projectile motion plot in Mathematica showing wrong results

1 reply · 2K views · last reply
Saptarshi Sarkar
Messages
98
Reaction score
13
Homework Statement
Consider the situation demonstrated in the image below. A man standing a distance L away from the cliff throws a ball with speed v at an angle ϕ with the vertical. Height of the cliff is H and its slope makes an angle θ with the horizontal.

After laying down a suitable coordinate system

(a) Find the equation of the trajectory of the ball.
(b) Find the equation of the slope of the hill.
(c) Non-dimensionalize both the equations. How many free parameters are left in the problem?
(d) Construct a Manipulate command by varying all the free parameters in a suitable range. Play with parameters to find out in what cases you have ball land somewhere on the slope. What is the condition for which ball will hit the edge of the cliff (top of the cliff).
(e) Validate your observations in part (d) by doing algebraic calculations.
Relevant Equations
##y_{ball}=ax^2+bx+c##
##y_{cliff}=dx+e##
The question is

Diagram of a man on the left throwing a ball from height h at speed v and angle phi from the vertical, over horizontal distance L to a blue cliff of height H whose slope makes angle theta with the horizontal.


I have tried solving this problem several times over several days but each time the plot I get gets weird. Can someone please check what I did wrong?

My attempt is attached below (I did not non-dimensionalize it as I wanted to first check if my code works)

Handwritten derivation for projectile motion over a hill, with a side diagram showing a ball launched at speed v and angle phi from a cliff of height h, reaching height H at horizontal distance L, and a hill slope angle theta; equations include y_ball = ax^2 + bx + c, y_cliff = dx + e, and solved expressions for a, b and c.


Handwritten equation: y_ball = (-g x^2)/(2 v^2 sin^2 phi) + cot phi x - (2 g L x)/(2 v^2 sin^2 phi) + h - (g L^2)/(2 v^2 sin^2 phi) + L cot phi, and below it y_cliff = -x tan theta + H.


The Mathematica code I wrote is

Manipulate[Plot[{((-9.8 x^2)/(2 (v Sin [\[CapitalPhi]])^2)) + Cot[\[CapitalPhi]] x - ((9.8 L*x)/(v Sin [\[CapitalPhi]])^2) + h - ((9.8 L)^2)/(2 (v Sin [\[CapitalPhi]])^2) + L Cot[\[CapitalPhi]], -x Tan[\[CapitalTheta]] + H}, {x, -10, 10}, PlotRange -> {0, 20}], {v, 1, 10}, {\[CapitalPhi], 0.001, Pi/2}, {L,0, 10}, {h, 0, 10}, {H, 0, 10}, {\[CapitalTheta], 0, Pi/2}]

Please Help!

You can get the lecture notes here, which contains a similar solved example on page 5.

 
I would find the equation of the trajectory of the ball with its launch point as the origin. That must be simplest. You can always change the origin afterwards.

It looks like that's what you have but you've expanded ##(x - L)^2## and ##(y-h)##. If you sort that out then your equation should simplify.
 
  • Informative
Likes   Reactions: Saptarshi Sarkar