# I Trajectory of a Projectile that must clear an obstruction

#### tchpowdog

I am trying to solve for Vy with given Vx. I know how to do this for the BLUE trajectory line, but I do not know how to solve this if there is an obstruction in the way (like the gray wall).

My givens are:
X1
X2
Y1
Y2
Vx
Gravity

Do I need to solve for the blue trajectory then adjust that for the red trajectory? If so, wouldn't I be adjusting both Vx and Vy in that case? How do I do that?

It's possible this is very simple and I'm just not seeing it lol Also, I'm not concerned about the angle of projection here, I am literally trying to solve for the X and Y components of the initial Velocity. So unless it's absolutely necessary, let's try to keep Trigonometry out of this. (Me and Trig aren't friends)

ETA: I am also not concerned about time (t).
ETA: Do not assume Y2 is the max height of the trajectory, It's only the height of the wall. So X1 could be really small while X2 is really large - placing the wall really close to the projectile's initial position.

#### Attachments

• 46 KB Views: 1,161
Last edited:
Related Other Physics Topics News on Phys.org

#### tchpowdog

Hi !
Your question is not clear . Kindly edit it and form it into a suitable question .
-KB
Did my image not post? It should make it clear.

How do I solve for Vy so that the projectile clears the X1/Y2 point and still hits it's target?

#### Mark44

Mentor
View attachment 219154
I am trying to solve for Vy with given Vx. I know how to do this for the BLUE trajectory line, but I do not know how to solve this if there is an obstruction in the way (like the gray wall).

My givens are:
X1
X2
Y1
Y2
Vx
Gravity

Do I need to solve for the blue trajectory then adjust that for the red trajectory?
No, that probably wouldn't work.
tchpowdog said:
If so, wouldn't I be adjusting both Vx and Vy in that case? How do I do that?

It's possible this is very simple and I'm just not seeing it lol Also, I'm not concerned about the angle of projection here, I am literally trying to solve for the X and Y components of the initial Velocity. So unless it's absolutely necessary, let's try to keep Trigonometry out of this. (Me and Trig aren't friends)
I don't see how you can keep trig out of this.
Using simplifying assumptions, i.e., that air resistance can be neglected, the arc of the trajectory is parabolic. With no air resistance, the projectile's horizontal velocity doesn't change, so the only force on the projectile is that due to gravity. With some simple physics and trig, you can work out the equation of the parabola that the projectile follows.
tchpowdog said:
ETA: I am also not concerned about time (t).
Time plays a definite role here. When the projectile's vertical height is zero (ground level), that gives you a point on the parabola.
tchpowdog said:
ETA: Do not assume Y2 is the max height of the trajectory, It's only the height of the wall. So X1 could be really small while X2 is really large - placing the wall really close to the projectile's initial position.

#### Doc Al

Mentor
Can you write expressions for the vertical and horizontal positions as functions of time? When the projectile reaches x1, what must be its vertical position? That should give you all you need to solve for Vy.

#### tchpowdog

Can you write expressions for the vertical and horizontal positions as functions of time? When the projectile reaches x1, what must be its vertical position? That should give you all you need to solve for Vy.
Yes, I am calculating the blue trajectory based on functions of time and I believe this is the correct route to take, however, solving for Vy for X1 only does not consider the required X2 value. In other words, solving for Vy with required X1 and delta Y, the projectile would clear the wall but "landing where it lands". The projectile still needs to hit it's target, the given X2 still needs to play it's role. This is why I asked if the Vx would have to be adjusted. So how would I factor that in? I don't think I could simply solve for a new Vx based on the new calculated Vy.

#### tchpowdog

When the projectile reaches x1, what must be its vertical position?
This is what is not true in my scenario. The projectile's height shouldn't be EQUAL to y2 at x1, the projectile's height just has to be GREATER than y2 at x1 so that it clears the wall AND hits it's x2 requirement.

So how do I do that?

(I just realized there was a sub script button lol)

#### Khashishi

It should be obvious that the solutions that go over the bar are just a subset of all of the "blue" solutions which you have already solved. You just have to find the set of vx, vy such that it barely crosses the bar. And it should be obvious that any solution with a lower vx will also cross the bar. So just set up a system of equations.
vx * t = x1
vy * t - 1/2 g t^2 = y2
You already know vy as a function of vx.

