Re: Avoid long output, Real variables?
- To: mathgroup at smc.vnet.net
- Subject: [mg20521] Re: [mg20424] Avoid long output, Real variables?
- From: BobHanlon at aol.com
- Date: Wed, 27 Oct 1999 02:05:12 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Use the option Assumptions
Integrate[E^(I*k*x)/Sqrt[1 + k^2]/(2*Pi), {k, -Infinity, Infinity},
Assumptions -> Im[x] == 0]
Integrate[E^(I*k*x)/Sqrt[1 + k^2]/(2*Pi), {k, -Infinity, Infinity},
Assumptions -> x > 0]
Bob Hanlon
In a message dated 10/26/1999 8:48:21 AM, bergervo at prl.philips.nl writes:
>Is it possible to tell Mathematica that a variable, x, is Real?
>I am looking for commands like those of some competing vendor:
> assume(x, real)
> assume(x>0)
>If I cannot declare x to be Real, I get clumsy answers. For
>instance, a Fourier transform which for real x is just:
>
> 2 BesselK[0, x Sign[x]]
>
>gives me instead a pretty long answer where the actual solution
>for real x is hardly recognizable between the rest:
>
> In[4]:=Integrate[E^(I*k*x)/Sqrt[1+k^2]/(2*Pi), {k,-Infinity,Infinity}]
>
> Out[4]= If[Im[x] == 0, 2 BesselK[0, x Sign[x]],
>
> I k x
> E
> Integrate[------------, {k, -Infinity, Infinity}]] / (2 Pi)
> 2
> Sqrt[1 + k ]
> In[5]:=
>
>And it can get worse if several variables are involved. So I really
>hope that someone can teach me how to declare them Real (or positive).
>