Results 1 to 3 of 3

Math Help - Differentiation of absolute values

  1. #1
    Newbie
    Joined
    Oct 2008
    Posts
    5

    Differentiation of absolute values

    Is the solution to:

    \frac{d}{da} \sum_{i=1}^n |x_{i}-a|

    just

    -\sum_{i=1}^n |x_{i}-a|

    Thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Moo
    Moo is offline
    A Cute Angle Moo's Avatar
    Joined
    Mar 2008
    From
    P(I'm here)=1/3, P(I'm there)=t+1/3
    Posts
    5,618
    Thanks
    6
    Hello,
    Quote Originally Posted by evidor View Post
    Is the solution to:

    \frac{d}{da} \sum_{i=1}^n |x_{i}-a|

    just

    -\sum_{i=1}^n |x_{i}-a|

    Thanks!
    Assume x_i is a constant with respect to a.
    Take just |x_1-a|
    What is its derivative ?
    If x_1-a>0, then |x_1-a|=x_1-a and hence the derivative is \color{red} -1
    If x_1-a<0, then |x_1-a|=-x_1+a and hence the derivative is \color{red} +1
    If x_1-a=0, the derivative is 0


    So no, your formula is not correct
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Oct 2008
    Posts
    5
    The easiest way to do this is:

    \frac{d}{da} \sum_{i=1}^n |x_{i}-a| = \frac{d}{da} \sum_{i=1}^n ((x_{i}-a)^2)^\frac {1}{2}

    and then the solution becomes:

    \sum_{i=1}^n \frac {1}{2} \frac {-2(x_{i}-a)}{ ((x_{i}-a)^2)^\frac{1}{2} } = -\sum_{i=1}^n \frac {x_{i}-a}{|x_{i}-a|}


    so now my new question is how do you take the second derivative?

    \frac{d}{da} -\sum_{i=1}^n \frac {x_{i}-a}{|x_{i}-a|}
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: September 7th 2011, 08:11 AM
  2. Replies: 1
    Last Post: June 1st 2011, 02:47 AM
  3. Replies: 8
    Last Post: May 23rd 2010, 11:59 PM
  4. Replies: 2
    Last Post: November 8th 2009, 02:52 PM
  5. Absolute Values
    Posted in the Algebra Forum
    Replies: 8
    Last Post: August 19th 2009, 05:04 PM

Search Tags


/mathhelpforum @mathhelpforum