Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am programming a ball falling down from a cliff and bouncing back. The physics can be ignored and I want to use a simple $y = ax^2$ parabola to draw the falling ball.

I have given two points, the edge of the cliff at $C(-0.9; 0.8)$ and the point where the ball hits the bottom $B(0.1; -1.05)$. Due to its symmetry we know there is another point at $A(-1.9; -1.05)$. So that are 3 points I could work with. $C$ is the vertex.

I've tried this approach but my parabola is not as exact as I need it to estimate for example the intersects with the x- or y-axis.

As the legs of the parabola are down, all I can tell is that $a$ is negative:

$$ y = ax^2 + bx +c; a < 0 $$

I tried drawing it in Excel which allows to add an polynomial trendline. This is the best approximation I could do so far (dotted line).

enter image description here

But I need the function. Is it somehow possible to calculate the equation somehow?

share|cite|improve this question
up vote 3 down vote accepted

Yes, we can find the equation for the parabola with the given information.

In this problem there are three unknowns, the coefficients $a,b$ and $c$ so to find them we will need three pieces of information. In this case we know that the parabola must pass through the three given points.

Substitute the given points into the equation for the parabola. Then:

$$ 0.8 = a(-0.9)^2 + b(-0.9) + c, $$ $$ -1.05 = a(0.1)^2 + b(0.1) + c, $$ $$ -1.05 = a(-1.9)^2 + b(-1.9) + c.$$

This is a system of three equations for three unknowns which we can solve in the following way.

From the first equation we can write $c = 0.8 - a(-0.9)^2 - b(-0.9).$ This expression for $c$ can be substituted into the second and third equations. Then:

$$ -1.85 = a\left[(0.1)^2 - (-0.9)^2\right] + b(-0.8), $$ $$ -1.85 = a\left[(-1.9)^2-(-0.9)^2\right] + b(-2.8) + 0.8.$$

From the first of these expressions $b = -\left[-1.85 - a\left[(0.1)^2 - (-0.9)^2\right]\right/0.8$

Substitute this into the final expression and solve for $a$, then $b$, then $c$. In this case:

$$a = -1.850,$$ $$b = -3.330,$$ $$c = -0.6985.$$

share|cite|improve this answer
Ah, thanks that worked! – 5chdn May 29 '13 at 7:00

Linear equation is the way to go. If you work it all out you'll get formulas for coefficients below: $$ a = \frac{y_2(x_3 - x_1) - y_1(x_3 - x_2) - y_3(x_2 - x_1)}{x_1^2(x_2 - x_3)-x_3^2(x_2-x_1)-x_2^2(x_1-x_3)} $$ $$ b = \frac{y_2 - y_1 + a(x_1^2 - x_2^2)}{x_2 - x_1} $$ $$ c = -ax_1^2 - bx_1 + y_1 $$

share|cite|improve this answer

Solve the system of linear equations $$\begin{cases} ax_1^2 + bx_1 +c=y_1; \\ ax_2^2 + bx_2 +c=y_2; \\ ax_3^2 + bx_3 +c=y_3; \end{cases}$$ w.r.t. unknown variables $a,\ b,\ c.$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.