# How do you determine where the function is increasing or decreasing, and determine where relative maxima and minima occur for f(x) = x^2e^x - 3?

Jul 17, 2017

$f \left(x\right)$ is strictly increasing in $\left(- \infty , - 2\right)$, has a local maximum in $x = - 2$, it is strictly decreasing in $\left(- 2 , 0\right)$ reaching a local minimum in $x = 0$ and again increasing for $x \in \left(0 , + \infty\right)$

#### Explanation:

Given:

$f \left(x\right) = {x}^{2} {e}^{x} - 3$

consider the derivative of the function:

$f ' \left(x\right) = \frac{d}{\mathrm{dx}} \left({x}^{2} {e}^{x} - 3\right) = \left(\frac{d}{\mathrm{dx}} {x}^{2}\right) {e}^{x} + {x}^{2} \left(\frac{d}{\mathrm{dx}} {e}^{x}\right)$

$f ' \left(x\right) = 2 x {e}^{x} + {x}^{2} {e}^{x}$

$f ' \left(x\right) = x \left(2 + x\right) {e}^{x}$

Solve now the inequality:

$f ' \left(x\right) > 0$

As ${e}^{x} > 0 \forall x \in \mathbb{R}$, the sign of $f ' \left(x\right)$ is the sign of $x \left(2 + x\right)$, then we have:

$f ' \left(x\right) > 0$ for $x \in \left(- \infty , - 2\right) \cup \left(0 , + \infty\right)$

$f ' \left(x\right) < 0$ for $x \in \left(- 2 , 0\right)$

and the critical points where $f ' \left(x\right) = 0$ are ${x}_{1} = - 2$ and ${x}_{2} = 0$

We can conclude that $f \left(x\right)$ is strictly increasing in $\left(- \infty , - 2\right)$, has a local maximum in $x = - 2$, it is strictly decreasing in $\left(- 2 , 0\right)$ reaching a local minimum in $x = 0$ and again increasing for $x \in \left(0 , + \infty\right)$

graph{x^2e^x-3 [-10, 10, -5, 5]}