Solved Examples — the Full Chapter Workout

Thirty worked problems: first-principles classics, then the full differentiation toolkit worked by type — quotients, products, trig simplifications and powers. Attempt each before reading the solution.

Example 1: First principles on a quotient

Differentiate f(x)=2x+3x−2f(x) = \frac{2x+3}{x-2} from first principles.

Solution:

Step 1 — Set up the difference quotient. f(x+h)−f(x)h=1h[2x+2h+3x+h−2−2x+3x−2]\frac{f(x+h) - f(x)}{h} = \frac{1}{h}\left[\frac{2x+2h+3}{x+h-2} - \frac{2x+3}{x-2}\right].

Step 2 — Combine over the common denominator. The numerator is (2x+2h+3)(x−2)−(2x+3)(x+h−2)(2x+2h+3)(x-2) - (2x+3)(x+h-2); expanding, every term without hh cancels, leaving −7h-7h.

Step 3 — Divide and limit. −7(x−2)(x+h−2)→−7(x−2)2\frac{-7}{(x-2)(x+h-2)} \to -\frac{7}{(x-2)^2} (x≠2x \ne 2).

First principles worked for x squared one by x sin x and constants

Takeaway: −7=ad−bc-7 = ad - bc for ax+bcx+d\frac{ax+b}{cx+d} here — first principles secretly derives the quotient-rule shortcut ad−bc(cx+d)2\frac{ad-bc}{(cx+d)^2}.

Example 2: First principles on x+1xx + \frac{1}{x}

Differentiate f(x)=x+1xf(x) = x + \frac{1}{x} from first principles.

Solution:

Step 1 — Split the quotient. 1h[(x+h)−x+1x+h−1x]=1+1h⋅−hx(x+h)\frac{1}{h}\left[(x + h) - x + \frac{1}{x+h} - \frac{1}{x}\right] = 1 + \frac{1}{h}\cdot\frac{-h}{x(x+h)}.

Step 2 — Simplify. =1−1x(x+h)= 1 - \frac{1}{x(x+h)}.

Step 3 — Limit. f′(x)=1−1x2f'(x) = 1 - \frac{1}{x^2}.

Takeaway: First principles respects sums — each piece contributes its own derivative, here 11 and −1x2-\frac{1}{x^2}.

Example 3: sin⁡x+cos⁡x\sin x + \cos x

Differentiate f(x)=sin⁡x+cos⁡xf(x) = \sin x + \cos x from first principles.

Solution:

Step 1 — Expand both compound angles. sin⁡(x+h)=sin⁡xcos⁡h+cos⁡xsin⁡h\sin(x+h) = \sin x\cos h + \cos x\sin h; cos⁡(x+h)=cos⁡xcos⁡h−sin⁡xsin⁡h\cos(x+h) = \cos x\cos h - \sin x\sin h.

Step 2 — Group by the two fundamental ratios. The quotient becomes sin⁡hh(cos⁡x−sin⁡x)+cos⁡h−1h(sin⁡x+cos⁡x)\frac{\sin h}{h}(\cos x - \sin x) + \frac{\cos h - 1}{h}(\sin x + \cos x).

Step 3 — Limit. sin⁡hh→1\frac{\sin h}{h} \to 1 and cos⁡h−1h→0\frac{\cos h - 1}{h} \to 0: f′(x)=cos⁡x−sin⁡xf'(x) = \cos x - \sin x.

Takeaway: Every trig first-principles computation funnels into the same two limits — organise the algebra AROUND them.

Example 4: xsin⁡xx \sin x

Differentiate f(x)=xsin⁡xf(x) = x\sin x from first principles.

Solution:

Step 1 — Add and subtract to split. (x+h)sin⁡(x+h)−xsin⁡x=x[sin⁡(x+h)−sin⁡x]+hsin⁡(x+h)(x+h)\sin(x+h) - x\sin x = x[\sin(x+h) - \sin x] + h\sin(x+h).

Step 2 — Divide by hh. x⋅sin⁡(x+h)−sin⁡xh+sin⁡(x+h)x \cdot \frac{\sin(x+h) - \sin x}{h} + \sin(x+h).

Step 3 — Limit. The first term →xcos⁡x\to x\cos x (the sin⁡\sin derivative); the second →sin⁡x\to \sin x: f′(x)=xcos⁡x+sin⁡xf'(x) = x\cos x + \sin x.

