I just want to check if this is the correct way to handle $\frac d{dx} |f(x)|$.
Should you say $|f(x)| = \operatorname{sgn}(f(x))f(x)$ (where $\operatorname{sgn}(x)$ is the sign function which equals $\pm 1$, depending on the sign of $x$) and then take the derivative of this, where $\operatorname{sgn}(x)$ is a constant? I.e. $\frac d{dx} |f(x)| = \operatorname{sgn}(x) \frac {df}{dx}$?
What about integration? Can I also do $\int_a^b |f(x)|dx = \operatorname{sgn}(f(x))\int_a^b f(x)dx$?