Mister T said:
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.