Takeaway: The split-off cross-term is exactly how the product rule is BORN — first principles on a product previews Leibnitz.

Example 5: Sign flips

Differentiate from first principles: (i) −x-x; (ii) −1x-\frac{1}{x}.

Solution:

Step 1 — (i). −(x+h)−(−x)h=−hh=−1\frac{-(x+h) - (-x)}{h} = \frac{-h}{h} = -1: derivative −1-1.

Step 2 — (ii) Combine fractions. 1h(−1x+h+1x)=1h⋅hx(x+h)=1x(x+h)\frac{1}{h}\left(\frac{-1}{x+h} + \frac{1}{x}\right) = \frac{1}{h}\cdot\frac{h}{x(x+h)} = \frac{1}{x(x+h)}.

Step 3 — Limit. 1x2\frac{1}{x^2} — the minus in the function flips the usual −1x2-\frac{1}{x^2}.

Takeaway: Constants (including −1-1) ride through derivatives untouched: (λf)′=λf′(\lambda f)' = \lambda f'.

Example 6: Shifted sines and cosines

Differentiate from first principles: (i) sin⁡(x+1)\sin(x+1); (ii) cos⁡(x−π8)\cos\left(x - \frac{\pi}{8}\right).

Solution:

Step 1 — (i) Sum-to-product. sin⁡(x+h+1)−sin⁡(x+1)h=2cos⁡(x+1+h2)sin⁡h2h\frac{\sin(x+h+1) - \sin(x+1)}{h} = \frac{2\cos\left(x + 1 + \frac{h}{2}\right)\sin\frac{h}{2}}{h}.

Step 2 — (i) Limit. cos⁡(x+1)⋅1=cos⁡(x+1)\cos(x + 1) \cdot 1 = \cos(x+1).

Step 3 — (ii) Same factorisation with cosine. −2sin⁡(x−π8+h2)sin⁡h2h→−sin⁡(x−π8)\frac{-2\sin\left(x - \frac{\pi}{8} + \frac{h}{2}\right)\sin\frac{h}{2}}{h} \to -\sin\left(x - \frac{\pi}{8}\right).

Takeaway: A constant shift inside sin or cos survives differentiation unchanged — the derivative just wears the same shift.

Example 7: Linear pieces

Differentiate: (i) x+ax + a; (ii) (px+q)(rx+s)(px + q)\left(\frac{r}{x} + s\right).

Solution:

Step 1 — (i). (x)′=1(x)' = 1, (a)′=0(a)' = 0: derivative 1.

Step 2 — (ii) Expand. pr+psx+qrx+qspr + psx + \frac{qr}{x} + qs.

Step 3 — Differentiate. ps−qrx2ps - \frac{qr}{x^2} (the constants prpr, qsqs die).

Takeaway: Expanding a small product beats Leibnitz when the expansion has two live terms — count before you choose the tool.

Example 8: Product with a squared factor

Differentiate (ax+b)(cx+d)2(ax + b)(cx + d)^2.

Solution:

Step 1 — Identify the pieces. u=ax+bu = ax + b, u′=au' = a; v=(cx+d)2v = (cx+d)^2, v′=2c(cx+d)v' = 2c(cx+d) (power-of-linear rule).

Step 2 — Leibnitz. a(cx+d)2+(ax+b)⋅2c(cx+d)a(cx+d)^2 + (ax+b)\cdot 2c(cx+d).

Step 3 — Present. =(cx+d)[a(cx+d)+2c(ax+b)]= (cx+d)\left[a(cx+d) + 2c(ax+b)\right] — factored, ready for any follow-up.

Takeaway: Factor the common (cx+d)(cx + d) out of the answer — factored derivatives are what root-finding questions want next.

Example 9: The ad−bc(cx+d)2\frac{ad - bc}{(cx+d)^2} pattern

Differentiate: (i) ax+bcx+d\frac{ax+b}{cx+d}; (ii) 1+1x1−1x\frac{1 + \frac{1}{x}}{1 - \frac{1}{x}}.

Solution:

Step 1 — (i) Quotient rule. a(cx+d)−c(ax+b)(cx+d)2=ad−bc(cx+d)2\frac{a(cx+d) - c(ax+b)}{(cx+d)^2} = \frac{ad - bc}{(cx+d)^2}.

