Integrand size = 45, antiderivative size = 138 \[ \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=-\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {-i+x^2}}{\sqrt {2} (1+x)}-\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \sqrt {i+x^2}}{\sqrt {2} (1+x)}+\frac {\text {arctanh}\left (\frac {i+x}{\sqrt {1-i} \sqrt {-i+x^2}}\right )}{(1-i)^{3/2} \sqrt {2}}-\frac {\text {arctanh}\left (\frac {i-x}{\sqrt {1+i} \sqrt {i+x^2}}\right )}{(1+i)^{3/2} \sqrt {2}} \] Output:
1/2*arctanh((I+x)/(1-I)^(1/2)/(-I+x^2)^(1/2))/(1-I)^(3/2)*2^(1/2)-1/2*arct anh((I-x)/(1+I)^(1/2)/(I+x^2)^(1/2))/(1+I)^(3/2)*2^(1/2)-(1/4+1/4*I)*(-I+x ^2)^(1/2)/(1+x)*2^(1/2)+(-1/4+1/4*I)*(I+x^2)^(1/2)/(1+x)*2^(1/2)
Time = 3.63 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.91 \[ \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=-\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \left (i \sqrt {-i+x^2}+\sqrt {i+x^2}+\frac {2 (1+x) \arctan \left (\sqrt {-\frac {1}{2}-\frac {i}{2}} \left (1+x-\sqrt {-i+x^2}\right )\right )}{\sqrt {1-i}}+(1+i)^{3/2} (1+x) \arctan \left (\sqrt {-\frac {1}{2}+\frac {i}{2}} \left (1+x-\sqrt {i+x^2}\right )\right )\right )}{\sqrt {2} (1+x)} \] Input:
Integrate[1/(Sqrt[2]*(1 + x)^2*Sqrt[-I + x^2]) + 1/(Sqrt[2]*(1 + x)^2*Sqrt [I + x^2]),x]
Output:
((-1/2 + I/2)*(I*Sqrt[-I + x^2] + Sqrt[I + x^2] + (2*(1 + x)*ArcTan[Sqrt[- 1/2 - I/2]*(1 + x - Sqrt[-I + x^2])])/Sqrt[1 - I] + (1 + I)^(3/2)*(1 + x)* ArcTan[Sqrt[-1/2 + I/2]*(1 + x - Sqrt[I + x^2])]))/(Sqrt[2]*(1 + x))
Time = 0.25 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.022, Rules used = {2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \left (\frac {1}{\sqrt {2} (x+1)^2 \sqrt {x^2+i}}+\frac {1}{\sqrt {2} (x+1)^2 \sqrt {x^2-i}}\right ) \, dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\text {arctanh}\left (\frac {x+i}{\sqrt {1-i} \sqrt {x^2-i}}\right )}{(1-i)^{3/2} \sqrt {2}}-\frac {\text {arctanh}\left (\frac {-x+i}{\sqrt {1+i} \sqrt {x^2+i}}\right )}{(1+i)^{3/2} \sqrt {2}}-\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)}\) |
Input:
Int[1/(Sqrt[2]*(1 + x)^2*Sqrt[-I + x^2]) + 1/(Sqrt[2]*(1 + x)^2*Sqrt[I + x ^2]),x]
Output:
((-1/2 - I/2)*Sqrt[-I + x^2])/(Sqrt[2]*(1 + x)) - ((1/2 - I/2)*Sqrt[I + x^ 2])/(Sqrt[2]*(1 + x)) + ArcTanh[(I + x)/(Sqrt[1 - I]*Sqrt[-I + x^2])]/((1 - I)^(3/2)*Sqrt[2]) - ArcTanh[(I - x)/(Sqrt[1 + I]*Sqrt[I + x^2])]/((1 + I )^(3/2)*Sqrt[2])
Time = 0.60 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.06
method | result | size |
default | \(\frac {\sqrt {2}\, \left (\frac {\left (-\frac {1}{2}-\frac {i}{2}\right ) \sqrt {\left (1+x \right )^{2}-2 x -1-i}}{1+x}+\frac {\left (-\frac {1}{2}-\frac {i}{2}\right ) \ln \left (\frac {-2 i-2 x +2 \sqrt {1-i}\, \sqrt {\left (1+x \right )^{2}-2 x -1-i}}{1+x}\right )}{\sqrt {1-i}}\right )}{2}+\frac {\sqrt {2}\, \left (\frac {\left (-\frac {1}{2}+\frac {i}{2}\right ) \sqrt {\left (1+x \right )^{2}-2 x -1+i}}{1+x}+\frac {\left (-\frac {1}{2}+\frac {i}{2}\right ) \ln \left (\frac {2 i-2 x +2 \sqrt {1+i}\, \sqrt {\left (1+x \right )^{2}-2 x -1+i}}{1+x}\right )}{\sqrt {1+i}}\right )}{2}\) | \(146\) |
Input:
int(1/2/(1+x)^2*2^(1/2)/(x^2-I)^(1/2)+1/2/(1+x)^2*2^(1/2)/(x^2+I)^(1/2),x, method=_RETURNVERBOSE)
Output:
1/2*2^(1/2)*((-1/2-1/2*I)/(1+x)*((1+x)^2-2*x-1-I)^(1/2)-(1/2+1/2*I)/(1-I)^ (1/2)*ln((-2*I-2*x+2*(1-I)^(1/2)*((1+x)^2-2*x-1-I)^(1/2))/(1+x)))+1/2*2^(1 /2)*((-1/2+1/2*I)/(1+x)*((1+x)^2-2*x-1+I)^(1/2)+(-1/2+1/2*I)/(1+I)^(1/2)*l n((2*I-2*x+2*(1+I)^(1/2)*((1+x)^2-2*x-1+I)^(1/2))/(1+x)))
Time = 0.09 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.17 \[ \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=\frac {\sqrt {-\frac {1}{2} i + \frac {1}{2}} {\left (-\left (i - 1\right ) \, x - i + 1\right )} \log \left (\sqrt {2} \sqrt {-\frac {1}{2} i + \frac {1}{2}} - x + \sqrt {x^{2} - i} - 1\right ) + \sqrt {-\frac {1}{2} i + \frac {1}{2}} {\left (\left (i - 1\right ) \, x + i - 1\right )} \log \left (-\sqrt {2} \sqrt {-\frac {1}{2} i + \frac {1}{2}} - x + \sqrt {x^{2} - i} - 1\right ) + \sqrt {-\frac {1}{2} i - \frac {1}{2}} {\left (-\left (i + 1\right ) \, x - i - 1\right )} \log \left (i \, \sqrt {2} \sqrt {-\frac {1}{2} i - \frac {1}{2}} - x + \sqrt {x^{2} + i} - 1\right ) + \sqrt {-\frac {1}{2} i - \frac {1}{2}} {\left (\left (i + 1\right ) \, x + i + 1\right )} \log \left (-i \, \sqrt {2} \sqrt {-\frac {1}{2} i - \frac {1}{2}} - x + \sqrt {x^{2} + i} - 1\right ) + \sqrt {2} {\left (-\left (i + 1\right ) \, x - i - 1\right )} - \sqrt {2} \sqrt {x^{2} + i} - i \, \sqrt {2} \sqrt {x^{2} - i}}{\left (2 i + 2\right ) \, x + 2 i + 2} \] Input:
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, algorithm="fricas")
Output:
(sqrt(-1/2*I + 1/2)*(-(I - 1)*x - I + 1)*log(sqrt(2)*sqrt(-1/2*I + 1/2) - x + sqrt(x^2 - I) - 1) + sqrt(-1/2*I + 1/2)*((I - 1)*x + I - 1)*log(-sqrt( 2)*sqrt(-1/2*I + 1/2) - x + sqrt(x^2 - I) - 1) + sqrt(-1/2*I - 1/2)*(-(I + 1)*x - I - 1)*log(I*sqrt(2)*sqrt(-1/2*I - 1/2) - x + sqrt(x^2 + I) - 1) + sqrt(-1/2*I - 1/2)*((I + 1)*x + I + 1)*log(-I*sqrt(2)*sqrt(-1/2*I - 1/2) - x + sqrt(x^2 + I) - 1) + sqrt(2)*(-(I + 1)*x - I - 1) - sqrt(2)*sqrt(x^2 + I) - I*sqrt(2)*sqrt(x^2 - I))/((2*I + 2)*x + 2*I + 2)
Exception generated. \[ \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=\text {Exception raised: TypeError} \] Input:
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)
Output:
Exception raised: TypeError >> Invalid comparison of non-real I
Exception generated. \[ \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=\text {Exception raised: RuntimeError} \] Input:
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, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: In function CAR, the value of the first argument is 1which is not of the expected type LIST
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 547 vs. \(2 (82) = 164\).
Time = 0.14 (sec) , antiderivative size = 547, normalized size of antiderivative = 3.96 \[ \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=\sqrt {2} {\left (\frac {-\left (i - 1\right ) \, \sqrt {2 \, x^{2} + 2 \, \sqrt {x^{4} + 1}} {\left (\frac {i}{x^{2} + \sqrt {x^{4} + 1}} + 1\right )} + \left (2 i - 2\right ) \, x + 2 i + 2}{{\left (\sqrt {2 \, x^{2} + 2 \, \sqrt {x^{4} + 1}} {\left (\frac {i}{x^{2} + \sqrt {x^{4} + 1}} + 1\right )} - 2 \, x\right )}^{2} - 4 \, \sqrt {2 \, x^{2} + 2 \, \sqrt {x^{4} + 1}} {\left (\frac {i}{x^{2} + \sqrt {x^{4} + 1}} + 1\right )} + 8 \, x - 4 i} - \frac {\left (i - 1\right ) \, \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2 \, x^{2} + 2 \, \sqrt {x^{4} + 1}} {\left (\frac {i}{x^{2} + \sqrt {x^{4} + 1}} + 1\right )} - 2 \, x\right )} - \sqrt {2 \, x^{2} + 2 \, \sqrt {x^{4} + 1}} {\left (\frac {i}{x^{2} + \sqrt {x^{4} + 1}} + 1\right )} + 2 \, x - 2 \, \sqrt {2} + 2}{\sqrt {2} \sqrt {2 \, \sqrt {2} - 2} - \left (i + 1\right ) \, \sqrt {2 \, \sqrt {2} - 2}}\right )}{\sqrt {2 \, \sqrt {2} - 2} {\left (-\frac {i}{\sqrt {2} - 1} + 1\right )}}\right )} + \sqrt {2} {\left (\frac {\left (i + 1\right ) \, \sqrt {2 \, x^{2} + 2 \, \sqrt {x^{4} + 1}} {\left (-\frac {i}{x^{2} + \sqrt {x^{4} + 1}} + 1\right )} - \left (2 i + 2\right ) \, x - 2 i + 2}{{\left (\sqrt {2 \, x^{2} + 2 \, \sqrt {x^{4} + 1}} {\left (-\frac {i}{x^{2} + \sqrt {x^{4} + 1}} + 1\right )} - 2 \, x\right )}^{2} - 4 \, \sqrt {2 \, x^{2} + 2 \, \sqrt {x^{4} + 1}} {\left (-\frac {i}{x^{2} + \sqrt {x^{4} + 1}} + 1\right )} + 8 \, x + 4 i} + \frac {\left (i + 1\right ) \, \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2 \, x^{2} + 2 \, \sqrt {x^{4} + 1}} {\left (-\frac {i}{x^{2} + \sqrt {x^{4} + 1}} + 1\right )} - 2 \, x\right )} - \sqrt {2 \, x^{2} + 2 \, \sqrt {x^{4} + 1}} {\left (-\frac {i}{x^{2} + \sqrt {x^{4} + 1}} + 1\right )} + 2 \, x - 2 \, \sqrt {2} + 2}{\sqrt {2} \sqrt {2 \, \sqrt {2} - 2} + \left (i - 1\right ) \, \sqrt {2 \, \sqrt {2} - 2}}\right )}{\sqrt {2 \, \sqrt {2} - 2} {\left (\frac {i}{\sqrt {2} - 1} + 1\right )}}\right )} \] Input:
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, algorithm="giac")
Output:
sqrt(2)*((-(I - 1)*sqrt(2*x^2 + 2*sqrt(x^4 + 1))*(I/(x^2 + sqrt(x^4 + 1)) + 1) + (2*I - 2)*x + 2*I + 2)/((sqrt(2*x^2 + 2*sqrt(x^4 + 1))*(I/(x^2 + sq rt(x^4 + 1)) + 1) - 2*x)^2 - 4*sqrt(2*x^2 + 2*sqrt(x^4 + 1))*(I/(x^2 + sqr t(x^4 + 1)) + 1) + 8*x - 4*I) - (I - 1)*arctan((sqrt(2)*(sqrt(2*x^2 + 2*sq rt(x^4 + 1))*(I/(x^2 + sqrt(x^4 + 1)) + 1) - 2*x) - sqrt(2*x^2 + 2*sqrt(x^ 4 + 1))*(I/(x^2 + sqrt(x^4 + 1)) + 1) + 2*x - 2*sqrt(2) + 2)/(sqrt(2)*sqrt (2*sqrt(2) - 2) - (I + 1)*sqrt(2*sqrt(2) - 2)))/(sqrt(2*sqrt(2) - 2)*(-I/( sqrt(2) - 1) + 1))) + sqrt(2)*(((I + 1)*sqrt(2*x^2 + 2*sqrt(x^4 + 1))*(-I/ (x^2 + sqrt(x^4 + 1)) + 1) - (2*I + 2)*x - 2*I + 2)/((sqrt(2*x^2 + 2*sqrt( x^4 + 1))*(-I/(x^2 + sqrt(x^4 + 1)) + 1) - 2*x)^2 - 4*sqrt(2*x^2 + 2*sqrt( x^4 + 1))*(-I/(x^2 + sqrt(x^4 + 1)) + 1) + 8*x + 4*I) + (I + 1)*arctan((sq rt(2)*(sqrt(2*x^2 + 2*sqrt(x^4 + 1))*(-I/(x^2 + sqrt(x^4 + 1)) + 1) - 2*x) - sqrt(2*x^2 + 2*sqrt(x^4 + 1))*(-I/(x^2 + sqrt(x^4 + 1)) + 1) + 2*x - 2* sqrt(2) + 2)/(sqrt(2)*sqrt(2*sqrt(2) - 2) + (I - 1)*sqrt(2*sqrt(2) - 2)))/ (sqrt(2*sqrt(2) - 2)*(I/(sqrt(2) - 1) + 1)))
Timed out. \[ \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=\int \frac {\sqrt {2}}{2\,\sqrt {x^2-\mathrm {i}}\,{\left (x+1\right )}^2}+\frac {\sqrt {2}}{2\,\sqrt {x^2+1{}\mathrm {i}}\,{\left (x+1\right )}^2} \,d x \] Input:
int(2^(1/2)/(2*(x^2 - 1i)^(1/2)*(x + 1)^2) + 2^(1/2)/(2*(x^2 + 1i)^(1/2)*( x + 1)^2),x)
Output:
int(2^(1/2)/(2*(x^2 - 1i)^(1/2)*(x + 1)^2) + 2^(1/2)/(2*(x^2 + 1i)^(1/2)*( x + 1)^2), x)
\[ \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=\int \left (\frac {\sqrt {2}}{2 \left (x +1\right )^{2} \sqrt {x^{2}-i}}+\frac {\sqrt {2}}{2 \left (x +1\right )^{2} \sqrt {x^{2}+i}}\right )d x \] Input:
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 )
Output:
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 )