# How to solve this integral

I'm trying to deal with this article, but I don't understand how equations 5.9 and 5.10 were obtained. I tried to use Mathematica 8 to solve it, but the answer was different. I have a problem with this integral $$\int _0^{\tau }\int _{\sigma -(\tau -\tau_1)}^{\sigma +(\tau-\tau_1)} \frac{M\ y_0\ \sinh^2(\beta)} {\left(\sigma_1^2+ (\tau_1 \sinh(\beta)+x_0)^2+y_0^2\right)^{3/2}} \ d\sigma_1\ d\tau_1$$

where $\tau, M, y_0, \beta$ are constants.

I used only a simple Integrate function with GenerateConditions -> False.

Maybe I'm doing something wrong in Mathematica. If you know; tell me Mathematica code, please. Otherwise, if there is some kind of algorithm to solve integrals like this, please tell me too.

-
"I tried to use Mathematica 8 to solve it, but the answer was different." - could you edit your question to include your Mathematica attempt? – J. M. Oct 1 '12 at 13:48
The TeX version of the integral is certainly useful, but what is the code you used. It is possible there is a typo you missed, so if you would post that, also. – rcollyer Oct 1 '12 at 15:27
Alexey, welcome to Mathematica.SE! Please consider registering your account so that any upvotes you get on this question are added to those you might get on future questions and answers. That way, over time you will be able to do more on the site (post graphics, edit things, etc). Another tip: after posting a question stay around for a little while, to answer questions raised by commenters. This will streamline the Q&A process considerably. – Verbeia Oct 1 '12 at 22:43
From a very quick peak at the integral it seems to me that you can calculate it analytically, basically by hand. Throw out all necessary constants first and then do the sigma integral. You can use Mathematica for that. For more complicated integrals you often have to do some simplifications and substitutions manually before MMA is able to solve it. – sebhofer Oct 5 '12 at 18:43

If you check for poles or make sure you don't hit any singularities then you could use brute force. With $b = \sinh (\beta)$ :

integ1[b_, bigM_, x0_, y0_, t_, s_] = (bigM y0 b^2)/(s1^2 + (x0 + b t1)^2 + y0^2)^(3/2) ;

int1[b_, bigM_, x0_, y0_, t_, s_] = Integrate[integ1[b, bigM, x0, y0, t, s], s1] ;

integ2[b_, bigM_, x0_, y0_, t_, s_] =
(int1[b, bigM, x0, y0, t, s] /. s1 -> s + (t - t1)) -
(int1[b, bigM, x0, y0, t, s] /. s1 -> s - (t - t1)) ;

almost[b_, bigM_, x0_, y0_, t_, s_] = Integrate[integ2[b, bigM, x0, y0, t, s], t1] ;

result[b_, bigM_, x0_, y0_, t_, s_] =
(almost[b, bigM, x0, y0, t, s] /. t1 -> t) -
(almost[b, bigM, x0, y0, t, s] /. t1 -> 0) ;

We can check against numeric integration :

numInt[b_?NumericQ, bigM_?NumericQ, x0_?NumericQ, y0_?NumericQ, t_?NumericQ, s_?NumericQ] :=
NIntegrate[integ1[b, bigM, x0, y0, t, s], {t1, 0, t}, {s1, s - (t - t1), s + (t - t1)}]

result[1, 1, -2, 3, -1., 0.] // Chop
numInt[1, 1, -2, 3, -1., 0.] // Chop

(* 0.0539054 *)
(* 0.0539054 *)

With[{b = 1, bigM = 1, x0 = -2., y0 = 3.},
Plot3D[result[b, bigM, x0, y0, t, s] -
numInt[b, bigM, x0, y0, t, s], {t, -1, 2}, {s, 0, 4},
PlotRange -> All]]

-