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

Click For Summary
SUMMARY

This discussion focuses on performing double numerical integration in MATLAB and Mathematica, specifically for a random variable defined by its characteristic function. The user seeks to evaluate the integral of the exponential integral function, E_1(x), and its relation to the cumulative distribution function (CDF) of the random variable X. Key tools mentioned include MATLAB's Symbolic Math Toolbox and the expint function, which are essential for achieving symbolic integration rather than numerical integration.

PREREQUISITES
  • Understanding of characteristic functions in probability theory
  • Familiarity with MATLAB programming, specifically the Symbolic Math Toolbox
  • Knowledge of numerical integration techniques and quadrature methods
  • Basic understanding of exponential integrals, particularly E_1(x)
NEXT STEPS
  • Research how to use the int function in MATLAB's Symbolic Math Toolbox for symbolic integration
  • Learn about the expint function and its applications in MATLAB
  • Explore numerical integration methods in MATLAB, focusing on quadrature techniques
  • Investigate the differences between numerical and symbolic integration in MATLAB and Mathematica
USEFUL FOR

This discussion is beneficial for mathematicians, statisticians, and engineers who require advanced numerical integration techniques in MATLAB, particularly those transitioning from Mathematica or seeking to understand symbolic versus numerical integration.

EngWiPy
Messages
1,361
Reaction score
61
I have the pdf of a random variable found from the characteristic function given by

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

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

F_X(x)=\int_0^xf_X(\alpha)\,d\alpha

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
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.
 
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   Reactions: EngWiPy
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
27
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 44 ·
2
Replies
44
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 8 ·
Replies
8
Views
10K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K