3.11 \(\int \left (\frac{1}{\sqrt{2} (1+x)^2 \sqrt{-i+x^2}}+\frac{1}{\sqrt{2} (1+x)^2 \sqrt{i+x^2}}\right ) \, dx\)

Optimal. Leaf size=138 \[ -\frac{\left (\frac{1}{2}+\frac{i}{2}\right ) \sqrt{x^2-i}}{\sqrt{2} (x+1)}-\frac{\left (\frac{1}{2}-\frac{i}{2}\right ) \sqrt{x^2+i}}{\sqrt{2} (x+1)}+\frac{\tanh ^{-1}\left (\frac{x+i}{\sqrt{1-i} \sqrt{x^2-i}}\right )}{(1-i)^{3/2} \sqrt{2}}-\frac{\tanh ^{-1}\left (\frac{-x+i}{\sqrt{1+i} \sqrt{x^2+i}}\right )}{(1+i)^{3/2} \sqrt{2}} \]

[Out]

((-1/2 - I/2)*Sqrt[-I + x^2])/(Sqrt[2]*(1 + x)) - ((1/2 - I/2)*Sqrt[I + x^2])/(S
qrt[2]*(1 + x)) + ArcTanh[(I + x)/(Sqrt[1 - I]*Sqrt[-I + x^2])]/((1 - I)^(3/2)*S
qrt[2]) - ArcTanh[(I - x)/(Sqrt[1 + I]*Sqrt[I + x^2])]/((1 + I)^(3/2)*Sqrt[2])

_______________________________________________________________________________________

Rubi [A]  time = 0.161835, antiderivative size = 138, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 3, integrand size = 45, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067 \[ -\frac{\left (\frac{1}{2}+\frac{i}{2}\right ) \sqrt{x^2-i}}{\sqrt{2} (x+1)}-\frac{\left (\frac{1}{2}-\frac{i}{2}\right ) \sqrt{x^2+i}}{\sqrt{2} (x+1)}+\frac{\tanh ^{-1}\left (\frac{x+i}{\sqrt{1-i} \sqrt{x^2-i}}\right )}{(1-i)^{3/2} \sqrt{2}}-\frac{\tanh ^{-1}\left (\frac{-x+i}{\sqrt{1+i} \sqrt{x^2+i}}\right )}{(1+i)^{3/2} \sqrt{2}} \]

Antiderivative was successfully verified.

[In]  Int[1/(Sqrt[2]*(1 + x)^2*Sqrt[-I + x^2]) + 1/(Sqrt[2]*(1 + x)^2*Sqrt[I + x^2]),x]

[Out]

