Re: FullSimplify Question

• To: mathgroup at smc.vnet.net
• Subject: [mg48606] Re: FullSimplify Question
• From: Paul Abbott <paul at physics.uwa.edu.au>
• Date: Mon, 7 Jun 2004 05:33:41 -0400 (EDT)
• Organization: The University of Western Australia
• References: <c9tmvi\$sek\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```In article <c9tmvi\$sek\$1 at smc.vnet.net>,
"Dana DeLouis" <delouis at bellsouth.net> wrote:

> Hello.  Hate to ask, but does anyone know what the issue is in the
> following?
>
> This equation basically is 5 when t is less than 0, and 1 when t>=0
>
> equ = 5 - 4*UnitStep[t]
>
> If I ask to "Simplify" this, by using the Sign function, I get the
> following, which is not even close
>
> FullSimplify[equ, TransformationFunctions -> {Sign}]
>
> 1 - UnitStep[t]

From the documentation:

TransformationFunctions is an option for Simplify and FullSimplify
which gives the list of functions to apply to try to t

So Sign is being _applied_ to equ. You can see this more clearly if you
try

FullSimplify[equ,
TransformationFunctions -> {Sign[Print[{#,Sign[#]}]; #] & }]

printing out the sub-expressions that FullSimplify is attempting to
simplify by application of Sign.

> The above is 1 when t<0, and 0 when t>=0.
>
> I have to use both functions "FourierTransform" and
> "InverseFourierTransform" to get the correct form.
>
> 3 - 2*Sign[t]

The transformation rule, UnitStep[x_] :> (Sign[x] + 1)/2 (valid
everywhere except at x==0) will do what you want:

Simplify[equ /. UnitStep[x_] :> (Sign[x] + 1)/2]

> My question is that I can't figure out why FullSimplify was so far off.
> Would Mathematica have been better to leave the expression unevaluated so as
> to use other methods?

You "told" Mathematica to apply Sign recursively in an attempt to
simplify the expression at hand ...

Cheers,
Paul

--
Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au
AUSTRALIA                            http://physics.uwa.edu.au/~paul

```

• Prev by Date: Re: Random Matrix of Integers
• Next by Date: Re: Help Browser
• Previous by thread: FullSimplify Question
• Next by thread: Re: FullSimplify Question