# What are the first and second derivatives of  g(x) = cosx^2 + e^(lnx^2)ln(x)?

Jul 14, 2016

$g ' \left(x\right) = - 2 x \sin \left({x}^{2}\right) + 2 x \ln \left(x\right) + x$

#### Explanation:

This is a fairly standard chain and product rule problem.

The chain rule states that:
$\frac{d}{\mathrm{dx}} f \left(g \left(x\right)\right) = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right)$

The product rule states that:
$\frac{d}{\mathrm{dx}} f \left(x\right) \cdot g \left(x\right) = f ' \left(x\right) \cdot g \left(x\right) + f \left(g\right) \cdot g ' \left(x\right)$

Combining these two, we can figure out $g ' \left(x\right)$ easily. But first let's note that:
$g \left(x\right) = \cos {x}^{2} + {e}^{\ln {x}^{2}} \ln \left(x\right) = \cos {x}^{2} + {x}^{2} \ln \left(x\right)$

(Because ${e}^{\ln} \left(x\right) = x$ ). Now moving on to determining the derivative:
$g ' \left(x\right) = - 2 x \sin \left({x}^{2}\right) + 2 x \ln \left(x\right) + \frac{{x}^{2}}{x}$
$= - 2 x \sin \left({x}^{2}\right) + 2 x \ln \left(x\right) + x$