How do you differentiate #f(x)=(2x-cos^3x)^2-(lnx)^2# using the chain rule?

1 Answer
Nov 10, 2015

#dy/dx = (4+6cos^2(x)sin(x))(2x-cos^3(x)) - (2ln(x))/x#

Explanation:

So we have

#y = (2x - cos^3(x))^2 - ln^2(x)#

Derivating it

#dy/dx = d/dx(2x - cos^3(x))^2 - d/dx(ln^2(x))#

Let's solve the log part first, let's call #ln(x) = u#

#dy/dx = d/dx(2x-cos^3(x))^2 - d/(du)u^2(du)/dx#
#dy/dx = d/dx(2x-cos^3(x))^2 - 2u*1/x#

Let's say that #(2x-cos^3(x)) = v#

#dy/dx = d/(dv)v^2(dv)/dx - 2u*1/x#
#dy/dx = 2v*d/dx(2x-cos^3(x)) - 2u*1/x#

We break that derivative in two parts and apply the distributive

#dy/dx = 2v*d/dx(2x) - 2v*d/dx(cos^3(x)) - 2u*1/x#
#dy/dx = 4v - 2v*d/dx(cos^3(x)) - 2u*1/x#

Let's say that #w = cos(x)#

#dy/dx = 4v - 2v*d/(dw)w^3(dw)/dx - 2u*1/x#
#dy/dx = 4v - 6vw^2*d/dx(cos(x)) - 2u*1/x#
#dy/dx = 4v + 6vw^2sin(x) - 2u*1/x#

Put everything in terms of #x#

#dy/dx = (4+6w^2sin(x))v-(2u)/x#
#dy/dx = (4+6cos^2(x)sin(x))(2x-cos^3(x)) - (2ln(x))/x#