How Can I Perform Double Numerical Integration in MATLAB or Mathematica?

In summary, the conversation discusses finding the CDF of a random variable using the characteristic function and the integral of the exponential integral. The poster wants to know how to evaluate the integral numerically in MATLAB, and it is suggested to use the int function in Symbolic Math Toolbox and the expint function.
  • #1
EngWiPy
1,368
61
I have the pdf of a random variable found from the characteristic function given by

[tex]f_X(\alpha)=\frac{1}{2\pi}\sum_{m=0}^Mj^m{K\choose m}\int_0^{\infty}e^{-jt(m+\alpha)}E_1^m(-jt)\,dt[/tex]

where ##j=\sqrt{-1}## and ##E_1(x)## is the exponential integral. I need to find the CDF of the random variable ##X## which is given by

[tex]F_X(x)=\int_0^xf_X(\alpha)\,d\alpha[/tex]

I can interchange the integrals, but I ended with two numerical integrations as well.

How can I do this in MATLAB? Is it easier to do in Mathematica?
 
Physics news on Phys.org
  • #2
First, how can I evaluate ##
\int_0^{\infty}e^{-jt(m+\alpha)}E_1^m(-jt)\,dt
## numerically in MATLAB? Previously I used Mathematica because I felt it is easier to use for numerical integration, but now I have access to MATLAB only. Note that the result will be a function of ##\alpha## and not a number.
 
  • #3
If you want the result in terms of alpha and not a number, then you want to do symbolic integration not numerical integration (the latter uses quadrature methods and produces a number).

Check out the int function in Symbolic Math Toolbox. You'll also need to use the expint function to form the integrand.
 
  • Like
Likes EngWiPy
  • #4
kreil said:
If you want the result in terms of alpha and not a number, then you want to do symbolic integration not numerical integration (the latter uses quadrature methods and produces a number).

Check out the int function in Symbolic Math Toolbox. You'll also need to use the expint function to form the integrand.

OK, so, it's possible. I thought numerical integrations result only in numbers. I will check that out. Thanks
 

Similar threads

Replies
13
Views
2K
Replies
1
Views
2K
Replies
44
Views
6K
Replies
5
Views
2K
Replies
1
Views
2K
Replies
8
Views
3K
Back
Top