What is the value of relative maximum of the function $f(x)=\dfrac{x^2+2x-3}{x^2+1}$ ?
$1)-1+\sqrt5\qquad\qquad2)1+\sqrt5\qquad\qquad3)-1+\sqrt3\qquad\qquad4)1+\sqrt3$
It is a problem from a timed exam so I'm looking for the fastest approaches. Here is my approach:
First I tried taking derivative of the function and equate it to zero, but I realized by doing that I should solve a third degree equation because the degree of numerator is $2$. So I decided to write the fraction as:
$$f(x)=\dfrac{x^2+1+2x-4}{x^2+1}=1+\frac{2x-4}{x^2+1}$$ Hence it is easier to take derivative:
$$f'(x)=0\Rightarrow f'(x)=\dfrac{2x^2+2-4x^2+8x}{x^2+1}=0$$So we have $-x^2+4x+1=0\Rightarrow x=2\pm\sqrt5$. And from here by using Wolfram Alpha I got maximum is $\sqrt5-1$ at $2+\sqrt5$ and minimum is $-1-\sqrt5$ at $2-\sqrt5$.
But this approach takes much time (specially at the end) and it is not suitable for these kinds of exams. So can you please solve this problem differently?
$$\frac{2x-4}{x^2+1}=u$$
$$\begin{align} &\implies ux^2-2x+(u+4)=0\\ &\implies \Delta=1-u(u+4)≥0 \\ &\implies u^2+4u-1≤0 \\ &\implies (u+2)^2-5≤0 \\ &\implies |u+2|≤\sqrt 5 \\ &\implies \max \left\{u\right\}=\sqrt 5-2 \\ &\implies \max \left\{f(x)\right\}=\sqrt 5-1.\end{align}$$