Block A — The Toolkit in Action

Example 1 — Roots and negative powers together

Differentiate 3x+2+12x2+4\sqrt{3x + 2} + \dfrac{1}{\sqrt{2x^2 + 4}} w.r.t. xx.

Step 1 — rewrite as powers: y=(3x+2)1/2+(2x2+4)−1/2y = (3x+2)^{1/2} + (2x^2+4)^{-1/2}.

Step 2 — chain rule on each: y′=12(3x+2)−1/2(3)−12(2x2+4)−3/2(4x)y' = \frac{1}{2}(3x+2)^{-1/2}(3) - \frac{1}{2}(2x^2+4)^{-3/2}(4x)

Answer: 323x+2−2x(2x2+4)3/2\dfrac{3}{2\sqrt{3x+2}} - \dfrac{2x}{(2x^2+4)^{3/2}}, defined for x>−23x > -\frac{2}{3}.

Example 2 — A change of base

Differentiate log⁡7(log⁡x)\log_7(\log x), x>1x > 1, w.r.t. xx.

Step 1 — change base: log⁡7(log⁡x)=log⁡(log⁡x)log⁡7\log_7(\log x) = \dfrac{\log(\log x)}{\log 7} — the denominator is a constant.

Step 2 — differentiate the numerator: ddxlog⁡(log⁡x)=1xlog⁡x\frac{d}{dx}\log(\log x) = \frac{1}{x\log x}.

Answer: 1x log⁡7 log⁡x\dfrac{1}{x\,\log 7\,\log x}.

Example 3 — Simplify before touching the derivative

Differentiate cos⁡−1(sin⁡x)\cos^{-1}(\sin x) w.r.t. xx.

Step 1 — co-function rewrite: sin⁡x=cos⁡(π2−x)\sin x = \cos\left(\frac{\pi}{2} - x\right), so f(x)=cos⁡−1cos⁡(π2−x)=π2−xf(x) = \cos^{-1}\cos\left(\frac{\pi}{2} - x\right) = \frac{\pi}{2} - x (on the principal range).

Step 2 — differentiate the linear result: f′(x)=−1f'(x) = -1.

Answer: −1-1 — a constant slope from an innocent-looking composite; brute chain rule gives −cos⁡x1−sin⁡2x\frac{-\cos x}{\sqrt{1 - \sin^2 x}}, which simplifies to the same.

Example 4 — The half-angle collapse inside an inverse tangent

Differentiate tan⁡−1(sin⁡x1+cos⁡x)\tan^{-1}\left(\dfrac{\sin x}{1 + \cos x}\right) w.r.t. xx.

Step 1 — half-angle: sin⁡x1+cos⁡x=2sin⁡x2cos⁡x22cos⁡2x2=tan⁡x2\dfrac{\sin x}{1 + \cos x} = \dfrac{2\sin\frac{x}{2}\cos\frac{x}{2}}{2\cos^2\frac{x}{2}} = \tan\frac{x}{2}.

Step 2 — collapse and differentiate: f(x)=tan⁡−1tan⁡x2=x2f(x) = \tan^{-1}\tan\frac{x}{2} = \frac{x}{2}, so f′(x)=12f'(x) = \frac{1}{2}.

Answer: 12\dfrac{1}{2}.

Example 5 — An exponential hiding a double angle

Differentiate sin⁡−1(2x+11+4x)\sin^{-1}\left(\dfrac{2^{x+1}}{1 + 4^x}\right) w.r.t. xx (for x<0x < 0).

Step 1 — spot the pattern: 2x+11+4x=2⋅2x1+(2x)2\dfrac{2^{x+1}}{1 + 4^x} = \dfrac{2 \cdot 2^x}{1 + (2^x)^2} — the double-angle shape with 2x2^x in place of tan⁡θ\tan\theta.

Step 2 — collapse: f(x)=2tan⁡−1(2x)f(x) = 2\tan^{-1}(2^x) on the given range.

Step 3 — differentiate: f′(x)=2⋅2xlog⁡21+4x=2x+1log⁡21+4xf'(x) = \dfrac{2 \cdot 2^x\log 2}{1 + 4^x} = \dfrac{2^{x+1}\log 2}{1 + 4^x}.

