# What are the local maxima and minima of f(x)= (x^2)/(x-2)^2?

Feb 23, 2016

f(x)=x^2/{(x-2)^2
This function has a vertical asymptote at $x = 2$, approaches $1$ from above as x goes to $+ \infty$ (horizontal asymptote) and approaches $1$ from below as x goes to $- \infty$. All derivatives are undefined at $x = 2$ as well. There is one local minima at $x = 0$, $y = 0$ (All that trouble for the origin!)

Note you might want to check my math, even the best of us drop the odd negative sign and this is a long question.

#### Explanation:

f(x)=x^2/{(x-2)^2

This function has a vertical asymptote at $x = 2$, because the denominator is zero when $x = 2$.

It approaches $1$ from above as x goes to $+ \infty$ (horizontal asymptote) and approaches $1$ from below as x goes to $- \infty$, because for large values ${x}^{2} \cong {\left(x - 2\right)}^{2}$ with ${x}^{2} > {\left(x - 2\right)}^{2}$ for $x > 0$ and ${x}^{2} < {\left(x - 2\right)}^{2}$ for $x < 0$.

To find max/min we need the first and second derivatives.

$\frac{d f \left(x\right)}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \left({x}^{2} / \left\{{\left(x - 2\right)}^{2}\right\}\right)$ Use the quotient rule!
$\frac{d f \left(x\right)}{\mathrm{dx}} = \left(\frac{\left(\frac{d}{\mathrm{dx}} {x}^{2}\right) {\left(x - 2\right)}^{2} - {x}^{2} \left(\frac{d}{\mathrm{dx}} {\left(x - 2\right)}^{2}\right)}{{\left(x - 2\right)}^{4}}\right)$.
Using rule for powers and the chain rule we get:
$\frac{d f \left(x\right)}{\mathrm{dx}} = \frac{\left(2 x\right) {\left(x - 2\right)}^{2} - {x}^{2} \left(2 \cdot \left(x - 2\right) \cdot 1\right)}{x - 2} ^ 4$.
We now neaten up a bit ...
$\frac{d f \left(x\right)}{\mathrm{dx}} = \frac{2 x \left({x}^{2} - 4 x + 4\right) - {x}^{2} \left(2 x - 4\right)}{x - 2} ^ 4$
$\frac{d f \left(x\right)}{\mathrm{dx}} = \frac{2 {x}^{3} - 8 {x}^{2} + 8 x - 2 {x}^{3} + 4 {x}^{2}}{x - 2} ^ 4$
$\frac{d f \left(x\right)}{\mathrm{dx}} = \frac{- 4 {x}^{2} + 8 x}{x - 2} ^ 4$

Now the second derivative, done like the first.
$\frac{{d}^{2} f \left(x\right)}{\mathrm{dx}} ^ 2 = \frac{\frac{d}{\mathrm{dx}} \left(- 4 {x}^{2} + 8 x\right) {\left(x - 2\right)}^{4} - \left(- 4 {x}^{2} + 8 x\right) \left(\frac{d}{\mathrm{dx}} \left({\left(x - 2\right)}^{4}\right)\right)}{x - 2} ^ 8$
$\frac{{d}^{2} f \left(x\right)}{\mathrm{dx}} ^ 2 = \frac{\left(- 8 x + 8\right) {\left(x - 2\right)}^{4} - \left(- 4 {x}^{2} + 8 x\right) \left(4 {\left(x - 2\right)}^{3} \cdot 1\right)}{x - 2} ^ 8$
$\frac{{d}^{2} f \left(x\right)}{\mathrm{dx}} ^ 2 = \frac{\left(- 8 x + 8\right) {\left(x - 2\right)}^{4} - \left(- 4 {x}^{2} + 8 x\right) \left(4 {\left(x - 2\right)}^{3} \cdot 1\right)}{x - 2} ^ 8$
It's ugly but we only need to plug and and note where it's badly behaved.

$\frac{d f \left(x\right)}{\mathrm{dx}} = \frac{- 4 {x}^{2} + 8 x}{x - 2} ^ 4$ This function is undefined at $x = 2$, that asymptote, but looks fine everywhere else.
We want to know were the max/min are ...
we set $\frac{d f \left(x\right)}{\mathrm{dx}} = 0$
$\frac{- 4 {x}^{2} + 8 x}{x - 2} ^ 4 = 0$ this is zero when the numerator is zero and if the denominator is not.
$- 4 {x}^{2} + 8 x = 0$
$4 x \left(- x + 2\right) = 0$ or $4 x \left(2 - x\right) = 0$ This is zero at $x = 0$ and $x = 2$, but we cannot have a max/min were the derivative/function are undefined, so the only possibility is $x = 0$.

"the second derivative test"
Now we look at the second derivative, ugly as it is ...
$\frac{{d}^{2} f \left(x\right)}{\mathrm{dx}} ^ 2 = \frac{\left(- 8 x + 8\right) {\left(x - 2\right)}^{4} - \left(- 4 {x}^{2} + 8 x\right) \left(4 {\left(x - 2\right)}^{3}\right)}{x - 2} ^ 8$
Like the function and the first derivative this is undefined at $x = 2$, but looks fine everywhere else.
We plug $x = 0$ into $\frac{{d}^{2} f \left(x\right)}{\mathrm{dx}} ^ 2$
$\frac{{d}^{2} f \left(0\right)}{\mathrm{dx}} ^ 2 =$
$\frac{\left(- 8 \cdot 0 + 8\right) {\left(0 - 2\right)}^{4} - \left(- 4 \cdot {0}^{2} + 8 \cdot 0\right) {\left(4 \cdot 0 - 2\right)}^{3}}{0 - 2} ^ 8$
$= \frac{\left(8\right) {\left(- 2\right)}^{4}}{2} ^ 8$, isn't zero such a lovely number to plug it?
$= \frac{128}{256}$ all that for $\frac{1}{2}$

$\frac{1}{2} > 0$ so $x = 0$ is a local minima.
To find the y value we need to plug it into the function.
$f \left(x\right) = {0}^{2} / \left\{{\left(0 - 2\right)}^{2}\right\} = 0$ The origin!