2
$\begingroup$

I am trying to numerically integrate the following double integral in MATHEMATICA. This question has also been asked at Wolfram Community

expression

where $Im$ is the imaginary part of the expression, $i$ is the imaginary number, $x$ and $y$ are variables while $a, b, c$ and $Q$ are constants greater than 0.

Here is my attempt to solve this.

a = 3
b = 0.0137
c = 0.0023
Q = 6
NIntegrate[
  Im[Exp[-I x c + b (I x y/(y^a - I x))]]/x, {x, 0, ∞}, {y, 0, Q},
  AccuracyGoal -> 10]

Is this the correct way of applying numerical integration with more than one variable? I am getting an error when I run this expression which reads as

evaluated to non-numerical values for all sampling points in the \region with boundaries {{[Infinity], 0.},{0, 6}}.

Can anyone please guide me to correct the implementation of the expression given above.

$\endgroup$
6
  • 2
    $\begingroup$ Your integrand should be Im[Exp[-I x c + b (I x y/(y^a - I x))]]/x not Im[Exp[-I x c + b (i x y/(y^a - I x))]]/x. Voting to close. $\endgroup$ Sep 4, 2020 at 15:02
  • 1
    $\begingroup$ This integral does not converge because for small x the integrand behaves as 1/x. $\endgroup$
    – Artes
    Sep 4, 2020 at 15:10
  • $\begingroup$ @Artes Is there any way around to avoid that? If the x values are restricted to be a larger value then it should work, right? $\endgroup$
    – shahrukh
    Sep 4, 2020 at 15:37
  • 1
    $\begingroup$ When you simultaneously cross-post the same question (community.wolfram.com/groups/-/m/t/2070465), you should mention that in both posts. $\endgroup$
    – JimB
    Sep 4, 2020 at 16:17
  • $\begingroup$ @Artes: The integral under consideration converges at the origin in view of ComplexExpand[ Normal[Series[ Im[Exp[-I x c + b (I x y/(y^a - I x))]]/x , {x, 0, 1}]]] /. {x -> r*Cos[\[Phi]], y -> r*Sin[\[Phi]]}] which results in -(1/r)E^(-((137 r^3 Cos[\[Phi]]^2 Sin[\[Phi]])/( 10000 (r^2 Cos[\[Phi]]^2 + r^6 Sin[\[Phi]]^6)))) Sec[\[Phi]] Sin[(23 r Cos[\[Phi]])/10000 - ( 137 r^5 Cos[\[Phi]] Sin[\[Phi]]^4)/( 10000 (r^2 Cos[\[Phi]]^2 + r^6 Sin[\[Phi]]^6))].. $\endgroup$
    – user64494
    Sep 5, 2020 at 6:45

1 Answer 1

3
$\begingroup$

ComplexExpand the functions and integrate separately.(Because I am in a hurry, i don't show intermediate results)

ceRe = ComplexExpand[Re[(I x y)/(y^3 - I x)], 
          TargetFunctions -> {Re, Im}]

ceIm = ComplexExpand[Im[(I x y)/(y^3 - I x)], 
          TargetFunctions -> {Re, Im}]

intRe[x_] = Integrate[ceRe, {y, 0, 6}, Assumptions -> x > 0]

intIm[x_] = Integrate[ceIm, {y, 0, 6}, Assumptions -> x > 0]

ii[x_] = ComplexExpand[Im[Exp[-I x c + b*(intRe[x] + I intIm[x])]]/x, 
TargetFunctions -> {Re, Im}] /. {b -> 137/10000, c -> 23/10000} //
   Simplify[#, x > 0] &

Plot[ii[x], {x, 0, 10000}]

nint = NIntegrate[ii[x], {x, 0, \[Infinity]}, MaxRecursion -> 50]

(*   -0.989098   *)
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.