Solution to the integral,i.e, expected value of a function of normal variable

Click For Summary

Discussion Overview

The discussion revolves around the calculation of a specific integral involving a normal variable, specifically the expected value of a function of a normal variable. The integral is expressed in terms of parameters \(a\), \(b\), \(\mu\), and \(\sigma\), and participants explore methods for evaluating it, including numerical techniques and potential approximations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants note that the integral does not have a closed form solution in elementary functions and suggest using numerical techniques for approximation.
  • There is a request for approximations to be made for the integral, with one participant suggesting that numerical techniques can yield approximate answers for specific parameter values.
  • Another participant proposes that for small \(\sigma\), the Gaussian function approximates a delta function, leading to a specific form of the integral that can be evaluated in terms of the error function.
  • One participant mentions the possibility of using complex contour integration, while another clarifies that the integral does not involve \(e^{-x^2}\) but rather \(e^{-x}\), suggesting a potential typo in the original post.
  • Concerns are raised about the convergence of an infinite series expansion for the integral, indicating uncertainty about the validity of switching the integral and sum.
  • There is a suggestion that learning numerical integration techniques would be beneficial for the original poster.

Areas of Agreement / Disagreement

Participants generally agree that the integral does not have a closed form solution in elementary functions and that numerical techniques are necessary. However, there are competing views on the potential for approximations and the validity of certain mathematical approaches, indicating that the discussion remains unresolved.

Contextual Notes

Participants express uncertainty regarding the convergence of series expansions and the appropriateness of various mathematical techniques for evaluating the integral. There is also a noted dependence on the parameters involved, particularly \(\sigma\), which affects the behavior of the integral.

ait.abd
Messages
24
Reaction score
0
I want to calculate [itex]\int_a^b \frac{1}{\sqrt{2 \pi \sigma^2}} e^{(-(x-\mu)/\sigma^2)} log_2 (1 + e^{-x}) dx[/itex]
 
Physics news on Phys.org
You'll need to use numerical techniques. The above integral doesn't have a closed form solution in the elementary functions.
 
D H said:
You'll need to use numerical techniques. The above integral doesn't have a closed form solution in the elementary functions.

can any approximation be made?
 
ait.abd said:
can any approximation be made?

Hey ait.abd and welcome to the forums.

Numerical techniques are ones that give approximate answers in general. You can supply parameters to get a good enough approximation (like for example a number good enough to say 4 decimal places) for the better implementations.

If you are unsure, just use a common package for numerical calculation.

You should probably try searching online for a numeric integrator Java applet, or go to www.wolframalpha.com and enter in your expression to get an approximate answer.
 
chiro said:
Hey ait.abd and welcome to the forums.

Numerical techniques are ones that give approximate answers in general. You can supply parameters to get a good enough approximation (like for example a number good enough to say 4 decimal places) for the better implementations.

If you are unsure, just use a common package for numerical calculation.

You should probably try searching online for a numeric integrator Java applet, or go to www.wolframalpha.com and enter in your expression to get an approximate answer.

Thanks chiro. But, wolfram online integrator doesn't work for this expression as it tries to compute the exact expression. I can perform numerical integration but I want answer in terms of $a$ and $b$. Numerical integration will calculate the answer for a particular $a$ and $b$.
 
ait.abd said:
Thanks chiro. But, wolfram online integrator doesn't work for this expression as it tries to compute the exact expression. I can perform numerical integration but I want answer in terms of $a$ and $b$. Numerical integration will calculate the answer for a particular $a$ and $b$.

If you need something analytical, you're going to have to develop some sort of approximation for the integral for certain parameter regimes. For example, for [itex]\sigma \rightarrow 0[/itex], the Gaussian essentially becomes a delta function and you would get

[tex]\log_2(1+e^{-\mu})\left[\Theta(b-\mu)+\Theta(\mu - a)\right][/tex]
as the result (the step functions [itex]\Theta[/itex] guarantee that mu is between a and b). So, for [itex]\sigma[/itex] small, a rather crude approximation might be

[tex]\log_2(1+e^{-\mu}) \int_a^b \frac{dx}{\sqrt{2\pi}\sigma} \exp\left[-\frac{(x-\mu)^2}{2\sigma^2}\right],[/tex]
where the integral can be evaluated in terms of the error function. There is a more systematic way to generate this approximation called the method of steepest descent. (You'll have to look that up in a book; I'm afraid the wikipedia article isn't very helpful).

You might also be able to write down an infinite series for the integral. However, when I tried this by expanding the logarithm in powers of e^(-x), I got a sum which looks like it doesn't converge, indicating that either I made a mistake in my calculation or that switching the integral and sum isn't valid in this case.
 
Just looking at the form of equation. It seems that complex contour integral MAY work.
 
The integral in the original post does NOT involve [itex]e^{-x^2}[/itex]. It is, rather, of the form [itex]e^{-x}[/itex].
 
HallsofIvy said:
The integral in the original post does NOT involve [itex]e^{-x^2}[/itex]. It is, rather, of the form [itex]e^{-x}[/itex].
I suspect that that may have been a typo. Even if it is a typo, it doesn't help. Either way ( exp(-x2) vs exp(-x) ), this function is not integrable in the elementary functions. Since it's not an integral that is widely used, it's dubious that someone has come up with a nifty way to evaluate it.To ait.abd: You need to learn how to do numerical integration sometime. If this is the right integral, that sometime is now.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
5K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 27 ·
Replies
27
Views
3K
  • · Replies 29 ·
Replies
29
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K