# better method of solving quadratic / cubic

Problem :

Let \begin{align} f(x) &= x^4 - 8x^3 + 18x^2 \\ g(x) &= 9x^2 - 64x\end{align} . Define $$h : \mathbb{R}^+ \to \mathbb{R}$$, $$h(x)=f(x)-ag(x)$$ for some real number $$a$$.

If $$h(x)$$ has an inverse, find a maximum of $$a$$.

My Attempt :

The statement of this problem is easy : solving $$h'(x)\geq 0 \quad (x>0)$$ and this means $$4x^3 - 24x^2 + 2(18-9a)x + 64a \geq 0 \quad (x>0)$$ but this is quite messy. I tried to derivative $$h'(x)$$ once again and change problem to local minimum of $$h'(x)$$ is greater or equal to zero.

But root of $$h''(x) = 0$$ is very very messy, so I am trying to find a better method.

The reason why I suspect there is a better method is, WA says maximum is 2, which is nice answer.

Thanks for help.

• What do you mean? $h''(x)$ is just a quadratic.
– lulu
Commented Jul 16 at 12:57
• @lulu I mean, let me call a root of $h''(x) = 0$ as $k$, then $h'(k)$ is too messy, Commented Jul 16 at 13:00
• This might help: $h'(4)=16-8 a$ Commented Jul 16 at 15:21
• @Lozenges Can u give me some details? Commented Jul 16 at 19:57
• $h'(4) \ge 0$ implies $a \le 2$. Check that for $a=2$ , $h(x)$ has an inverse. see also the answer by @Anne Bauval Commented Jul 18 at 14:53

From your first derivative: $$h'(x)=4x^3-24x^2+2(18-9a)x+64a$$ We can rearrange this expression a bit: $$h'(x)=4x\{x^2-6x+9(2-a)\}+64a$$ $$=4x\{x^2-6x+9-9+9(2-a)\}+64a$$ $$4x\{(x-3)^2+9(2-a)-9\}+64a$$ Now, you need ensure that for $$x\geq 0$$, $$h'(x)>0$$. For that to happen, look at the expression of $$h'(x)$$. For $$x\geq 0$$, $$4x\geq 0$$ holds. Now, $$(x-3)$$ is always positive, no matter what the value of $$x$$ is. We just need to ensure that , the total expression $$(x-3)^2+9(2-a)-9$$ remains positive.

For that, consider the smallest value of $$(x-3)^2$$, that is $$9$$. Now, the value of the expression $$9(2-a)-9$$ must not be less than $$-9$$. If that remains true, then the value of the expression $$(x-3)^2+9(2-a)-9$$ always remains positive. Therefore, we get: $$9(2-a)-9\geq-9$$ $$a\leq2$$ Therefore, the maximum value of $$a$$ is $$2$$, that also makes the term $$64a$$ to be positive.

Thus, the expression $$h'(x)$$ always remains positive.

• why should I ignore that the first cubic term is negative and second term $64a$ is positive and (cubic) + $64a$ $\geq 0$? Commented Jul 16 at 18:44
• That's not the limiting case. I have studied the limiting case here. The case where, first cubic term is negative, second term is positive and the total expression is positive only happens for certain values of $x$ and $a$. If I have considered $a=3$, then for $x=1$ and $x=2$, the total expression is positive, but for $x=3$, it is not. Therefore, it is safe, to choose a certain criteria, where no matter what $x$ is, the cubic term is always positive along with the term $64a$. Commented Jul 17 at 7:03

$$h'(x)\ge0$$ for every $$x>0$$ iff

• either $$h'$$ has one or three (not necessarily distinct) real roots, all $$\le0$$,
• or $$h'(x)=4(x-\alpha)(x-\beta)^2$$ with $$\alpha\le0$$.

In the first case, the product $$-16a$$ of the three roots (in $$\Bbb C$$, and not necessarily distinct) must be $$\le0$$, i.e. $$a$$ must be $$\ge0$$. But the second case allows larger values for $$a$$. It happens when the discriminant of $$h'$$ is $$0$$. This (after some tedious calculations) is equivalent to $$a=2\text{ or }0\text{ or }-\frac{10}{27}.$$ $$a=2$$ is convenient since for this value, $$h'(x)=4(x+2)(x-4)^2$$.

Verification that the two other roots of the discriminant are indeed $$0$$ and $$-\frac{10}{27}$$:

• for $$a=0$$, $$h'(x)=4x(x-3)^2$$;
• for $$a=-\frac{10}{27}$$, $$h'(x)=4\left(x-\frac{10}3\right)\left(x-\frac43\right)^2$$.