#### tchpowdog

It should be obvious that the solutions that go over the bar are just a subset of all of the "blue" solutions which you have already solved. You just have to find the set of vx, vy such that it barely crosses the bar. And it should be obvious that any solution with a lower vx will also cross the bar. So just set up a system of equations.
vx * t = x1
vy * t - 1/2 g t^2 = y2
You already know vy as a function of vx.
I think the problem with this is that x1 and x2 are not constant. They are variables that will have different inputs Everytime I run the equation in my program.

Again, with given Vx, x1, x2, h1, and h2 - how do I solve for Vy so that the projectile clears the wall and lands at it's x2 position?

#### Andy Resnick

I am trying to solve for Vy with given Vx. I know how to do this for the BLUE trajectory line, but I do not know how to solve this if there is an obstruction in the way (like the gray wall).

It's possible this is very simple and I'm just not seeing it lol Also, I'm not concerned about the angle of projection here, I am literally trying to solve for the X and Y components of the initial Velocity. So unless it's absolutely necessary, let's try to keep Trigonometry out of this. (Me and Trig aren't friends)
As it happens, I was just working out a similar problem to discuss in class- in my case, it was kicking a field goal; the ball has to clear the crossbar.

My first step was to combine the projectile motion equations for x(t) and y(t) into a single expression y(x). You should be able to do that, and it's easier if you do that in terms of the speed v and launch angle θ rather than the velocity components Vx and Vy.

Now you have three specified points on the trajectory: the start point (0,y1), (x1, y2), and (x1+x2, 0). That is enough information to solve for v and θ, and since you know Vx, you can get Vy.. Unfortunately, y(x) is a transcendental equation in θ, so you'll need to solve the equation numerically (I used Mathematica).

Edit: because you have specified 3 points, you have an overdetermined system- there may not be a v and θ that generates your trajectory.

Last edited:

#### Khashishi

Again, with given Vx, x1, x2, h1, and h2 - how do I solve for Vy so that the projectile clears the wall and lands at it's x2 position?
Didn't you say you know how to calculate the blue solution? Please show your work for that.

#### tchpowdog

Edit: because you have specified 3 points, you have an overdetermined system- there may not be a v and θ that generates your trajectory.
I have no desire to specify 3 points though.
Point A - (0,y1) specified
Point B - (x1, >y2) y component is unknown
Point C - (x2,0) specified

The y component of Point B is an unknown variable and I don't care what it is along as it's greater than y2

Last edited:

#### tchpowdog

Didn't you say you know how to calculate the blue solution? Please show your work for that.
Δx = Vxt
t = Δx/Vx

Δy = ½gt2 + Vyt

Δy = ½gt2 + VyΔx/Vx

Solve for Vy. All other variables or known.

#### Mister T

Gold Member
Δy = ½gt2 + VyΔx/Vx

Solve for Vy. All other variables or known.
Show us, we need to see how you do it.

#### tchpowdog

Show us, we need to see how you do it.
... why??

Δy = ½gt2 + VyΔx/Vx

Δy ⋅ 2Vx = ½gt2 ⋅ 2Vx + VyΔx/Vx ⋅ 2Vx

2VxΔy = Vxgt2 + 2VyΔx

2VxΔy - Vxgt2 = Vxgt2 + 2VyΔx - Vxgt2

2VxΔy - Vxgt2 = 2VyΔx

Factor...

Vx(2Δy - gt2) = 2VyΔx

Vx = 2VyΔx / (2Δy - gt2)

I'll go ahead and shame you now if you try to point out a typo in all that...

ETA: I just realized I solved for Vx here instead of Vy... BUT it doesn't matter because this doesn't address my issue anyway.

Last edited:

#### Khashishi

You are supposed to show a relationship for $v_y$ in terms of $v_x$ such that the trajectory hits the point (x1+x2,0). I don't see that in your result. You said you know how to solve the blue trajectory.

#### tchpowdog

