### Dr. Wilson

4f. Find the first and second derivative.

We rewrite this as

so that we can deal with it. We can now simply use the chain rule. The outrside function is the exponential function, and it is equal to its own derivative. The inside function is a product so we use the product rule to get its derivative.

This can be rewritten as

or

f'(x) = (sin x)cos x (cos x cot x - sin x ln sin x).

However, to get the second derivative we will use

To get the second derivative we will use the product rule. The first factor is just our original function, so its derivative is the first derivative which is the original function times the quantity in parentheses. When you multiply it by the second factor, which is the quatity in parentheses, you get two factors of the quantity in parentheses. Then the product rule tells us to multiply the first factor times the derivative of the second which is the quantity in parentheses. The quntity in parentheses has two terms, so we differentiate it term by term. We are expressing the first term as a quotient, so we will use the quotient rule. The top is a cosine squared, so its derivative is obtained by hauling the power down in front and raising the inside function, which, in this case, is the cosine, to one smaller power before multiplying by the derivative of the inside function. The second term is a product where the second factor is a natural log. When we put it all together we get.

This can be cleaned up a little bit.