MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ..Integrate[Abs[x]... UnitStep again!


Jose;
    It occured to me that Abs[x]= Integrate[Sign[x],x]; but when I tried
that, Mathematica generated an "invalid integration limit or variable..."
error, so I split the function in two parts joining at x=0 using the Unit
Step function & that worked:

mySign = UnitStep[t] - UnitStep[-t];
Plot[dublStep, {t, -2, 2} ]

(* output omitted   *)

In>>
myAbs = Integrate[mySign, t]
Plot[myAbs, {t, -3, 3}]

Out>>
-t + 2 t UnitStep[t]
(*   Plot omitted   *)

In[10]:=
Integrate[myAbs, t]
Plot[%, {t, -4, 4}]

Out[10]=
-t^2/2 + t^2 UnitStep[t]
(*   Plot omitted   *)

-mark harder
harderm at ucs.orst.edu


-----Original Message-----
From: José María Lasso <jml at accessinter.net>
To: mathgroup at smc.vnet.net
Subject: [mg23728] [mg23712] Thx for your help


>Hi,
>Thx for the answers to my last post, but I have a new question, similar to
>the last one, when I try: Integrate[Abs[x],x], there is no result, just the
>original input, what I am doing wrong?, I need some advice about a good
>book about Mathematica for beginers.Thx again.Best regards
>
>Jose M Lasso
>
>
>



  • Prev by Date: Pb with ZeroTest
  • Next by Date: Fwd: Thx for your help
  • Previous by thread: Pb with ZeroTest
  • Next by thread: Finding Front-End Options