Determine cubic function from 2 roots and a maximum.

1k Views Asked by At

If I am trying to find a cubic function with 3 real roots, and I know two of them, and one local maximum, is it possible?

Assuming my roots are $0.05$, $0.95$ and $u$, and my local maximum is $(i, j)$. Since a cubic takes the form $y = ax^3 + bx^2 + cx + d$:

$$ 0 = a(0.05^3) + b(0.05^2) + c(0.05) + d$$ $$ 0 = a(0.95^3) + b(0.95^2) + c(0.95) + d$$ $$ 0 = a(u^3) + b(u^2) + c(u) + d$$

My local maximum is where the derivative = $0$;

$$ 0 = 3ax^2 + 2bx + c $$

Of course, if I could calculate $u$, I could write the cubic in the form:

$$y = (x-0.05)(x-0.95)(x-u)$$

5

There are 5 best solutions below

2
On

Your first two equations are fine. To incorporate the information from the local maximum, you get $j=ai^3+bi^2+ci+d$ from the fact that $(i,j)$ is on the curve. From the derivative being zero you get $3ai^2+2bi+c=0$ You now have four equations in four unknowns. In your last equation you lost the overall factor $a$, but you don't need to use that one.

0
On

I'm not sure if I get this wrong. I assume you don't know i and j. Then:

If you think of the graphs of cubic functions, it should be clear that there can be very many functions complying to your conditions (e.g. by moving up or down along the y-axis).

If you do know i and j you get: - one more euqation from knowing that the first derivate at x=i is 0 - one more equation from knowing f(i) = j and you are fine

2
On

A cubic $f(x)$ can be expressed as $$f(x)=(x-r_1)(x-r_2)(x-r_3)$$ where the $r_i$'s are (not necessarily distinct) roots. Knowing $r_1$ and $r_2$, you can determine $r_3$ by differentiating $f(x)$ at $0$ and equating the resulting $f'(x)$ to your local maximum.

1
On

Given any cubic equation

$$f(x) = ax^3 + bx^2 + cx + d = a(x-\alpha)(x-\beta)(x-\gamma)$$

which you know $\alpha$ and $\beta$. If $f(x)$ reaches local maximum at $x_m$ with value $f(x_m) = m$, one has

$$f'(x_m) = 0 \quad\implies\quad \frac{f'(x_m)}{f(x_m)} = 0 \quad\implies\quad \frac{1}{x_m-\alpha}+\frac{1}{x_m-\beta}+\frac{1}{x_m-\gamma} = 0$$ This give us $\quad\displaystyle \gamma = x_m + \frac{1}{\frac{1}{x_m-\alpha} + \frac{1}{x_m-\beta}}$. Once you figure out what $\gamma$ is, then $f(x)$ is given by: $$f(x) = m \frac{(x-\alpha)(x-\beta)(x-\gamma)}{(x_m-\alpha)(x_m-\beta)(x_m-\gamma)}$$

0
On

Start with an equation of the form: $$y = a(x-r_{1})(x-r{_{2}})(x-r{_{3}})$$ or $$y = a(x^3 -(r_{1}+r_{2}+r_{3})x^2+(r_{1}r_{2}+r_{2}r_{3}+r_{3}r_{1})x-r_{1}r_{2}r_{3})$$ You have $r_{1}$ and $r_{2}$, and want to find $a$ and $r_{3}$.

The derivative condition at the known maximum $(x_{max},y_{max})$ will be $$a(3x_{max}^2-2(r_{1}+r_{2}+r_{3})x_{max}+(r_{1}r_{2}+r_{2}r_{3}+r_{3}r_{1}))\equiv0$$ Which is linear in $r_{3}$, so use your known $x_{max}$, $r_{1}$ and $r_{2}$ values to determine $r_{3}$. Once you have $r_{3}$, substitute $(x_{max},y_{max})$ into the first equation to find $a$.