Foundations to FrontierPart III: Calculus IBezhig

Module 10: The chain rule and elementary derivatives

8 exercises, each with a complete solution. 1 figure.

On this page
  1. A. Prerequisites and observable goals
  2. B. The central idea: rates multiply along a dependency chain
  3. C. The rule and a compact derivative dictionary
  4. D. Why the method works
  5. E. Read from outside inward, then multiply outward
  6. F. Worked examples with explicit layers
  7. Computing bridge: Chain rule as a dependency calculation
  8. G. Independent practice
  9. H. Complete solutions: Module 10
  10. I. Retention and readiness

A. Prerequisites and observable goals#

Before

Composition, derivative rules, radians, exponentials, and logarithms.

After

Differentiate nested functions without missing inner factors, use elementary derivative formulas with their domains, and distinguish a product from a composition.

B. The central idea: rates multiply along a dependency chain#

Suppose u=g(x)u=g(x) and y=f(u)y=f(u). A small input change first changes uu at rate g′(x)g'(x), then changes yy at rate f′(u)f'(u) per unit change in uu. The total rate with respect to xx multiplies these effects. The evaluation point of the outer derivative is the inner output, not automatically xx.

Rates multiply. For u=x2u=x^2 and y=3uy=3u, move xx from 22 to 2.12.1. Then uu moves about 44 times as far, from 44 to 4.414.41, and yy moves 33 times as far as uu, from 1212 to 13.2313.23. Altogether yy changes about 3⋅4=123\cdot4=12 times as fast as xx. Each line is drawn to its own scale.

C. The rule and a compact derivative dictionary#

If gg is differentiable at xx and ff is differentiable at g(x)g(x), then

 d dxf(g(x))=f′(g(x))g′(x).\boxed{\frac{\dd}{\dd x}f(g(x))=f'(g(x))g'(x)}.

For a differentiable inner function u=u(x)u=u(x), useful consequences are

(ur)′=rur−1u′,(eu)′=euu′,(bu)′=buln⁡(b)u′,(ln⁡∣u∣)′=u′u(u≠0),(sin⁡u)′=cos⁡u u′,(cos⁡u)′=−sin⁡u u′,(tan⁡u)′=sec⁡2u u′,(cot⁡u)′=−csc⁡2u u′,(sec⁡u)′=sec⁡utan⁡u u′,(csc⁡u)′=−csc⁡ucot⁡u u′.\begin{align*} (u^r)'&=ru^{r-1}u',&(e^u)'&=e^u u',\\ (b^u)'&=b^u\ln(b)u',&(\ln|u|)'&=\frac{u'}u\quad(u\ne0),\\ (\sin u)'&=\cos u\,u',&(\cos u)'&=-\sin u\,u',\\ (\tan u)'&=\sec^2u\,u',&(\cot u)'&=-\csc^2u\,u',\\ (\sec u)'&=\sec u\tan u\,u',&(\csc u)'&=-\csc u\cot u\,u'. \end{align*}

Here b>0b>0, and the trigonometric quotient functions require their usual nonzero denominators. For arbitrary real rr, use u>0u>0 unless an appropriate real branch is separately justified. The formula for ln⁡u\ln u itself requires u>0u>0; ln⁡∣u∣\ln|u| extends the derivative formula to nonzero negative inputs on their own intervals. These formulas are exact, not small-angle approximations. Chain-rule conditions and inverse-function derivatives: [O1Ch], [O1Inv].

D. Why the method works#

Optional proof from local linear changes. Let u=g(x)u=g(x), let hh be the change in xx, and let k=g(x+h)−g(x)k=g(x+h)-g(x) be the resulting change in uu. Differentiability means that we can write the exact decompositions

k=[g′(x)+α(h)]h,f(u+k)−f(u)=[f′(u)+β(k)]k,k=[g'(x)+\alpha(h)]h,\qquad f(u+k)-f(u)=[f'(u)+\beta(k)]k,

where the error factors α(h)→0\alpha(h)\to0 and β(k)→0\beta(k)\to0 as their inputs approach zero. Set β(0)=0\beta(0)=0 so the second identity also covers k=0k=0. For h≠0h\ne0, substitution gives

f(g(x+h))−f(g(x))h=[f′(u)+β(k)] [g′(x)+α(h)].\frac{f(g(x+h))-f(g(x))}{h} =[f'(u)+\beta(k)]\,[g'(x)+\alpha(h)].