((-1/2 - I/2)*Sqrt[-I + x^2])/(Sqrt[2]*(1 + x)) - ((1/2 - I/2)*Sqrt[I + x^2])/(S
qrt[2]*(1 + x)) + ArcTanh[(I + x)/(Sqrt[1 - I]*Sqrt[-I + x^2])]/((1 - I)^(3/2)*S
qrt[2]) - ArcTanh[(I - x)/(Sqrt[1 + I]*Sqrt[I + x^2])]/((1 + I)^(3/2)*Sqrt[2])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 18.4555, size = 184, normalized size = 1.33 \[ \frac{\left (1 + i\right ) \operatorname{atanh}{\left (\frac{\sqrt{2} \left (- x - i\right )}{\sqrt{x^{2} - i} \left (\sqrt{1 + \sqrt{2}} - i \sqrt{-1 + \sqrt{2}}\right )} \right )}}{2 \left (- \sqrt{1 + \sqrt{2}} + i \sqrt{-1 + \sqrt{2}}\right )} - \frac{\left (1 - i\right ) \operatorname{atanh}{\left (\frac{\sqrt{2} \left (- x + i\right )}{\sqrt{x^{2} + i} \left (\sqrt{1 + \sqrt{2}} + i \sqrt{-1 + \sqrt{2}}\right )} \right )}}{2 \left (\sqrt{1 + \sqrt{2}} + i \sqrt{-1 + \sqrt{2}}\right )} - \frac{\sqrt{2} \left (1 + i\right ) \sqrt{x^{2} - i}}{4 \left (x + 1\right )} - \frac{\sqrt{2} \left (1 - i\right ) \sqrt{x^{2} + i}}{4 \left (x + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/2/(1+x)**2*2**(1/2)/(-I+x**2)**(1/2)+1/2/(1+x)**2*2**(1/2)/(I+x**2)**(1/2),x)

[Out]

(1 + I)*atanh(sqrt(2)*(-x - I)/(sqrt(x**2 - I)*(sqrt(1 + sqrt(2)) - I*sqrt(-1 +
sqrt(2)))))/(2*(-sqrt(1 + sqrt(2)) + I*sqrt(-1 + sqrt(2)))) - (1 - I)*atanh(sqrt
(2)*(-x + I)/(sqrt(x**2 + I)*(sqrt(1 + sqrt(2)) + I*sqrt(-1 + sqrt(2)))))/(2*(sq
rt(1 + sqrt(2)) + I*sqrt(-1 + sqrt(2)))) - sqrt(2)*(1 + I)*sqrt(x**2 - I)/(4*(x
+ 1)) - sqrt(2)*(1 - I)*sqrt(x**2 + I)/(4*(x + 1))

_______________________________________________________________________________________

Mathematica [B]  time = 0.4127, size = 403, normalized size = 2.92 \[ -\frac{(2+2 i) \sqrt{x^2-i}+(2-2 i) \sqrt{x^2+i}+i \sqrt{1-i} x \log \left ((-2+i) x^2+2 \sqrt{1-i} \sqrt{x^2-i} x+i\right )+i \sqrt{1-i} \log \left ((-2+i) x^2+2 \sqrt{1-i} \sqrt{x^2-i} x+i\right )-i \sqrt{1+i} x \log \left ((-2-i) x^2+2 \sqrt{1+i} \sqrt{x^2+i} x-i\right )-i \sqrt{1+i} \log \left ((-2-i) x^2+2 \sqrt{1+i} \sqrt{x^2+i} x-i\right )+2 \sqrt{1-i} (x+1) \tan ^{-1}\left (\frac{x^2+2 i \sqrt{1-i} \sqrt{x^2-i}+1}{x^2-2 i x+(1-2 i)}\right )+2 \sqrt{1+i} (x+1) \tan ^{-1}\left (\frac{x^2-2 i \sqrt{1+i} \sqrt{x^2+i}+1}{x^2+2 i x+(1+2 i)}\right )+i \sqrt{1+i} x \log \left ((x+1)^2\right )-i \sqrt{1-i} x \log \left ((x+1)^2\right )+i \sqrt{1+i} \log \left ((x+1)^2\right )-i \sqrt{1-i} \log \left ((x+1)^2\right )}{4 \sqrt{2} (x+1)} \]

Antiderivative was successfully verified.

[In]  Integrate[1/(Sqrt[2]*(1 + x)^2*Sqrt[-I + x^2]) + 1/(Sqrt[2]*(1 + x)^2*Sqrt[I + x^2]),x]

[Out]

-((2 + 2*I)*Sqrt[-I + x^2] + (2 - 2*I)*Sqrt[I + x^2] + 2*Sqrt[1 - I]*(1 + x)*Arc
Tan[(1 + x^2 + (2*I)*Sqrt[1 - I]*Sqrt[-I + x^2])/((1 - 2*I) - (2*I)*x + x^2)] +
2*Sqrt[1 + I]*(1 + x)*ArcTan[(1 + x^2 - (2*I)*Sqrt[1 + I]*Sqrt[I + x^2])/((1 + 2
*I) + (2*I)*x + x^2)] - I*Sqrt[1 - I]*Log[(1 + x)^2] + I*Sqrt[1 + I]*Log[(1 + x)
^2] - I*Sqrt[1 - I]*x*Log[(1 + x)^2] + I*Sqrt[1 + I]*x*Log[(1 + x)^2] + I*Sqrt[1
 - I]*Log[I - (2 - I)*x^2 + 2*Sqrt[1 - I]*x*Sqrt[-I + x^2]] + I*Sqrt[1 - I]*x*Lo
g[I - (2 - I)*x^2 + 2*Sqrt[1 - I]*x*Sqrt[-I + x^2]] - I*Sqrt[1 + I]*Log[-I - (2
+ I)*x^2 + 2*Sqrt[1 + I]*x*Sqrt[I + x^2]] - I*Sqrt[1 + I]*x*Log[-I - (2 + I)*x^2
 + 2*Sqrt[1 + I]*x*Sqrt[I + x^2]])/(4*Sqrt[2]*(1 + x))

_______________________________________________________________________________________

Maple [B]  time = 0.032, size = 278, normalized size = 2. \[ -{\frac{\sqrt{2}}{4+4\,x}\sqrt{ \left ( 1+x \right ) ^{2}-1-i-2\,x}}-{\frac{{\frac{i}{4}}\sqrt{2}}{1+x}\sqrt{ \left ( 1+x \right ) ^{2}-1-i-2\,x}}-{\frac{\sqrt{2}}{4\,\sqrt{1-i}}\ln \left ({\frac{1}{1+x} \left ( -2\,i-2\,x+2\,\sqrt{1-i}\sqrt{ \left ( 1+x \right ) ^{2}-1-i-2\,x} \right ) } \right ) }-{\frac{{\frac{i}{4}}\sqrt{2}}{\sqrt{1-i}}\ln \left ({\frac{1}{1+x} \left ( -2\,i-2\,x+2\,\sqrt{1-i}\sqrt{ \left ( 1+x \right ) ^{2}-1-i-2\,x} \right ) } \right ) }-{\frac{\sqrt{2}}{4+4\,x}\sqrt{ \left ( 1+x \right ) ^{2}-1+i-2\,x}}+{\frac{{\frac{i}{4}}\sqrt{2}}{1+x}\sqrt{ \left ( 1+x \right ) ^{2}-1+i-2\,x}}-{\frac{\sqrt{2}}{4\,\sqrt{1+i}}\ln \left ({\frac{1}{1+x} \left ( 2\,i-2\,x+2\,\sqrt{1+i}\sqrt{ \left ( 1+x \right ) ^{2}-1+i-2\,x} \right ) } \right ) }+{\frac{{\frac{i}{4}}\sqrt{2}}{\sqrt{1+i}}\ln \left ({\frac{1}{1+x} \left ( 2\,i-2\,x+2\,\sqrt{1+i}\sqrt{ \left ( 1+x \right ) ^{2}-1+i-2\,x} \right ) } \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/2/(1+x)^2*2^(1/2)/(-I+x^2)^(1/2)+1/2/(1+x)^2*2^(1/2)/(I+x^2)^(1/2),x)

[Out]

-1/4*2^(1/2)/(1+x)*((1+x)^2-1-I-2*x)^(1/2)-1/4*I*2^(1/2)/(1+x)*((1+x)^2-1-I-2*x)
^(1/2)-1/4*2^(1/2)/(1-I)^(1/2)*ln((-2*I-2*x+2*(1-I)^(1/2)*((1+x)^2-1-I-2*x)^(1/2
))/(1+x))-1/4*I*2^(1/2)/(1-I)^(1/2)*ln((-2*I-2*x+2*(1-I)^(1/2)*((1+x)^2-1-I-2*x)
^(1/2))/(1+x))-1/4*2^(1/2)/(1+x)*((1+x)^2-1+I-2*x)^(1/2)+1/4*I*2^(1/2)/(1+x)*((1
+x)^2-1+I-2*x)^(1/2)-1/4*2^(1/2)/(1+I)^(1/2)*ln((2*I-2*x+2*(1+I)^(1/2)*((1+x)^2-
1+I-2*x)^(1/2))/(1+x))+1/4*I*2^(1/2)/(1+I)^(1/2)*ln((2*I-2*x+2*(1+I)^(1/2)*((1+x
)^2-1+I-2*x)^(1/2))/(1+x))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/2*sqrt(2)/(sqrt(x^2 + I)*(x + 1)^2) + 1/2*sqrt(2)/(sqrt(x^2 - I)*(x + 1)^2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

_______________________________________________________________________________________

Fricas [A]  time = 0.286757, size = 680, normalized size = 4.93 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/2*sqrt(2)/(sqrt(x^2 + I)*(x + 1)^2) + 1/2*sqrt(2)/(sqrt(x^2 - I)*(x + 1)^2),x, algorithm="fricas")

[Out]

(sqrt(2)*sqrt(x^2 - I)*((I + 1)*x - I) + (sqrt(-1/2*I + 1/2)*sqrt(x^2 - I)*((I -
 1)*x^2 + (I - 1)*x) + sqrt(-1/2*I + 1/2)*(-(I - 1)*x^3 - (I - 1)*x^2) + sqrt(x^
2 + I)*(sqrt(-1/2*I + 1/2)*sqrt(x^2 - I)*(-(I - 1)*x - I + 1) + sqrt(-1/2*I + 1/
2)*((I - 1)*x^2 + (I - 1)*x)))*log(sqrt(2)*sqrt(-1/2*I + 1/2) - x + sqrt(x^2 - I
) - 1) + (sqrt(-1/2*I + 1/2)*sqrt(x^2 - I)*(-(I - 1)*x^2 - (I - 1)*x) + sqrt(-1/
2*I + 1/2)*((I - 1)*x^3 + (I - 1)*x^2) + sqrt(x^2 + I)*(sqrt(-1/2*I + 1/2)*sqrt(
x^2 - I)*((I - 1)*x + I - 1) + sqrt(-1/2*I + 1/2)*(-(I - 1)*x^2 - (I - 1)*x)))*l
og(-sqrt(2)*sqrt(-1/2*I + 1/2) - x + sqrt(x^2 - I) - 1) + (sqrt(-1/2*I - 1/2)*((
I + 1)*x^2 + (I + 1)*x)*sqrt(x^2 - I) + sqrt(-1/2*I - 1/2)*(-(I + 1)*x^3 - (I +
1)*x^2) + sqrt(x^2 + I)*(sqrt(-1/2*I - 1/2)*sqrt(x^2 - I)*(-(I + 1)*x - I - 1) +
 sqrt(-1/2*I - 1/2)*((I + 1)*x^2 + (I + 1)*x)))*log(I*sqrt(2)*sqrt(-1/2*I - 1/2)
 - x + sqrt(x^2 + I) - 1) + (sqrt(-1/2*I - 1/2)*sqrt(x^2 - I)*(-(I + 1)*x^2 - (I
 + 1)*x) + sqrt(-1/2*I - 1/2)*((I + 1)*x^3 + (I + 1)*x^2) + (sqrt(-1/2*I - 1/2)*
sqrt(x^2 - I)*((I + 1)*x + I + 1) + sqrt(-1/2*I - 1/2)*(-(I + 1)*x^2 - (I + 1)*x
))*sqrt(x^2 + I))*log(-I*sqrt(2)*sqrt(-1/2*I - 1/2) - x + sqrt(x^2 + I) - 1) + s
qrt(2)*(-(I + 1)*x^2 + (I + 1)*x) + sqrt(x^2 + I)*(sqrt(2)*((I + 1)*x - 1) - (I
+ 1)*sqrt(2)*sqrt(x^2 - I)))/((2*I + 2)*x^3 + (2*I + 2)*x^2 + sqrt(x^2 + I)*(-(2
*I + 2)*x^2 + sqrt(x^2 - I)*((2*I + 2)*x + 2*I + 2) - (2*I + 2)*x) + sqrt(x^2 -
I)*(-(2*I + 2)*x^2 - (2*I + 2)*x))

_______________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/2/(1+x)**2*2**(1/2)/(-I+x**2)**(1/2)+1/2/(1+x)**2*2**(1/2)/(I+x**2)**(1/2),x)

[Out]

Exception raised: TypeError

_______________________________________________________________________________________

GIAC/XCAS [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/2*sqrt(2)/(sqrt(x^2 + I)*(x + 1)^2) + 1/2*sqrt(2)/(sqrt(x^2 - I)*(x + 1)^2),x, algorithm="giac")

[Out]

Exception raised: TypeError