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