This page reviews the some common rules of differentiation.
Basic Rules
Notation
We represent a derivative with respect to $x$ as:
First Derivative
$$\frac{d}{dx}f(x) = f'(x)$$
second Derivative
$$\frac{d^2}{dx^2}f(x) = f''(x)$$
The primes denote differentiation with respect to $x$ and the number of primes denotes the order of the derivative.
For example, $f''(x)$ is the second derivative of $f(x)$ with respect to $x$.
The derivative rules, of course, apply equally well to functions of other variables,
such as time. Thus, we if we have a rule involving $y'=dy/dx$ we can also apply it to
a time derivative $\dot{y}= dy/dt$, where the dot notation is widely used in mechanics to
denote time derivatives.
Power Rule
The power rule is one of the most basic differentiation rules:
Power Rule
$$\frac{d}{dx}(x^n) = nx^{n-1}$$
where $n$ is any real number.
Sum and Difference Rules
The derivative of a sum or difference is the sum or difference of the derivatives:
Sum and Difference Rules
$$\begin{aligned} \frac{d}{dx}[f(x) \pm g(x)] &= \frac{d}{dx}f(x) \pm \frac{d}{dx}g(x) \\ &= f'(x) \pm g'(x) \end{aligned}$$
Constant Multiple Rule
A constant factor can be pulled out of the derivative:
Constant Multiple Rule
$$\frac{d}{dx}[cf(x)] = c \cdot \frac{d}{dx}f(x) = cf'(x)$$
where $c$ is a constant.
Product Rule
The product rule allows us to differentiate the product of two functions.
Product Rule
$$\frac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x)$$
In words: the derivative of a product is the derivative of the first function times the second function,
plus the first function times the derivative of the second function.
Example: Differentiate $f(x) = x^2 \sin(x)$ with respect to $x$.
Using the product rule with $f(x) = x^2$ and $g(x) = \sin(x)$:
\begin{align*}
\frac{d}{dx}[x^2 \sin(x)] &= \frac{d}{dx}(x^2) \cdot \sin(x) + x^2 \cdot \frac{d}{dx}[\sin(x)] \\
&= 2x \sin(x) + x^2 \cos(x)
\end{align*}
Example: Differentiate $f(x) = e^x \cos(x)$ with respect to $x$.
Using the product rule with $f(x) = e^x$ and $g(x) = \cos(x)$:
\begin{align*}
\frac{d}{dx}[e^x \cos(x)] &= \frac{d}{dx}(e^x) \cdot \cos(x) + e^x \cdot \frac{d}{dx}[\cos(x)] \\
&= e^x \cos(x) - e^x \sin(x) \\
&= e^x[\cos(x) - \sin(x)]
\end{align*}
Quotient Rule
The quotient rule allows us to differentiate the ratio of two functions.
Quotient Rule
$$\frac{d}{dx}\left[\frac{f(x)}{g(x)}\right] = \frac{f'(x)g(x) - f(x)g'(x)}{[g(x)]^2}$$
provided that $g(x) \neq 0$.
Mnemonic: "Low d(High) minus High d(Low), over Low squared" or "gdf minus fdg over g^2."
Example: Differentiate $f(x) = \frac{x^2 + 1}{x + 3}$
Using the quotient rule with $f(x) = x^2 + 1$ and $g(x) = x + 3$:
\begin{align*}
\frac{d}{dx}\left[\frac{x^2 + 1}{x + 3}\right] &= \frac{(2x)(x + 3) - (x^2 + 1)(1)}{(x + 3)^2} \\
&= \frac{2x^2 + 6x - x^2 - 1}{(x + 3)^2} \\
&= \frac{x^2 + 6x - 1}{(x + 3)^2}
\end{align*}
Example: Differentiate $f(x) = \frac{\sin(x)}{x}$
Using the quotient rule with $f(x) = \sin(x)$ and $g(x) = x$:
\begin{align*}
\frac{d}{dx}\left[\frac{\sin(x)}{x}\right] &= \frac{\cos(x) \cdot x - \sin(x) \cdot 1}{x^2} \\
&= \frac{x\cos(x) - \sin(x)}{x^2}
\end{align*}
Chain Rule
The chain rule is perhaps the most powerful and frequently used differentiation rule. It allows us to
differentiate composite functions—functions that are functions of other functions. This situation arises
constantly in physics, such as when expressing one physical quantity in terms of another that itself
depends on time or position.
Chain Rule
If $y$ is a function of $x$ and $x$ is a function of time (i.e. we know $y(x)$ and
$x(t)$), then the derivative of $y$ with respect to time is given by:
$$\frac{dy}{dt} = \frac{dy}{dx} \cdot \frac{dx}{dt}$$
In words: the product of the instantaneous rate of change of y relative to x with the rate of change
of x relative to y allows equals the instantaneous rate of change of y relative to t.
For multiple compositions, the chain rule extends naturally:
Extended Chain Rule
If we are given $y(x)$, $x(u)$ and $u(t)$, then the derivative of $y$ with respect to time is given by:
$$\frac{dy}{dt} = \frac{dy}{dx} \cdot \frac{dx}{du} \cdot \frac{du}{dt}$$
Example: Differentiate $f(x) = \sin(x^2)$
Define variables $y = \sin(u)$ and $u = x^2$. Using the chain rule:
$$\begin{aligned}
\frac{dy}{dx} &= \frac{dy}{du} \cdot \frac{du}{dx} \\
&= \cos(u) \cdot 2x \\
&= 2x\cos(x^2).
\end{aligned}$$
Don't forget to substitute back for $u=x^2$ in the final answer.
Example: Differentiate $f(x) = (x^2 + 3x)^5$
Define variables $y = u^5$ and $u = x^2 + 3x$. Using the chain rule:
$$\begin{aligned}
\frac{dy}{dx} &= \frac{dy}{du} \cdot \frac{du}{dx} \\
&= 5u^4 \cdot (2x + 3) \\
&= 5(2x + 3)(x^2 + 3x)^4
\end{aligned}$$
Combining Rules
In practice, many functions require the application of multiple differentiation rules simultaneously.
The key is to identify which rule applies at each step and work systematically through the problem.
Example: Differentiate $f(x) = \frac{x^2 e^x}{\sin(x)}$
This function requires both the quotient rule and the product rule. We'll use the quotient rule first,
and within that, apply the product rule to differentiate the numerator $x^2 e^x$:
First, find the derivative of the numerator using the product rule:
$$\frac{d}{dx}[x^2 e^x] = 2x e^x + x^2 e^x = e^x(2x + x^2)$$
Now apply the quotient rule:
\begin{align*}
\frac{d}{dx}\left[\frac{x^2 e^x}{\sin(x)}\right] &= \frac{\frac{d(x^2 e^x)}{dx}\cdot \sin(x) - x^2 e^x \cdot \frac{d\sin(x)}{dt}}{\sin^2(x)} \\
&= \frac{e^x(2x + x^2) \cdot \sin(x) - x^2 e^x \cdot \cos(x)}{\sin^2(x)} \\
&= \frac{(2x + x^2)\sin(x) - x^2\cos(x)}{\sin^2(x)}e^x
\end{align*}
Example: Differentiate $f(x) = \ln(x^2 + 1)$
This requires the chain rule. The outer function is $\ln(u)$ and the inner function is $u = x^2 + 1$:
\begin{align*}
\frac{d}{dx}[\ln(x^2 + 1)] &= \frac{d\ln(u)}{du} \cdot \frac{du}{dx} \\
&= \frac{1}{u} \cdot \frac{d}{dx}(x^2 + 1) \\
&= \frac{1}{x^2 + 1} \cdot 2x \\
&= \frac{2x}{x^2 + 1}
\end{align*}
Derivatives of Exponential and Logarithmic Functions
Exponential Functions
The exponential function has the remarkable property that its derivative is proportional to itself:
Derivative of Exponential Functions
$$\frac{d}{dx}[e^x] = e^x$$
$$\frac{d}{dx}[a^x] = a^x \ln(a)$$
where $a > 0$ and $a \neq 1$.
Logarithmic Functions
Derivative of Logarithmic Functions
$$\frac{d}{dx}[\ln(x)] = \frac{1}{x}, \quad x > 0$$
$$\frac{d}{dx}[\log_a(x)] = \frac{1}{x \ln(a)}, \quad x > 0$$
Example: Differentiate $f(x) = x e^{3x}$
This requires the product rule:
\begin{align*}
\frac{d}{dx}[x e^{3x}] &= \frac{d}{dx}(x) \cdot e^{3x} + x \cdot \frac{d}{dx}[e^{3x}] \\
&= 1 \cdot e^{3x} + x \cdot e^{3x} \cdot 3 \\
&= e^{3x}(1 + 3x)
\end{align*}
Derivatives of Trigonometric Functions
Trigonometric functions are ubiquitous in physics, especially in oscillations, waves, and periodic phenomena.
Their derivatives follow a cyclic pattern:
Derivatives of Trigonometric Functions
\begin{align*}
\frac{d}{dx}[\sin(x)] &= \cos(x) \\
\frac{d}{dx}[\cos(x)] &= -\sin(x) \\
\frac{d}{dx}[\tan(x)] &= \sec^2(x) = \frac{1}{\cos^2(x)} \\
\frac{d}{dx}[\sec(x)] &= \sec(x)\tan(x) \\
\frac{d}{dx}[\csc(x)] &= -\csc(x)\cot(x) \\
\frac{d}{dx}[\cot(x)] &= -\csc^2(x)
\end{align*}
Example: Differentiate $f(x) = \sin(2x + \pi/4)$
Using the chain rule with the outer function $\sin(u)$ and inner function $u = 2x + \pi/4$:
\begin{align*}
\frac{d}{dx}[\sin(2x + \pi/4)] &= \cos(2x + \pi/4) \cdot \frac{d}{dx}(2x + \pi/4) \\
&= \cos(2x + \pi/4) \cdot 2 \\
&= 2\cos(2x + \pi/4)
\end{align*}
Implicit Differentiation
Sometimes functions are defined implicitly rather than explicitly. In such cases, we can differentiate both
sides of an equation with respect to $x$ and then solve for the derivative. This technique is particularly
useful when it's difficult or impossible to solve for $y$ explicitly as a function of $x$.
Example: Find $\frac{dy}{dx}$ if $x^2 + y^2 = 25$
Differentiating both sides with respect to $x$:
\begin{align*}
\frac{d}{dx}(x^2 + y^2) &= \frac{d}{dx}(25) \\
2x + 2y \frac{dy}{dx} &= 0 \\
2y \frac{dy}{dx} &= -2x \\
\frac{dy}{dx} &= -\frac{x}{y}\\
&= \pm\frac{x}{\sqrt{25-x^2}}
\end{align*}
Note that when differentiating $y^2$ with respect to $x$, we use the chain rule:
$\frac{d}{dx}(y^2) = 2y \frac{dy}{dx}$.
Physicists often take a shortcut and differentiate implicitly without writing down the intermediate steps.
For example, the above example can be solved by taking a differential of each side instead of a derivative:
$$
\begin{align*}
x^2 + y^2 &= 25 \\
d(x^2 + y^2) &= d(25) \\
2xdx + 2y dy &= 0 \\
y dy &= -xdx \\
\frac{dy}{dx} &= -\frac{x}{y}\\
&= \pm\frac{x}{\sqrt{25-x^2}}
\end{align*}
$$
Summary
- Product Rule: $\frac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x)$
- Quotient Rule: $\frac{d}{dx}\left[\frac{f(x)}{g(x)}\right] = \frac{f'(x)g(x) - f(x)g'(x)}{[g(x)]^2}$
- Chain Rule: $\frac{d}{dx}[f(g(x))] = f'(g(x)) \cdot g'(x)$
- Key Derivatives: $\frac{d}{dx}[e^x] = e^x$, $\frac{d}{dx}[\ln(x)] = \frac{1}{x}$, $\frac{d}{dx}[\sin(x)] = \cos(x)$, $\frac{d}{dx}[\cos(x)] = -\sin(x)$
- Implicit Differentiation: Differentiate both sides of an equation and solve for the derivative
- Complex functions often require combining multiple rules—identify which rules apply and work systematically