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

MathGroup Archive 2005

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

Search the Archive

Re: Re: an Integrate question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58937] Re: [mg58918] Re: an Integrate question
  • From: Pratik Desai <pdesai1 at umbc.edu>
  • Date: Sun, 24 Jul 2005 01:21:56 -0400 (EDT)
  • References: <dbie3r$brm$1@smc.vnet.net><dbkkiq$s49$1@smc.vnet.net> <dbninb$hlj$1@smc.vnet.net> <200507230932.FAA29106@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Drago Ganic wrote:

>Antonio,
>We have a more precise analytical solution in Mathematica 5.2 than in 5.1. 
>Here is the solution I got with 5.2:
>
>In[3]:=
>Integrate[E^(I*h*x)/(E^(m*Sqrt[k2 + x2])*
>(Abs[x] + Sqrt[k2 + x2])), {x, 0, Infinity}]
>
>Out[3]=
>Piecewise[{{((1/2)*(2*Gamma[0, (-I)*h*Sqrt[k2 + x2]] -
>2*Log[(-I)*h] + 2*Log[(-I)*h*Sqrt[k2 + x2]] -
>Log[k2 + x2]))/E^((I*h + m)*Sqrt[k2 + x2]),
>Im[h] > 0},
>{(Pi*MeijerG[{{0}, {1/2}}, {{0, 0}, {1/2}},
>I*h*Sqrt[k2 + x2]])/E^(m*Sqrt[k2 + x2]),
>h \[Element] Reals && Im[h] <= 0}},
>Integrate[E^(I*h*x - m*Sqrt[k2 + x2])/
>(Abs[x] + Sqrt[k2 + x2]), {x, 0, Infinity},
>Assumptions -> h \[NotElement] Reals && Im[h] <= 0]]
>and using assumptions we get just one solution:
>
>In[6]:=
>Assuming[{h, m} \[Element] Reals && Re[k2] <= 0),
>Integrate[E^(I*h*x)/(E^(m*Sqrt[x2 + k2])*(Abs[x] + Sqrt[x2 + k2])),
>{x, 0, Infinity}]]
>
>Out[6]=
>(Pi*MeijerG[{{0}, {1/2}}, {{0, 0}, {1/2}},
>I*h*Sqrt[k2 + x2]])/E^(m*Sqrt[k2 + x2])
>
>I did not verify the solution. But I don't understand the condition:
>
> h \[Element] Reals && Im[h] <= 0
>
>because   h \[Element] => Im[h] == 0 ?!?  Your case should be covered with 
>the solution given.
>
>Gretings,
>Drago Ganic
>
>"Antonio Carlos Siqueira" <acsl at dee.ufrj.br> wrote in message 
>news:dbninb$hlj$1 at smc.vnet.net...
>  
>
>>Dear Mathgroup
>>First of all thanks to Carl Woll and Andreas Dieckman for providing the
>>answer to the integral.   Digging my results a little bit I found
>>myself with a little different integral. I am trying to calculate some
>>electromagnetic field in conductive soil, the integral looks like this:
>>Integrate[Exp[-m Sqrt[x2+k2]]*> Exp[I h
>>x]/(Abs[x]+Sqrt[x2+k2]),{x,0,Infinity}]
>>where h and m are real and k is either pure imaginary or has a negative
>>real part.
>>Any ideas on how to solve such integral analytically?
>>After some tests I believe this integral is a job for NIntegrate,
>>nevertheless it is worth asking if anyone knows any trick to transform
>>this integral in something that can be solved analytically.
>>Nice Regards
>>Antonio
>>
>>    
>>
>
>
>  
>
Here is something that works a little faster
Assuming[h ϵ Reals && m ϵ Reals, Integrate[E^(I*h*x)/(E^(m*Sqrt[
k2 + x2])*(Abs[x] + Sqrt[k2 + x2])), {x, 0, Infinity}]] // Timing
 >>\!\({8.122000000000014`\ Second, \[ExponentialE]\^\(\(-m\)\ \@\(k2 + 
x2\)\)\ \
\[Pi]\ MeijerG[{{0}, {1\/2}}, {{0,
0}, {1\/2}}, \[ImaginaryI]\ h\ \@\(k2 + x2\)]}\)

TagSet[h, Im[h], 0]
TagSet[h, Re[h], h]
TagSet[m, Im[m], 0]
TagSet[m, Re[m], m]
Integrate[E^(I*h*x)/(E^(m*Sqrt[k2 + x2])*(Abs[x] + Sqrt[k2 +
x2])), {x, 0, Infinity}] // Timing

 >>\!\({6.789999999999992`\ Second, \[ExponentialE]\^\(\(-m\)\ \@\(k2 + 
x2\)\)\ \
\[Pi]\ MeijerG[{{0}, {1\/2}}, {{0,
0}, {1\/2}}, \[ImaginaryI]\ h\ \@\(k2 + x2\)]}\)


Now if you want to work by simplifying your integrand
Clear[f, h, m]
TagSet[h, Im[h], 0]
TagSet[h, Re[h], h]
TagSet[m, Im[m], 0]
TagSet[m, Re[m], m]
f[x_] = E^(I*h*x)/(E^(m*Sqrt[k2 + x2])*(Abs[x] + Sqrt[k2 + x2])) // 
ExpToTrig \
// Simplify
Integrate[f[x], {x, 0, 1}] // Timing

 >>\!\({26.577999999999975`\ Second, 
\(-\[ExponentialE]\^\(\((\(-\[ImaginaryI]\)\
\ h - m)\)\ \@\(k2 + x2\)\)\)\ \((CosIntegral[h\ \@\(k2 + x2\)] -
CosIntegral[
h\ \((1 + \@\(k2 + x2\))\)] + \[ImaginaryI]\ SinIntegral[
h\ \@\(k2 + x2\)] - \[ImaginaryI]\ SinIntegral[
h\ \((1 + \@\(k2 + x2\))\)])\)}\)

The trick that I always use and makes the integration go faster is that 
if you simplify your expression and find certain cluster of constants 
just replace them by simple names like m*Sqrt[k2+x2] by say s, 
Mathematica finds the simplified version more easy to integrate and you 
can always replace your parameters by thier actual values (relationships)

PS: This was all done on 5.1


-- 
Pratik Desai
Graduate Student
UMBC
Department of Mechanical Engineering
Phone: 410 455 8134



  • Prev by Date: Re: limit problem
  • Next by Date: Re: Casting a Command as a String
  • Previous by thread: Re: an Integrate question
  • Next by thread: Functional equations for HermiteH[n,x]