Derivative of |sinx|

1. Jan 16, 2012

PirateFan308

1. The problem statement, all variables and given/known data
Compute the derivatives of the following (where they are differentiable):
h) |sinx|

2. Relevant equations
Chain rule: (f°g)'(c) = f'(g(c))(g'(c))

3. The attempt at a solution
Let f=|x| and g=sin x
(f°g)'(c) = f'(g(x))g'(c) = f'(sin x)(cos x)
But I don't know what (|x|)' is. It's +1 when x>0 and -1 when x<0 and it's not differentiable at 0, but then there is no x to plug g into, and looking at the graph, I don't think this would be right. Thanks!

2. Jan 16, 2012

Dickfore

Hint:
$$\vert x \vert \equiv \left\lbrace\begin{array}{rl} x &, \ x \ge 0 \\ -x &, \ x < 0 \end{array}\right.$$

Therefore:
$$\frac{d}{d x} \vert x \vert = \left\lbrace \begin{array}{rl} 1 &, \ x > 0 \\ -1 &, \ x < 0 \end{array}\right. \equiv \mathrm{sgn}(x)$$
The derivative does not exist at $x = 0$.

Then, use the chain rule.

3. Jan 16, 2012

Simon Bridge

express the function piecewise to remove the absolute value sign.
eg |x| = {x: x>0 and -x: x<0 and 0: x=0}

Dickfore beat me to it

4. Jan 17, 2012

PirateFan308

So if x>0, $(f°g)' = f'(g(x))g'(x) = (1)(cos x) = cos x$

If x<0, $(f°g)' = f'(g(x))g'(x) = (-1)(cos x) = -cos x$

Thanks for the hint!

5. Jan 17, 2012

SammyS

Staff Emeritus
What you have is not correct. sin(x) may be negative when x > 0 .

$\vert \sin(x) \vert \equiv \left\lbrace\begin{array}{rl} \sin(x) &\text{if } \ \sin(x) \ge 0 \\ -\sin(x) &\text{if } \ \sin(x) < 0 \end{array}\right.$

So, what matters is the sign of sin(x), not the sign of x itself.

Last edited: Jan 17, 2012
6. Jan 17, 2012

ehild

You can use the "sign" function sign(a)=a/|a| (http://mathworld.wolfram.com/Sign.html) to express the derivative of |sinx|.

It is also possible to use the identity

$|a|=\sqrt{a^2}$

and determine the derivative of $\sqrt{sin^2(x)}$.

ehild

Last edited: Jan 18, 2012
7. Jan 19, 2012

Thanks!