Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Exponential integration with normal density function

Subject: Exponential integration with normal density function

From: Angie

Date: 5 May, 2012 21:05:13

Message: 1 of 7

Hello,

I need to evaluate an exponential integral over a positive range. The integrand is of the following form:

(1/x)*pdf(X)

where pdf(X) is the Normal(mu,sigma^2) probability density function.

Which integral approximation method (quad, quadgk, etc.) is the best to evaluate this integral in terms of time and least error?

Thank you,

A.

Subject: Exponential integration with normal density function

From: Greg Heath

Date: 5 May, 2012 22:36:17

Message: 2 of 7

On May 5, 5:05 pm, "Angie" <angie1...@yahoo.com> wrote:
> Hello,
>
> I need to evaluate an exponential integral over a positive range. The integrand is of the following form:
>
> (1/x)*pdf(X)
>
> where pdf(X) is the Normal(mu,sigma^2) probability density function.
>
> Which integral approximation method (quad, quadgk, etc.) is the best to evaluate this integral in terms of time and least error?
>
> Thank you,
>
> A.

It is a divergent integral.

Hope this helps.

Greg

Subject: Exponential integration with normal density function

From: Angie

Date: 5 May, 2012 23:12:30

Message: 3 of 7

"Angie" wrote in message <jo44m9$2au$1@newscl01ah.mathworks.com>...
> Hello,
>
> I need to evaluate an exponential integral over a positive range. The integrand is of the following form:
>
> (1/x)*pdf(X)
>
> where pdf(X) is the Normal(mu,sigma^2) probability density function.
>
> Which integral approximation method (quad, quadgk, etc.) is the best to evaluate this integral in terms of time and least error?
>
> Thank you,
>
> A.

Hello Greg,

Thank you for your reply.I thought so because of the (1/x), however, Matlab gives a finite answer when evaluated. Is this a bug?

Thank you,

A.

Subject: Exponential integration with normal density function

From: Greg Heath

Date: 6 May, 2012 03:34:34

Message: 4 of 7

On May 5, 7:12 pm, "Angie" <angie1...@yahoo.com> wrote:
> "Angie" wrote in message <jo44m9$2a...@newscl01ah.mathworks.com>...
> > Hello,
>
> > I need to evaluate an exponential integral over a positive range. The integrand is of the following form:
>
> > (1/x)*pdf(X)
>
> > where pdf(X) is the Normal(mu,sigma^2) probability density function.
>
> > Which integral approximation method (quad, quadgk, etc.) is the best to evaluate this integral in terms of time and least error?
>
> > Thank you,
>
> > A.
>
> Hello Greg,
>
> Thank you for your reply.I thought so because of the (1/x), however, Matlab gives a finite answer when evaluated. Is this a bug?

Probably not. It is probably the way you used the code. Posting the
relevant part of the code would help

Greg

Subject: Exponential integration with normal density function

From: Greg Heath

Date: 6 May, 2012 03:43:49

Message: 5 of 7

On May 5, 11:34 pm, Greg Heath <g.he...@verizon.net> wrote:
> On May 5, 7:12 pm, "Angie" <angie1...@yahoo.com> wrote:
>
>
>
>
>
> > "Angie" wrote in message <jo44m9$2a...@newscl01ah.mathworks.com>...
> > > Hello,
>
> > > I need to evaluate an exponential integral over a positive range. The integrand is of the following form:
>
> > > (1/x)*pdf(X)
>
> > > where pdf(X) is the Normal(mu,sigma^2) probability density function.
>
> > > Which integral approximation method (quad, quadgk, etc.) is the best to evaluate this integral in terms of time and least error?
>
> > > Thank you,
>
> > > A.
>
> > Hello Greg,
>
> > Thank you for your reply.I thought so because of the (1/x), however, Matlab gives a finite answer when evaluated. Is this a bug?
>
> Probably not. It is probably the way you used the code. Posting the
> relevant part of the code would help

Sorry. My mistake.

If the integration interval is positive then it is not divergent!

However it will be divergent if it includes zero.

Greg

Subject: Exponential integration with normal density function

From: Angie

Date: 6 May, 2012 04:45:45

Message: 6 of 7

Greg Heath <g.heath@verizon.net> wrote in message <0fdcd765-9389-463a-a983-99a69ff46ab5@e15g2000vba.googlegroups.com>...
> On May 5, 11:34 pm, Greg Heath <g.he...@verizon.net> wrote:
> > On May 5, 7:12 pm, "Angie" <angie1...@yahoo.com> wrote:
> >
> >
> >
> >
> >
> > > "Angie" wrote in message <jo44m9$2a...@newscl01ah.mathworks.com>...
> > > > Hello,
> >
> > > > I need to evaluate an exponential integral over a positive range. The integrand is of the following form:
> >
> > > > (1/x)*pdf(X)
> >
> > > > where pdf(X) is the Normal(mu,sigma^2) probability density function.
> >
> > > > Which integral approximation method (quad, quadgk, etc.) is the best to evaluate this integral in terms of time and least error?
> >
> > > > Thank you,
> >
> > > > A.
> >
> > > Hello Greg,
> >
> > > Thank you for your reply.I thought so because of the (1/x), however, Matlab gives a finite answer when evaluated. Is this a bug?
> >
> > Probably not. It is probably the way you used the code. Posting the
> > relevant part of the code would help
>
> Sorry. My mistake.
>
> If the integration interval is positive then it is not divergent!
>
> However it will be divergent if it includes zero.
>
> Greg

Hi Greg,

Thank you for your replies. The integration is over a positive range. I would still appreciate if anyone can help with my initial question: Which integral approximation method (quad, quadgk, etc.) is the best to evaluate this integral in terms of time and least error?

Thanks,

A.

Subject: Exponential integration with normal density function

From: Bruno Luong

Date: 6 May, 2012 06:00:44

Message: 7 of 7

"Angie" wrote in message <jo4vlp$e9q$1@newscl01ah.mathworks.com>...
 if anyone can help with my initial question: Which integral approximation method (quad, quadgk, etc.) is the best to evaluate this integral in terms of time and least error?

There is no answer for such generic question. It depends. Text book, research papers usually show which method is suitable for which situation.

That's why we have the choice (why bother to implement the non-best methods?)

Bruno

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us