Answer: as displayed — the substitution dictionary works even when the "xx" inside is itself an exponential.

Example 6 — Sine to the power sine

Find f′(x)f'(x) if f(x)=(sin⁡x)sin⁡xf(x) = (\sin x)^{\sin x} for 0<x<π0 < x < \pi.

Step 1 — log: log⁡y=sin⁡xlog⁡(sin⁡x)\log y = \sin x \log(\sin x).

Step 2 — product + chain: 1yy′=cos⁡xlog⁡(sin⁡x)+sin⁡x⋅cos⁡xsin⁡x=cos⁡x[1+log⁡(sin⁡x)]\frac{1}{y}y' = \cos x\log(\sin x) + \sin x \cdot \frac{\cos x}{\sin x} = \cos x\left[1 + \log(\sin x)\right].

Answer: f′(x)=(sin⁡x)sin⁡xcos⁡x[1+log⁡(sin⁡x)]f'(x) = (\sin x)^{\sin x}\cos x\left[1 + \log(\sin x)\right].

Example 7 — Differentiating one function w.r.t. another

Differentiate sin⁡2x\sin^2 x with respect to ecos⁡xe^{\cos x}.

Step 1 — the ratio rule: with u=sin⁡2xu = \sin^2 x and v=ecos⁡xv = e^{\cos x}: dudv=du/dxdv/dx\frac{du}{dv} = \frac{du/dx}{dv/dx}.

Step 2 — both rates: dudx=2sin⁡xcos⁡x\frac{du}{dx} = 2\sin x\cos x and dvdx=−sin⁡x ecos⁡x\frac{dv}{dx} = -\sin x\, e^{\cos x}.

Step 3 — divide: dudv=2sin⁡xcos⁡x−sin⁡x ecos⁡x=−2cos⁡x e−cos⁡x\frac{du}{dv} = \frac{2\sin x\cos x}{-\sin x\,e^{\cos x}} = -2\cos x\, e^{-\cos x}.

Answer: −2cos⁡x e−cos⁡x-2\cos x\,e^{-\cos x} — "differentiate uu w.r.t. vv" always means divide the two xx-derivatives.

Example 8 — A ninth power, no expansion

Differentiate (3x2−9x+5)9(3x^2 - 9x + 5)^9 w.r.t. xx.

Step 1 — chain rule: 9(3x2−9x+5)8⋅(6x−9)9(3x^2 - 9x + 5)^8 \cdot (6x - 9).

Answer: 27(2x−3)(3x2−9x+5)827(2x - 3)(3x^2 - 9x + 5)^8 — factor the 33 out of 6x−96x - 9 for the tidy final form.

Example 9 — Powers of sine and cosine

Differentiate sin⁡3x+cos⁡6x\sin^3 x + \cos^6 x w.r.t. xx.

Step 1 — chain rule on each power: 3sin⁡2xcos⁡x+6cos⁡5x(−sin⁡x)3\sin^2 x\cos x + 6\cos^5 x(-\sin x).

Answer: 3sin⁡xcos⁡x(sin⁡x−2cos⁡4x)3\sin x\cos x\left(\sin x - 2\cos^4 x\right) — extract the common 3sin⁡xcos⁡x3\sin x\cos x to finish cleanly.

Block B — Logarithmic and Inverse-Trig Classics

Example 10 — A trig exponent on a linear base

Differentiate (5x)3cos⁡2x(5x)^{3\cos 2x} w.r.t. xx.

Step 1 — log: log⁡y=3cos⁡2xlog⁡5x\log y = 3\cos 2x \log 5x.

Step 2 — product rule: 1yy′=−6sin⁡2xlog⁡5x+3cos⁡2xx\frac{1}{y}y' = -6\sin 2x\log 5x + \frac{3\cos 2x}{x}.

Answer: dydx=(5x)3cos⁡2x[3cos⁡2xx−6sin⁡2xlog⁡5x]\dfrac{dy}{dx} = (5x)^{3\cos 2x}\left[\dfrac{3\cos 2x}{x} - 6\sin 2x\log 5x\right].

