Re: Problem with an integral

• To: mathgroup at smc.vnet.net
• Subject: [mg95645] Re: [mg95571] Problem with an integral
• From: "David Park" <djmpark at comcast.net>
• Date: Fri, 23 Jan 2009 05:09:56 -0500 (EST)
• References: <18607536.1232540493860.JavaMail.root@m02>

```When I see an expression like:

fun = x^(n + 1)*E^(-x + (I*k)/x)

it always makes me cringe a little. That is because it has parameters and a
variable and it is always better to make these a part of the definition. So
I would write:

fun[n_, k_][x_] := x^(n + 1)*E^(-x + (I*k)/x)

Then if I wanted to see precisely what I was doing, I would use the
Student's Integral section of the Presentation package.

Needs["Presentations`Master`"]

integrate[fun[1, 1][x], {x, 0, \[Infinity]}]
% // UseIntegrate[]
% // N

giving...

\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(\[Infinity]\)]\(\(
\*SuperscriptBox[\(E\), \(
\*FractionBox[\(I\), \(x\)] - x\)]\
\*SuperscriptBox[\(x\), \(2\)]\) \[DifferentialD]x\)\)
4 (MeijerG[{{}, {}}, {{0, 3/2, 2}, {1/2}}, 1/16] +
I MeijerG[{{}, {}}, {{1/2, 3/2, 2}, {0}}, 1/16])
1.67562 + 0.832688 I

If one wanted to do simplifications on the integrand or use other
integration techniques after the first step, that could also be done.

David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/

From: Jepessen [mailto:jepessen at gmail.com]

Hi.

I'm working with a little problem in Mathematica 7.0.0.
I want to integrate this function

fun = x^(n + 1)*E^(-x + (I*k)/x)

Assuming that both n and k are greater than zero, I write

integral = FullSimplify[Assuming[{k > 0, n > 0}, Integrate[fun, {x, 0,
\[Infinity]}]]]

And I obtain a symbolic result.
But, when I want to put some specific value, like this

integral /. {n -> 1, k -> 1}

I obtain always ComplexInfinity, and/or other errors.
So, I've tried to evaluate numerically the integral for the same
specific values, in this way

NIntegrate[Evaluate[fun /. {n -> 1, k -> 1}], {x, 0, \[Infinity]}]

And I obtain a finite numeric result. So, there's some error in
symbolic computation, or I miss something when I try to integrate the
formula?

Thanks for answers

```

• Prev by Date: Re: message-driven function: more explanation
• Next by Date: Re: Re: Re: Which editor do you use for math articles
• Previous by thread: Re: Problem with an integral
• Next by thread: message-driven function: more explanation
{"ft_lang_label":"__label__en","ft_lang_prob":0.76042205,"math_prob":0.9390865,"size":2107,"snap":"2019-13-2019-22","text_gpt3_token_len":698,"char_repetition_ratio":0.09557775,"word_repetition_ratio":0.033846155,"special_character_ratio":0.36877078,"punctuation_ratio":0.19909503,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9919034,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-05-20T21:58:46Z\",\"WARC-Record-ID\":\"<urn:uuid:a28377f7-ba5a-4f96-a27b-f4de3b92b0c4>\",\"Content-Length\":\"43099\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:343c05de-41cc-4c6d-ae0d-eb97d44e2002>\",\"WARC-Concurrent-To\":\"<urn:uuid:127cb96d-1896-4c0e-967c-1e7a22894221>\",\"WARC-IP-Address\":\"140.177.205.73\",\"WARC-Target-URI\":\"http://forums.wolfram.com/mathgroup/archive/2009/Jan/msg00401.html\",\"WARC-Payload-Digest\":\"sha1:TB3UF45B5Z3RD6SMMGUDGXNV5627AWX6\",\"WARC-Block-Digest\":\"sha1:VRBOBTBO237ILF2BEK2I6TB6L4KRTI3S\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-22/CC-MAIN-2019-22_segments_1558232256147.15_warc_CC-MAIN-20190520202108-20190520224108-00149.warc.gz\"}"}