Numerical Integration ( Double integral with log singularity)



Re Don't know if the answer is correct or not, but it looks reasonable.:

(%i27) assume(L>0,M>0);
(%o27) [L>0,M>0]
(%i28) integrate(integrate(log(abs(x1-x2)), x1, 0, L), x2, 0, M);
(%o28) -((M^2-2*L*M+L^2)*log(abs(M-L))-M^2*log(M)+3*L*M-L^2*log(L))/2
(%i29) diff(%,L);
(%o29) -((2*L-2*M)*log(abs(M-L))-(M^2-2*L*M+L^2)/M-L+3*M-2*L*log(L)-L)/2
(%i30) diff(%,M);
(%o30)
-(-2*log(abs(M-L))+(2*L-2*M)/M-L+(M^2-2*L*M+L^2)/(M-L)^2-(2*M-2*L)/M-L+3)/2
(%i31) ratsimp(%);
(%o31) log(abs(M-L))


On Tue, Jul 9, 2013 at 12:18 PM, Raymond Toy <toy.raymond at gmail.com> wrote:

> >>>>> "ccitak" == ccitak  <ccitak at metu.edu.tr> writes:
>
>     ccitak> Hi, my name is Can studying at Aerospace Engineering
> Department of Middle East Technical University
>     ccitak> I couldnt find the option for,
>     ccitak>                                                     Integral
> from 0 to L ( Integral from 0 to L (
>     ccitak> ln(abs(x1-x2))))dx1dx2
>     ccitak> How can double integral shown above be calculated numerically ?
>
> Not as it's written since you probably want to say log instead of ln
> and you didn't give a value for L.
>
> However, in this case, maxima can do the integral symbolically:
>
> assume(L>0);
> integrate(integrate(log(abs(x1-x2)), x1, 0, L), x2, 0, L);
>
> (2*L^2*log(L)-3*L^2)/2
>
> Don't know if the answer is correct or not, but it looks reasonable.
>
> Ray
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>