You are supposed to show a relationship for $v_y$ in terms of $v_x$ such that the trajectory hits the point (x1+x2,0). I don't see that in your result. You said you know how to solve the blue trajectory.
<Rude comment deleted by mentor.>

I don't care about the blue line, it's only there to show that the scenarios are different. If you don't want to help with the actual problem then stop replying, please.

Last edited by a moderator:

#### Doc Al

Mentor
This is what is not true in my scenario. The projectile's height shouldn't be EQUAL to y2 at x1, the projectile's height just has to be GREATER than y2 at x1 so that it clears the wall AND hits it's x2 requirement.
Well, if I wanted to find the range of Vy that makes the height greater than y2 at x1 I would first find the value that makes the height equal to y2.

#### Mister T

Gold Member
I don't care about the blue line, it's only there to show that the scenarios are different.
Okay, so if we start over ignoring the blue line, what do we have? Looking at your figure we are given $x_1, x_2, y_1,$ and $y_2$. We know nothing about $v_x$ or $v_y$ as they are defined using the blue line, but if we instead assume they are the x- and y-components of the initial velocity of a projectile that follows the red line, it appears you want to be able to solve for $v_y$ given $v_x$. I don't understand why you can't do that the same way you did it for the blue line. That is why I asked you to show us how you're doing it for the blue line. Because I would then just do it the same way for the red line.

The red line is a parabola that passes through the points $(0, y_1), (x_1, y_2), (x_1+x_2, 0)$. Aren't three points enough to define any parabola? In other words, there is only one parabola that passes through any three points.

#### tchpowdog

Okay, so if we start over ignoring the blue line, what do we have? Looking at your figure we are given $x_1, x_2, y_1,$ and $y_2$. We know nothing about $v_x$ or $v_y$ as they are defined using the blue line, but if we instead assume they are the x- and y-components of the initial velocity of a projectile that follows the red line, it appears you want to be able to solve for $v_y$ given $v_x$. I don't understand why you can't do that the same way you did it for the blue line. That is why I asked you to show us how you're doing it for the blue line. Because I would then just do it the same way for the red line.

The red line is a parabola that passes through the points $(0, y_1), (x_1, y_2), (x_1+x_2, 0)$. Aren't three points enough to define any parabola? In other words, there is only one parabola that passes through any three points.
I am solving the blue line based on the kinematic equations for time (time in the x direction, time in the y direction). When doing that, I have a given Vx, distance, and height - so solving for Vy is pretty simple. But when I introduce the wall (which can be anywhere between point A and B), it gets more complicated (to me anyways). My experience with this is extremely limited. I'm a software developer lol we don't need to know this stuff.

So if I went the 3-point parabola way, could you give me some info on that? Seems I'd have to form the equation and get a tangent line at my point A? Then derive the x and y components from that?

#### tchpowdog

Okay, so if we start over ignoring the blue line, what do we have? Looking at your figure we are given $x_1, x_2, y_1,$ and $y_2$. We know nothing about $v_x$ or $v_y$ as they are defined using the blue line, but if we instead assume they are the x- and y-components of the initial velocity of a projectile that follows the red line, it appears you want to be able to solve for $v_y$ given $v_x$. I don't understand why you can't do that the same way you did it for the blue line. That is why I asked you to show us how you're doing it for the blue line. Because I would then just do it the same way for the red line.

The red line is a parabola that passes through the points $(0, y_1), (x_1, y_2), (x_1+x_2, 0)$. Aren't three points enough to define any parabola? In other words, there is only one parabola that passes through any three points.
So I was able to get my "a" and "b" coefficients to form a parabolic equation and I verified that they are correct values for my given points. From here, I know how to get the slope by taking the first derivative, but what do I do after that?

equation:
y = ax2 + bx + c
y' = 2ax + b ← what does this actually give me and how do I get Vx and Vy out of it?

#### Mister T

Gold Member
I am solving the blue line based on the kinematic equations for time (time in the x direction, time in the y direction).
Are you referring to these equations:

$x=x_o+v_ot$
$y=y_o+v_ot-\frac{1}{2}gt^2$.

They give you the position as a function of time. You can, for example, solve the first one for $t$ and substitute that into the second one. That will give you the equation of the parabola. You can then compare that to the equation of the parabola you derived from the three points and determine the values of the coefficients $a$, $b$, and $c$.

