# How do you find the derivative of sqrt(x^2)?

Mar 22, 2016

$\frac{d}{\mathrm{dx}} \left(\sqrt{{x}^{2}}\right) = \frac{x}{\sqrt{{x}^{2}}} = \left\{\begin{matrix}1 & \text{if" & x > 0 \\ -1 & "if} & x < 0\end{matrix}\right.$

#### Explanation:

$f \left(x\right) = \sqrt{{x}^{2}} = {\left({x}^{2}\right)}^{\frac{1}{2}}$

Using the chain rule we get:

$f ' \left(x\right) = \frac{1}{2} {\left({x}^{2}\right)}^{- \frac{1}{2}} \frac{d}{\mathrm{dx}} \left({x}^{2}\right)$

$= \frac{1}{2} {\left({x}^{2}\right)}^{- \frac{1}{2}} \cdot 2 x$

$= x {\left({x}^{2}\right)}^{- \frac{1}{2}}$

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

$= \frac{x}{\sqrt{{x}^{2}}}$.

This can also be written as a piecewise function.

$f \left(x\right) = \sqrt{{x}^{2}} = \left\mid x \right\mid = \left\{\begin{matrix}x & \text{if" & x >= 0 \\ -x & "if} & x < 0\end{matrix}\right.$

So,

$f ' \left(x\right) = \left\{\begin{matrix}1 & \text{if" & x > 0 \\ -1 & "if} & x < 0\end{matrix}\right.$