Example 11 — Three-halves power inside an inverse sine

Differentiate sin⁡−1(xx)\sin^{-1}(x\sqrt{x}), 0≤x≤10 \leq x \leq 1, w.r.t. xx.

Step 1 — rewrite the inside: xx=x3/2x\sqrt{x} = x^{3/2}.

Step 2 — chain rule: 11−x3⋅32x1/2\dfrac{1}{\sqrt{1 - x^3}} \cdot \dfrac{3}{2}x^{1/2}.

Answer: 3x21−x3\dfrac{3\sqrt{x}}{2\sqrt{1 - x^3}} — note (x3/2)2=x3(x^{3/2})^2 = x^3 under the root.

Example 12 — A quotient with an inverse cosine upstairs

Differentiate cos⁡−1x22x+7\dfrac{\cos^{-1}\frac{x}{2}}{\sqrt{2x + 7}}, −2<x<2-2 < x < 2, w.r.t. xx.

Step 1 — quotient rule pieces: ddxcos⁡−1x2=−14−x2\frac{d}{dx}\cos^{-1}\frac{x}{2} = \frac{-1}{\sqrt{4 - x^2}} (chain rule brings a 12\frac{1}{2} that merges into the root) and ddx2x+7=12x+7\frac{d}{dx}\sqrt{2x+7} = \frac{1}{\sqrt{2x+7}}.

Step 2 — assemble: dydx=−2x+74−x2−cos⁡−1x22x+72x+7\frac{dy}{dx} = \frac{\frac{-\sqrt{2x+7}}{\sqrt{4 - x^2}} - \frac{\cos^{-1}\frac{x}{2}}{\sqrt{2x+7}}}{2x + 7}

Answer: −[14−x22x+7+cos⁡−1x2(2x+7)3/2]-\left[\dfrac{1}{\sqrt{4 - x^2}\sqrt{2x+7}} + \dfrac{\cos^{-1}\frac{x}{2}}{(2x+7)^{3/2}}\right] — both terms negative, as expected for a decreasing numerator over a growing denominator.

Example 13 — The rationalising cotangent

Differentiate cot⁡−1[1+sin⁡x+1−sin⁡x1+sin⁡x−1−sin⁡x]\cot^{-1}\left[\dfrac{\sqrt{1 + \sin x} + \sqrt{1 - \sin x}}{\sqrt{1 + \sin x} - \sqrt{1 - \sin x}}\right], 0<x<π20 < x < \dfrac{\pi}{2}, w.r.t. xx.

Step 1 — half-angle inside the roots: 1±sin⁡x=(cos⁡x2±sin⁡x2)21 \pm \sin x = \left(\cos\frac{x}{2} \pm \sin\frac{x}{2}\right)^2, and on (0,π2)\left(0, \frac{\pi}{2}\right) both brackets are positive, so the roots strip cleanly.

Step 2 — simplify the big fraction: 2cos⁡x22sin⁡x2=cot⁡x2\dfrac{2\cos\frac{x}{2}}{2\sin\frac{x}{2}} = \cot\frac{x}{2}.

Step 3 — collapse: y=cot⁡−1cot⁡x2=x2y = \cot^{-1}\cot\frac{x}{2} = \frac{x}{2}, so y′=12y' = \frac{1}{2}.

Answer: 12\dfrac{1}{2} — the entire beast was x2\frac{x}{2} in disguise.

Example 14 — Log to the power log

Differentiate (log⁡x)log⁡x(\log x)^{\log x}, x>1x > 1, w.r.t. xx.

Step 1 — log: log⁡y=log⁡x⋅log⁡(log⁡x)\log y = \log x \cdot \log(\log x).

Step 2 — product rule: 1yy′=1xlog⁡(log⁡x)+log⁡x⋅1xlog⁡x=1x[log⁡(log⁡x)+1]\frac{1}{y}y' = \frac{1}{x}\log(\log x) + \log x \cdot \frac{1}{x\log x} = \frac{1}{x}\left[\log(\log x) + 1\right].