Step 2 — (ii) Simplify FIRST. Multiply top and bottom by xx: x+1x−1\frac{x+1}{x-1} (for x≠0x \ne 0).

Step 3 — (ii) Apply the pattern. a=1,b=1,c=1,d=−1a=1, b=1, c=1, d=-1: (1)(−1)−(1)(1)(x−1)2=−2(x−1)2\frac{(1)(-1) - (1)(1)}{(x-1)^2} = \frac{-2}{(x-1)^2}.

Takeaway: ad−bc(cx+d)2\frac{ad-bc}{(cx+d)^2} is worth memorising — linear-over-linear derivatives become one determinant.

Example 10: Reciprocals of quadratics

Differentiate: (i) 1ax2+bx+c\frac{1}{ax^2 + bx + c}; (ii) ax+bpx2+qx+r\frac{ax + b}{px^2 + qx + r}; (iii) px2+qx+rax+b\frac{px^2 + qx + r}{ax + b}.

Solution:

Step 1 — (i) Quotient rule with u=1u = 1. 0−(2ax+b)(ax2+bx+c)2=−2ax+b(ax2+bx+c)2\frac{0 - (2ax + b)}{(ax^2+bx+c)^2} = -\frac{2ax + b}{(ax^2 + bx + c)^2}.

Step 2 — (ii). a(px2+qx+r)−(ax+b)(2px+q)(px2+qx+r)2\frac{a(px^2+qx+r) - (ax+b)(2px+q)}{(px^2+qx+r)^2}.

Step 3 — (iii) Roles swapped. (2px+q)(ax+b)−a(px2+qx+r)(ax+b)2\frac{(2px+q)(ax+b) - a(px^2+qx+r)}{(ax+b)^2}.

Takeaway: A reciprocal's derivative is −v′v2-\frac{v'}{v^2} — the u=1u = 1 special case of the quotient rule, worth knowing on its own.

Example 11: Negative and fractional powers

Differentiate: (i) ax4−bx2+cos⁡x\frac{a}{x^4} - \frac{b}{x^2} + \cos x; (ii) 4x−24\sqrt{x} - 2.

Solution:

Step 1 — (i) Rewrite as powers. ax−4−bx−2+cos⁡xax^{-4} - bx^{-2} + \cos x.

Step 2 — (i) Power rule each. −4ax−5+2bx−3−sin⁡x=−4ax5+2bx3−sin⁡x-4ax^{-5} + 2bx^{-3} - \sin x = -\frac{4a}{x^5} + \frac{2b}{x^3} - \sin x.

Step 3 — (ii). 4⋅12x−1/2=2x4 \cdot \frac{1}{2}x^{-1/2} = \frac{2}{\sqrt{x}}.

Takeaway: xnx^n's rule is universal — negative and fractional exponents included; rewrite radicals and reciprocals as powers first.

Example 12: Powers of linear factors

Differentiate: (i) (ax+b)n(ax + b)^n; (ii) (ax+b)n(cx+d)m(ax+b)^n(cx+d)^m.

Solution:

Step 1 — (i) Binomial first principles. (ax+ah+b)n−(ax+b)n=nah(ax+b)n−1+O(h2)(ax + ah + b)^n - (ax+b)^n = nah(ax+b)^{n-1} + O(h^2): derivative na(ax+b)n−1na(ax+b)^{n-1}.

Step 2 — (ii) Leibnitz with two such powers. na(ax+b)n−1(cx+d)m+mc(ax+b)n(cx+d)m−1na(ax+b)^{n-1}(cx+d)^m + mc(ax+b)^n(cx+d)^{m-1}.

Step 3 — Factor. =(ax+b)n−1(cx+d)m−1[na(cx+d)+mc(ax+b)]= (ax+b)^{n-1}(cx+d)^{m-1}\left[na(cx+d) + mc(ax+b)\right].

Takeaway: The inner coefficient always multiplies out (nana, not just nn) — the pre-chain-rule fact to internalise this year.

Example 13: Shifted sine, cosec-cot product

Differentiate: (i) sin⁡(x+a)\sin(x + a); (ii) cosec xcot⁡x\mathrm{cosec}\,x\cot x.

Solution:

