# How do you differentiate f(x)=(x-3)^2+(x-4)^3 using the sum rule?

Jun 23, 2017

You can apply the sum rule right away to the two expressions added.

d/dx[(x-3)^2+(x-4)^3)]=d/dx[(x-3)^2]+d/dx[(x-4)^3]

You can then differentiate each part using the chain rule.

$= 2 \left(x - 3\right) \frac{d}{\mathrm{dx}} \left(x - 3\right) + 3 {\left(x - 4\right)}^{2} \frac{d}{\mathrm{dx}} \left(x - 4\right)$

$= 2 \left(x - 3\right) \left(1\right) + 3 {\left(x - 4\right)}^{2} \left(1\right) \text{ }$The derivative terms go to $1$

$= 2 x - 6 + 3 \left({x}^{2} - 8 x + 16\right) \text{ }$Expand the squared term

$= 2 x - 6 + 3 {x}^{2} - 24 x + 48 \text{ }$Multiply the $3$ through

Combining like terms, we get

$= 3 {x}^{2} - 22 x + 42$