# How do you find the derivative of f(x)= 4sinx+4x^x?

Jun 29, 2016

Differentiating the $4 \sin x$ is significantly easier than the $4 {x}^{x}$.

If $f \left(x\right) = 4 \sin x + 4 {x}^{x}$, $f ' \left(x\right) = \frac{d}{\mathrm{dx}} \left(4 \sin x\right) + \frac{d}{\mathrm{dx}} \left(4 {x}^{x}\right)$
$f ' \left(x\right) = 4 \frac{d}{\mathrm{dx}} \left(\sin x\right) + 4 \frac{d}{\mathrm{dx}} \left({x}^{x}\right)$

$\frac{d}{\mathrm{dx}} \left(\sin x\right) = \cos x$ (important one to learn!)
$\frac{d}{\mathrm{dx}} \left({x}^{x}\right)$ can not be computed using the generalised power rule for differentiation, such that: $\frac{d}{\mathrm{dx}} \left({x}^{x}\right) \ne x \left({x}^{x - 1}\right)$ since x is not a constant.

We can compute it however, by using the following rule:
${f}^{g} = {e}^{g \log f}$, where $f$ denotes $f \left(x\right)$, $g$ denotes $g \left(x\right)$ and $\log$ is the natural logarithm.
By extension: ${x}^{x} = {e}^{x \log x}$ and therefore:
$\frac{d}{\mathrm{dx}} \left({x}^{x}\right) = \frac{d}{\mathrm{dx}} \left({e}^{x \log x}\right)$

The whole point of this is that it's possible to take the derivative of this function easily. This is because the derivative of ${e}^{x}$ is just ${e}^{x}$, so we only need to multiply through by the derivative of what's in the power (as given by the chain rule).
Therefore $\frac{d}{\mathrm{dx}} \left({e}^{x \log x}\right) = {e}^{x \log x} \left(\frac{d}{\mathrm{dx}} \left(x \log x\right)\right)$
But there's no point leaving the result like that since we can just go back to ${x}^{x}$ from ${e}^{x \log x}$.
Also, $\frac{d}{\mathrm{dx}} \left(x \log x\right) = 1 + \log x$

So finally, $f ' \left(x\right) = 4 \cos x + 4 {x}^{x} \left(1 + \log x\right)$