Answer: dydx=(log⁡x)log⁡x⋅1+log⁡(log⁡x)x\dfrac{dy}{dx} = (\log x)^{\log x}\cdot\dfrac{1 + \log(\log x)}{x}.

Example 15 — Constants riding inside a cosine

Differentiate cos⁡(acos⁡x+bsin⁡x)\cos(a\cos x + b\sin x) w.r.t. xx, for constants a,ba, b.

Step 1 — chain rule: −sin⁡(acos⁡x+bsin⁡x)⋅(−asin⁡x+bcos⁡x)-\sin(a\cos x + b\sin x) \cdot (-a\sin x + b\cos x).

Answer: (asin⁡x−bcos⁡x)sin⁡(acos⁡x+bsin⁡x)(a\sin x - b\cos x)\sin(a\cos x + b\sin x) — the two minus signs merge.

Example 16 — A sum that is secretly constant

Find dydx\dfrac{dy}{dx} if y=sin⁡−1x+sin⁡−11−x2y = \sin^{-1} x + \sin^{-1}\sqrt{1 - x^2}, 0<x<10 < x < 1.

Step 1 — recognise the pair: for 0<x<10 < x < 1, 1−x2=cos⁡(sin⁡−1x)\sqrt{1 - x^2} = \cos(\sin^{-1}x), so the second term is cos⁡−1x\cos^{-1} x — and sin⁡−1x+cos⁡−1x=π2\sin^{-1}x + \cos^{-1}x = \frac{\pi}{2}.

Step 2 — differentiate the constant: 00. (Term-by-term: 11−x2+11−(1−x2)⋅−x1−x2=11−x2−11−x2=0\frac{1}{\sqrt{1-x^2}} + \frac{1}{\sqrt{1 - (1-x^2)}}\cdot\frac{-x}{\sqrt{1-x^2}} = \frac{1}{\sqrt{1-x^2}} - \frac{1}{\sqrt{1-x^2}} = 0 ✓.)

Answer: dydx=0\dfrac{dy}{dx} = 0.

Example 17 — An implicit relation that solves itself

If x1+y+y1+x=0x\sqrt{1 + y} + y\sqrt{1 + x} = 0 for −1<x<1-1 < x < 1 (with x≠yx \neq y), prove that dydx=−1(1+x)2\dfrac{dy}{dx} = -\dfrac{1}{(1 + x)^2}.

Step 1 — isolate cleverly: x1+y=−y1+xx\sqrt{1+y} = -y\sqrt{1+x}; square both sides: x2(1+y)=y2(1+x)x^2(1 + y) = y^2(1 + x).

Step 2 — factor: x2−y2+x2y−xy2=(x−y)(x+y+xy)=0x^2 - y^2 + x^2 y - xy^2 = (x - y)(x + y + xy) = 0; since x≠yx \neq y, we get y=−x1+xy = -\dfrac{x}{1 + x}.

Step 3 — differentiate the explicit form (quotient rule): dydx=−(1+x)−x(1+x)2=−1(1+x)2\frac{dy}{dx} = -\frac{(1 + x) - x}{(1 + x)^2} = -\frac{1}{(1 + x)^2}

Answer: proved. ∎ Squaring converted an awkward radical relation into a factorable polynomial — then the explicit function did the rest.

Block C — Mixed Classics and Deeper Results

Example 18 — Four terms, four different rules

Differentiate xx+xa+ax+aax^x + x^a + a^x + a^a (for fixed a>0a > 0, x>0x > 0) w.r.t. xx.

Step 1 — classify each term: variable-variable, variable-constant, constant-variable, constant-constant.

Step 2 — apply the right rule to each: dydx=xx(1+log⁡x)+a xa−1+axlog⁡a+0\frac{dy}{dx} = x^x(1 + \log x) + a\,x^{a-1} + a^x\log a + 0

Answer: as displayed — one expression that examines the entire classification table at once.

Example 19 — Sine minus cosine to its own power

