doPhysics.in
All chapters
Differentiation · Lesson 3 of 6

Sines, Exponentials and the Chain Rule

16 min read2 ideas6 checks2 figures to playBy Asheshanand Acharya
What you will learn 0 / 2
Derivatives of sin cos and exp
Look around
How fast does the mains voltage change?

The voltage at a wall socket in Mumbai swings between \(+325\,\text{V}\) and \(-325\,\text{V}\), fifty times every second. A transformer does not respond to the voltage itself. It responds to how fast the voltage changes. That rate is largest at one moment of each cycle and zero at another. Which moments are they, and how large is the largest rate?

you will find the velocity of a body in SHM, how fast a mains voltage changes, and the decay rate of a sample.

The slopes of the sine

Draw the graph of \(\sin x\) and slide a tangent along it, as in Fig 3.1. Where the sine rises through zero, at \(x = 0\), its slope is \(+1\). At the top, \(x = \pi/2\), the tangent is flat. Where the sine falls through zero, at \(x = \pi\), the slope is \(-1\). At the bottom it is flat again. These slopes, plotted below, trace exactly the curve \(\cos x\).

The slopes of sin x trace cos xTop: the graph of y = sin x for x from 0 to 2π radians. Press play. A tangent slides along the curve, and a dashed line drops from the point of contact to the graph below. Bottom: the slope of the tangent at each x draws itself as the tangent moves, over a dashed reference curve cos x. The slope is 1 where the sine rises through zero, 0 at the top and bottom of the sine, and −1 where the sine falls through zero at x = π. The drawn slopes lie exactly on cos x.1234561−1Ox (rad)slope cos x 1234561−1Ox (rad)sin x x = 0.00 rad, slope = +1.00
Fig 3.1Press play. A tangent slides along \(\sin x\). Below, its slope draws itself over a dashed curve \(\cos x\), and lies exactly on it.
RememberDerivatives of the sine, the cosine, the exponential and the logarithm
\[ \begin{gathered} \dfrac{d}{dx}\sin x = \cos x \\ \dfrac{d}{dx}\cos x = -\sin x \\ \dfrac{d}{dx}e^x = e^x \\ \dfrac{d}{dx}\ln x = \dfrac{1}{x} \end{gathered} \]
Holds when\(x\) in radians for the sine and the cosine; \(x > 0\) for the logarithm; \(e = 2.718\ldots\)
Symbols\(\sin\), \(\cos\) the sine and cosine; \(e^x\) the exponential; \(\ln x\) the natural logarithm, the power to which \(e\) must be raised to give \(x\)
Units\(x\) is a pure number, an angle in radians or a ratio

The cosine follows the same way. Just after \(x = 0\), \(\cos x\) falls from its top, while \(\sin x\) is positive. The slopes of the cosine form the curve \(\cos x\) shifted by a quarter turn, which is \(-\sin x\). So differentiating a sine or a cosine twice brings back the same curve with a minus sign.

These results need the angle in radians. In radians a small angle and its sine are almost equal, so \(\sin x\) starts with slope exactly \(1\). In degrees one turn of the sine takes 360 units instead of \(2\pi\), so the curve is about 57 times wider. Its slope at zero is then only \(\pi/180 \approx 0.0175\) per degree. Every derivative of a sine or cosine in physics assumes radians.

The function that is its own slope

The number \(e = 2.718\ldots\) is chosen for one property. The graph of \(e^x\) crosses the \(y\) axis with slope exactly \(1\). Check it with \(h = 0.001\): \((e^{0.001} - 1)/0.001 = 1.0005\), and the value approaches \(1\) as \(h\) shrinks. From this one fact follows the derivative of \(e^x\) at every \(x\).

Deriving \(\dfrac{d}{dx}\,e^x = e^x\) step 1 of 3
1

\[ \dfrac{e^{x + h} - e^x}{h} = e^x\,\dfrac{e^h - 1}{h} \]

Why. \(e^{x + h} = e^x e^h\), so \(e^x\) comes out as a common factor.

So \(e^x\) is its own slope. The higher the curve, the steeper it is, in exact proportion. So exponentials appear wherever a quantity changes at a rate proportional to itself. Examples are a decaying count of nuclei, a discharging capacitor and a cooling cup of tea.

The natural logarithm \(\ln x\) undoes the exponential: \(\ln x\) is the power to which \(e\) must be raised to give \(x\). Its graph is the graph of \(e^x\) reflected in the line \(y = x\). Reflection turns every slope \(m\) into \(1/m\), and the result is \(d(\ln x)/dx = 1/x\). At \(x = 1\) the slope is \(1\); at \(x = 10\) it is only \(0.1\).

