Finding the values of coefficients on trinomials of any degree such that the graph contains three given points

40 Views Asked by At

I was going through a textbook when i encountered a problem as such: given an equation $y= ax^m+bx^n+cx^p$ and 3 points, $(x_1,y_1), (x_2,y_2),(x_3,y_3)$, find the values of a, b , and c such that the graph of the equation contains the three points for any values of m,n, and p.

The problem was part of a unit on matrices and so i mapped the problem to the following matrices: $$ A=\begin{pmatrix} ax_1^m &bx_1^n&cx_1^p\\ ax_2^m &bx_2^n&cx_2^p\\ ax_3^m &bx_3^n&cx_3^p \end{pmatrix} B= \begin{pmatrix}y_1\\y_2\\y_3\end{pmatrix} X=\begin{pmatrix}a\\b\\c\end{pmatrix}$$ Then I used Cramer's rule to find the values of a, b, and c getting:$$a= \frac{ (y_1)(x_2^nx_3^p-x_3^nx_2^p)-(x_1)^n(y_2x_3^p-y_3x_2^p)+(x_1)^p(y_2x_3^n-y_3x_2^n)}{ (x_1)^m(x_2^nx_3^p-x_3^nx_2^p)-(x_1)^n(x_2^mx_3^p-x_3^mx_2^p)+(x_1)^p(x_2^mx_3^n-x_3^mx_2^n)}$$

$$ b=\frac{(x_1)^m(y_2x_3^p-y_3x_2^p)-(y_1)(x_2^mx_3^p-x_3^mx_2^p)+(x_1)^p(y_3x_2^m-y_2x_3^m) }{(x_1)^m(x_2^nx_3^p-x_3^nx_2^p)-(x_1)^n(x_2^mx_3^p-x_3^mx_2^p)+(x_1)^p(x_2^mx_3^n-x_3^mx_2^n) }$$

$$ c= \frac{(x_1)^m(y_3x_2^n-y_2x_3^n)-(x_1)^n(y_3x_2^m-y_2x_3^m)+(y_1)(x_2^mx_3^n-x_3^mx_2^n)}{ (x_1)^m(x_2^nx_3^p-x_3^nx_2^p)-(x_1)^n(x_2^mx_3^p-x_3^mx_2^p)+(x_1)^p(x_2^mx_3^n-x_3^mx_2^n)} $$

$$ \begin{pmatrix} a\\ b\\ c\\ \end{pmatrix} =\begin{pmatrix}\frac{(y_1)(x_2^nx_3^p-x_3^nx_2^p)-(x_1)^n(y_2x_3^p-y_3x_2^p)+(x_1)^p(y_2x_3^n-y_3x_2^n)}{ (x_1)^m(x_2^nx_3^p-x_3^nx_2^p)-(x_1)^n(x_2^mx_3^p-x_3^mx_2^p)+(x_1)^p(x_2^mx_3^n-x_3^mx_2^n)}\\ \frac{(x_1)^m(y_2x_3^p-y_3x_2^p)-(y_1)(x_2^mx_3^p-x_3^mx_2^p)+(x_1)^p(y_3x_2^m-y_2x_3^m)}{(x_1)^m(x_2^nx_3^p-x_3^nx_2^p)-(x_1)^n(x_2^mx_3^p-x_3^mx_2^p)+(x_1)^p(x_2^mx_3^n-x_3^mx_2^n)}\\ \frac{(x_1)^m(y_3x_2^n-y_2x_3^n)-(x_1)^n(y_3x_2^m-y_2x_3^m)+(y_1)(x_2^mx_3^n-x_3^mx_2^n)} {(x_1)^m(x_2^nx_3^p-x_3^nx_2^p)-(x_1)^n(x_2^mx_3^p-x_3^mx_2^p)+(x_1)^p(x_2^mx_3^n-x_3^mx_2^n)}\end{pmatrix} $$ This solution worked when I plugged in different possible values into the equation. Then I programed this equation in python and calculated more values. It worked for all possible values; however,using (0,0) as a possible point, even though it is on the graph, resulted in the program and equation failing to result in a value for a, b, c.

My question is why this is the case and if there is a more elegant and/or easier way to find a, b, and c?