TransWikia.com

Numerical integration of double integral with two variables

Mathematica Asked by shahrukh on March 21, 2021

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.

One Answer

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   *)

Correct answer by Akku14 on March 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP