@anhnha Hm... there seems to be a bug here - evaluating that (either directly or after applying TrigToExp and FullSimplify to get something manifestly real) with N returns 5.75739, while NIntegrate and the analytic expression from version 11.3 both give 0.521405.
Also, 11.3 on a fresh kernel gives 1/15 (2 + Sqrt[2] + 10 \[Pi] + 5 ArcSinh[1]), which is 2.6158 - somewhere, Integrate seems to mess up by a few multiples of π...
Correction: 11.3 on one computer gives 0.52..., 11.3 on the other one gives 2.61... - both are running Windows 10 64bit - I will report this issue to WRI, lets see what they say
BoundaryDiscretizeGraphics takes a long time when you give it ListPlot3D output...
I'm doing something like generating a heightmap using an array of elevation values and ListPlot3D. I then want to 3D print it, and sadly export to stl takes over an hour for a 300*400 input array. Can I skip the discretize step by simply creating a Region from this array of height data?
(even things like PerformanceGoal -> "Speed", AccuracyGoal -> 1, MaxCellMeasure -> 10, none of them seem to improve performance)
I guess it's sad because ListPlot3D interpolates the data, which is something I want. I don't really understand why this takes so long
@CarlLange I ran into the same issue with DiscretizeGraphics applied to a list of 382 points representing a polygon yesterday. I aborted the computation after ~30min. It seems to be very sensitive to the data values. Add a small offset to each point and it completes in a few seconds.
Complex terms sometimes come up because various pathways through algebra sometimes wander out into the complex plane. For instance 1/(1+x^2) is equal to 1/(2 (1 - I x)) + 1/(2 (1 + I x)). When integrated, one gets 1/2 I Log[1 - I x] - 1/2 I Log[1 + I x], which is equivalent to ArcTan[x].
@LukasLang Yep, there seems to be a bug.
Since the integrand is between 0 and 1, and the region of integration has a volume of 1, the integral should be less than 1.