Christopher Creutzig <Christopher.Creutzig@mathworks.com> wrote in message <51ECF984.7080907@mathworks.com>...
> On 26.06.13 03:26, Ferra wrote:
>
> > I'm trying to solve this integration but it gives me this error:
> > Warning: Explicit integral could not be found.
> >
> > syms a b
> > Q = (1/(2*pi*lams)) * exp(  (a^2 + b^2)/(2*lams));
> > q = int(int(Q,b,0,sqrt((lams^2)  (a^2))),a,0,lams);
>
> I'm not sure what lams is, but even assuming it is an unspecified
> symbolic variable, changing the order of integration yields a
> closedform integral:
>
> >> syms lams
> >> q = int(int(Q,a,0,lams),b,0,sqrt((lams^2)  (a^2)))
>
> q =
>
> (5734161139222659*pi*erf((2^(1/2)*lams)/2)*erf((2^(1/2)*(lams^2 
> a^2)^(1/2))/2))/72057594037927936
>
>
> SMT neither has some explicit notion of “double integral,” nor does it
> check whether your integrand fulfills the conditions of Fubini's theorem
> to allow exchanging the order of integration (which happens to be the
> case here, at least if a, b, and lams are finite and real, and lams is
> positive). That is something you need to do yourself.
>
>
>
> HTH,
>
> Christopher
a is the second variable of integration  so it should not be part of the solution.
The solution for the integral
q = int(int(Q,b,0,sqrt((lams^2)  (a^2))),a,0,lams);
should come out as
q = 0.25*(1exp(lams/2))
Best wishes
Torsten.
