Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Re: What is wrong?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg7704] Re: What is wrong?
  • From: Marc Mazzariol <Marc.Mazzariol at di.epfl.ch>
  • Date: Wed, 2 Jul 1997 14:21:24 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Sergio Rojas wrote:
> 
> In[1]:= Integrate[x*Sin[x]/(x^2+1),{x,0,Infinity}]
> 
>         Pi
> Out[1]= ---
>         2 E
> 
> In[2]:= f[x_] = Evaluate[ Integrate[x*Sin[x]/(x^2+1),x]] ;
> 
> In[3]:= ans = f[Infinity] - f[0]
> 
>         E Pi
> Out[3]= ----
>          2
> 
> In[4]:= $Version
> 
> Out[4]= DEC OSF/1 Alpha 2.2 (September 9, 1994)
> 
> sergio
> 
> E-mail: sergio at scisun.sci.ccny.cuny.edu

I don't know, but in the new version of Mathematica it seems to work :

In[23]:= Integrate[x Sin[x]/(x^2+1),{x,0,Infinity}]
Out[23]= Sqrt[Pi/2]*BesselK[1/2, 1]
In[24]:= N[%] == Pi/(2 E)
Out[24]= True

In[25]:= f[x_] = Evaluate[Integrate[x*Sin[x]/(x^2 + 1), x]]
Out[25]= 1/2*(I*CosIntegral[-I + x]*Sinh[1] - 
          I*CosIntegral[I + x]*Sinh[1] + 
          Cosh[1]*SinIntegral[-I + x] + Cosh[1]*SinIntegral[I + x])

In[26]:= f[Infinity] - f[0]
Out[26]= 1/2*Pi*Cosh[1] + 1/2*(-I*CosIntegral[-I]*Sinh[1] + 
           I*CosIntegral[I]*Sinh[1] - Cosh[1]*SinIntegral[-I] - 
           Cosh[1]*SinIntegral[I])
In[27]:= N[%] == Pi/(2 E)
Out[27]= True

In[28]:= $Version
Out[28]= "Microsoft Windows 3.0 (October 6, 1996)"


In an older version I've the same problem as you, maybe the difference
lies
in how Mathematica interpretes In[25] (I'm not sure) :

In[24]:= $Version
Out[24]= SPARC 2.2 (June 14, 1994)

In[25]:= f[x_] = Evaluate[ Integrate[x*Sin[x]/(x^2+1),x]]
                                     2
Out[25]= (-I CosIntegral[I - x] + I E  CosIntegral[I - x]
+                                                       2
      I CosIntegral[I + x] - I E  CosIntegral[I + x] - 

      SinIntegral[I - x] -  
        2                                            2
      E  SinIntegral[I - x] + SinIntegral[I + x] +  E  SinIntegral[I +
x])/ 

     (4 E)


-- 
+--------------------------------------------------------+
|               - No brain, no headache -                |
+--------------------------------------------------------+
|    Marc Mazzariol                       		 |
|    Swiss Federal Institute of Technology (EPFL) 	 |
|    Peripheral Systems Laboratory (LSP)		 |
|    CH-1015 Lausanne, Switzerland			 |
|    Tel: +41 21 693 3944				 |
|    Fax: +41 21 693 6680				 |
|    E-mail: Marc.Mazzariol at di.epfl.ch        		 |
+--------------------------------------------------------+


  • Prev by Date: Re: using indexed variables in MultiplierMethod[ ], etc.
  • Next by Date: Package for Blockmatrices
  • Previous by thread: Re: What is wrong?
  • Next by thread: Combining graphics objects