I have a quadratic Bézier curve which starts at $P0(5,10)$ and ends at $P2(7,0)$. I know that the maximum x-value of the curve is supposed to be at $x = 10$ and that the y-value of the control point $P1$ is at $y_{P1} = \frac{y_{P0}-y_{P2}}{2} = 5$.
How do I find $x_{P1}$ given these information?
The formula for quadratic bezier curves is (according to Wikipedia): $B(t) = (1-t)^2P0 + 2(1-t)tP1 + t^2P2$
I know that one can calculate $t$ at the maximum x-value of the curve as: $t_{x(max)} = \frac{x_{P0}-x_{P1}}{x_{P0}-2x_{P1}+x_{P2}}$
Also, for a known value of $t$ and the according x-value $x_t$ on the bezier curve the x-value of the control point $x_{P1}$ can be calculated as following: $x_{P1} = \frac{x_t - (1-t)^2x_{P0}-t^2x_{P2}}{2(1-t)t}$
However, that's where my brain stops working. Is there a way to combine these formulas? Or do I have to approach this problem with an iterative algorithm where I try different values for $x_{P1}$ to find an approximate?
Example image to illustrate the problem
(Move P1 along the x-axis so that the dashed curve has a maximum x-value at x = 10)