Step 1 — (i) First principles with sum-to-product. 2cos⁡(x+a+h2)sin⁡h2h→cos⁡(x+a)\frac{2\cos\left(x + a + \frac{h}{2}\right)\sin\frac{h}{2}}{h} \to \cos(x + a).

Step 2 — (ii) Leibnitz. (cosec x)′cot⁡x+cosec x(cot⁡x)′=(−cosec xcot⁡x)cot⁡x+cosec x(−cosec2x)(\mathrm{cosec}\,x)'\cot x + \mathrm{cosec}\,x(\cot x)' = (-\mathrm{cosec}\,x\cot x)\cot x + \mathrm{cosec}\,x(-\mathrm{cosec}^2 x).

Step 3 — Collect. −cosec x (cot⁡2x+cosec2x)-\mathrm{cosec}\,x\,(\cot^2 x + \mathrm{cosec}^2 x).

Takeaway: Factor the common −cosec x-\mathrm{cosec}\,x — collected forms are what markers (and later substitutions) want.

Example 14: A collapsing quotient

Differentiate cos⁡x1+sin⁡x\frac{\cos x}{1 + \sin x}.

Solution:

Step 1 — Quotient rule. −sin⁡x(1+sin⁡x)−cos⁡xcos⁡x(1+sin⁡x)2\frac{-\sin x(1 + \sin x) - \cos x\cos x}{(1 + \sin x)^2}.

Step 2 — Expand the numerator. −sin⁡x−sin⁡2x−cos⁡2x=−sin⁡x−1-\sin x - \sin^2 x - \cos^2 x = -\sin x - 1.

Step 3 — Cancel. −(1+sin⁡x)(1+sin⁡x)2=−11+sin⁡x\frac{-(1 + \sin x)}{(1 + \sin x)^2} = -\frac{1}{1 + \sin x}.

Takeaway: When sin⁡2+cos⁡2\sin^2 + \cos^2 appears in a numerator, a collapse is coming — simplify before declaring the answer.

Example 15: Symmetric sin-cos quotient

Differentiate sin⁡x+cos⁡xsin⁡x−cos⁡x\frac{\sin x + \cos x}{\sin x - \cos x}.

Solution:

Step 1 — Quotient rule numerator. (cos⁡x−sin⁡x)(sin⁡x−cos⁡x)−(sin⁡x+cos⁡x)(cos⁡x+sin⁡x)(\cos x - \sin x)(\sin x - \cos x) - (\sin x + \cos x)(\cos x + \sin x).

Step 2 — Recognise the squares. =−(sin⁡x−cos⁡x)2−(sin⁡x+cos⁡x)2= -(\sin x - \cos x)^2 - (\sin x + \cos x)^2.

Step 3 — Add. The cross terms cancel: −2(sin⁡2x+cos⁡2x)=−2-2(\sin^2 x + \cos^2 x) = -2. Derivative: −2(sin⁡x−cos⁡x)2\frac{-2}{(\sin x - \cos x)^2}.

Takeaway: (a−b)2+(a+b)2=2(a2+b2)(a-b)^2 + (a+b)^2 = 2(a^2 + b^2) — an algebra identity doing calculus work.

Example 16: sec ratios via half-angles

Differentiate sec⁡x−1sec⁡x+1\frac{\sec x - 1}{\sec x + 1}.

Solution:

Step 1 — Clear the sec. Multiply top and bottom by cos⁡x\cos x: 1−cos⁡x1+cos⁡x\frac{1 - \cos x}{1 + \cos x}.

Step 2 — Quotient rule. sin⁡x(1+cos⁡x)−(1−cos⁡x)(−sin⁡x)(1+cos⁡x)2\frac{\sin x(1 + \cos x) - (1 - \cos x)(-\sin x)}{(1 + \cos x)^2}.

Step 3 — Collect. sin⁡x[(1+cos⁡x)+(1−cos⁡x)](1+cos⁡x)2=2sin⁡x(1+cos⁡x)2\frac{\sin x\left[(1 + \cos x) + (1 - \cos x)\right]}{(1+\cos x)^2} = \frac{2\sin x}{(1 + \cos x)^2}.

Takeaway: Converting sec/cosec ratios to sin/cos FIRST almost always shortens the differentiation.

Example 17: Powers of sine

Differentiate sin⁡nx\sin^n x.

Solution:

