# Consider the function f(x)= x^2e^{-x}. Use the Second Derivative Test to find the local maximum...

## Question:

Consider the function {eq}f(x)= x^2e^{-x}. {/eq} Use the Second Derivative Test to find the local maximum and local minimum values of f. Determine the intervals on which f is concave up or concave down.

## Concavity:

We will say that a function is concave or has its concavity down when given any two points the segment that joins them is below the curve.

Similarly, we will say that it is convex or presents its concavity upwards if given two points of the curve the segment that joins them is above the curve.

Find and analyze the first derivative

Find all critical point

{eq}\displaystyle f (x) = x^2e^{-x} \\ \displaystyle f'(x) = 2xe^{-x}+\left(-e^{-x}\right)x^2\\ \displaystyle f'(x) = 2e^{-x}x-e^{-x}x^2\\ \displaystyle f'(x) = xe^x(2-x)\\ \displaystyle f'(x) =0 \,\,\, \rightarrow \,\,\,\, xe^x(2-x)=0\\ \displaystyle x=0 \,\,\,\,\,\, x=2 \,\,\, \rightarrow \,\,\,\, \textrm {critical points, where the first derivative is canceled} {/eq}

Second derivative test

{eq}\displaystyle f (x) = 2e^{-x}x-e^{-x}x^2\\ \displaystyle f''(x) = 2(e^{-x}-e^{-x}x)-(2e^{-x}x-e^{-x}x^2)\\ \displaystyle f''(x) = 2e^{-x}-4e^{-x}x+e^{-x}x^2\\ \displaystyle f''(x) = e^x(x^2-4x+2)\\ \displaystyle f''(x) = e^x(x^2-4x+2)\\ \displaystyle f''(0) = 2\\ \displaystyle f''(2) = -2e^2\\ {/eq}

Conclusion (local minimums and local maximum)

{eq}\displaystyle \boxed{ \left(0,0\right)} \,\, \Longrightarrow \,\, \textrm {local minimum point of the function}\\ \displaystyle \boxed{ \left(2,\frac{4}{e^2}\right)} \,\, \Longrightarrow \,\, \textrm {local maximum point of the function} {/eq}

Find and analyze the second derivative(concavity)

{eq}\displaystyle f''(x) = e^x(x^2-4x+2)\\ \displaystyle f''(x) = 0 \,\,\, \rightarrow \,\,\,\, e^x(x^2-4x+2)=0 \\ \displaystyle x_{1,2}=\frac{-b \pm \sqrt{b^2-4ac}}{2a}\\ \displaystyle x_{1,\:2}=\frac{4 \pm \sqrt{(-4)^2-4\cdot \:1\cdot \:2}}{2\cdot \:2}\\ \displaystyle x=2 \pm \sqrt 2 \,\,\,\,\, \textrm {points where the second derivative is zero}\\ {/eq}

The intervals where the second derivative changes sign are. {eq}\left (-\infty,2-\sqrt 2 \right ) \,\,\,\,\, \left (2-\sqrt 2,2+\sqrt 2 \right ) \,\,\,\,\, \left (2+\sqrt 2,\infty \right ) {/eq}

To define the sign of the second derivative in each interval, evaluate a point of each interval and verify the sign {eq}\left (-\infty,2-\sqrt 2 \right) \,\,\, \rightarrow \,\,\, f'' > 0 \,\,\, \rightarrow \,\,\,\, \textrm {the second derivative is positive in this interval} \\ \left (2 -\sqrt 2,2 +\sqrt 2 \right ) \,\,\, \rightarrow \,\,\, f''< 0 \,\,\, \rightarrow \,\,\,\, \textrm {the second derivative is negative in this interval} \\ \left (2+\sqrt 2,\infty \right ) \,\,\, \rightarrow \,\,\, f'' > 0 \,\,\, \rightarrow \,\,\,\, \textrm {the second derivative is positive in this interval} \\ {/eq}

Conclusion (concavity) {eq}\left (-\infty ,2 -\sqrt 2\right) \bigcup \left (2+\sqrt 2,\infty \right ) \,\,\,\, \rightarrow \,\,\,\,\, \textrm {concave up}\\ \left (2-\sqrt 2,2+\sqrt 2 \right ) \,\,\,\, \rightarrow \,\,\,\,\, \textrm {concave down}\\ {/eq} 