Results 1 to 3 of 3

Thread: Differentiation of absolute values

  1. #1
    Newbie
    Joined
    Oct 2008
    Posts
    5

    Differentiation of absolute values

    Is the solution to:

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

    just

    $\displaystyle -\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:

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

    just

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

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

    $\displaystyle \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:

    $\displaystyle \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?

    $\displaystyle \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: Sep 7th 2011, 07:11 AM
  2. Replies: 1
    Last Post: Jun 1st 2011, 01:47 AM
  3. Replies: 8
    Last Post: May 23rd 2010, 10:59 PM
  4. Replies: 2
    Last Post: Nov 8th 2009, 01:52 PM
  5. Absolute Values
    Posted in the Algebra Forum
    Replies: 8
    Last Post: Aug 19th 2009, 04:04 PM

Search Tags


/mathhelpforum @mathhelpforum