Why doesn’t simultaneous equations work to find co-efficients of a cubic that passes through four points

algebra-precalculuscubicspolynomialssystems of equations

I'm trying to find the equation of a cubic that passes through three specific points (technically it's four but that point is y-intercept). The equation would look something like this:
$f(x)=ax^3+bx^2+cx+25.8$ (25.8 is the given y-intercept mentioned above)
The points are: $(0,25.8),(19.3,7.3),(48.9,30),(38.6,26)$
I set it up by starting with the first three equations:
$7.3=a19.3^3+b19.3^2+c19.3+25.8$
$30=a48.9^3+b48.9^2+c48.9+25.8$
$26=a38.6^3+b38.6^2+c38.6+25.8$
I have tried using three simultaneous equations but when I graph the function it only goes through the y-intercept (obviously) and one of the three points. Is there something I'm doing wrong or can I just not solve this that way?

Best Answer

$$\large\color{red}{\text{You do not learn anything using blindly any software !!!}}$$

Making the problem more gereral for four data points, the equations are $$y_1=a \,x_1^3+b \,x_1^2+c\, x_1+d \tag 1$$ $$y_2=a \,x_2^3+b \,x_2^2+c\, x_2+d \tag 2$$ $$y_3=a \,x_3^3+b \,x_3^2+c\, x_3+d \tag 3$$ $$y_4=a \,x_4^3+b \,x_4^2+c\, x_4+d \tag 4$$

So $$y_2-y_1=a(x_2^3-x_1^3)+b(x_2^2-x_1^2)+c(x_2-x_1)$$ $$y_3-y_2=a(x_3^3-x_2^3)+b(x_3^2-x_2^2)+c(x_3-x_2)$$ $$y_4-y_3=a(x_2^4-x_3^3)+b(x_4^2-x_3^2)+c(x_4-x_3)$$

Use the factorization and divide $$\color{red}{z_1}=\frac{y_2-y_1}{x_2-x_1}=a(x_2^2+x_1x_2+x_1^2)+b(x_2+x_1)+c \tag 5$$ $$\color{red}{z_2}=\frac{y_3-y_2}{x_3-x_2}=a(x_3^2+x_2x_3+x_2^2)+b(x_3+x_2)+c \tag 6$$ $$\color{red}{z_3}=\frac{y_4-y_3}{x_4-x_3}=a(x_4^2+x_3x_4+x_3^2)+b(x_4+x_3)+c \tag 7$$

Repeat the process $$\color{red}{w_1}=\frac{z_2-z_1}{x_3-x_1}=a(x_1+x_2+x_3)+b \tag 8$$ $$\color{red}{w_2}=\frac{z_3-z_2}{x_4-x_2}=a(x_2+x_3+x_4)+b \tag 9$$ One more step $$w_2-w_1=a(x_4-x_1) \qquad \implies \qquad \color{red}{a=\frac{w_2-w_1 }{x_4-x_1}} \tag {10}$$

Go back to $(9)$ to obtain $\color{red}{b}$; go back to $(7)$ to obtain $\color{red}{c}$; go back to $(4)$ to obtain $\color{red}{d}$.

$$\huge\color{red}{\text{End of the story}}$$