I am writing a computer program that needs to be able to find positions in parabolic arcs.
I need to calculate the position of a projectile after traveling a given distance. I have $X_0, Y_0, X_1, Y_1$, and $Y_{max}$. What is the equation I would use to find $Y$ at a given $X$ value?
Since this is for a computer program, the answer should be in the form of a single equation. It may be assumed that the initial variables are valid.
Use the equation
$y=a(x-h)^2+k$
for a parabola with turning point (vertex) $(h,k)$
Substituting $Y_{max}$ for k gives
$$y=a(x-h)^2+Y_{max}$$
Now, substituting the pairs of points $(X_0,Y_0)$ and $(X_1,Y_1)$ gives the simultaneous equations
$$\begin{cases} Y_0=a(X_0-h)^2+Y_{max} \\ Y_1=a(X_1-h)^2+Y_{max} \end{cases}$$
Solving this simultaneous should give you the values of $h$ and $a$ in terms of $X_0,Y_0,X_1,Y_1$ and $Y_{max}$, which can then be plugged into the turning point equation to give the equation of the parabola. This equation can then be used to calculate any $Y$ for a given $X$ value.
Update: Rearranging the equation $$Y_0=a(X_0-h)^2+Y_{max}$$ gives $$\frac{Y_0-Y_{max}}{a}=(X_0-h)^2$$ Since the right hand side of this equation is positive, if
$Y_0-Y_{max}<0$ , then $a<0$.
On the other hand, if
$Y_0-Y_{max}>0$, then $a>0$.
This should eliminate one of the two solutions to the simultaneous equation.