       Re: Avoid long output, Real variables?

• To: mathgroup at smc.vnet.net
• Subject: [mg20465] Re: Avoid long output, Real variables?
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Wed, 27 Oct 1999 02:04:39 -0400
• Organization: Universitaet Leipzig
• References: <7v3ch5\$5vu@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

in Mathematica 3. and 4. you can give the assumptions option

Integrate[E^(I*k*x)/Sqrt[1 + k^2]/(2*Pi), {k, -Infinity, Infinity},
Assumptions -> {Im[x] == 0}]

Hope that helps
Jens

"Bergervoet J.R.M." wrote:
>
> 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:=Integrate[E^(I*k*x)/Sqrt[1+k^2]/(2*Pi), {k,-Infinity,Infinity}]
>
>   Out= 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:=
>
> 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).
>