Derivative of $\mathrm{e}^{3\,x}\,\cos\left(x\right)$

Differentiated with respect to x. Edit the function · Differentiation rules

Step-by-step solution

Input function
$$\mathrm{e}^{3\,x}\,\cos\left(x\right)$$

Start of the differentiation
$$\frac{d}{dx}{\left[\mathrm{e}^{3\,x}\,\cos\left(x\right)\right]}$$

Yellow: the expression being replaced. Green: its replacement.

Step 1 — Product Rule Differentiation rule
📖 Rule
$$\frac{d}{dx}(u \cdot v)=u'v+uv'$$
With:
  • $u = \mathrm{e}^{3\,x}$
  • $v = \cos\left(x\right)$

Why: First, differentiate the first factor and multiply by the unchanged second factor. Add the unchanged first factor times the derivative of the second. Do not simply multiply the two derivatives.

🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\mathrm{e}^{3\,x}\,\cos\left(x\right)\right]}\,}}}$$
✨ After: Product Rule
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\mathrm{e}^{3\,x}\right]}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}\,}}}$$
Step 2 — Exponential Rule Differentiation rule
📖 Rule
$$\frac{d}{dx}(e^{u})=e^{u}\cdot u'$$
With:
  • $u = 3\,x$

Why: The exponential with base e remains unchanged. For a composite exponent, multiply by its derivative using the chain rule.

Changed part: $\frac{d}{dx}{\left[\mathrm{e}^{3\,x}\right]} \;\Longrightarrow\; \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[3\,x\right]}$
🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\mathrm{e}^{3\,x}\right]}\,}}}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}$$
✨ After: Exponential Rule
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[3\,x\right]}\,}}}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}$$
Step 3 — Constant Factor Rule Differentiation rule
📖 Rule
$$\frac{d}{dx}(c\,u)=c\,u'$$
With:
  • $c = 3$
  • $u = x$

Why: Keep the constant multiplier outside the derivative. Next, differentiate only the part depending on x.

Changed part: $\frac{d}{dx}{\left[3\,x\right]} \;\Longrightarrow\; 3\,\frac{d}{dx}{\left[x\right]}$
🧮 Current expression
$$\mathrm{e}^{3\,x}\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[3\,x\right]}\,}}}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}$$
✨ After: Constant Factor Rule
$$\mathrm{e}^{3\,x} \cdot \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,3\,\frac{d}{dx}{\left[x\right]}\,}}}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}$$
Step 4 — Derivative of a Variable Differentiation rule
📖 Rule
$$\frac{d}{dx}(x)=1$$

Why: When x increases by one, the value of this term also increases by one. Its derivative is therefore one.

Changed part: $\frac{d}{dx}{\left[x\right]} \;\Longrightarrow\; 1$
🧮 Current expression
$$\mathrm{e}^{3\,x} \cdot 3\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x\right]}\,}}}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}$$
✨ After: Derivative of a Variable
$$\mathrm{e}^{3\,x} \cdot 3 \cdot \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,1\,}}}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}$$
Step 5 — Remove a factor of one Simplification
📖 Rule
$$1\cdot a=a,\quad \frac{a}{1}=a$$

Why: Multiplication or division by one leaves the value unchanged.

Changed part: $3 \cdot 1 \;\Longrightarrow\; 3$
🧮 Current expression
$$\mathrm{e}^{3\,x} \cdot \bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,3 \cdot 1\,}}}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}$$
✨ After: Remove a factor of one
$$\mathrm{e}^{3\,x} \cdot \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,3\,}}}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}$$
Step 6 — Order the factors Simplification
📖 Rule
$$u\cdot c=c\cdot u$$

Why: The order of factors may be changed (commutative law). Usual order: number, constants, powers of the variable, other factors.

Changed part: $\mathrm{e}^{3\,x} \cdot 3\,\cos\left(x\right) \;\Longrightarrow\; 3\,\mathrm{e}^{3\,x}\,\cos\left(x\right)$
🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\mathrm{e}^{3\,x} \cdot 3\,\cos\left(x\right)\,}}} + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}$$
✨ After: Order the factors
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,3\,\mathrm{e}^{3\,x}\,\cos\left(x\right)\,}}} + \mathrm{e}^{3\,x}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}$$
Step 7 — Derivative of Cosine Differentiation rule
📖 Rule
$$\frac{d}{dx}\cos\left(x\right)=-\sin\left(x\right)$$

Why: The argument is exactly x. Apply the known elementary derivative.

Changed part: $\frac{d}{dx}{\left[\cos\left(x\right)\right]} \;\Longrightarrow\; -\sin\left(x\right)$
🧮 Current expression
$$3\,\mathrm{e}^{3\,x}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\cos\left(x\right)\right]}\,}}}$$
✨ After: Derivative of Cosine
$$3\,\mathrm{e}^{3\,x}\,\cos\left(x\right) + \mathrm{e}^{3\,x}\,\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\left(-\sin\left(x\right)\right)\,}}}$$
Step 8 — Determine the sign of the product Simplification
📖 Rule
$$a\cdot(-b)=-(a\cdot b),\quad (-a)\cdot(-b)=a\cdot b$$

Why: Move the minus signs of the factors in front of the product. An even number of minus signs gives plus, an odd number gives minus.

Changed part: $\mathrm{e}^{3\,x}\,\left(-\sin\left(x\right)\right) \;\Longrightarrow\; -\mathrm{e}^{3\,x}\,\sin\left(x\right)$
🧮 Current expression
$$3\,\mathrm{e}^{3\,x}\,\cos\left(x\right) + \bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\mathrm{e}^{3\,x}\,\left(-\sin\left(x\right)\right)\,}}}$$
✨ After: Determine the sign of the product
$$3\,\mathrm{e}^{3\,x}\,\cos\left(x\right) + \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\left(-\mathrm{e}^{3\,x}\,\sin\left(x\right)\right)\,}}}$$
Step 9 — Combine plus and minus Simplification
📖 Rule
$$a+(-b)=a-b$$

Why: Adding a negative expression is the same as subtracting the positive expression.

🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,3\,\mathrm{e}^{3\,x}\,\cos\left(x\right) + \left(-\mathrm{e}^{3\,x}\,\sin\left(x\right)\right)\,}}}$$
✨ After: Combine plus and minus
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,3\,\mathrm{e}^{3\,x}\,\cos\left(x\right) - \mathrm{e}^{3\,x}\,\sin\left(x\right)\,}}}$$
Final result
$$3\,\mathrm{e}^{3\,x}\,\cos\left(x\right) - \mathrm{e}^{3\,x}\,\sin\left(x\right)$$
Copy link to this solution
Cross-check with a computer algebra system

The derivative computed directly by the computer algebra system Maxima:

$$3\,\mathrm{e}^{3\,x}\,\cos\left(x\right) - \mathrm{e}^{3\,x}\,\sin\left(x\right)$$

Step-by-step result ↔ Maxima: identical ✓