Mister Exam

Derivative of abs(x-y0)+abs(x-y1)

Function f() - derivative -N order at the point
v

The graph:

from to

Piecewise:

The solution

You have entered [src]
|x - y0| + |x - y1|
$$\left|{x - y_{0}}\right| + \left|{x - y_{1}}\right|$$
|x - y0| + |x - y1|
The first derivative [src]
(y1 - re(x))*sign(x - y1)
-------------------------
          x - y1         
$$\frac{\left(y_{1} - \operatorname{re}{\left(x\right)}\right) \operatorname{sign}{\left(x - y_{1} \right)}}{x - y_{1}}$$
The second derivative [src]
              d                  (y1 - re(x))*sign(x - y1)               
(y1 - re(x))*---(sign(x - y1)) + ------------------------- + sign(x - y1)
             dy1                           x - y1                        
-------------------------------------------------------------------------
                                  x - y1                                 
$$\frac{\left(y_{1} - \operatorname{re}{\left(x\right)}\right) \frac{\partial}{\partial y_{1}} \operatorname{sign}{\left(x - y_{1} \right)} + \operatorname{sign}{\left(x - y_{1} \right)} + \frac{\left(y_{1} - \operatorname{re}{\left(x\right)}\right) \operatorname{sign}{\left(x - y_{1} \right)}}{x - y_{1}}}{x - y_{1}}$$
The third derivative [src]
                                                                                         d                                             
                                     2                                   2*(y1 - re(x))*---(sign(x - y1))                              
   d                                d                   2*sign(x - y1)                  dy1                 2*(y1 - re(x))*sign(x - y1)
2*---(sign(x - y1)) + (y1 - re(x))*----(sign(x - y1)) + -------------- + -------------------------------- + ---------------------------
  dy1                                 2                     x - y1                    x - y1                                 2         
                                   dy1                                                                               (x - y1)          
---------------------------------------------------------------------------------------------------------------------------------------
                                                                 x - y1                                                                
$$\frac{\left(y_{1} - \operatorname{re}{\left(x\right)}\right) \frac{\partial^{2}}{\partial y_{1}^{2}} \operatorname{sign}{\left(x - y_{1} \right)} + 2 \frac{\partial}{\partial y_{1}} \operatorname{sign}{\left(x - y_{1} \right)} + \frac{2 \left(y_{1} - \operatorname{re}{\left(x\right)}\right) \frac{\partial}{\partial y_{1}} \operatorname{sign}{\left(x - y_{1} \right)}}{x - y_{1}} + \frac{2 \operatorname{sign}{\left(x - y_{1} \right)}}{x - y_{1}} + \frac{2 \left(y_{1} - \operatorname{re}{\left(x\right)}\right) \operatorname{sign}{\left(x - y_{1} \right)}}{\left(x - y_{1}\right)^{2}}}{x - y_{1}}$$