The derivatives that physics uses less often are collected below, for reference. Each one comes from the four above with the rules of this chapter.

Property
Derivative
Where it holds
\(\tan x\)
\(\sec^2 x\)
\(x\) in radians, \(\cos x \neq 0\)
\(\cot x\)
\(-\text{cosec}^2\,x\)
\(x\) in radians, \(\sin x \neq 0\)
\(\sec x\)
\(\sec x\tan x\)
\(x\) in radians, \(\cos x \neq 0\)
\(\text{cosec}\,x\)
\(-\text{cosec}\,x\cot x\)
\(x\) in radians, \(\sin x \neq 0\)
\(a^x\)
\(a^x\ln a\)
\(a > 0\), a constant base
\(\log_{10} x\)
\(1/(x\ln 10)\)
\(x > 0\)
\(\sin^{-1} x\)
\(1/\sqrt{1 - x^2}\)
\(|x| < 1\)
\(\cos^{-1} x\)
\(-1/\sqrt{1 - x^2}\)
\(|x| < 1\)
\(\tan^{-1} x\)
\(1/(1 + x^2)\)
every \(x\)
CheckpointUnanswered

A student measures an angle \(x\) in degrees and writes \(d(\sin x)/dx = \cos x\). What is wrong?

Checkpoint · numericUnanswered

A capacitor discharges so that its charge, as a fraction of the start, is \(y = e^{-2t}\), with \(t\) in seconds. Its derivative is \(dy/dt = -2e^{-2t}\). Find \(dy/dt\) at \(t = 0\).

± 2 %
The chain rule

A function of a function

In physics the time rarely appears alone inside a sine. A body on a spring moves as \(x = A\sin\omega t\), where \(\omega\) is a constant. The sine is applied to \(u = \omega t\), not to \(t\). Such a function of a function needs the chain rule. The sine changes at the rate \(\cos u\) per unit of \(u\). And \(u\) changes at the rate \(\omega\) per second. So the sine changes at \(\omega\cos u\) per second: the two rates multiply.

RememberThe chain rule
\[ \dfrac{dy}{dx} = \dfrac{dy}{du}\,\dfrac{du}{dx} \]
Holds when\(y\) has a derivative with respect to \(u\), and \(u\) has a derivative with respect to \(x\), at the point in question.
Symbols\(y = f(u)\) the outer function; \(u = g(x)\) the inner function
Unitsthe units of \(u\) cancel, leaving the unit of \(y\) divided by the unit of \(x\)
Deriving \(\dfrac{dy}{dx} = \dfrac{dy}{du}\,\dfrac{du}{dx}\) step 1 of 3
1

\[ \dfrac{\Delta y}{\Delta x} = \dfrac{\Delta y}{\Delta u}\,\dfrac{\Delta u}{\Delta x} \]

Why. a small change \(\Delta x\) causes a change \(\Delta u\), which causes \(\Delta y\). Multiply and divide by \(\Delta u\), which is not zero for a small \(\Delta x\).

Squeezing a graph sideways shows the rule at work. The curve \(\sin\omega t\) is the curve \(\sin t\) squeezed \(\omega\) times, so every rise now happens in \(1/\omega\) of the time. Fig 3.2 compares two points at the same height, one on each curve. The squeezed curve is \(\omega\) times as steep there.

Squeezing a curve multiplies its slopesTwo graphs against t from 0 to 6.6: the dashed curve sin t and the solid curve sin ωt, which is the same curve squeezed sideways by the factor ω. A slider sets ω from 1 to 3. The point P on sin t at t = 1 and the point Q on sin ωt at t = 1/ω have the same height, 0.84. The tangent at P has slope cos 1 = 0.54. The tangent at Q is ω times as steep, 0.54 ω: 1.08 for ω = 2 and 1.62 for ω = 3. This is the chain rule: the angle ωt grows ω times as fast as t, so every slope is multiplied by ω.1234561−1Ot (s)y P Q slope at Q = 0.54 × 2 = 1.08
SimMove the slider. The dashed curve is \(\sin t\) and the solid curve is \(\sin\omega t\). P and Q are at the same height, \(0.84\). The tangent at Q is always \(\omega\) times as steep as the tangent at P.

In words the rule is: differentiate the outer function with the inside left alone, then multiply by the derivative of the inside. So \(\cos\omega t\) gives \(-\omega\sin\omega t\). The exponential \(e^{-t/\tau}\) has the inside \(-t/\tau\), whose derivative is \(-1/\tau\), so it gives \(-e^{-t/\tau}/\tau\). And \((x^2 + 1)^3\) has the inside \(x^2 + 1\), so it gives \(3(x^2 + 1)^2 \times 2x = 6x(x^2 + 1)^2\).

