# Helping Ada Lovelace with her Homework: Classroom Exercises from a Victorian Calculus Course – Solution to Problem 4

Author(s):
If she had understood the meaning of these theorems, she could have applied theorem (2) to $$u=x^2 (a+x)^3 (b-x)^4$$, where $$v_1=x^2$$, $$v_2= (a+x)^3$$, and $$v_3= (b-x)^4$$. This would have given her
$\begin{array}{ccl}du&=&x^2 (a+x)^3 (b-x)^4 \left \{\frac{2x}{x^2} + 3\frac{(a+x)^2}{(a+x)^3} - \frac{4(b-x)^3}{ (b-x)^4} \right \}dx \\ &=&x^2 (a+x)^3 (b-x)^4 \left \{\frac{2}{x}+\frac{3}{a+x}-\frac{4}{b-x}\right \}dx\\ &=&x^2 (a+x)^3 (b-x)^4 \left \{\frac{(2(a+x)(b-x)+3x(b-x)-4x(a+x)}{ x(a+x)(b-x)}\right \}dx\\ &=&x^2 (a+x)^3 (b-x)^4 \left \{\frac{2ab-6ax+5bx- 9x^2}{x(a+x)(b-x)}\right \}dx\\ &=&x (a+x)^2 (b-x)^3 (2ab-(6a-5b)x-9x^2 )dx.\end{array}$
Lovelace’s mistake was that she did not apply the chain rule to  $$(b-x)^4$$ correctly, and obtained $$4 (b-x)^3$$instead of $$-4 (b-x)^3$$. As De Morgan explained to her: ‘It is very common to suppose that if $$\phi(x)$$ differentiated gives $$\psi(x)$$, then $$\phi(-x)$$ gives $$\psi(-x)$$, but this should be $$\psi(-x)\times \mbox{diff. co.}(-x)$$ or $$\psi(-x)\times -1$$’ [LB 170, 14 Nov. 1840, f. 20r]. Sure enough, once Lovelace rectified her mistake she obtained the correct answer.