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 ) = 2 x + 3 x − 2 f(x) = \frac{2x+3}{x-2} f ( x ) = x − 2 2 x + 3 from first principles.
Solution:
Step 1 — Set up the difference quotient. f ( x + h ) − f ( x ) h = 1 h [ 2 x + 2 h + 3 x + h − 2 − 2 x + 3 x − 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] h f ( x + h ) − f ( x ) = h 1 [ x + h − 2 2 x + 2 h + 3 − x − 2 2 x + 3 ] .
Step 2 — Combine over the common denominator. The numerator is ( 2 x + 2 h + 3 ) ( x − 2 ) − ( 2 x + 3 ) ( x + h − 2 ) (2x+2h+3)(x-2) - (2x+3)(x+h-2) ( 2 x + 2 h + 3 ) ( x − 2 ) − ( 2 x + 3 ) ( x + h − 2 ) ; expanding, every term without h h h cancels, leaving − 7 h -7h − 7 h .
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 − 2 ) ( x + h − 2 ) − 7 → − ( x − 2 ) 2 7 (x ≠ 2 x \ne 2 x = 2 ).
Takeaway: − 7 = a d − b c -7 = ad - bc − 7 = a d − b c for a x + b c x + d \frac{ax+b}{cx+d} c x + d a x + b here — first principles secretly derives the quotient-rule shortcut a d − b c ( c x + d ) 2 \frac{ad-bc}{(cx+d)^2} ( c x + d ) 2 a d − b c .
Example 2: First principles on x + 1 x x + \frac{1}{x} x + x 1
Differentiate f ( x ) = x + 1 x f(x) = x + \frac{1}{x} f ( x ) = x + x 1 from first principles.
Solution:
Step 1 — Split the quotient. 1 h [ ( x + h ) − x + 1 x + h − 1 x ] = 1 + 1 h ⋅ − h x ( 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)} h 1 [ ( x + h ) − x + x + h 1 − x 1 ] = 1 + h 1 ⋅ x ( x + h ) − h .
Step 2 — Simplify. = 1 − 1 x ( x + h ) = 1 - \frac{1}{x(x+h)} = 1 − x ( x + h ) 1 .
Step 3 — Limit. f ′ ( x ) = 1 − 1 x 2 f'(x) = 1 - \frac{1}{x^2} f ′ ( x ) = 1 − x 2 1 .
Takeaway: First principles respects sums — each piece contributes its own derivative, here 1 1 1 and − 1 x 2 -\frac{1}{x^2} − x 2 1 .
Example 3: sin x + cos x \sin x + \cos x sin x + cos x
Differentiate f ( x ) = sin x + cos x f(x) = \sin x + \cos x f ( x ) = sin x + cos x from first principles.
Solution:
Step 1 — Expand both compound angles. sin ( x + h ) = sin x cos h + cos x sin h \sin(x+h) = \sin x\cos h + \cos x\sin h sin ( x + h ) = sin x cos h + cos x sin h ; cos ( x + h ) = cos x cos h − sin x sin h \cos(x+h) = \cos x\cos h - \sin x\sin h cos ( x + h ) = cos x cos h − sin x sin h .
Step 2 — Group by the two fundamental ratios. The quotient becomes sin h h ( cos x − sin x ) + cos h − 1 h ( sin x + cos x ) \frac{\sin h}{h}(\cos x - \sin x) + \frac{\cos h - 1}{h}(\sin x + \cos x) h s i n h ( cos x − sin x ) + h c o s h − 1 ( sin x + cos x ) .
Step 3 — Limit. sin h h → 1 \frac{\sin h}{h} \to 1 h s i n h → 1 and cos h − 1 h → 0 \frac{\cos h - 1}{h} \to 0 h c o s h − 1 → 0 : f ′ ( x ) = cos x − sin x f'(x) = \cos x - \sin x f ′ ( x ) = cos x − sin x .
Takeaway: Every trig first-principles computation funnels into the same two limits — organise the algebra AROUND them.
Example 4: x sin x x \sin x x sin x
Differentiate f ( x ) = x sin x f(x) = x\sin x f ( x ) = x sin x from first principles.
Solution:
Step 1 — Add and subtract to split. ( x + h ) sin ( x + h ) − x sin x = x [ sin ( x + h ) − sin x ] + h sin ( x + h ) (x+h)\sin(x+h) - x\sin x = x[\sin(x+h) - \sin x] + h\sin(x+h) ( x + h ) sin ( x + h ) − x sin x = x [ sin ( x + h ) − sin x ] + h sin ( x + h ) .
Step 2 — Divide by h h h . x ⋅ sin ( x + h ) − sin x h + sin ( x + h ) x \cdot \frac{\sin(x+h) - \sin x}{h} + \sin(x+h) x ⋅ h s i n ( x + h ) − s i n x + sin ( x + h ) .
Step 3 — Limit. The first term → x cos x \to x\cos x → x cos x (the sin \sin sin derivative); the second → sin x \to \sin x → sin x : f ′ ( x ) = x cos x + sin x f'(x) = x\cos x + \sin x f ′ ( 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 − x ; (ii) − 1 x -\frac{1}{x} − x 1 .
Solution:
Step 1 — (i). − ( x + h ) − ( − x ) h = − h h = − 1 \frac{-(x+h) - (-x)}{h} = \frac{-h}{h} = -1 h − ( x + h ) − ( − x ) = h − h = − 1 : derivative − 1 -1 − 1 .
Step 2 — (ii) Combine fractions. 1 h ( − 1 x + h + 1 x ) = 1 h ⋅ h x ( x + h ) = 1 x ( 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)} h 1 ( x + h − 1 + x 1 ) = h 1 ⋅ x ( x + h ) h = x ( x + h ) 1 .
Step 3 — Limit. 1 x 2 \frac{1}{x^2} x 2 1 — the minus in the function flips the usual − 1 x 2 -\frac{1}{x^2} − x 2 1 .
Takeaway: Constants (including − 1 -1 − 1 ) ride through derivatives untouched: ( λ f ) ′ = λ f ′ (\lambda f)' = \lambda f' ( λ f ) ′ = λ f ′ .
Example 6: Shifted sines and cosines
Differentiate from first principles: (i) sin ( x + 1 ) \sin(x+1) sin ( x + 1 ) ; (ii) cos ( x − π 8 ) \cos\left(x - \frac{\pi}{8}\right) cos ( x − 8 π ) .
Solution:
Step 1 — (i) Sum-to-product. sin ( x + h + 1 ) − sin ( x + 1 ) h = 2 cos ( x + 1 + h 2 ) sin h 2 h \frac{\sin(x+h+1) - \sin(x+1)}{h} = \frac{2\cos\left(x + 1 + \frac{h}{2}\right)\sin\frac{h}{2}}{h} h s i n ( x + h + 1 ) − s i n ( x + 1 ) = h 2 c o s ( x + 1 + 2 h ) s i n 2 h .
Step 2 — (i) Limit. cos ( x + 1 ) ⋅ 1 = cos ( x + 1 ) \cos(x + 1) \cdot 1 = \cos(x+1) cos ( x + 1 ) ⋅ 1 = cos ( x + 1 ) .
Step 3 — (ii) Same factorisation with cosine. − 2 sin ( x − π 8 + h 2 ) sin h 2 h → − 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) h − 2 s i n ( x − 8 π + 2 h ) s i n 2 h → − sin ( x − 8 π ) .
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 + a x + a x + a ; (ii) ( p x + q ) ( r x + s ) (px + q)\left(\frac{r}{x} + s\right) ( p x + q ) ( x r + s ) .
Solution:
Step 1 — (i). ( x ) ′ = 1 (x)' = 1 ( x ) ′ = 1 , ( a ) ′ = 0 (a)' = 0 ( a ) ′ = 0 : derivative 1.
Step 2 — (ii) Expand. p r + p s x + q r x + q s pr + psx + \frac{qr}{x} + qs p r + p s x + x q r + q s .
Step 3 — Differentiate. p s − q r x 2 ps - \frac{qr}{x^2} p s − x 2 q r (the constants p r pr p r , q s qs q s 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 ( a x + b ) ( c x + d ) 2 (ax + b)(cx + d)^2 ( a x + b ) ( c x + d ) 2 .
Solution:
Step 1 — Identify the pieces. u = a x + b u = ax + b u = a x + b , u ′ = a u' = a u ′ = a ; v = ( c x + d ) 2 v = (cx+d)^2 v = ( c x + d ) 2 , v ′ = 2 c ( c x + d ) v' = 2c(cx+d) v ′ = 2 c ( c x + d ) (power-of-linear rule).
Step 2 — Leibnitz. a ( c x + d ) 2 + ( a x + b ) ⋅ 2 c ( c x + d ) a(cx+d)^2 + (ax+b)\cdot 2c(cx+d) a ( c x + d ) 2 + ( a x + b ) ⋅ 2 c ( c x + d ) .
Step 3 — Present. = ( c x + d ) [ a ( c x + d ) + 2 c ( a x + b ) ] = (cx+d)\left[a(cx+d) + 2c(ax+b)\right] = ( c x + d ) [ a ( c x + d ) + 2 c ( a x + b ) ] — factored, ready for any follow-up.
Takeaway: Factor the common ( c x + d ) (cx + d) ( c x + d ) out of the answer — factored derivatives are what root-finding questions want next.
Example 9: The a d − b c ( c x + d ) 2 \frac{ad - bc}{(cx+d)^2} ( c x + d ) 2 a d − b c pattern
Differentiate: (i) a x + b c x + d \frac{ax+b}{cx+d} c x + d a x + b ; (ii) 1 + 1 x 1 − 1 x \frac{1 + \frac{1}{x}}{1 - \frac{1}{x}} 1 − x 1 1 + x 1 .
Solution:
Step 1 — (i) Quotient rule. a ( c x + d ) − c ( a x + b ) ( c x + d ) 2 = a d − b c ( c x + d ) 2 \frac{a(cx+d) - c(ax+b)}{(cx+d)^2} = \frac{ad - bc}{(cx+d)^2} ( c x + d ) 2 a ( c x + d ) − c ( a x + b ) = ( c x + d ) 2 a d − b c .
Step 2 — (ii) Simplify FIRST. Multiply top and bottom by x x x : x + 1 x − 1 \frac{x+1}{x-1} x − 1 x + 1 (for x ≠ 0 x \ne 0 x = 0 ).
Step 3 — (ii) Apply the pattern. a = 1 , b = 1 , c = 1 , d = − 1 a=1, b=1, c=1, d=-1 a = 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} ( x − 1 ) 2 ( 1 ) ( − 1 ) − ( 1 ) ( 1 ) = ( x − 1 ) 2 − 2 .
Takeaway: a d − b c ( c x + d ) 2 \frac{ad-bc}{(cx+d)^2} ( c x + d ) 2 a d − b c is worth memorising — linear-over-linear derivatives become one determinant.
Example 10: Reciprocals of quadratics
Differentiate: (i) 1 a x 2 + b x + c \frac{1}{ax^2 + bx + c} a x 2 + b x + c 1 ; (ii) a x + b p x 2 + q x + r \frac{ax + b}{px^2 + qx + r} p x 2 + q x + r a x + b ; (iii) p x 2 + q x + r a x + b \frac{px^2 + qx + r}{ax + b} a x + b p x 2 + q x + r .
Solution:
Step 1 — (i) Quotient rule with u = 1 u = 1 u = 1 . 0 − ( 2 a x + b ) ( a x 2 + b x + c ) 2 = − 2 a x + b ( a x 2 + b x + c ) 2 \frac{0 - (2ax + b)}{(ax^2+bx+c)^2} = -\frac{2ax + b}{(ax^2 + bx + c)^2} ( a x 2 + b x + c ) 2 0 − ( 2 a x + b ) = − ( a x 2 + b x + c ) 2 2 a x + b .
Step 2 — (ii). a ( p x 2 + q x + r ) − ( a x + b ) ( 2 p x + q ) ( p x 2 + q x + r ) 2 \frac{a(px^2+qx+r) - (ax+b)(2px+q)}{(px^2+qx+r)^2} ( p x 2 + q x + r ) 2 a ( p x 2 + q x + r ) − ( a x + b ) ( 2 p x + q ) .
Step 3 — (iii) Roles swapped. ( 2 p x + q ) ( a x + b ) − a ( p x 2 + q x + r ) ( a x + b ) 2 \frac{(2px+q)(ax+b) - a(px^2+qx+r)}{(ax+b)^2} ( a x + b ) 2 ( 2 p x + q ) ( a x + b ) − a ( p x 2 + q x + r ) .
Takeaway: A reciprocal's derivative is − v ′ v 2 -\frac{v'}{v^2} − v 2 v ′ — the u = 1 u = 1 u = 1 special case of the quotient rule, worth knowing on its own.
Example 11: Negative and fractional powers
Differentiate: (i) a x 4 − b x 2 + cos x \frac{a}{x^4} - \frac{b}{x^2} + \cos x x 4 a − x 2 b + cos x ; (ii) 4 x − 2 4\sqrt{x} - 2 4 x − 2 .
Solution:
Step 1 — (i) Rewrite as powers. a x − 4 − b x − 2 + cos x ax^{-4} - bx^{-2} + \cos x a x − 4 − b x − 2 + cos x .
Step 2 — (i) Power rule each. − 4 a x − 5 + 2 b x − 3 − sin x = − 4 a x 5 + 2 b x 3 − sin x -4ax^{-5} + 2bx^{-3} - \sin x = -\frac{4a}{x^5} + \frac{2b}{x^3} - \sin x − 4 a x − 5 + 2 b x − 3 − sin x = − x 5 4 a + x 3 2 b − sin x .
Step 3 — (ii). 4 ⋅ 1 2 x − 1 / 2 = 2 x 4 \cdot \frac{1}{2}x^{-1/2} = \frac{2}{\sqrt{x}} 4 ⋅ 2 1 x − 1/2 = x 2 .
Takeaway: x n x^n x 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) ( a x + b ) n (ax + b)^n ( a x + b ) n ; (ii) ( a x + b ) n ( c x + d ) m (ax+b)^n(cx+d)^m ( a x + b ) n ( c x + d ) m .
Solution:
Step 1 — (i) Binomial first principles. ( a x + a h + b ) n − ( a x + b ) n = n a h ( a x + b ) n − 1 + O ( h 2 ) (ax + ah + b)^n - (ax+b)^n = nah(ax+b)^{n-1} + O(h^2) ( a x + ah + b ) n − ( a x + b ) n = nah ( a x + b ) n − 1 + O ( h 2 ) : derivative n a ( a x + b ) n − 1 na(ax+b)^{n-1} na ( a x + b ) n − 1 .
Step 2 — (ii) Leibnitz with two such powers. n a ( a x + b ) n − 1 ( c x + d ) m + m c ( a x + b ) n ( c x + d ) m − 1 na(ax+b)^{n-1}(cx+d)^m + mc(ax+b)^n(cx+d)^{m-1} na ( a x + b ) n − 1 ( c x + d ) m + m c ( a x + b ) n ( c x + d ) m − 1 .
Step 3 — Factor. = ( a x + b ) n − 1 ( c x + d ) m − 1 [ n a ( c x + d ) + m c ( a x + b ) ] = (ax+b)^{n-1}(cx+d)^{m-1}\left[na(cx+d) + mc(ax+b)\right] = ( a x + b ) n − 1 ( c x + d ) m − 1 [ na ( c x + d ) + m c ( a x + b ) ] .
Takeaway: The inner coefficient always multiplies out (n a na na , not just n n n ) — the pre-chain-rule fact to internalise this year.
Example 13: Shifted sine, cosec-cot product
Differentiate: (i) sin ( x + a ) \sin(x + a) sin ( x + a ) ; (ii) c o s e c x cot x \mathrm{cosec}\,x\cot x cosec x cot x .
Solution:
Step 1 — (i) First principles with sum-to-product. 2 cos ( x + a + h 2 ) sin h 2 h → cos ( x + a ) \frac{2\cos\left(x + a + \frac{h}{2}\right)\sin\frac{h}{2}}{h} \to \cos(x + a) h 2 c o s ( x + a + 2 h ) s i n 2 h → cos ( x + a ) .
Step 2 — (ii) Leibnitz. ( c o s e c x ) ′ cot x + c o s e c x ( cot x ) ′ = ( − c o s e c x cot x ) cot x + c o s e c x ( − c o s e c 2 x ) (\mathrm{cosec}\,x)'\cot x + \mathrm{cosec}\,x(\cot x)' = (-\mathrm{cosec}\,x\cot x)\cot x + \mathrm{cosec}\,x(-\mathrm{cosec}^2 x) ( cosec x ) ′ cot x + cosec x ( cot x ) ′ = ( − cosec x cot x ) cot x + cosec x ( − cosec 2 x ) .
Step 3 — Collect. − c o s e c x ( cot 2 x + c o s e c 2 x ) -\mathrm{cosec}\,x\,(\cot^2 x + \mathrm{cosec}^2 x) − cosec x ( cot 2 x + cosec 2 x ) .
Takeaway: Factor the common − c o s e c x -\mathrm{cosec}\,x − cosec x — collected forms are what markers (and later substitutions) want.
Example 14: A collapsing quotient
Differentiate cos x 1 + sin x \frac{\cos x}{1 + \sin x} 1 + s i n x c o s x .
Solution:
Step 1 — Quotient rule. − sin x ( 1 + sin x ) − cos x cos x ( 1 + sin x ) 2 \frac{-\sin x(1 + \sin x) - \cos x\cos x}{(1 + \sin x)^2} ( 1 + s i n x ) 2 − s i n x ( 1 + s i n x ) − c o s x c o s x .
Step 2 — Expand the numerator. − sin x − sin 2 x − cos 2 x = − sin x − 1 -\sin x - \sin^2 x - \cos^2 x = -\sin x - 1 − sin x − sin 2 x − cos 2 x = − sin x − 1 .
Step 3 — Cancel. − ( 1 + sin x ) ( 1 + sin x ) 2 = − 1 1 + sin x \frac{-(1 + \sin x)}{(1 + \sin x)^2} = -\frac{1}{1 + \sin x} ( 1 + s i n x ) 2 − ( 1 + s i n x ) = − 1 + s i n x 1 .
Takeaway: When sin 2 + cos 2 \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 x sin x − cos x \frac{\sin x + \cos x}{\sin x - \cos x} s i n x − c o s x s i n x + c o s 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) ( 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 = − ( sin x − cos x ) 2 − ( sin x + cos x ) 2 .
Step 3 — Add. The cross terms cancel: − 2 ( sin 2 x + cos 2 x ) = − 2 -2(\sin^2 x + \cos^2 x) = -2 − 2 ( sin 2 x + cos 2 x ) = − 2 . Derivative: − 2 ( sin x − cos x ) 2 \frac{-2}{(\sin x - \cos x)^2} ( s i n x − c o s x ) 2 − 2 .
Takeaway: ( a − b ) 2 + ( a + b ) 2 = 2 ( a 2 + b 2 ) (a-b)^2 + (a+b)^2 = 2(a^2 + b^2) ( 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 − 1 sec x + 1 \frac{\sec x - 1}{\sec x + 1} s e c x + 1 s e c x − 1 .
Solution:
Step 1 — Clear the sec. Multiply top and bottom by cos x \cos x cos x : 1 − cos x 1 + cos x \frac{1 - \cos x}{1 + \cos x} 1 + c o s x 1 − c o s 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} ( 1 + c o s x ) 2 s i n x ( 1 + c o s x ) − ( 1 − c o s x ) ( − s i n x ) .
Step 3 — Collect. sin x [ ( 1 + cos x ) + ( 1 − cos x ) ] ( 1 + cos x ) 2 = 2 sin 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} ( 1 + c o s x ) 2 s i n x [ ( 1 + c o s x ) + ( 1 − c o s x ) ] = ( 1 + c o s x ) 2 2 s i n x .
Takeaway: Converting sec/cosec ratios to sin/cos FIRST almost always shortens the differentiation.
Example 17: Powers of sine
Differentiate sin n x \sin^n x sin n x .
Solution:
Step 1 — Base cases. ( sin 1 x ) ′ = cos x (\sin^1 x)' = \cos x ( sin 1 x ) ′ = cos x ; ( sin 2 x ) ′ = 2 sin x cos x (\sin^2 x)' = 2\sin x\cos x ( sin 2 x ) ′ = 2 sin x cos x (Leibnitz).
Step 2 — Induction step. If ( sin n − 1 x ) ′ = ( n − 1 ) sin n − 2 x cos x (\sin^{n-1}x)' = (n-1)\sin^{n-2}x\cos x ( sin n − 1 x ) ′ = ( n − 1 ) sin n − 2 x cos x , then Leibnitz on sin x ⋅ sin n − 1 x \sin x \cdot \sin^{n-1}x sin x ⋅ sin n − 1 x gives cos x sin n − 1 x + ( n − 1 ) sin n − 2 x cos x sin x \cos x\sin^{n-1}x + (n-1)\sin^{n-2}x\cos x\sin x cos x sin n − 1 x + ( n − 1 ) sin n − 2 x cos x sin x .
Step 3 — Collect. n sin n − 1 x cos x n\sin^{n-1}x\cos x n 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 + b sin x c + d cos x \frac{a + b\sin x}{c + d\cos x} c + d c o s x a + b s i n x .
Solution:
Step 1 — Quotient rule. Numerator: b cos x ( c + d cos x ) − ( a + b sin x ) ( − d sin x ) b\cos x(c + d\cos x) - (a + b\sin x)(-d\sin x) b cos x ( c + d cos x ) − ( a + b sin x ) ( − d sin x ) .
Step 2 — Expand. b c cos x + b d cos 2 x + a d sin x + b d sin 2 x bc\cos x + bd\cos^2 x + ad\sin x + bd\sin^2 x b c cos x + b d cos 2 x + a d sin x + b d sin 2 x .
Step 3 — Collapse. b d ( cos 2 + sin 2 ) = b d bd(\cos^2 + \sin^2) = bd b d ( cos 2 + sin 2 ) = b d : derivative b c cos x + a d sin x + b d ( c + d cos x ) 2 \frac{bc\cos x + ad\sin x + bd}{(c + d\cos x)^2} ( c + d c o s x ) 2 b c c o s x + a d s i n x + b d .
Takeaway: Four letters, one collapse — the b d bd b d 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} c o s x s i n ( x + a ) .
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) 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) cos ( x + a ) cos x + sin ( x + a ) sin x = cos ( ( x + a ) − x ) .
Step 3 — Conclude. = cos a = \cos a = cos a : derivative cos a cos 2 x \frac{\cos a}{\cos^2 x} c o s 2 x c o s a — a CONSTANT over cos 2 x \cos^2 x cos 2 x .
Takeaway: cos A cos B + sin A sin B = cos ( A − B ) \cos A\cos B + \sin A\sin 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) x 4 ( 5 sin x − 3 cos x ) x^4(5\sin x - 3\cos x) x 4 ( 5 sin x − 3 cos x ) ; (ii) ( x 2 + 1 ) cos x (x^2 + 1)\cos x ( x 2 + 1 ) cos x .
Solution:
Step 1 — (i) Leibnitz. 4 x 3 ( 5 sin x − 3 cos x ) + x 4 ( 5 cos x + 3 sin x ) 4x^3(5\sin x - 3\cos x) + x^4(5\cos x + 3\sin x) 4 x 3 ( 5 sin x − 3 cos x ) + x 4 ( 5 cos x + 3 sin x ) .
Step 2 — (ii) Leibnitz. 2 x cos x + ( x 2 + 1 ) ( − sin x ) 2x\cos x + (x^2 + 1)(-\sin x) 2 x cos x + ( x 2 + 1 ) ( − sin x ) .
Step 3 — Present. 2 x cos x − ( x 2 + 1 ) sin x 2x\cos x - (x^2 + 1)\sin x 2 x cos x − ( x 2 + 1 ) sin x .
Takeaway: Differentiate the bracket carefully — ( − 3 cos x ) ′ = + 3 sin x (-3\cos x)' = +3\sin x ( − 3 cos x ) ′ = + 3 sin x : two sign flips in one term is where these go wrong.
Example 21: A double product
Differentiate ( a x 2 + sin x ) ( p + q cos x ) (ax^2 + \sin x)(p + q\cos x) ( a x 2 + sin x ) ( p + q cos x ) .
Solution:
Step 1 — The pieces. u ′ = 2 a x + cos x u' = 2ax + \cos x u ′ = 2 a x + cos x ; v ′ = − q sin x v' = -q\sin x v ′ = − q sin x .
Step 2 — Leibnitz. ( 2 a x + cos x ) ( p + q cos x ) + ( a x 2 + sin x ) ( − q sin x ) (2ax + \cos x)(p + q\cos x) + (ax^2 + \sin x)(-q\sin x) ( 2 a x + cos x ) ( p + q cos x ) + ( a x 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) ( x + cos x ) ( x − tan x ) .
Solution:
Step 1 — The pieces. u ′ = 1 − sin x u' = 1 - \sin x u ′ = 1 − sin x ; v ′ = 1 − sec 2 x v' = 1 - \sec^2 x v ′ = 1 − sec 2 x .
Step 2 — Leibnitz. ( 1 − sin x ) ( x − tan x ) + ( x + cos x ) ( 1 − sec 2 x ) (1 - \sin x)(x - \tan x) + (x + \cos x)(1 - \sec^2 x) ( 1 − sin x ) ( x − tan x ) + ( x + cos x ) ( 1 − sec 2 x ) .
Step 3 — Optional polish. 1 − sec 2 x = − tan 2 x 1 - \sec^2 x = -\tan^2 x 1 − sec 2 x = − tan 2 x , giving ( 1 − sin x ) ( x − tan x ) − tan 2 x ( x + cos x ) (1 - \sin x)(x - \tan x) - \tan^2 x(x + \cos x) ( 1 − sin x ) ( x − tan x ) − tan 2 x ( x + cos x ) .
Takeaway: 1 − sec 2 x = − tan 2 x 1 - \sec^2 x = -\tan^2 x 1 − sec 2 x = − tan 2 x — the Pythagorean identities keep working after differentiation.
Example 23: A full quotient
Differentiate 4 x + 5 sin x 3 x + 7 cos x \frac{4x + 5\sin x}{3x + 7\cos x} 3 x + 7 c o s x 4 x + 5 s i n x .
Solution:
Step 1 — The pieces. u ′ = 4 + 5 cos x u' = 4 + 5\cos x u ′ = 4 + 5 cos x ; v ′ = 3 − 7 sin x v' = 3 - 7\sin x v ′ = 3 − 7 sin x .
Step 2 — Quotient rule. ( 4 + 5 cos x ) ( 3 x + 7 cos x ) − ( 4 x + 5 sin x ) ( 3 − 7 sin x ) ( 3 x + 7 cos x ) 2 \frac{(4 + 5\cos x)(3x + 7\cos x) - (4x + 5\sin x)(3 - 7\sin x)}{(3x + 7\cos x)^2} ( 3 x + 7 c o s x ) 2 ( 4 + 5 c o s x ) ( 3 x + 7 c o s x ) − ( 4 x + 5 s i n x ) ( 3 − 7 s i n x ) .
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 x 2 cos π 4 sin x \frac{x^2\cos\frac{\pi}{4}}{\sin x} s i n x x 2 c o s 4 π .
Solution:
Step 1 — Pull out the constant. cos π 4 = 1 2 \cos\frac{\pi}{4} = \frac{1}{\sqrt{2}} cos 4 π = 2 1 multiplies everything: differentiate x 2 sin x \frac{x^2}{\sin x} s i n x x 2 .
Step 2 — Quotient rule. 2 x sin x − x 2 cos x sin 2 x \frac{2x\sin x - x^2\cos x}{\sin^2 x} s i n 2 x 2 x s i n x − x 2 c o s x .
Step 3 — Reattach. cos π 4 ⋅ 2 x sin x − x 2 cos x sin 2 x \cos\frac{\pi}{4} \cdot \frac{2x\sin x - x^2\cos x}{\sin^2 x} cos 4 π ⋅ s i n 2 x 2 x s i n x − x 2 c o s x .
Takeaway: cos π 4 \cos\frac{\pi}{4} cos 4 π is a NUMBER, not a function of x x x — never differentiate it.
Example 25: tan in the denominator, sec in a product
Differentiate: (i) x 1 + tan x \frac{x}{1 + \tan x} 1 + t a n x x ; (ii) ( x + sec x ) ( x − tan x ) (x + \sec x)(x - \tan x) ( x + sec x ) ( x − tan x ) .
Solution:
Step 1 — (i) Quotient rule. ( 1 ) ( 1 + tan x ) − x sec 2 x ( 1 + tan x ) 2 \frac{(1)(1 + \tan x) - x\sec^2 x}{(1 + \tan x)^2} ( 1 + t a n x ) 2 ( 1 ) ( 1 + t a n x ) − x s e c 2 x .
Step 2 — (ii) The pieces. u ′ = 1 + sec x tan x u' = 1 + \sec x\tan x u ′ = 1 + sec x tan x ; v ′ = 1 − sec 2 x v' = 1 - \sec^2 x v ′ = 1 − sec 2 x .
Step 3 — (ii) Leibnitz. ( 1 + sec x tan x ) ( x − tan x ) + ( x + sec x ) ( 1 − sec 2 x ) (1 + \sec x\tan x)(x - \tan x) + (x + \sec x)(1 - \sec^2 x) ( 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' u , u ′ , v , v ′ in a little table before assembling — it prevents cross-wiring.
Example 26: A power of sine below
Differentiate x sin n x \frac{x}{\sin^n x} s i n n x x .
Solution:
Step 1 — The pieces. u = x u = x u = x , u ′ = 1 u' = 1 u ′ = 1 ; v = sin n x v = \sin^n x v = sin n x , v ′ = n sin n − 1 x cos x v' = n\sin^{n-1}x\cos x v ′ = n sin n − 1 x cos x (Example 17).
Step 2 — Quotient rule. sin n x − x n sin n − 1 x cos x sin 2 n x \frac{\sin^n x - x\,n\sin^{n-1}x\cos x}{\sin^{2n}x} s i n 2 n x s i n n x − x n s i n n − 1 x c o s x .
Step 3 — Cancel sin n − 1 x \sin^{n-1}x sin n − 1 x . sin x − n x cos x sin n + 1 x \frac{\sin x - nx\cos x}{\sin^{n+1}x} s i n n + 1 x s i n x − n x c o s x .
Takeaway: Always cancel the common power after a quotient rule on powers — the exponent drops from 2 n 2n 2 n to n + 1 n+1 n + 1 .
Example 27: sin 2x and cot x
Differentiate: (i) sin 2 x \sin 2x sin 2 x ; (ii) cot x \cot x cot x .
Solution:
Step 1 — (i) Product form. sin 2 x = 2 sin x cos x \sin 2x = 2\sin x\cos x sin 2 x = 2 sin x cos x : Leibnitz gives 2 ( cos 2 x − sin 2 x ) 2(\cos^2 x - \sin^2 x) 2 ( cos 2 x − sin 2 x ) .
Step 2 — (i) Recognise. = 2 cos 2 x = 2\cos 2x = 2 cos 2 x .
Step 3 — (ii) Quotient rule on cos x sin x \frac{\cos x}{\sin x} s i n x c o s x . − sin 2 x − cos 2 x sin 2 x = − c o s e c 2 x \frac{-\sin^2 x - \cos^2 x}{\sin^2 x} = -\mathrm{cosec}^2 x s i n 2 x − s i n 2 x − c o s 2 x = − cosec 2 x .
Takeaway: Both answers preview the chain rule: the 2 in 2 cos 2 x 2\cos 2x 2 cos 2 x is the inner derivative of 2 x 2x 2 x .
Example 28: A five-term collapse
Differentiate x 5 − cos x sin x \frac{x^5 - \cos x}{\sin x} s i n x x 5 − c o s x .
Solution:
Step 1 — The pieces. u ′ = 5 x 4 + sin x u' = 5x^4 + \sin x u ′ = 5 x 4 + sin x ; v ′ = cos x v' = \cos x v ′ = cos x .
Step 2 — Quotient rule. ( 5 x 4 + sin x ) sin x − ( x 5 − cos x ) cos x sin 2 x \frac{(5x^4 + \sin x)\sin x - (x^5 - \cos x)\cos x}{\sin^2 x} s i n 2 x ( 5 x 4 + s i n x ) s i n x − ( x 5 − c o s x ) c o s x .
Step 3 — Expand and collapse. sin 2 x + cos 2 x = 1 \sin^2 x + \cos^2 x = 1 sin 2 x + cos 2 x = 1 : numerator = − x 5 cos x + 5 x 4 sin x + 1 = -x^5\cos x + 5x^4\sin x + 1 = − x 5 cos x + 5 x 4 sin x + 1 .
Takeaway: The stray "+1" in such numerators is the fingerprint of a Pythagorean collapse — expect it whenever u u u and v v v mix a polynomial with sin/cos.
Example 29: No simplification available
Differentiate x + cos x tan x \frac{x + \cos x}{\tan x} t a n x x + c o s x .
Solution:
Step 1 — The pieces. u ′ = 1 − sin x u' = 1 - \sin x u ′ = 1 − sin x ; v ′ = sec 2 x v' = \sec^2 x v ′ = sec 2 x .
Step 2 — Quotient rule. ( 1 − sin x ) tan x − ( x + cos x ) sec 2 x tan 2 x \frac{(1 - \sin x)\tan x - (x + \cos x)\sec^2 x}{\tan^2 x} t a n 2 x ( 1 − s i n x ) t a n x − ( x + c o s x ) s e c 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 ) = x sin x f(x) = x\sin x f ( x ) = x sin x , find f ′ ( π 2 ) f'\left(\frac{\pi}{2}\right) f ′ ( 2 π ) .
Solution:
Step 1 — Differentiate once. f ′ ( x ) = x cos x + sin x f'(x) = x\cos x + \sin x f ′ ( x ) = x cos x + sin x (Example 4).
Step 2 — Evaluate. f ′ ( π 2 ) = π 2 cos π 2 + sin π 2 = π 2 ( 0 ) + 1 f'\left(\frac{\pi}{2}\right) = \frac{\pi}{2}\cos\frac{\pi}{2} + \sin\frac{\pi}{2} = \frac{\pi}{2}(0) + 1 f ′ ( 2 π ) = 2 π cos 2 π + sin 2 π = 2 π ( 0 ) + 1 .
Step 3 — Conclude. = 1 = 1 = 1 .
Takeaway: Differentiate first, substitute second — the graph of x sin x x\sin x x sin x crosses x = π 2 x = \frac{\pi}{2} x = 2 π with slope exactly 1.