# Derivatives and functions and maxima

Let

$$f(x)=\left\{% \begin{array}{ll} x^3-x^2+10x-5,& x\leq 1 \\ -2x+\log_2 (b^2-2),& x>1 \\ \end{array}% \right.$$

Find all possible real values of $b$ such that $f(x)$ has the greatest value at $x=1$.

How do I proceed? I tried checking LHL=RHL, but I'm getting $b=\pm \sqrt{130}$. The answer is given as $b \in [-\sqrt{130},-2] \cup[\sqrt{2},\sqrt{130}]$.

• As the function is defined in two parts such that $x=1$ lies in the upper equation should you not use this one? – Henry Lee Aug 5 '18 at 14:53

$$(x^3-x^2+10x-5)'=3x^2-2x+10>0$$ and it's obvious that $f$ decreases on $(1,+\infty).$
Thus, we need $$-2\cdot1+\log_2(b^2-2)\leq f(1)$$ or $$\log_2(b^2-2)\leq7$$ or $$0<b^2-2\leq128$$ or $$[-\sqrt{130},-\sqrt2)\cup(\sqrt2,\sqrt{130}].$$
• How does modifying the parameter $b$ change the value of $f(x)$ at $x=1$? The function $f$ does not depend on $b$ for $x \leq 1$. – Sambo Aug 5 '18 at 20:35
• @Sambo For $x\leq1$ $f$ increases. See better my solution. – Michael Rozenberg Aug 5 '18 at 20:38
• Oh, I understand my confusion. I understood the question as "what value of $b$ maximizes $f(1)$", as opposed to "what value of $b$ ensures that the global maximum of $f$ is at $x=1$". – Sambo Aug 5 '18 at 22:14