You then also have the equations for velocity as a function of time:

$v_x=v_{ox}$
$v_y=v_{oy}-gt$.

Note that $\tan\theta=\frac{v_y}{v_x}$.

But when I introduce the wall (which can be anywhere between point A and B), it gets more complicated (to me anyways).
Yeah, that's the part I don't understand. That's why I asked you to show us your work for the blue line. But when you did that someone responded pointing out that what you'd done wasn't what you'd claimed it was and your response was to tell us to ignore the blue line.

I'm a software developer lol we don't need to know this stuff.
Please use use LaTeX to encode your equations. It will make them easier to read. To see an example of how to do that just quote mine in your reply and you'll be able to see how I did it.

So if I went the 3-point parabola way, could you give me some info on that? Seems I'd have to form the equation and get a tangent line at my point A? Then derive the x and y components from that?
Yes, see above.

#### tchpowdog

Okay, so if we start over ignoring the blue line, what do we have? Looking at your figure we are given $x_1, x_2, y_1,$ and $y_2$. We know nothing about $v_x$ or $v_y$ as they are defined using the blue line, but if we instead assume they are the x- and y-components of the initial velocity of a projectile that follows the red line, it appears you want to be able to solve for $v_y$ given $v_x$. I don't understand why you can't do that the same way you did it for the blue line. That is why I asked you to show us how you're doing it for the blue line. Because I would then just do it the same way for the red line.

The red line is a parabola that passes through the points $(0, y_1), (x_1, y_2), (x_1+x_2, 0)$. Aren't three points enough to define any parabola? In other words, there is only one parabola that passes through any three points.
So I have figured all of this out. I had to change my approach a bit. In this scenario, $V_x$ and $V_y$ are both unknowns, so is angle ∅. With a given $V_x$, you can either ensure that you clear the wall OR ensure that you hit your mark, but you can't do both. The parabola with 3 points solved this beautifully. Here was my approach.

At the point of launch of the projectile, I grab my 3 points:
$(x_1, y_1), (x_2, y_2), (x_3, y_3)$

For the given quadratic equation: $y = ax^2 + bx + c$
I calculated the coefficients "a" and "b" using these two very ugly formulas:

$a = \frac{x_3(y_2-y_1) + x_2(y_1-y_3) + x_1(y_3-y_2)}{(x_1-x_2)(x_1-x_3)(x_2-x_3)}$

$b =\frac{x_1^2(y_2-y_3) + x_3^2(y_1-y_2) + x_2^2(y_3-y_1)}{(x_1-x_2)(x_1-x_3)(x_2-x_3)}$

Now I have my parabolic equation. From this, I find the tangent line at point $(x_1,y_1)$ by taking the derivative of my equation, finding the slope, pluggin that back, etc. From here, I can calculate an angle ∅ of the initial trajectory.

To get the required $V_x$ and $V_y$, I find the max y value of my equation by evaluating the derivative where slope = 0. This gives me the max height of my trajectory.

Now I can use the following kinematic equation to find Vi, which I can further break down into it's $V_x$ and $V_y$ components given my angle ∅.
$maxHeight = \frac{V_i^2sin^2∅}{|2g|}$

All of this works beautifully and no matter what my $x_1$ and $x_2$ values are, the projectile always clears the wall AND hits it's mark.

Thanks to everyone who gave valuable insight. And special thanks to Mister T.

Last edited:

#### Mister T

Gold Member
y' = 2ax + b ← what does this actually give me and how do I get Vx and Vy out of it?
$y'$ is the slope of the parabola at that point, which is equal to $\tan \theta$ which is, in turn, equal to $\frac{v_y}{v_x}$.

#### Andy Resnick

I have no desire to specify 3 points though.
Point A - (0,y1) specified
Point B - (x1, >y2) y component is unknown
Point C - (x2,0) specified

The y component of Point B is an unknown variable and I don't care what it is along as it's greater than y2

Oh- ok, then you should be able to find solutions in the way I outlined earlier: I needed to solve the problem numerically.

"Trajectory of a Projectile that must clear an obstruction"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving