1
$\begingroup$

I want to compute a numerical value for the following definite integral: $$ \int_0^1\int_0^1 e^{-\xi^2+\eta^2}e^{\int_0^{1/2}e^{-2\,\xi\,(1+\cos(3 s))}\eta\sin (\pi s)\,ds}\,d\xi\,d\eta.$$ I wrote in Mathematica the following code:

Integrate[Exp[-xi^2 + eta^2]*Exp[Integrate[Exp[-2*xi*(1+Cos[3*s])]*eta*Sin[Pi*s], {s,0, 0.5}]], {xi, 0, 1}, {eta, 0, 1}]

I think the problem is the computation of $$ \int_0^{1/2}e^{-2\,\xi\,(1+\cos(3 s))}\eta\sin (\pi s)\,ds. $$ Is there a way to compute integrals of the form $$\int_a^b F(x,y)\,dy $$ in Mathematica? Integrals of the form $\int_a^b F(y)\,dy$ can be computed exactly or numerically, with the Integral or NIntegral functions, but what about $\int_a^b F(x,y)\,dy$ ?

$\endgroup$
  • $\begingroup$ Does this solve your problem? $\endgroup$ – Lukas Lang Sep 16 '17 at 12:23
  • $\begingroup$ @Mathe172 Yes! Thank you very much. $\endgroup$ – user39756 Sep 16 '17 at 12:49
1
$\begingroup$

Use the following code:

i1[xi_?NumericQ, eta_?NumericQ] := i1[xi, eta] = NIntegrate[Exp[-2*xi*(1 + Cos[3*s])]*eta*Sin[Pi*s], {s, 0, 0.5}];

NIntegrate[Exp[-xi^2 + eta^2]*Exp[i1[xi, eta]], {xi, 0, 1}, {eta, 0, 1}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.