Differentiate (sin⁡x−cos⁡x)(sin⁡x−cos⁡x)(\sin x - \cos x)^{(\sin x - \cos x)}, π4<x<3π4\dfrac{\pi}{4} < x < \dfrac{3\pi}{4}, w.r.t. xx.

Step 1 — the interval matters: on it, sin⁡x−cos⁡x>0\sin x - \cos x > 0, so the logarithm is legal.

Step 2 — log and differentiate: log⁡y=(sin⁡x−cos⁡x)log⁡(sin⁡x−cos⁡x)\log y = (\sin x - \cos x)\log(\sin x - \cos x); with u=sin⁡x−cos⁡xu = \sin x - \cos x and u′=cos⁡x+sin⁡xu' = \cos x + \sin x: 1yy′=u′log⁡u+u⋅u′u=(cos⁡x+sin⁡x)[1+log⁡(sin⁡x−cos⁡x)]\frac{1}{y}y' = u'\log u + u \cdot \frac{u'}{u} = (\cos x + \sin x)\left[1 + \log(\sin x - \cos x)\right]

Answer: dydx=(sin⁡x−cos⁡x)(sin⁡x−cos⁡x)(cos⁡x+sin⁡x)[1+log⁡(sin⁡x−cos⁡x)]\dfrac{dy}{dx} = (\sin x - \cos x)^{(\sin x - \cos x)}(\cos x + \sin x)\left[1 + \log(\sin x - \cos x)\right].

Example 20 — A curvature-flavoured constant

If (x−a)2+(y−b)2=c2(x - a)^2 + (y - b)^2 = c^2 for some c>0c > 0, prove that [1+(dydx)2]3/2d2ydx2\dfrac{\left[1 + \left(\frac{dy}{dx}\right)^2\right]^{3/2}}{\frac{d^2y}{dx^2}} is a constant independent of aa and bb.

Step 1 — first implicit differentiation: (x−a)+(y−b)y′=0(x - a) + (y - b)y' = 0, so y′=−x−ay−by' = -\frac{x - a}{y - b}.

Step 2 — second differentiation: 1+(y′)2+(y−b)y′′=01 + (y')^2 + (y - b)y'' = 0, so y′′=−1+(y′)2y−by'' = -\frac{1 + (y')^2}{y - b}.

Step 3 — assemble: 1+(y′)2=(x−a)2+(y−b)2(y−b)2=c2(y−b)21 + (y')^2 = \frac{(x-a)^2 + (y-b)^2}{(y-b)^2} = \frac{c^2}{(y-b)^2}; then [1+(y′)2]3/2y′′=c3/(y−b)3−c2/(y−b)3=−c\frac{\left[1 + (y')^2\right]^{3/2}}{y''} = \frac{c^3/(y-b)^3}{-c^2/(y-b)^3} = -c

