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+3x2f(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+h22x+3x2]\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)(x2)(2x+3)(x+h2)(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(x2)(x+h2)7(x2)2\frac{-7}{(x-2)(x+h-2)} \to -\frac{7}{(x-2)^2} (x2x \ne 2).

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

Takeaway: 7=adbc-7 = ad - bc for ax+bcx+d\frac{ax+b}{cx+d} here — first principles secretly derives the quotient-rule shortcut adbc(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+h1x]=1+1hhx(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. =11x(x+h)= 1 - \frac{1}{x(x+h)}.

Step 3 — Limit. f(x)=11x2f'(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: sinx+cosx\sin x + \cos x

Differentiate f(x)=sinx+cosxf(x) = \sin x + \cos x from first principles.

Solution:

Step 1 — Expand both compound angles. sin(x+h)=sinxcosh+cosxsinh\sin(x+h) = \sin x\cos h + \cos x\sin h; cos(x+h)=cosxcoshsinxsinh\cos(x+h) = \cos x\cos h - \sin x\sin h.

Step 2 — Group by the two fundamental ratios. The quotient becomes sinhh(cosxsinx)+cosh1h(sinx+cosx)\frac{\sin h}{h}(\cos x - \sin x) + \frac{\cos h - 1}{h}(\sin x + \cos x).

Step 3 — Limit. sinhh1\frac{\sin h}{h} \to 1 and cosh1h0\frac{\cos h - 1}{h} \to 0: f(x)=cosxsinxf'(x) = \cos x - \sin x.

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

Example 4: xsinxx \sin x

Differentiate f(x)=xsinxf(x) = x\sin x from first principles.

Solution:

Step 1 — Add and subtract to split. (x+h)sin(x+h)xsinx=x[sin(x+h)sinx]+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. xsin(x+h)sinxh+sin(x+h)x \cdot \frac{\sin(x+h) - \sin x}{h} + \sin(x+h).

Step 3 — Limit. The first term xcosx\to x\cos x (the sin\sin derivative); the second sinx\to \sin x: f(x)=xcosx+sinxf'(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)=1hhx(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)sinh2h\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)sinh2hsin(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. psqrx2ps - \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 adbc(cx+d)2\frac{ad - bc}{(cx+d)^2} pattern

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

Solution:

Step 1 — (i) Quotient rule. a(cx+d)c(ax+b)(cx+d)2=adbc(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+1x1\frac{x+1}{x-1} (for x0x \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)(x1)2=2(x1)2\frac{(1)(-1) - (1)(1)}{(x-1)^2} = \frac{-2}{(x-1)^2}.

Takeaway: adbc(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 vv2-\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) ax4bx2+cosx\frac{a}{x^4} - \frac{b}{x^2} + \cos x; (ii) 4x24\sqrt{x} - 2.

Solution:

Step 1 — (i) Rewrite as powers. ax4bx2+cosxax^{-4} - bx^{-2} + \cos x.

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

Step 3 — (ii). 412x1/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)n1+O(h2)(ax + ah + b)^n - (ax+b)^n = nah(ax+b)^{n-1} + O(h^2): derivative na(ax+b)n1na(ax+b)^{n-1}.

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

Step 3 — Factor. =(ax+b)n1(cx+d)m1[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) cosecxcotx\mathrm{cosec}\,x\cot x.

Solution:

Step 1 — (i) First principles with sum-to-product. 2cos(x+a+h2)sinh2hcos(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. (cosecx)cotx+cosecx(cotx)=(cosecxcotx)cotx+cosecx(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. cosecx(cot2x+cosec2x)-\mathrm{cosec}\,x\,(\cot^2 x + \mathrm{cosec}^2 x).

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

Example 14: A collapsing quotient

Differentiate cosx1+sinx\frac{\cos x}{1 + \sin x}.

Solution:

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

Step 2 — Expand the numerator. sinxsin2xcos2x=sinx1-\sin x - \sin^2 x - \cos^2 x = -\sin x - 1.

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

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

Example 15: Symmetric sin-cos quotient

Differentiate sinx+cosxsinxcosx\frac{\sin x + \cos x}{\sin x - \cos x}.

Solution:

Step 1 — Quotient rule numerator. (cosxsinx)(sinxcosx)(sinx+cosx)(cosx+sinx)(\cos x - \sin x)(\sin x - \cos x) - (\sin x + \cos x)(\cos x + \sin x).

Step 2 — Recognise the squares. =(sinxcosx)2(sinx+cosx)2= -(\sin x - \cos x)^2 - (\sin x + \cos x)^2.

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

Takeaway: (ab)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 secx1secx+1\frac{\sec x - 1}{\sec x + 1}.

Solution:

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

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

Step 3 — Collect. sinx[(1+cosx)+(1cosx)](1+cosx)2=2sinx(1+cosx)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 sinnx\sin^n x.

Solution:

Step 1 — Base cases. (sin1x)=cosx(\sin^1 x)' = \cos x; (sin2x)=2sinxcosx(\sin^2 x)' = 2\sin x\cos x (Leibnitz).

Step 2 — Induction step. If (sinn1x)=(n1)sinn2xcosx(\sin^{n-1}x)' = (n-1)\sin^{n-2}x\cos x, then Leibnitz on sinxsinn1x\sin x \cdot \sin^{n-1}x gives cosxsinn1x+(n1)sinn2xcosxsinx\cos x\sin^{n-1}x + (n-1)\sin^{n-2}x\cos x\sin x.

Step 3 — Collect. nsinn1xcosxn\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+bsinxc+dcosx\frac{a + b\sin x}{c + d\cos x}.

Solution:

Step 1 — Quotient rule. Numerator: bcosx(c+dcosx)(a+bsinx)(dsinx)b\cos x(c + d\cos x) - (a + b\sin x)(-d\sin x).

Step 2 — Expand. bccosx+bdcos2x+adsinx+bdsin2xbc\cos x + bd\cos^2 x + ad\sin x + bd\sin^2 x.

Step 3 — Collapse. bd(cos2+sin2)=bdbd(\cos^2 + \sin^2) = bd: derivative bccosx+adsinx+bd(c+dcosx)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)cosx\frac{\sin(x + a)}{\cos x}.

Solution:

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

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

Step 3 — Conclude. =cosa= \cos a: derivative cosacos2x\frac{\cos a}{\cos^2 x} — a CONSTANT over cos2x\cos^2 x.

Takeaway: cosAcosB+sinAsinB=cos(AB)\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(5sinx3cosx)x^4(5\sin x - 3\cos x); (ii) (x2+1)cosx(x^2 + 1)\cos x.

Solution:

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

Step 2 — (ii) Leibnitz. 2xcosx+(x2+1)(sinx)2x\cos x + (x^2 + 1)(-\sin x).

Step 3 — Present. 2xcosx(x2+1)sinx2x\cos x - (x^2 + 1)\sin x.

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

Example 21: A double product

Differentiate (ax2+sinx)(p+qcosx)(ax^2 + \sin x)(p + q\cos x).

Solution:

Step 1 — The pieces. u=2ax+cosxu' = 2ax + \cos x; v=qsinxv' = -q\sin x.

Step 2 — Leibnitz. (2ax+cosx)(p+qcosx)+(ax2+sinx)(qsinx)(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+cosx)(xtanx)(x + \cos x)(x - \tan x).

Solution:

Step 1 — The pieces. u=1sinxu' = 1 - \sin x; v=1sec2xv' = 1 - \sec^2 x.

Step 2 — Leibnitz. (1sinx)(xtanx)+(x+cosx)(1sec2x)(1 - \sin x)(x - \tan x) + (x + \cos x)(1 - \sec^2 x).

Step 3 — Optional polish. 1sec2x=tan2x1 - \sec^2 x = -\tan^2 x, giving (1sinx)(xtanx)tan2x(x+cosx)(1 - \sin x)(x - \tan x) - \tan^2 x(x + \cos x).

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

Example 23: A full quotient

Differentiate 4x+5sinx3x+7cosx\frac{4x + 5\sin x}{3x + 7\cos x}.

Solution:

Step 1 — The pieces. u=4+5cosxu' = 4 + 5\cos x; v=37sinxv' = 3 - 7\sin x.

Step 2 — Quotient rule. (4+5cosx)(3x+7cosx)(4x+5sinx)(37sinx)(3x+7cosx)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π4sinx\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 x2sinx\frac{x^2}{\sin x}.

Step 2 — Quotient rule. 2xsinxx2cosxsin2x\frac{2x\sin x - x^2\cos x}{\sin^2 x}.

Step 3 — Reattach. cosπ42xsinxx2cosxsin2x\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+tanx\frac{x}{1 + \tan x}; (ii) (x+secx)(xtanx)(x + \sec x)(x - \tan x).

Solution:

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

Step 2 — (ii) The pieces. u=1+secxtanxu' = 1 + \sec x\tan x; v=1sec2xv' = 1 - \sec^2 x.

Step 3 — (ii) Leibnitz. (1+secxtanx)(xtanx)+(x+secx)(1sec2x)(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,vu, u', v, v' in a little table before assembling — it prevents cross-wiring.

Example 26: A power of sine below

Differentiate xsinnx\frac{x}{\sin^n x}.

Solution:

Step 1 — The pieces. u=xu = x, u=1u' = 1; v=sinnxv = \sin^n x, v=nsinn1xcosxv' = n\sin^{n-1}x\cos x (Example 17).

Step 2 — Quotient rule. sinnxxnsinn1xcosxsin2nx\frac{\sin^n x - x\,n\sin^{n-1}x\cos x}{\sin^{2n}x}.

Step 3 — Cancel sinn1x\sin^{n-1}x. sinxnxcosxsinn+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) sin2x\sin 2x; (ii) cotx\cot x.

Solution:

Step 1 — (i) Product form. sin2x=2sinxcosx\sin 2x = 2\sin x\cos x: Leibnitz gives 2(cos2xsin2x)2(\cos^2 x - \sin^2 x).

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

Step 3 — (ii) Quotient rule on cosxsinx\frac{\cos x}{\sin x}. sin2xcos2xsin2x=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 2cos2x2\cos 2x is the inner derivative of 2x2x.

Example 28: A five-term collapse

Differentiate x5cosxsinx\frac{x^5 - \cos x}{\sin x}.

Solution:

Step 1 — The pieces. u=5x4+sinxu' = 5x^4 + \sin x; v=cosxv' = \cos x.

Step 2 — Quotient rule. (5x4+sinx)sinx(x5cosx)cosxsin2x\frac{(5x^4 + \sin x)\sin x - (x^5 - \cos x)\cos x}{\sin^2 x}.

Step 3 — Expand and collapse. sin2x+cos2x=1\sin^2 x + \cos^2 x = 1: numerator =x5cosx+5x4sinx+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+cosxtanx\frac{x + \cos x}{\tan x}.

Solution:

Step 1 — The pieces. u=1sinxu' = 1 - \sin x; v=sec2xv' = \sec^2 x.

Step 2 — Quotient rule. (1sinx)tanx(x+cosx)sec2xtan2x\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)=xsinxf(x) = x\sin x, find f(π2)f'\left(\frac{\pi}{2}\right).

Solution:

Step 1 — Differentiate once. f(x)=xcosx+sinxf'(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 xsinxx\sin x crosses x=π2x = \frac{\pi}{2} with slope exactly 1.