I need an equation for a parabola that starts at the origin, has a peak of $P$, and has a $y$-value of $M$ when $x = T$, where $0 \leq M \leq P$.
I know how to describe this when $M = 0$:
$$Q = \frac{P}{(T/2)^2}$$
and
$$y = -Qx^2 - QTx.$$
I used an online graphing calculator to confirm this: https://www.desmos.com/calculator/16rf9h1myy
However, I can't figure out how to work $M$ into the equation. Please help.
There are 2 parabolas possible (graphing will give you a visual picture). First, the equation of the parabola has to be $$y=f(x)=-a(x-b)^2+c$$ where I have used a negative sign before the square term and specified $a>0$ because we know that the parabola has a peak (i.e., it is downward facing). We need to find out $a$,$b$ and $c$.
Since the peak has to be reached at $x=b$, we have $P=y(b)=c$. Having found $c$, we have two conditions to help us determine $a$ and $b$. $$f(0)=0 \Longrightarrow ab^2=P$$ Finally $$f(T)=M \Longrightarrow Mb^2 - 2TPb +PT^2=0$$ Solving for $b$ here we get $$b=\frac{TP}{M}\left(1 \pm \sqrt{1-\frac{M}{P}}\right)$$ Having found $c$ and $b$, we know $a=\frac{P}{b^2}$. These two values of $b$ show the 2 parabolas, one with peak to the left of $x=T$ and another to the right.