Answer: the ratio equals −c-c, free of aa and bb. ∎ (Geometrically: the expression measures the radius of curvature, and a circle's is its radius everywhere.)

Example 21 — An elegant implicit identity

If cos⁡y=xcos⁡(a+y)\cos y = x\cos(a + y) with cos⁡a≠±1\cos a \neq \pm 1, prove that dydx=cos⁡2(a+y)sin⁡a\dfrac{dy}{dx} = \dfrac{\cos^2(a + y)}{\sin a}.

Step 1 — differentiate implicitly: −sin⁡y y′=cos⁡(a+y)−xsin⁡(a+y) y′-\sin y \, y' = \cos(a + y) - x\sin(a + y)\,y'.

Step 2 — substitute x=cos⁡ycos⁡(a+y)x = \frac{\cos y}{\cos(a+y)} and collect: y′[cos⁡ysin⁡(a+y)cos⁡(a+y)−sin⁡y]=cos⁡(a+y)y'\left[\frac{\cos y \sin(a+y)}{\cos(a+y)} - \sin y\right] = \cos(a+y) The bracket is sin⁡(a+y)cos⁡y−cos⁡(a+y)sin⁡ycos⁡(a+y)=sin⁡acos⁡(a+y)\frac{\sin(a + y)\cos y - \cos(a + y)\sin y}{\cos(a+y)} = \frac{\sin a}{\cos(a+y)}.

Step 3 — solve: y′=cos⁡2(a+y)sin⁡ay' = \dfrac{\cos^2(a+y)}{\sin a}. ∎

Answer: proved — the compound-angle formula sin⁡(A−B)\sin(A - B) collapses the bracket in one stroke.

Example 22 — Two exotic powers added

Differentiate xx2−3+(x−3)x2x^{x^2 - 3} + (x - 3)^{x^2}, for x>3x > 3, w.r.t. xx.

Step 1 — log each term separately: with u=xx2−3u = x^{x^2-3}: log⁡u=(x2−3)log⁡x\log u = (x^2 - 3)\log x, so u′=u[x2−3x+2xlog⁡x]u' = u\left[\frac{x^2 - 3}{x} + 2x\log x\right].

Step 2 — the second term: with v=(x−3)x2v = (x-3)^{x^2}: log⁡v=x2log⁡(x−3)\log v = x^2\log(x - 3), so v′=v[x2x−3+2xlog⁡(x−3)]v' = v\left[\frac{x^2}{x - 3} + 2x\log(x - 3)\right].

Answer: dydx=xx2−3[x2−3x+2xlog⁡x]+(x−3)x2[x2x−3+2xlog⁡(x−3)]\frac{dy}{dx} = x^{x^2-3}\left[\frac{x^2 - 3}{x} + 2x\log x\right] + (x-3)^{x^2}\left[\frac{x^2}{x-3} + 2x\log(x-3)\right] — a sum of exotic powers is handled term by term, each with its own logarithm.

Example 23 — Modulus cubed is twice differentiable

If f(x)=∣x∣3f(x) = \vert x \vert^3, show that f′′(x)f''(x) exists for all real xx and find it.

Step 1 — split by sign: f(x)=x3f(x) = x^3 for x≥0x \geq 0 and f(x)=−x3f(x) = -x^3 for x<0x < 0.

Step 2 — differentiate each side twice: f′′(x)=6xf''(x) = 6x for x>0x > 0 and f′′(x)=−6xf''(x) = -6x for x<0x < 0.

Step 3 — glue at 00: f′(x)=±3x2→0f'(x) = \pm 3x^2 \to 0 from both sides (so f′(0)=0f'(0) = 0 exists), and likewise both second-derivative formulas approach 00 — the defining limits at 00 agree.

Answer: f′′(x)=6∣x∣f''(x) = 6\vert x \vert for all real xx. ∎ Cubing smooths the modulus corner enough for two derivatives — the third fails at 00.

Example 24 — Differentiation as a formula factory

Using sin⁡(A+B)=sin⁡Acos⁡B+cos⁡Asin⁡B\sin(A + B) = \sin A\cos B + \cos A\sin B and differentiation, obtain the sum formula for cosines.

Step 1 — treat AA as variable, BB as constant: differentiate both sides w.r.t. AA.

Step 2 — left side: cos⁡(A+B)\cos(A + B) by the chain rule (inner derivative 11).

Step 3 — right side: cos⁡Acos⁡B−sin⁡Asin⁡B\cos A\cos B - \sin A\sin B.

Answer: cos⁡(A+B)=cos⁡Acos⁡B−sin⁡Asin⁡B\cos(A + B) = \cos A\cos B - \sin A\sin B. ∎ Differentiating a trig identity yields its partner free of charge.

Example 25 — Exactly two bad points

Does there exist a function which is continuous everywhere but not differentiable at exactly two points?

Step 1 — build from corners: each ∣x−a∣\vert x - a \vert is continuous everywhere and non-differentiable only at aa, and sums of continuous functions are continuous.

Step 2 — the candidate: f(x)=∣x∣+∣x−1∣f(x) = \vert x \vert + \vert x - 1 \vert — continuous everywhere; at x=0x = 0 and x=1x = 1 one summand has a corner while the other is locally linear, so the corners survive; everywhere else both pieces are smooth.

Answer: yes — f(x)=∣x∣+∣x−1∣f(x) = \vert x \vert + \vert x - 1 \vert works, with non-differentiability at exactly x=0x = 0 and x=1x = 1.