login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

This is how FriCAS currently differentiates the absolute value function.

fricas
(1) -> differentiate(abs(x),x)

\label{eq1}\frac{abs \left({x}\right)}{x}(1)
Type: Expression(Integer)

The abs function is often defined in terms of the positive square root

fricas
Abs(x)==sqrt(x^2)
Type: Void

so comparison with the following is perhaps a surprize.

fricas
differentiate(Abs(x),x)
fricas
Compiling function Abs with type Variable(x) -> Expression(Integer)

\label{eq2}\frac{x}{\sqrt{{x}^{2}}}(2)
Type: Expression(Integer)

Are these expressions really equivalent?

The derivative of abs is often represented by the signum function (or sign) and the derivative of signum is the Dirac delta function which of course is not really a functions at all ... So what is the 2nd derivative of abs?

fricas
differentiate(abs(x),[x,x])

\label{eq3}0(3)
Type: Expression(Integer)
fricas
differentiate(Abs(x),[x,x])

\label{eq4}0(4)
Type: Expression(Integer)




  Subject:   Be Bold !!
  ( 15 subscribers )  
Please rate this page: