How to determine the interval where $f(x)$ is concave up and concave down? 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?

 A: The sign of $f''(x)$ is determined by the sign of the polynomial (because any $e^A$ is always strictly positive, whatever $A$ is) $x^2 - 2x + 4$ which is a parabola shaped like $x^2$ (what we in Dutch call a "dalparabool" ("valley-parabola", roughly) so positive to the left and right of any zeroes. So $f$ is concave up left of the zero $\frac{4-\sqrt{8}}{2} = 2- \sqrt{2}$, and to the right of the zero $\frac{4+\sqrt{8}}{2} = 2+\sqrt{2}$, just as your solution manual said.
Inbetween the zeroes, the polynomial is $<0$ so $f''(x) < 0$ and so it is concave down. Apply the facts you know. The graph is not needed.
Also for the derivative, whose sign is determined by a polynomial $-x^2 + 2x$ (shaped upside down), we can predict that $f'(x)>0$ is positive (so upward slope) for all values inbetween the zeroes $0$ and $2$ and negative (downward gradient)  for $x<0$ and $x>2$. But graphs being concave up/down is determined entirely by the sign of $f''(x)$, so whether the gradient itself is decreasing or increasing (so whether growth slows down or increases).
A: If $f’’(x)=(x^2-4x+2)e^{4-x}$ then $f’’(x)>0 \iff x^2-4x+2 >0$. This is true because $e^{4-x}>0$ for any $x\in\mathbb{R}$ and so the sign of $f’’$ is the same as the sign of $x^2-4x+2$.
Can you reach to the conclusions from here?