Differentiability of gg implies k→0k\to0 when h→0h\to0, so the limit is f′(u)g′(x)f'(u)g'(x). This proof never divides by kk, which could be zero. The informal “cancel dudu” mnemonic alone does not establish the theorem.

For sine, use the addition formula in its difference quotient:

sin⁡(x+h)−sin⁡xh=sin⁡xcos⁡h−1h+cos⁡xsin⁡hh.\frac{\sin(x+h)-\sin x}{h} =\sin x\frac{\cos h-1}{h}+\cos x\frac{\sin h}{h}.

The two basic radian limits make this approach 0+cos⁡x0+\cos x. For exponentials, ex+h=exehe^{x+h}=e^x e^h reduces the derivative to exlim⁡h→0(eh−1)/h=exe^x\lim_{h\to0}(e^h-1)/h=e^x. The normalization of the base ee makes that final limit equal to one. Other bases add the factor ln⁡b\ln b.

E. Read from outside inward, then multiply outward#

For 1+e2x\sqrt{1+e^{2x}}, the outer operation is a square root, then addition, then an exponential, then multiplication of the input by 22. Differentiate each layer at its current input and multiply the chain factors. For x2exx^2e^x, the outer operation is multiplication of two functions, so start with the product rule. A problem may need both rules: differentiate the product, then apply the chain rule within its terms.

A useful self-check is to count nonlinear nesting layers. If sin⁡(5x)\sin(5x) gives only cos⁡(5x)\cos(5x), the derivative of the inner 5x5x was lost. If a derivative of ln⁡(1+x2)\ln(1+x^2) contains 1/x1/x, the original inner expression was incorrectly replaced instead of preserved.

F. Worked examples with explicit layers#

Power of a trigonometric function. Write y=[sin⁡(3x)]2y=[\sin(3x)]^2. The outside square differentiates to twice its input; sine contributes cosine; 3x3x contributes 33:

y′=2sin⁡(3x)⋅cos⁡(3x)⋅3=6sin⁡(3x)cos⁡(3x).y'=2\sin(3x)\cdot\cos(3x)\cdot3 =6\sin(3x)\cos(3x).

The notation sin⁡2(3x)\sin^2(3x) means this square, not sin⁡((3x)2)\sin((3x)^2).

Product plus chain. For y=(x2+1)e−3xy=(x^2+1)e^{-3x},

y′=2xe−3x+(x2+1)e−3x(−3)=e−3x(2x−3x2−3).y'=2xe^{-3x}+(x^2+1)e^{-3x}(-3) =e^{-3x}(2x-3x^2-3).

The exponential changes too, so treating it as a constant would lose the second term.

Finish the layer. For y=ln⁡(4+x2)y=\ln(4+x^2), the outer derivative is 1/(4+x2)1/(4+x^2). Multiply by 2x2x to finish: y′=2x/(4+x2)y'=2x/(4+x^2). The log input is positive for every real xx, so this derivative is valid everywhere.

Computing bridge: Chain rule as a dependency calculation#

For u=3x+1u=3x+1 and y=u2y=u^2, a small change travels through two stages:  du/ dx=3\dd u/\dd x=3 and  dy/ du=2u\dd y/\dd u=2u. Their product gives  dy/ dx=6(3x+1)\dd y/\dd x=6(3x+1). A computational graph records these dependencies explicitly. T03 later applies the same rule to a loss function with many parameters. The mathematical chain rule is the foundation; a library computing gradients does not remove the need to understand the graph or the differentiability assumptions.

G. Independent practice#

F foundation C standard course work T transfer S optional stretch L runnable lab or project. Attempt the complete set before opening its solutions.

M10.01FSolution

Differentiate (5x2−1)4(5x^2-1)^4.

M10.02CSolution

Differentiate esin⁡xe^{\sin x}.

M10.03CSolution

Differentiate ln⁡(2+x2)\ln(2+x^2) and state its real domain.

M10.04CSolution

Differentiate sec⁡2(3x)\sec^2(3x) and state the excluded inputs.

M10.05CSolution

Differentiate x2e−xx^2e^{-x}.

M10.06TSolution

Differentiate (ln⁡x)/x(\ln x)/x, and find the inputs where its derivative is zero.

M10.07TSolution

Let h(x)=f(g(x))h(x)=f(g(x)), where g(2)=5g(2)=5, g′(2)=−3g'(2)=-3, f′(5)=4f'(5)=4, and f′(2)=7f'(2)=7. Find h′(2)h'(2) and explain which given value is irrelevant.

M10.08SSolution

