MathGroup Archive 1999

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

Search the Archive

Avoid long output, Real variables?

  • To: mathgroup at
  • Subject: [mg20424] Avoid long output, Real variables?
  • From: bergervo at (Bergervoet J.R.M.)
  • Date: Tue, 26 Oct 1999 00:33:08 -0400
  • Organization: Philips Research Laboratories Eindhoven, Netherlands
  • Sender: owner-wri-mathgroup at

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)
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
      Integrate[------------, {k, -Infinity, Infinity}]] / (2 Pi)
                Sqrt[1 + k ]

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).

Thanks in advance,

  • Prev by Date: Re: OOP in Mathematica -- please help a newbie
  • Next by Date: Re: Display problems
  • Previous by thread: Re: Mathematica for Macintosh Plus i.e. 68000 processors?
  • Next by thread: Re: Avoid long output, Real variables?