# Thread:

1. ## Integral sought for: C/x * exp(-1/2 [x-m/s]^2)

I am trying to find a closed-form expression for the following integral:
$\int_{a}^{b}\frac{C}{x}exp^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2}dx$

with $0<a<b$

Neither Maple nor Mathematica will give a ready answer.

If I put $\mu$ to 0, Maple gives me:

$\int\frac{C}{x}exp^{-\frac{1}{2}(\frac{x}{\sigma})^2}dx=-\frac{1}{2}*C*Ei(1,\frac{1}{2}\frac{x^2}{\sigma^2} )$

With Ei the exponential integral. This is Ok as far as it goes, but I need the integral for $x-\mu$.

If I add $\mu$ to the function, Maple can no longer find the integral.

I tried taking the derivative of
$-\frac{1}{2}*C*Ei(1,\frac{1}{2}\frac{(x-\mu)^2}{\sigma^2})$ for clues, and that gives me $\frac{C}{x-\mu}$ $exp^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2}$, and the factor $\frac {C}{x-\mu}$ is not what I'm looking for; I need $\frac {C}{x}$.

Any suggestions? Am I overlooking something obvious?

2. Originally Posted by Golodh
I am trying to find a closed-form expression for the following integral:
$\int_{a}^{b}\frac{C}{x}exp^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2}dx$

with $0<a<b$

Neither Maple nor Mathematica will give a ready answer.

If I put $\mu$ to 0, Maple gives me:

$\int\frac{C}{x}exp^{-\frac{1}{2}(\frac{x}{\sigma})^2}dx=-\frac{1}{2}*C*Ei(1,\frac{1}{2}\frac{x^2}{\sigma^2} )$

With Ei the exponential integral. This is Ok as far as it goes, but I need the integral for $x-\mu$.

If I add $\mu$ to the function, Maple can no longer find the integral.

I tried taking the derivative of $-\frac{1}{2}*C*Ei(1,\frac{1}{2}\frac{(x-\mu)^2}{\sigma^2})$ for clues, and that gives me $\frac{C}{x-\mu}$ $exp^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2}$, and the factor $\frac {C}{x-\mu}$ is not what I'm looking for; I need $\frac {C}{x}$.

Any suggestions? Am I overlooking something obvious?
Why do you need this integral?

Why not define a special function:

$G(x, \kappa)=\int_1^x \frac{e^{\frac{(\xi-\kappa)^2}{2}}}{\xi} \; d\xi$

CB

3. ## Why not ...

Well, the integral arises as the expectation of 1/x of a statistic with a truncated Normal distribution. If you use an ordinary non-truncated Normal distribution, the distribution of 1/x is the Cauchy distribution, which doesn't have an expectation. But I don't think that helps, and the answer seems to revolve around special functions anyway so I didn't post it in the probability and statistics thread.

If I allow $a<0, b>0$ I have to keep track of the singularity of $1/x$ in 0, which I'm not sure how to do. This work has already been done for the case that $\mu=0$ in the investigation of the Ei function,which isn't something I know how to replicate.

So why not define a special function like e.g. $G(x,\kappa)$ and go with that?

Well, for two reasons.

First of all, the integral seems tantalizingly close to one that's already expressible in terms of a known special function (Ei). If I'm to define a "new" special function, I should have some confidence I'm not overlooking some obvious trick that will reduce it to a known special function, right. I have no idea how to go about that. Any suggestions on this part?

If I can be reasonable certain that my integral isn't expressible in known elementary and special functions I'm happy to define a new special function $G(x,\kappa)$ as you suggest and do a simple investigation of its properties (extremes, inflexion points, limits).

Secondly, I can get numerical values for the integral I'm looking for from Matlab, but that just gives me numbers but not a lot of insight. Besides I can't readily check the numbers if I do, so I'd either have to trust Maple to get it right, or program the function in a dedicated numerical program like Matlab, Scilab or Octave and then use a numerical integration algorithm that I know to be correct to check on Maple's numbers. I will if I have to, but again, I want to be sure that it's not redundant (i.e. that $G(x,\kappa)$ isn't some simple expression of documented quantities).

4. Originally Posted by Golodh
Well, the integral arises as the expectation of 1/x of a statistic with a truncated Normal distribution. If you use an ordinary non-truncated Normal distribution, the distribution of 1/x is the Cauchy distribution, which doesn't have an expectation. But I don't think that helps, and the answer seems to revolve around special functions anyway so I didn't post it in the probability and statistics thread.
The problem about the mean of $1/x$ with the non-truncated normal distribution is due to the singularity at $x=0$ not the tails, so if your integration interval includes $0$, you will have the same problem.

CB

5. ## Truncated ...

The problem about the mean of with the non-truncated normal distribution is due to the singularity at not the tails, so if your integration interval includes , you will have the same problem.
Of course, which is why I'm interested in the truncated Normal (so that I can exclude 0 from the integration domain). In the question of the integral as posed the problem of the singularity for $x=0$ plays no role.

The digression about the singularity and the expectation of was by way of background information, which I left out because I felt it might obscure the real problem,which is how to deal with the integral.

#### Search Tags

View Tag Cloud

Copyright © 2005-2013 Math Help Forum. All rights reserved.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 33, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9510194063186646, "perplexity_flag": "head"}