Derivative of $\frac{1}{x} - x$

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

Step-by-step solution

Input function
$$\frac{1}{x} - x$$

Start of the differentiation
$$\frac{d}{dx}{\left[\frac{1}{x} - x\right]}$$

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

Step 1 — Sum/Difference Rule Differentiation rule
📖 Rule
$$\frac{d}{dx}(u \pm v \pm \dots) = \frac{d}{dx}(u) \pm \frac{d}{dx}(v) \pm \dots$$
With:
  • $u = \frac{1}{x}$
  • $v = x$

Why: Differentiate every term separately and keep the plus and minus signs between them. Even a constant term first receives its own derivative symbol.

🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\frac{1}{x} - x\right]}\,}}}$$
✨ After: Sum/Difference Rule
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\frac{1}{x}\right]} - \frac{d}{dx}{\left[x\right]}\,}}}$$
Step 2 — Write the reciprocal as a negative power Rewriting
📖 Rule
$$\frac{c}{v}=c\cdot v^{-1},\quad \frac{c}{v^k}=c\cdot v^{-k}$$

Why: Write the denominator as a power with a negative exponent, then apply the factor and power rules. The original denominator must still be nonzero.

Changed part: $\frac{d}{dx}{\left[\frac{1}{x}\right]} \;\Longrightarrow\; \frac{d}{dx}{\left[x^{-1}\right]}$
🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[\frac{1}{x}\right]}\,}}} - \frac{d}{dx}{\left[x\right]}$$
✨ After: Write the reciprocal as a negative power
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x^{-1}\right]}\,}}} - \frac{d}{dx}{\left[x\right]}$$
Step 3 — Power Rule (special case) Differentiation rule
📖 Rule
$$\frac{d}{dx}\left(u^{c}\right)=c\,u^{c-1}$$
With:
  • $u = x$
  • $c = -1$

Why: Bring the current exponent down as a multiplier and subtract one from the exponent. Evaluate that small calculation in a separate step.

Changed part: $\frac{d}{dx}{\left[x^{-1}\right]} \;\Longrightarrow\; -1\,x^{-1 - 1}$
🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x^{-1}\right]}\,}}} - \frac{d}{dx}{\left[x\right]}$$
✨ After: Power Rule (special case)
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,-1\,x^{-1 - 1}\,}}} - \frac{d}{dx}{\left[x\right]}$$
Step 4 — Evaluate numbers Simplification
📖 Rule

Why: Evaluate only the highlighted numeric expression, preserving exact fractions and decimals.

Changed part: $-1 - 1 \;\Longrightarrow\; -2$
🧮 Current expression
$$-1\,x^{\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,-1 - 1\,}}}} - \frac{d}{dx}{\left[x\right]}$$
✨ After: Evaluate numbers
$$-1\,x^{\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,-2\,}}}} - \frac{d}{dx}{\left[x\right]}$$
Step 5 — Write the factor −1 as a minus sign Simplification
📖 Rule
$$(-1)\cdot a=-a$$

Why: Multiplying by −1 gives the negative. Write just a minus sign instead.

Changed part: $-1\,x^{-2} \;\Longrightarrow\; -x^{-2}$
🧮 Current expression
$$\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,-1\,x^{-2}\,}}} - \frac{d}{dx}{\left[x\right]}$$
✨ After: Write the factor −1 as a minus sign
$$\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,-x^{-2}\,}}} - \frac{d}{dx}{\left[x\right]}$$
Step 6 — 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
$$-x^{-2} - \bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{d}{dx}{\left[x\right]}\,}}}$$
✨ After: Derivative of a Variable
$$-x^{-2} - \bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,1\,}}}$$
Step 7 — Write negative exponents as a fraction Simplification
📖 Rule
$$a^{-n}=\frac{1}{a^n}$$

Why: A power with a negative exponent is the reciprocal of the power with the positive exponent. The result then has no negative exponents.

Changed part: $x^{-2} \;\Longrightarrow\; \frac{1}{x^{2}}$
🧮 Current expression
$$-\bbox[#fff1b8, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,x^{-2}\,}}} - 1$$
✨ After: Write negative exponents as a fraction
$$-\bbox[#d6f5df, padding:0.15em]{{\color{black}{\vphantom{\dfrac{d}{dx}}\,\frac{1}{x^{2}}\,}}} - 1$$
Final result
$$-\frac{1}{x^{2}} - 1$$
Valid where:
  • $x\ne0$ – The original denominator must be nonzero.

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:

$$-\frac{1}{x^{2}} - 1$$

Step-by-step result ↔ Maxima: identical ✓