Determining the coefficients of $y = a x^2 + b x + c$ so that the graph contains three given points

279 Views Asked by At

Determine coefficients of the equation for a second order polynomial in the format: $y = a x^2 + b x + c$

Here are the $x$-$y$ coordinates of three points:

  1. $(0.8143,0.3500)$
  2. $(0.2435,0.1966)$
  3. $(0.9293,0.2511)$

What are the steps needed to solve this?

2

There are 2 best solutions below

5
On BEST ANSWER

Three equations in three unknowns $(a,b,c)$:

  • $y_1 = a x_1^2 + b x_1 + c$
  • $y_2 = a x_2^2 + b x_2 + c$
  • $y_3 = a x_3^2 + b x_3 + c$

$${\bf X} {\bf a} = \left( \begin{array}{ccc} x_1^2 & x_1 & 1 \\ x_2^2 & x_2 & 1 \\ x_3^2 & x_3 & 1 \\ \end{array}\right) \left( \begin{array}{c} a \\ b \\ c \end{array} \right) = \left( \begin{array}{c} y_1 \\ y_2 \\ y_3 \end{array} \right) = {\bf y}$$

You have all values except $a,b,c$, so use standard linear algebra:

$${\bf a} = {\bf X}^{-1} {\bf y}$$

[You might need to use pseudo-inverse, or regularize... but this is the basic approach.]

Result: $a = -1.64181, b = 2.00498, c = -0.194267$

enter image description here

0
On

Use Interpolation. $$y=f(a)\dfrac{(x-b)(x-c)}{(a-b)(a-c)}+f(b)\dfrac{(x-a)(x-c)}{(b-a)(b-c)}+f(c)\dfrac{(x-a)(x-b)}{(c-a)(c-b)}$$

Note that when you plug in $a$, the last two terms vanish and the coefficient normalizes to give $f(a)$ . The same holds for $b,c$.