Step 1 — Base cases. (sin⁡1x)′=cos⁡x(\sin^1 x)' = \cos x; (sin⁡2x)′=2sin⁡xcos⁡x(\sin^2 x)' = 2\sin x\cos x (Leibnitz).

Step 2 — Induction step. If (sin⁡n−1x)′=(n−1)sin⁡n−2xcos⁡x(\sin^{n-1}x)' = (n-1)\sin^{n-2}x\cos x, then Leibnitz on sin⁡x⋅sin⁡n−1x\sin x \cdot \sin^{n-1}x gives cos⁡xsin⁡n−1x+(n−1)sin⁡n−2xcos⁡xsin⁡x\cos x\sin^{n-1}x + (n-1)\sin^{n-2}x\cos x\sin x.

Step 3 — Collect. nsin⁡n−1xcos⁡xn\sin^{n-1}x\cos x. ∎

Takeaway: The pattern "power drops, times inner derivative" is the chain rule announcing itself a year early.

Example 18: The general sin-cos quotient

Differentiate a+bsin⁡xc+dcos⁡x\frac{a + b\sin x}{c + d\cos x}.

Solution:

Step 1 — Quotient rule. Numerator: bcos⁡x(c+dcos⁡x)−(a+bsin⁡x)(−dsin⁡x)b\cos x(c + d\cos x) - (a + b\sin x)(-d\sin x).

Step 2 — Expand. bccos⁡x+bdcos⁡2x+adsin⁡x+bdsin⁡2xbc\cos x + bd\cos^2 x + ad\sin x + bd\sin^2 x.

Step 3 — Collapse. bd(cos⁡2+sin⁡2)=bdbd(\cos^2 + \sin^2) = bd: derivative bccos⁡x+adsin⁡x+bd(c+dcos⁡x)2\frac{bc\cos x + ad\sin x + bd}{(c + d\cos x)^2}.

Takeaway: Four letters, one collapse — the bdbd constant term is the signature of this classic.

Example 19: A hidden compound angle

Differentiate sin⁡(x+a)cos⁡x\frac{\sin(x + a)}{\cos x}.

Solution:

Step 1 — Quotient rule. Numerator: cos⁡(x+a)cos⁡x−sin⁡(x+a)(−sin⁡x)\cos(x+a)\cos x - \sin(x+a)(-\sin x).

Step 2 — Recognise the formula. cos⁡(x+a)cos⁡x+sin⁡(x+a)sin⁡x=cos⁡((x+a)−x)\cos(x+a)\cos x + \sin(x+a)\sin x = \cos\big((x+a) - x\big).

Step 3 — Conclude. =cos⁡a= \cos a: derivative cos⁡acos⁡2x\frac{\cos a}{\cos^2 x} — a CONSTANT over cos⁡2x\cos^2 x.

Takeaway: cos⁡Acos⁡B+sin⁡Asin⁡B=cos⁡(A−B)\cos A\cos B + \sin A\sin B = \cos(A - B) — spot compound-angle skeletons inside quotient-rule numerators.

Example 20: Polynomial × trig products

Differentiate: (i) x4(5sin⁡x−3cos⁡x)x^4(5\sin x - 3\cos x); (ii) (x2+1)cos⁡x(x^2 + 1)\cos x.

Solution:

Step 1 — (i) Leibnitz. 4x3(5sin⁡x−3cos⁡x)+x4(5cos⁡x+3sin⁡x)4x^3(5\sin x - 3\cos x) + x^4(5\cos x + 3\sin x).

Step 2 — (ii) Leibnitz. 2xcos⁡x+(x2+1)(−sin⁡x)2x\cos x + (x^2 + 1)(-\sin x).

Step 3 — Present. 2xcos⁡x−(x2+1)sin⁡x2x\cos x - (x^2 + 1)\sin x.

Takeaway: Differentiate the bracket carefully — (−3cos⁡x)′=+3sin⁡x(-3\cos x)' = +3\sin x: two sign flips in one term is where these go wrong.

Example 21: A double product

Differentiate (ax2+sin⁡x)(p+qcos⁡x)(ax^2 + \sin x)(p + q\cos x).

Solution:

Step 1 — The pieces. u′=2ax+cos⁡xu' = 2ax + \cos x; v′=−qsin⁡xv' = -q\sin x.

