# Derivative of xeˣ: Formula, Steps and Examples

> The derivative of xeˣ is eˣ(x + 1). See the product rule steps, the minimum at x = −1, the nth derivative pattern, a graph and worked examples.

Source: https://practicecalculus.com/derivatives/x-e-to-the-x
Updated: 2026-11-06

$$ \frac{d}{dx}\,xe^x = e^x(x + 1) $$

## At a glance

- **Derivative:** $e^x(x + 1)$
- **Second derivative:** $e^x(x + 2)$
- **nth derivative:** $e^x(x + n)$
- **Minimum:** $x = -1$, value $-\frac{1}{e} \approx -0.368$
- **Integral:** $\int xe^x\,dx = e^x(x - 1) + C$

## Key takeaways

- The derivative of $xe^x$ is $e^x + xe^x = e^x(x + 1)$, by the product rule.
- Each further derivative adds $1$ to the bracket: the $n$th derivative is $e^x(x + n)$.
- The function has a minimum at $x = -1$ and an inflection point at $x = -2$.
- Factoring out $e^x$ makes the derivative easy to set to zero, since $e^x$ is never $0$.

The **derivative of $xe^x$ is $e^x(x + 1)$**. It is a product of $x$ and $e^x$, so the [product rule](/rules/product-rule) is the tool to use.

$$\frac{d}{dx}\,xe^x = e^x + xe^x = e^x(x + 1)$$

## Step by step with the product rule

With $f = x$ and $g = e^x$, the product rule $(fg)' = f'g + fg'$ gives:

1. $f' = 1$.
2. $g' = e^x$, since the [derivative of eˣ](/derivatives/e-to-the-x) is itself.
3. Combine: $1\cdot e^x + x\cdot e^x = e^x + xe^x$.
4. Factor out $e^x$: $e^x(x + 1)$.

The factored form is more useful. Because $e^x$ is never zero, the derivative is zero only where $x + 1 = 0$.

## Graph of xeˣ and its derivative

```graph
title: 'Graph of y = xeˣ and its derivative y = eˣ(x + 1)'
caption: 'The function has its lowest point at $x = -1$, where the derivative crosses zero. To the left it flattens toward $0$; to the right it shoots up.'
x: [-6, 2]
y: [-1, 4]
functions:
  - expr: x*exp(x)
    label: y = xeˣ
    domain: [-6, 1.2]
  - expr: (x+1)*exp(x)
    label: y = eˣ(x + 1) (derivative)
    dashed: true
    domain: [-6, 0.75]
points:
  - [-1, -0.3679, 'minimum (−1, −1/e)']
  - [-2, -0.2707, 'inflection (−2, −2/e²)']
```

## Minimum and inflection point

**Minimum.** The derivative $e^x(x + 1)$ is negative for $x < -1$ and positive for $x > -1$. So $x = -1$ is a minimum, with value

$$(-1)e^{-1} = -\frac{1}{e} \approx -0.368$$

**Inflection point.** The second derivative is

$$\frac{d}{dx}\,e^x(x + 1) = e^x(x + 1) + e^x = e^x(x + 2)$$

It changes sign at $x = -2$, so the graph switches from concave down to concave up there. The point is $\left(-2, -\frac{2}{e^2}\right) \approx (-2, -0.271)$.

## The nth derivative pattern

Every time you differentiate $e^x(x + k)$, you get $e^x(x + k) + e^x = e^x(x + k + 1)$. So:

| Derivative | Result |
| --- | --- |
| $f'(x)$ | $e^x(x + 1)$ |
| $f''(x)$ | $e^x(x + 2)$ |
| $f'''(x)$ | $e^x(x + 3)$ |
| $f^{(n)}(x)$ | $e^x(x + n)$ |

## Worked examples

**Example 1: decaying version.** For $f(x) = xe^{-x}$, use the chain rule on $e^{-x}$ (see [e^(−x)](/derivatives/e-to-the-negative-x)):

$$f'(x) = e^{-x} - xe^{-x} = e^{-x}(1 - x)$$

Now the critical point is a maximum at $x = 1$.

**Example 2: a bigger power.** For $g(x) = x^2e^x$,

$$g'(x) = 2xe^x + x^2e^x = xe^x(x + 2)$$

Critical points are at $x = 0$ and $x = -2$.

**Example 3: a scaled exponent.** For $h(x) = xe^{3x}$,

$$h'(x) = e^{3x} + 3xe^{3x} = e^{3x}(1 + 3x)$$

**Example 4: a tangent line.** At $x = 0$, $xe^x = 0$ and the slope is $e^0(0 + 1) = 1$. The tangent line is $y = x$.

## Common mistakes

1. **Multiplying the two derivatives.** $1\cdot e^x = e^x$ is not the product rule; it drops the $xe^x$ term.
2. **Writing $xe^x$ as the answer.** The derivative of $e^x$ is $e^x$, but the product with $x$ still needs the product rule.
3. **Not factoring.** Leaving $e^x + xe^x$ is correct, but factoring makes it far easier to find critical points.

Going backwards, $\int xe^x\,dx = e^x(x - 1) + C$ by integration by parts; see the [integral of xeˣ](/integrals/x-e-to-the-x). Check it: $\frac{d}{dx}e^x(x - 1) = e^x(x - 1) + e^x = xe^x$. Practise with [product and quotient rule problems](/practice-problems/product-and-quotient-rules).

## Frequently asked questions

### What is the derivative of xe^x?

The derivative of $xe^x$ is $e^x + xe^x$, which factors as $e^x(x + 1)$.

### What is the second derivative of xe^x?

Differentiate $e^x(x + 1)$ with the product rule: $e^x(x + 1) + e^x = e^x(x + 2)$.

### What is the nth derivative of xe^x?

It is $e^x(x + n)$. Each derivative adds one more $e^x$ term.

### What is the derivative of xe^(−x)?

By the product rule, $e^{-x} - xe^{-x} = e^{-x}(1 - x)$.
