Message Boards Message Boards

0
|
6722 Views
|
7 Replies
|
4 Total Likes
View groups...
Share
Share this post:

How to simplify Sign'

Posted 4 years ago

How can I force Mathematica to simplify the derivative of Sign? The following

FullSimplify[D[Sign[x], x], x > 0]

does not work. All it produces is

Sign'[x]

(On the other hand,

FullSimplify[D[Abs[x], x], x > 0]

goes through.)

POSTED BY: Severin Posta
7 Replies

Sign is a programming construct, not an analytic function. However, you can define a generalized function with similar properties and differentiate that:

sign[x_] := 2 HeavisideTheta[x] - 1
sign'[x]
(* 2 DiracDelta[x] *)
POSTED BY: John Doty

You could get around this by:

    sgn[x_] := Piecewise[{{-1, x < 0}, {0, x == 0}, {1, x > 0}}]

    sgn'[x]
(* Piecewise[{{0, x < 0 || x > 0}}, Indeterminate]  *)

    D[sgn[x], x]
(* iecewise[{{0, x < 0 || x > 0}}, Indeterminate] *)

I'm showing the InputForm of each output. In a notebook you'll actually see the usual nice display, with a big left brace enclosing the separate cases on each line.

POSTED BY: Murray Eisenberg

Or do it:

 D[PiecewiseExpand[Sign[x], Assumptions -> x \[Element] Reals], x]
 (*Piecewise[{{0, x < 0 || x > 0}}, Indeterminate]*)
POSTED BY: Mariusz Iwaniuk
Posted 4 years ago

Interesting. Thanks.

POSTED BY: Severin Posta
PiecewiseExpand[Sign[x], Assumptions -> x > 0]

(* 1 *)

Regards M.I

POSTED BY: Mariusz Iwaniuk
Posted 4 years ago

Thanks. However I need to simplify Sign', not Sign.

POSTED BY: Severin Posta
ComplexExpand[Re[D[Sign[x], x]], TargetFunctions -> Conjugate]
(* 0 *)
POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract