# How do you find the first and second derivative of x(lnx)^2?

May 8, 2017

$f ' \left(x\right) = \ln x \left(\ln x + 2\right)$
$f ' ' \left(x\right) = \frac{2}{x} \left(\ln x + 1\right)$

#### Explanation:

$f \left(x\right) = x {\ln}^{2} x$

$f ' \left(x\right) = x \cdot 2 \ln x \cdot \frac{1}{x} + {\ln}^{2} x \cdot 1$ [Product rule, chain rule and power rule]

$= 2 \ln x + {\ln}^{2} x$

$= \ln x \left(\ln x + 2\right)$

$f ' ' \left(x\right) = \ln x \cdot \frac{d}{\mathrm{dx}} \left(\ln x + 2\right) + \frac{d}{\mathrm{dx}} \ln x \cdot \left(\ln x + 2\right)$ [Product rule]

$= \ln x \left(\frac{1}{x} + 0\right) + \frac{1}{x} \cdot \left(\ln x + 2\right)$ [Standard differential]

$= \frac{1}{x} \cdot \left(2 \ln x + 2\right)$

$= \frac{2}{x} \left(\ln x + 1\right)$

May 8, 2017

Use the product rule to get: $y ' = 2 \ln \left(x\right) + \ln {\left(x\right)}^{2}$
and the same for getting $y ' ' = \frac{2}{x} \left(\ln \left(x\right) + 1\right)$

#### Explanation:

Step 1. Break the original into two functions

$u = x$ and $v = \ln {\left(x\right)}^{2}$

Step 2. Differentiate each $u$ and $v$

$\frac{d}{\mathrm{dx}} \left(u\right) = \frac{d}{\mathrm{dx}} \left(x\right) = 1$

$\frac{d}{\mathrm{dx}} \left(v\right) = \frac{d}{\mathrm{dx}} \left(\ln {\left(x\right)}^{2}\right) = 2 \cdot \ln \left(x\right) \cdot \frac{1}{x}$

Step 3. Use the Product Rule to solve

Product Rule: $\frac{\mathrm{dy}}{\mathrm{dx}} = u \frac{\mathrm{dv}}{\mathrm{dx}} + v \frac{\mathrm{du}}{\mathrm{dx}}$

Plugging in: $\frac{\mathrm{dy}}{\mathrm{dx}} = x \cdot 2 \ln \left(x\right) \frac{1}{x} + \ln {\left(x\right)}^{2} \cdot 1$
$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 \ln \left(x\right) + \ln {\left(x\right)}^{2} = \ln \left(x\right) \left(2 + \ln \left(x\right)\right)$

Step 4. Differentiate the answer from Step 3.
$\frac{{d}^{2} y}{\mathrm{dx}} ^ 2 = \ln \left(x\right) \frac{1}{x} + \left(2 + \ln \left(x\right)\right) \frac{1}{x}$
$= \ln \frac{x}{x} + \frac{2}{x} + \ln \frac{x}{x}$
$= \frac{1}{x} \left(2 \ln \left(x\right) + 2\right)$
$= \frac{2}{x} \left(\ln \left(x\right) + 1\right)$