# Integration doesn't work

I'm trying to obtain the following integral:

Integrate[(1/(1 + s^2))*
Exp[-(s^2/(1 + s^2))*((0.001/rl + a*rl/(2*s^2))^2 + (0.001/
rl)^2) - ((0.001/rl)^2)*(s^2)] , {s, 0, Infinity}]


where rl is just a parameter, but I'm getting just the expression for the function under the integral in the answer. Why is this? Mathematica cannot solve it?

• "Mathematica cannot solve it" - not quite unlikely, yes. Commented Jun 18, 2015 at 13:24

As Guess has mentioned, Mathematica seems unable to calculate your integral analytically. Nonetheless, you might want to consider obtaining numerical approximations for interesting values of your parameters $rl$ and $a$. I don't know your application, so I don't know what those represent, or which values would be relevant, but here is an idea of how you could obtain at least some information on the behavior of your integral.

For example, you could define a function that approximates the value of that integral numerically, given numerical values of the two parameters:

numint[rl_?NumericQ, a_?NumericQ] :=
NIntegrate[
(1/(1 + s^2))*Exp[-(s^2/(1 + s^2))*((0.001/rl + a*rl/(2*s^2))^2 +
(0.001/rl)^2) - ((0.001/rl)^2)*(s^2)],
{s, 0, Infinity}
]


You can then calculate the integral for arbitrary values of the parameters:

numint[-4, 5]
(* Out: 0.283655 *)


Since we can do this, and you have two parameters, we can use numint as the argument of a 3D plotting function, e.g. DensityPlot:

DensityPlot[numint[rl, a], {rl, -10, 10}, {a, -10, 10}, MaxRecursion -> 3, PlotPoints -> 25]


Given the apparent symmetry of this function, we can also restrict ourselves to values of the parameters in the first quadrant:

ContourPlot[
numint[rl, a],
{rl, 0.001, 5}, {a, 0.001, 5},
MaxRecursion -> 2, PlotPoints -> 25, FrameLabel -> {"rl", "a"}
]