Consider the function $f\left(x\right)=x^2e^{\left(-x+4\right)}$
The first and second derivatives are:
$f'\left(x\right)=x\left(2-x\right)e^{\left(-x+4\right)}$
$f''\left(x\right)=\left(x^2-4x+2\right)e^{\left(-x+4\right)}$
e) Determine the intervals where $f(x)$ is concave up and concave down
I know that $f''(x) < 0 $ curve is concave down, if $f''(x) > 0$, then the curve is concave down. I also know that if $f''(x) = 0$, then $x$ is the point of inflection, where the concavity changes.
So I thought I compute it: $0=\left(x^2-4x+2\right)e^{\left(-x+4\right)}$
$\:x^2-4x+2=0$
using the quadratic formula:
$x=\frac{-\left(-4\right)-\sqrt{\left(-4\right)^2-4\cdot \:1\cdot \:2}}{2\cdot \:1}:\quad 2-\sqrt{2}$ or $2+\sqrt{2}$
The solution is:
But why? I don't see it? $2-\sqrt{2}$ to the maximum has a positive gradient right? Then how come is is concave down? What is the general approach to questions that ask something like this?


