1. ## Fit Quadratic to 2 points and 1 condition

Hi,

I was hoping to get some advice on the best way to handle this problem. When fitting a quadratic with 3 points, I use a matrix approach to evaluate the coefficients which works nicely. In this case, I have only 2 points but an extra condition. I tried to evaluate the coefficients by simultaneous equations but this was painfully slow and I did not get the right equation.

The conditions are:

$\begin{matrix}
x=0 & y=0 \\
x=12 & y=70 \\
\frac{dy}{dx}=0 & y=-70 \\
\end{matrix}

$

$
y=2.1012x^2 -19.3805x
$

Which satisfies the first 2 conditions but not the third. Any advice on the easiest way to go about this would be greatly appreciated.

Regards Elbarto

2. Originally Posted by elbarto
Hi,

I was hoping to get some advice on the best way to handle this problem. When fitting a quadratic with 3 points, I use a matrix approach to evaluate the coefficients which works nicely. In this case, I have only 2 points but an extra condition. I tried to evaluate the coefficients by simultaneous equations but this was painfully slow and I did not get the right equation.

The conditions are:

$\begin{matrix}
x=0 & y=0 \\
x=12 & y=70 \\
\frac{dy}{dx}=0 & y=-70 \\
\end{matrix}

$

$
y=2.1012x^2 -19.3805x
$

Which satisfies the first 2 conditions but not the third. Any advice on the easiest way to go about this would be greatly appreciated.

Regards Elbarto
(0, 0): y = ax^2 + bx.

(12, 70): 70 = 144a + 12b => 25 = 72a + 6b

dy/dx = 2ax + b = 0 => x = -b/(2a). Substitute into y = ax^2 + bx to get y in terms of a and b. Equate this to -70. This gives a second equation.

Solve the two equations for a and b.

3. Thank you for the reply. This is the approach I used, though I suspect that I made a calculation error when evaluating the 2 equations.

Thanks again for your time, I will attempt to revise my calculations.

Regards Elbarto