Step 2 — Leibnitz. (2ax+cos⁡x)(p+qcos⁡x)+(ax2+sin⁡x)(−qsin⁡x)(2ax + \cos x)(p + q\cos x) + (ax^2 + \sin x)(-q\sin x).

Step 3 — Stop here. The factored form IS the answer — expanding invites sign slips and earns nothing.

Takeaway: Unless a question demands expansion, leave product-rule answers factored.

Example 22: Mixed brackets

Differentiate (x+cos⁡x)(x−tan⁡x)(x + \cos x)(x - \tan x).

Solution:

Step 1 — The pieces. u′=1−sin⁡xu' = 1 - \sin x; v′=1−sec⁡2xv' = 1 - \sec^2 x.

Step 2 — Leibnitz. (1−sin⁡x)(x−tan⁡x)+(x+cos⁡x)(1−sec⁡2x)(1 - \sin x)(x - \tan x) + (x + \cos x)(1 - \sec^2 x).

Step 3 — Optional polish. 1−sec⁡2x=−tan⁡2x1 - \sec^2 x = -\tan^2 x, giving (1−sin⁡x)(x−tan⁡x)−tan⁡2x(x+cos⁡x)(1 - \sin x)(x - \tan x) - \tan^2 x(x + \cos x).

Takeaway: 1−sec⁡2x=−tan⁡2x1 - \sec^2 x = -\tan^2 x — the Pythagorean identities keep working after differentiation.

Example 23: A full quotient

Differentiate 4x+5sin⁡x3x+7cos⁡x\frac{4x + 5\sin x}{3x + 7\cos x}.

Solution:

Step 1 — The pieces. u′=4+5cos⁡xu' = 4 + 5\cos x; v′=3−7sin⁡xv' = 3 - 7\sin x.

Step 2 — Quotient rule. (4+5cos⁡x)(3x+7cos⁡x)−(4x+5sin⁡x)(3−7sin⁡x)(3x+7cos⁡x)2\frac{(4 + 5\cos x)(3x + 7\cos x) - (4x + 5\sin x)(3 - 7\sin x)}{(3x + 7\cos x)^2}.

Step 3 — Leave assembled. No collapse is available — this one is meant to stay big.

Takeaway: Not every answer simplifies; knowing when to STOP is also a skill the examiner checks.

Example 24: A constant coefficient rides along

Differentiate x2cos⁡π4sin⁡x\frac{x^2\cos\frac{\pi}{4}}{\sin x}.

Solution:

Step 1 — Pull out the constant. cos⁡π4=12\cos\frac{\pi}{4} = \frac{1}{\sqrt{2}} multiplies everything: differentiate x2sin⁡x\frac{x^2}{\sin x}.

Step 2 — Quotient rule. 2xsin⁡x−x2cos⁡xsin⁡2x\frac{2x\sin x - x^2\cos x}{\sin^2 x}.

Step 3 — Reattach. cos⁡π4⋅2xsin⁡x−x2cos⁡xsin⁡2x\cos\frac{\pi}{4} \cdot \frac{2x\sin x - x^2\cos x}{\sin^2 x}.

Takeaway: cos⁡π4\cos\frac{\pi}{4} is a NUMBER, not a function of xx — never differentiate it.

Example 25: tan in the denominator, sec in a product

Differentiate: (i) x1+tan⁡x\frac{x}{1 + \tan x}; (ii) (x+sec⁡x)(x−tan⁡x)(x + \sec x)(x - \tan x).

Solution:

Step 1 — (i) Quotient rule. (1)(1+tan⁡x)−xsec⁡2x(1+tan⁡x)2\frac{(1)(1 + \tan x) - x\sec^2 x}{(1 + \tan x)^2}.

Step 2 — (ii) The pieces. u′=1+sec⁡xtan⁡xu' = 1 + \sec x\tan x; v′=1−sec⁡2xv' = 1 - \sec^2 x.

Step 3 — (ii) Leibnitz. (1+sec⁡xtan⁡x)(x−tan⁡x)+(x+sec⁡x)(1−sec⁡2x)(1 + \sec x\tan x)(x - \tan x) + (x + \sec x)(1 - \sec^2 x).

Takeaway: With four trig derivatives in play, write u,u′,v,v′u, u', v, v' in a little table before assembling — it prevents cross-wiring.

Example 26: A power of sine below