Find the tangent line to y=1+e2xy=\sqrt{1+e^{2x}} at x=0x=0. Show every chain factor before simplification.

Optional small hints

For M10.04, sec⁡2(3x)\sec^2(3x) is a square of a secant, not the derivative of tangent. For M10.08, compute the curve’s height separately from its derivative.

H. Complete solutions: Module 10#

Compare the first step where your work differs. A corrected answer is not yet an independent success.

M10.01Show solution

A polynomial inside a fourth power

Set u=5x2−1u=5x^2-1. The outer derivative is 4u34u^3 and u′=10xu'=10x. Thus

y′=4(5x2−1)3(10x)=40x(5x2−1)3.\boxed{y'=4(5x^2-1)^3(10x)=40x(5x^2-1)^3}.

Both original and derivative are polynomials, defined for all real inputs.

Back to M10.01
M10.02Show solution

An exponential of a sine

The outer exponential reproduces itself evaluated at its current input: esin⁡xe^{\sin x}. The inner derivative is cos⁡x\cos x. Multiplication gives esin⁡xcos⁡x\boxed{e^{\sin x}\cos x}. The exponential factor never vanishes, so the sign of the slope follows the sign of cos⁡x\cos x.

Back to M10.02
M10.03Show solution

A log of a positive inner function

Because 2+x2>02+x^2>0 for all real xx, the domain is R\R. The outer derivative is 1/(2+x2)1/(2+x^2) and the inner derivative is 2x2x, so 2x/(2+x2)\boxed{2x/(2+x^2)}. In particular, the slope at zero is zero, consistent with the original being an even function with a minimum there.

Back to M10.03
M10.04Show solution

Three chain factors

Writing y=[sec⁡(3x)]2y=[\sec(3x)]^2 exposes the layers:

y′=2sec⁡(3x)⋅[sec⁡(3x)tan⁡(3x)]⋅3=6sec⁡2(3x)tan⁡(3x).y'=2\sec(3x)\cdot[\sec(3x)\tan(3x)]\cdot3 =\boxed{6\sec^2(3x)\tan(3x)}.

Both the original and derivative exclude cos⁡(3x)=0\cos(3x)=0, that is x=π/6+kπ/3\boxed{x=\pi/6+k\pi/3} for integers kk.

Back to M10.04
M10.05Show solution

Product outside, chain inside

Use the product rule, then the derivative of e−xe^{-x}:

y′=2xe−x+x2e−x(−1)=e−x(2x−x2).y'=2xe^{-x}+x^2e^{-x}(-1) =\boxed{e^{-x}(2x-x^2)}.

The second term is negative because the inner derivative of −x-x is −1-1. The domain is all real inputs.

Back to M10.05
M10.06Show solution

Derivative of a quotient, then solve its zero equation

The real domain is x>0x>0. Quotient rule gives

y′=(1/x)x−ln⁡xx2=1−ln⁡xx2.y'=\frac{(1/x)x-\ln x}{x^2}=\frac{1-\ln x}{x^2}.

Since x2>0x^2>0, its zeros solve ln⁡x=1\ln x=1, hence x=e\boxed{x=e}. This identifies a horizontal tangent; classifying an extremum requires the sign analysis developed in Module 14.

Back to M10.06
M10.07Show solution

Evaluate the outer derivative at the inner output

The chain rule gives h′(2)=f′(g(2))g′(2)=f′(5)(−3)=−12h'(2)=f'(g(2))g'(2)=f'(5)(-3)=\boxed{-12}. The value f′(2)=7f'(2)=7 is irrelevant because the input arriving at ff is 55, not 22. This problem tests the location of evaluation, not just multiplication of available numbers.

Back to M10.07
M10.08Show solution

A tangent through a nested function

The height is y(0)=2y(0)=\sqrt2. The derivative before simplification is

12(1+e2x)−1/2⋅e2x⋅2=e2x1+e2x.\frac12(1+e^{2x})^{-1/2}\cdot e^{2x}\cdot2 =\frac{e^{2x}}{\sqrt{1+e^{2x}}}.

At zero the slope is 1/21/\sqrt2. Therefore

y−2=12x.\boxed{y-\sqrt2=\frac1{\sqrt2}x}.

The radical input is strictly positive everywhere. The tangent at zero has the correct height and positive slope.

Back to M10.08

I. Retention and readiness#

Return to M03.01 and M09.06, then solve M10.07 from memory of the rule rather than the numbers. Advance when you can identify the outermost operation in a fresh expression and explain the evaluation point of every chain factor. Repair composition before memorizing more derivative tables.