The tangent of a decay

A current that dies away in a coil falls as \(I = I_0e^{-t/\tau}\). The chain rule gives its slope, \(dI/dt = -I/\tau\). The current falls at a rate proportional to what is left. So a tangent drawn at any instant, followed down to the time axis, always reaches it one time constant later. Fig 3.3 shows it with the numbers of a decaying current in Eddy Currents, Generators and Inductance: \(3\,\text{A}\) and \(\tau = 0.5\,\text{s}\).

The tangent of a decay meets the axis one time constant laterThe graph of a decaying current, I = 3e^(−t/0.5) amperes, for t from 0 to 2.5 s. Press play. A point P slides down the curve, and the tangent at P is drawn down to the time axis. A double arrow on the axis marks the gap from the instant of P to the point where the tangent meets the axis. The gap is always 0.5 s, the time constant τ, because the slope of the curve is always −I/τ: the current falls at a rate proportional to what is left. At t = 0 the slope is −6 A/s; at t = 0.4 s the current is 1.35 A and the slope is −2.70 A/s.0.511.522.5123Ot (s)I (A) τ = 0.5 s P t = 0.00 s, I = 3.00 A slope = −6.00 A/s
Fig 3.2Press play. The current \(I = 3e^{-t/0.5}\) amperes decays, and the tangent at P is drawn down to the time axis. The double arrow below the axis is always \(0.5\,\text{s}\) long. At \(t = 0\) the slope is \(-6\,\text{A/s}\). At \(t = 0.4\,\text{s}\) the current is \(1.35\,\text{A}\) and the slope is \(-2.70\,\text{A/s}\).
CheckpointUnanswered

What is the derivative of \(\cos 4t\) with respect to \(t\)?

CheckpointUnanswered

What is \(\dfrac{d}{dx}(x^2 + 1)^3\)?

CheckpointUnanswered

What is \(\dfrac{d}{dx}\ln(5x)\), for \(x > 0\)?

Common mistake

Two errors break these rules more than any other. First, the angle must be in radians; a calculator in degree mode gives wrong slopes. Second, \(\ln x\) exists only for \(x > 0\). A formula such as \(\ln(R - r)\) means nothing when \(R \le r\), and no derivative can rescue it.

Back to physics

Kinematics of SHM differentiates a sine twice to meet the law of simple harmonic motion. With the chain rule, each differentiation takes one line.

ExampleTwo derivatives of 0.2 sin 5t

This is the worked example of Kinematics of SHM, lesson 1, done with the tool. A quantity changes with time as \(x = 0.2\sin 5t\). Find \(dx/dt\) and \(d^2x/dt^2\), and show that \(d^2x/dt^2 = -25x\).

Try it on paper first. The solution is one tap away when you are ready.
Checkpoint · numericUnanswered

A sample holds \(N = 8000e^{-0.3465t}\) undecayed nuclei, with \(t\) in hours. Its activity is \(A = -dN/dt\), the number of decays per hour. Find the activity at \(t = 0\).

decays per hour± 2 %

Back to the socket

The mains voltage is \(V = 325\sin(100\pi t)\) volts. By the chain rule its rate of change is \(dV/dt = 325 \times 100\pi\cos(100\pi t)\). The rate is largest when the cosine is \(\pm 1\), that is, when the voltage itself passes through zero. There it is \(325 \times 100\pi \approx 1.02 \times 10^5\,\text{V/s}\). At the peaks of \(\pm 325\,\text{V}\) the cosine is zero, and the voltage is not changing at all for that instant.

In the world
Where this tool works in physics

With the chain rule, the derivatives of the sine and the cosine give the velocity and the acceleration in Kinematics of SHM. They also give the emf of a coil turning in a magnetic field. The same pair gives the particle velocity in a wave and the pressure of a sound wave in the waves unit. The derivative of an exponential gives the activity of a radioactive sample and the slope of a decaying current in a coil. The chain rule also links the equations for constant angular acceleration. It differentiates the mirror formula to find how fast an image moves.

Exam traps
  1. Forgetting the factor \(\omega\) when differentiating \(\sin\omega t\).
    By the chain rule, every differentiation of \(\sin\omega t\) or \(\cos\omega t\) brings one factor \(\omega\).
  2. Losing the minus sign in the derivative of the cosine.
    \(d(\cos x)/dx = -\sin x\): the cosine falls just after \(x = 0\).
  3. Differentiating \(e^x\) by the power rule, as \(xe^{x-1}\).
    The power rule needs a constant power. Here the variable is in the power, and \(e^x\) is its own derivative.

Where this tool works in the book

The physics that leans on this lesson. Each card opens the topic where the tool is at work.