Differentiate xsin⁡nx\frac{x}{\sin^n x}.

Solution:

Step 1 — The pieces. u=xu = x, u′=1u' = 1; v=sin⁡nxv = \sin^n x, v′=nsin⁡n−1xcos⁡xv' = n\sin^{n-1}x\cos x (Example 17).

Step 2 — Quotient rule. sin⁡nx−x nsin⁡n−1xcos⁡xsin⁡2nx\frac{\sin^n x - x\,n\sin^{n-1}x\cos x}{\sin^{2n}x}.

Step 3 — Cancel sin⁡n−1x\sin^{n-1}x. sin⁡x−nxcos⁡xsin⁡n+1x\frac{\sin x - nx\cos x}{\sin^{n+1}x}.

Takeaway: Always cancel the common power after a quotient rule on powers — the exponent drops from 2n2n to n+1n+1.

Example 27: sin 2x and cot x

Differentiate: (i) sin⁡2x\sin 2x; (ii) cot⁡x\cot x.

Solution:

Step 1 — (i) Product form. sin⁡2x=2sin⁡xcos⁡x\sin 2x = 2\sin x\cos x: Leibnitz gives 2(cos⁡2x−sin⁡2x)2(\cos^2 x - \sin^2 x).

Step 2 — (i) Recognise. =2cos⁡2x= 2\cos 2x.

Step 3 — (ii) Quotient rule on cos⁡xsin⁡x\frac{\cos x}{\sin x}. −sin⁡2x−cos⁡2xsin⁡2x=−cosec2x\frac{-\sin^2 x - \cos^2 x}{\sin^2 x} = -\mathrm{cosec}^2 x.

Takeaway: Both answers preview the chain rule: the 2 in 2cos⁡2x2\cos 2x is the inner derivative of 2x2x.

Example 28: A five-term collapse

Differentiate x5−cos⁡xsin⁡x\frac{x^5 - \cos x}{\sin x}.

Solution:

Step 1 — The pieces. u′=5x4+sin⁡xu' = 5x^4 + \sin x; v′=cos⁡xv' = \cos x.

Step 2 — Quotient rule. (5x4+sin⁡x)sin⁡x−(x5−cos⁡x)cos⁡xsin⁡2x\frac{(5x^4 + \sin x)\sin x - (x^5 - \cos x)\cos x}{\sin^2 x}.

Step 3 — Expand and collapse. sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1: numerator =−x5cos⁡x+5x4sin⁡x+1= -x^5\cos x + 5x^4\sin x + 1.

Takeaway: The stray "+1" in such numerators is the fingerprint of a Pythagorean collapse — expect it whenever uu and vv mix a polynomial with sin/cos.

Example 29: No simplification available

Differentiate x+cos⁡xtan⁡x\frac{x + \cos x}{\tan x}.

Solution:

Step 1 — The pieces. u′=1−sin⁡xu' = 1 - \sin x; v′=sec⁡2xv' = \sec^2 x.

Step 2 — Quotient rule. (1−sin⁡x)tan⁡x−(x+cos⁡x)sec⁡2xtan⁡2x\frac{(1 - \sin x)\tan x - (x + \cos x)\sec^2 x}{\tan^2 x}.

Step 3 — Confirm no collapse. No identity matches the mixed terms — this is the final form.

Takeaway: Contrast with Example 28 — recognising a NON-collapse quickly is as valuable as executing a collapse.

Example 30: A derivative-at-a-point capstone

For f(x)=xsin⁡xf(x) = x\sin x, find f′(π2)f'\left(\frac{\pi}{2}\right).

Solution:

Step 1 — Differentiate once. f′(x)=xcos⁡x+sin⁡xf'(x) = x\cos x + \sin x (Example 4).

Step 2 — Evaluate. f′(π2)=π2cos⁡π2+sin⁡π2=π2(0)+1f'\left(\frac{\pi}{2}\right) = \frac{\pi}{2}\cos\frac{\pi}{2} + \sin\frac{\pi}{2} = \frac{\pi}{2}(0) + 1.

Step 3 — Conclude. =1= 1.

Chord PQ tilting into the tangent showing derivative as slope

Takeaway: Differentiate first, substitute second — the graph of xsin⁡xx\sin x crosses x=π2x = \frac{\pi}{2} with slope exactly 1.