Hello. I need to calculate the integral, but it turns out a strange answer. How to fix this problem? I’m new so don’t judge strictly ![]()
Integrate[Log[Sqrt[1 - x] + Sqrt[1 + x^2]], x]
Yes, it looks like one needs elliptic integrals to express it. What kind of answer were you expecting for it?
What version of Mathematica are you running? On “13.1.0 for Mac OS X ARM (64-bit) (June 16, 2022)” I get
-x + (I (-Sqrt[1 - x] + Sqrt[1 - x] x^2 - Sqrt[1 + x^2] +
x (-2 Sqrt[1 - x] + Sqrt[1 + x^2])) ((-1 - I) Sqrt[2]
Sqrt[(-1 + I) (-1 + x)] (1 + x^2) EllipticE[
ArcSin[Sqrt[1 - I x]/Sqrt[2]], 1 + I] -
2 Sqrt[2]
Sqrt[(-1 + I) (-1 + x)] (1 + x^2) EllipticF[
ArcSin[Sqrt[1 - I x]/Sqrt[2]], 1 + I] + (1 + I) Sqrt[2]
Sqrt[(-1 + I) (-1 + x)]
EllipticPi[1 - I, ArcSin[Sqrt[1 - I x]/Sqrt[2]],
1 + I] + (1 + I) Sqrt[2] Sqrt[(-1 + I) (-1 + x)]
x^2 EllipticPi[1 - I, ArcSin[Sqrt[1 - I x]/Sqrt[2]], 1 + I] +
I Sqrt[1 + x^2] Sqrt[1 - x + x^2 - x^3] Log[1 + x]))/(2 (-1 +
x) (1 + x^2) (-1 - 2 x + x^2 - Sqrt[1 - x + x^2 - x^3])) +
x Log[Sqrt[1 - x] + Sqrt[1 + x^2]]
The stone-age-old version V7 gives the following answer:
1/2 (-2 x - ((-1 - Sqrt[1 - x] Sqrt[1 + x^2] +
x (1 - 2 Sqrt[1 - x] Sqrt[1 + x^2] +
x (-1 + x + Sqrt[1 - x] Sqrt[1 + x^2]))) ((-1 + I) Sqrt[2]
Sqrt[(-1 + I) (-1 + x)] (1 +
x^2) (EllipticE[ArcSin[Sqrt[1 - I x]/Sqrt[2]],
1 + I] + (1 - I) EllipticF[ArcSin[Sqrt[1 - I x]/Sqrt[2]],
1 + I] -
EllipticPi[1 - I, ArcSin[Sqrt[1 - I x]/Sqrt[2]], 1 + I]) +
Sqrt[1 + x^2] Sqrt[-(-1 + x) (1 + x^2)] Log[1 + x]))/((-1 +
x) (1 + x^2)^(
3/2) (-1 + (-2 + x) x - Sqrt[-(-1 + x) (1 + x^2)])) +
2 x Log[Sqrt[1 - x] + Sqrt[1 + x^2]])