I want to plot a definite integral
myIntegral[x_] := NIntegrate[Sqrt[(a - b)^2 + (c - d)^2]/ (a - b), {a, 0, x}, {b, x, 1}, {c, 0, 1}, {d, 0, 1}]
Plot[myIntegral[x], {x, 0, 1}]
I am using Mathematica 11.3. When I evaluate the code, Mathematica immediately gives some warnings about numerical integration converging too slowly, then it seems stuck in computation. I have tried some options of NIntegrate, for example as suggested here, but have had no success. Is there a way to obtain the result of Plot in an acceptable time (e.g. some minutes)?
It is within reach of Integrate
.
Assuming[0<x<1,
Simplify[
Integrate[Sqrt[(a-b)^2 + (c-d)^2]/(a-b), {a,0,x}, {b,x,1}, {c,0,1}, {d,0,1}]]]
which gives you
(-11*Sqrt[2] + 11*Sqrt[2+(-2+x)*x] + x*(-8-7*Sqrt[2+(-2+x)*x] + 13*Sqrt[1+x^2] +
2*x*(6-3*Sqrt[2+(-2+x)*x] + x*(-4+2*x + Sqrt[2+(-2+x)*x] - Sqrt[1+x^2]))) +
18*x^2*ArcCoth[Sqrt[2+(-2+x)*x]] + 9*ArcSinh[1] - 3*ArcSinh[1-x] - 3*ArcSinh[x] +
6*Log[1-x] + 9*x*Log[-1+Sqrt[2+(-2+x)*x]] + 3*((-2+x)*Log[1+Sqrt[2+(-2+x)*x]] -
4*x*Log[-(((-1+x)*(1 + Sqrt[1+x^2]))/x)] + x^3*(Log[2+x^2+2*Sqrt[1+x^2]] +
2*Log[(1-x)/(x+x*Sqrt[2-2*x+x^2])])))/36
And that should be much faster to plot than doing thousands on individual NIntegrate