Find Minima and Maxima of $ y = \frac{x^2-3x+2}{x^2+2x+1}$ $$ y = \frac{x^2-3x+2}{x^2+2x+1}$$
I guess I made some mistakes cause after taking the first derivative and simlifying I have
$$y = \frac{2x^3-4x^2+5}{(x+1)^2}$$
but then numerator has complex roots. which should not be, IMO
 A: Well, you can use five rules:


*

*Quotient rule:
$$\frac{\text{d}}{\text{d}x}\left(\frac{\text{u}}{\text{v}}\right)=\frac{\text{v}\cdot\frac{\text{d}\text{u}}{\text{d}x}-\text{u}\cdot\frac{\text{d}\text{v}}{\text{d}x}}{\text{v}^2}\tag1$$

*Differentiate the sum term by term and factor out constants.

*The power rule:
$$\frac{\text{d}}{\text{d}x}\left(x^\text{n}\right)=\text{n}x^{\text{n}-1}\tag2$$

*The derivative of $x$ is $1$.

*The derivative of $1$ is $0$:


So, using the quotient rule:
$$\text{y}'\left(x\right)=\frac{\left(x^2+2x+1\right)\cdot\frac{\text{d}}{\text{d}x}\left(x^2-3x+2\right)-\left(x^2-3x+2\right)\cdot\frac{\text{d}}{\text{d}x}\left(x^2+2x+1\right)}{\left(x^2+2x+1\right)^2}\tag3$$
Now, we can use the second rule to get:


*

*$$\frac{\text{d}}{\text{d}x}\left(x^2-3x+2\right)=\frac{\text{d}}{\text{d}x}\left(x^2\right)-3\cdot\frac{\text{d}}{\text{d}x}\left(x\right)+2\cdot\frac{\text{d}}{\text{d}x}\left(1\right)\tag4$$

*$$\frac{\text{d}}{\text{d}x}\left(x^2+2x+1\right)=\frac{\text{d}}{\text{d}x}\left(x^2\right)+2\cdot\frac{\text{d}}{\text{d}x}\left(x\right)+\frac{\text{d}}{\text{d}x}\left(1\right)\tag5$$


So, we end up with:
$$\text{y}'\left(x\right)=\frac{5x-7}{\left(1+x\right)^3}=0\space\Longleftrightarrow\space x=\frac{7}{5}\tag6$$
A: Hint.  Write it as:
$$ y = \frac{x^2+2x+1-5(x+1)+6}{(x+1)^2}=1 -\frac{5}{x+1}+\frac{6}{(x+1)^2}$$
The latter is a quadratic in $w=\frac{1}{x+1}\,$ with easy to determine extrema: $\;y=1-5w+6w^2\,$.
A: Let's derive 
$$y'={(2x-3)(x^2+2x+1)-(2x+2)(x^2-3x+2)\over (x^2+2x+1)^2}={5x^2-2x-7\over (x+1)^4}={5x-7\over (x+1)^3}$$
A: The derivative is not correct, unfortunately.
Given that $x^2+2x+1 = (x+1)^2$, observe that if we let $g(x) = (x+1)^2$ and $f(x) = x^2-3x+2$ we have $$\begin{align}{dy\over dx} &= {g(x)f'(x) - f(x)g'(x) \over g^2(x)}\\ &= {(x+1)^2(2x-3) - (x^2-3x+2)2(x+1) \over (x+1)^4}\\ &= {(x+1)(2x-3)-2(x^2-3x+2) \over(x+1)^3}\\&= {2x^2-3x+2x-3 -2x^2+6x-4\over(x+1)^3}\\ &= {5x - 7\over(x+1)^3}. \end{align}$$
Now we set the numerator and the denominator equal to $0$ to find the points of the function where we have global maxima and global minima.
A: It is immediate to see that there is some mistake in the derivative. In the numerator we must have a term $2x^3$ by the product of the derivative of the numerator by the denominator and an opposite term $-2x^3$ from the product of the numerator by the derivative of the denominator. So we cannot have a third degree term.
A: $$y = \frac{x^2 - 3x + 2}{x^2 + 2x + 1} = 1 - \frac{5x-1}{(x+1)^2}$$
\begin{align*}
\frac{dy}{dx} &= \frac{d}{dx} \left[ \frac{1-5x}{(x+1)^2} \right] \\
&= \frac{-5\cdot(x+1)^2-(1-5x)\cdot 2(x+1)}{(x+1)^4} \\
&= \frac{-5\cdot(x+1)-2(1-5x)}{(x+1)^3} \\
&= \frac{-5x-5-2+10x}{(x+1)^3} \\
&= \frac{5x-7}{(x+1)^3}
\end{align*}
$$\frac{dy}{dx} = 0 \Longleftrightarrow x=\frac{7}{5} $$
