This is nasty.
y = (cos(7x))^x
Start by taking the natural logarithm of either side, and bring the exponent x down to be the coefficient of the right hand side:
rArr lny = xln(cos(7x))
Now differentiate each side with respect to x, using the product rule on the right hand side. Remember the rule of implicit differentiation: d/dx(f(y)) = f'(y)*dy/dx
:.1/y*dy/dx = d/dx(x)*ln(cos(7x)) + d/dx(ln(cos(7x)))*x
Using the chain rule for natural logarithm functions - d/dx(ln(f(x))) = (f'(x))/f(x) - we can differentiate the ln(cos(7x))
d/dx(ln(cos(7x))) = -7sin(7x)/cos(7x) = -7tan(7x)
Returning to the original equation:
1/y*dy/dx = ln(cos(7x)) - 7xtan(7x)
Now we can substitute the original y as a function of x value from the start back in, so as to remove the errant y on the left hand side. Multiplying both sides by y:
dy/dx = (cos(7x))^x*(ln(cos(7x))-7x(tan(7x)))