general equation to find cubic polynomial from two minimums?

429 Views Asked by At

I tried researching and found that I can use a system of linear equations and solve by an inverse matrix to find the cubic equation given 4 points which satisfy the function f(x) of the general form $f(x)=ax^3+bx^2+cx+d$

I can also find a cubic of the form $ax^3 + d$ with no $x^2$ or $x$ term from 2 points, however I was wondering how one would go about finding a full general form cubic given only the minimum and maximum.

Example minimums could be (-1,4) and (2,3)

2

There are 2 best solutions below

0
On

Well, since the extrema are the roots of the derivate, it would be nice to have the minimum and the maximum (and an initial condition too.)

0
On

First find a quadratic that has zeros at the $x$-values of your points. Then integrate. Then adjust the constant to get the correct $y$-values. Using your example, we need a quadratic that passes through the points $(-1,0)$ and $(2,0)$. So it must have the form $g(x+1)(x-2) = gx^2-gx -2g$.

Integrate this to get $f(x) = \frac{g}{3}x^3-\frac{g}{2}x^2 - 2gx +C.$

The $y$-values of your points insist that $f(-1) = 4$ and $f(2) = 3$. This gives two linear equations:

$$f(-1) = -\frac{g}{3} - \frac{g}{2}+2g +C = 4$$ $$f(2) = \frac{8g}{3} -2g -4g+C = 3$$

which we can solve to get $g=\frac{1}{9}$ and $C=\frac{91}{27}$. This gives

$$f(x) = \frac{1}{27}x^3 -\frac{1}{18}x^2-\frac{2}{9}x +\frac{91}{27}.$$