# How to differentiate a modulus?

How to differentiate something like this: \begin{aligned} \large \ (\ln |Ax+B + \sqrt{Cx-D}|)' \end{aligned} If it would something like that: \begin{aligned} \large \ (\ln |Ax-B|)' \end{aligned} Could I just split in something like this: \begin{aligned} \large \ (\ln (Ax-B))' + (\ln(Ax+B))' \end{aligned} And differentiate it then?

-
Are you having problems differentiating the logarithm or the modulus. The modulus is in there to tell you that logarithms blush if they saw negative people! – user21436 Mar 1 '12 at 6:16

Apply the chain rule. $$\begin{eqnarray}(ln |Ax+B + \sqrt{Cx-D}|)'&=&\frac{1}{|Ax+B + \sqrt{Cx-D}|}|Ax+B + \sqrt{Cx-D}|'\\ &=&\frac{\mathrm{sgn}(Ax+B + \sqrt{Cx-D})}{|Ax+B + \sqrt{Cx-D}|}(Ax+B + \sqrt{Cx-D})'\\ &=&\frac{\mathrm{sgn}(Ax+B + \sqrt{Cx-D})}{|Ax+B + \sqrt{Cx-D}|}\left(A+\frac{1}{2}\frac{C}{\sqrt{Cx+D}}\right)\\ &=&\frac{1}{Ax+B + \sqrt{Cx-D}}\left(A+\frac{1}{2}\frac{C}{\sqrt{Cx+D}}\right)\\ \end{eqnarray}$$
The most useful fact is that the derivative of $\ln|x|$ is $1/x$ (most easily checked by considering $x>0$ and $x<0$ separately). Your function is a composition of this and another function. Use the chain rule.