1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Derivative of |sinx|

  1. Jan 16, 2012 #1
    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. jcsd
  3. Jan 16, 2012 #2
    \vert x \vert \equiv \left\lbrace\begin{array}{rl}
    x &, \ x \ge 0 \\

    -x &, \ x < 0

    \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 [itex]x = 0[/itex].

    Then, use the chain rule.
  4. Jan 16, 2012 #3

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

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

    [edit]Dickfore beat me to it
  5. Jan 17, 2012 #4
    So if x>0, [itex](f°g)' = f'(g(x))g'(x) = (1)(cos x) = cos x[/itex]

    If x<0, [itex](f°g)' = f'(g(x))g'(x) = (-1)(cos x) = -cos x[/itex]

    Thanks for the hint!
  6. Jan 17, 2012 #5


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

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

    Your function is:

    [itex]\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

    So, what matters is the sign of sin(x), not the sign of x itself.
    Last edited: Jan 17, 2012
  7. Jan 17, 2012 #6


    User Avatar
    Homework Helper

    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


    and determine the derivative of [itex]\sqrt{sin^2(x)}[/itex].

    Last edited: Jan 18, 2012
  8. Jan 19, 2012 #7
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook