Derivative of $x\,\tan\left(x\right)$

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

Step-by-step solution

Input function
$$x\,\tan\left(x\right)$$

Start of the differentiation
$$\frac{d}{dx}{\left[x\,\tan\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 = x$
  • $v = \tan\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[x\,\tan\left(x\right)\right]}\,}}}$$
✨ After: Product Rule
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x\right]}\,\tan\left(x\right) + x\,\frac{d}{dx}{\left[\tan\left(x\right)\right]}\,}}}$$
Step 2 — 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
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x\right]}\,}}}\,\tan\left(x\right) + x\,\frac{d}{dx}{\left[\tan\left(x\right)\right]}$$
✨ After: Derivative of a Variable
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,1\,}}}\,\tan\left(x\right) + x\,\frac{d}{dx}{\left[\tan\left(x\right)\right]}$$
Step 3 — 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: $1\,\tan\left(x\right) \;\Longrightarrow\; \tan\left(x\right)$
🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,1\,\tan\left(x\right)\,}}} + x\,\frac{d}{dx}{\left[\tan\left(x\right)\right]}$$
✨ After: Remove a factor of one
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\tan\left(x\right)\,}}} + x\,\frac{d}{dx}{\left[\tan\left(x\right)\right]}$$
Step 4 — Derivative of Tangent Differentiation rule
📖 Rule
$$\frac{d}{dx}\tan\left(x\right)=\frac{1}{\cos\left(x\right)^{2}}$$

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

Changed part: $\frac{d}{dx}{\left[\tan\left(x\right)\right]} \;\Longrightarrow\; \frac{1}{\cos\left(x\right)^{2}}$
🧮 Current expression
$$\tan\left(x\right) + x\,\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\tan\left(x\right)\right]}\,}}}$$
✨ After: Derivative of Tangent
$$\tan\left(x\right) + x \cdot \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{1}{\cos\left(x\right)^{2}}\,}}}$$
Step 5 — Combine into one fraction Simplification
📖 Rule
$$a\cdot\frac{b}{c}=\frac{a\cdot b}{c}$$

Why: A factor in front of a fraction multiplies its numerator, giving a single fraction.

Changed part: $x \cdot \frac{1}{\cos\left(x\right)^{2}} \;\Longrightarrow\; \frac{x}{\cos\left(x\right)^{2}}$
🧮 Current expression
$$\tan\left(x\right) + \bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,x \cdot \frac{1}{\cos\left(x\right)^{2}}\,}}}$$
✨ After: Combine into one fraction
$$\tan\left(x\right) + \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{x}{\cos\left(x\right)^{2}}\,}}}$$
Final result
$$\tan\left(x\right) + \frac{x}{\cos\left(x\right)^{2}}$$
Valid where:
  • $\cos\left(x\right)\ne0$ – The function and its derivative are undefined at poles.

The derivative is only valid where the original function is defined.

Copy link to this solution
Cross-check with a computer algebra system

The derivative computed directly by the computer algebra system Maxima:

$$\tan\left(x\right) + x\,\sec\left(x\right)^{2}$$

Step-by-step result ↔ Maxima: identical ✓