Integrand size = 88, antiderivative size = 92 \[ \int \frac {\left (1+2 x+x^2\right ) \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx=\frac {\arctan \left (\frac {\sqrt [4]{d}+\sqrt [4]{d} x}{\sqrt [4]{1+\left (-1-k^2\right ) x^2+k^2 x^4}}\right )}{d^{3/4}}-\frac {\text {arctanh}\left (\frac {\sqrt [4]{d}+\sqrt [4]{d} x}{\sqrt [4]{1+\left (-1-k^2\right ) x^2+k^2 x^4}}\right )}{d^{3/4}} \]
[Out]
\[ \int \frac {\left (1+2 x+x^2\right ) \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx=\int \frac {\left (1+2 x+x^2\right ) \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx \]
[In]
[Out]
Rubi steps \begin{align*} \text {integral}& = \int \frac {(1+x)^2 \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx \\ & = \int \frac {(1+x)^2 \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx \\ & = \int \frac {(1+x)^2 \left (-2+(1-k) (1+k) x+2 k^2 x^2\right )}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx \\ & = \int \left (\frac {k^2+5 k^4-d \left (1-3 k^2\right )}{\left (d-k^2\right )^2 \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}}-\frac {2 k^2 x}{\left (d-k^2\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}}+\frac {-3 d^2 \left (1-k^2\right )-k^2 \left (1+7 k^2\right )+d \left (1+2 k^2+5 k^4\right )+\left (k^2-k^6-6 d^2 \left (1-k^2\right )-d \left (1-14 k^2-19 k^4\right )\right ) x+\left (24 d k^4-3 d^2 \left (1-k^2\right )+k^4 \left (3+5 k^2\right )\right ) x^2}{\left (d-k^2\right )^2 \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}}\right ) \, dx \\ & = \frac {\int \frac {-3 d^2 \left (1-k^2\right )-k^2 \left (1+7 k^2\right )+d \left (1+2 k^2+5 k^4\right )+\left (k^2-k^6-6 d^2 \left (1-k^2\right )-d \left (1-14 k^2-19 k^4\right )\right ) x+\left (24 d k^4-3 d^2 \left (1-k^2\right )+k^4 \left (3+5 k^2\right )\right ) x^2}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx}{\left (d-k^2\right )^2}-\frac {\left (2 k^2\right ) \int \frac {x}{\left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx}{d-k^2}+\frac {\left (k^2+5 k^4-d \left (1-3 k^2\right )\right ) \int \frac {1}{\left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx}{\left (d-k^2\right )^2} \\ & = \frac {\int \left (\frac {k^2 \left (-1-7 k^2\right ) \left (1-\frac {d \left (1+2 k^2+5 k^4+3 d \left (-1+k^2\right )\right )}{k^2+7 k^4}\right )}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}}+\frac {\left (-6 d^2 \left (1-k^2\right )-d \left (1-14 k^2-19 k^4\right )+k^2 \left (1-k^4\right )\right ) x}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}}+\frac {\left (24 d k^4-3 d^2 \left (1-k^2\right )+k^4 \left (3+5 k^2\right )\right ) x^2}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}}\right ) \, dx}{\left (d-k^2\right )^2}-\frac {k^2 \text {Subst}\left (\int \frac {1}{\left (1+\left (-1-k^2\right ) x+k^2 x^2\right )^{3/4}} \, dx,x,x^2\right )}{d-k^2}+\frac {\left (\left (k^2+5 k^4-d \left (1-3 k^2\right )\right ) \left (1-x^2\right )^{3/4} \left (1-k^2 x^2\right )^{3/4}\right ) \int \frac {1}{\left (1-x^2\right )^{3/4} \left (1-k^2 x^2\right )^{3/4}} \, dx}{\left (d-k^2\right )^2 \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \\ & = \frac {\left (k^2+5 k^4-d \left (1-3 k^2\right )\right ) x \left (\frac {1-x^2}{1-k^2 x^2}\right )^{3/4} \left (1-k^2 x^2\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{4},\frac {3}{2},\frac {\left (1-k^2\right ) x^2}{1-k^2 x^2}\right )}{\left (d-k^2\right )^2 \left (1-\left (1+k^2\right ) x^2+k^2 x^4\right )^{3/4}}+\frac {\left (24 d k^4-3 d^2 \left (1-k^2\right )+k^4 \left (3+5 k^2\right )\right ) \int \frac {x^2}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx}{\left (d-k^2\right )^2}+\frac {\left (k^2-k^6-6 d^2 \left (1-k^2\right )-d \left (1-14 k^2-19 k^4\right )\right ) \int \frac {x}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx}{\left (d-k^2\right )^2}+\frac {\left (-3 d^2 \left (1-k^2\right )-k^2 \left (1+7 k^2\right )+d \left (1+2 k^2+5 k^4\right )\right ) \int \frac {1}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx}{\left (d-k^2\right )^2}-\frac {\left (4 k^2 \sqrt {\left (-1-k^2+2 k^2 x^2\right )^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-4 k^2+\left (-1-k^2\right )^2+4 k^2 x^4}} \, dx,x,\sqrt [4]{\left (-1+x^2\right ) \left (-1+k^2 x^2\right )}\right )}{\left (d-k^2\right ) \left (-1-k^2+2 k^2 x^2\right )} \\ & = \frac {\sqrt {2} k^{3/2} \sqrt {-1+k^2} \sqrt {\left (-1-k^2+2 k^2 x^2\right )^2} \sqrt {\frac {\left (1+k^2 \left (1-2 x^2\right )\right )^2}{\left (1-k^2\right )^2 \left (1-\frac {2 k \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}}{1-k^2}\right )^2}} \left (1-\frac {2 k \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}}{1-k^2}\right ) \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt {2} \sqrt {k} \sqrt [4]{\left (1-x^2\right ) \left (1-k^2 x^2\right )}}{\sqrt {-1+k^2}}\right ),\frac {1}{2}\right )}{\left (d-k^2\right ) \left (1+k^2-2 k^2 x^2\right ) \sqrt {\left (-1-k^2 \left (1-2 x^2\right )\right )^2}}+\frac {\left (k^2+5 k^4-d \left (1-3 k^2\right )\right ) x \left (\frac {1-x^2}{1-k^2 x^2}\right )^{3/4} \left (1-k^2 x^2\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{4},\frac {3}{2},\frac {\left (1-k^2\right ) x^2}{1-k^2 x^2}\right )}{\left (d-k^2\right )^2 \left (1-\left (1+k^2\right ) x^2+k^2 x^4\right )^{3/4}}+\frac {\left (24 d k^4-3 d^2 \left (1-k^2\right )+k^4 \left (3+5 k^2\right )\right ) \int \frac {x^2}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx}{\left (d-k^2\right )^2}+\frac {\left (k^2-k^6-6 d^2 \left (1-k^2\right )-d \left (1-14 k^2-19 k^4\right )\right ) \int \frac {x}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx}{\left (d-k^2\right )^2}+\frac {\left (-3 d^2 \left (1-k^2\right )-k^2 \left (1+7 k^2\right )+d \left (1+2 k^2+5 k^4\right )\right ) \int \frac {1}{\left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2-\left (d-k^2\right ) x^3\right ) \left (1+\left (-1-k^2\right ) x^2+k^2 x^4\right )^{3/4}} \, dx}{\left (d-k^2\right )^2} \\ \end{align*}
\[ \int \frac {\left (1+2 x+x^2\right ) \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx=\int \frac {\left (1+2 x+x^2\right ) \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx \]
[In]
[Out]
\[\int \frac {\left (x^{2}+2 x +1\right ) \left (-2-\left (-1+k \right ) \left (1+k \right ) x +2 k^{2} x^{2}\right )}{{\left (\left (-x^{2}+1\right ) \left (-k^{2} x^{2}+1\right )\right )}^{\frac {3}{4}} \left (1-d -\left (1+3 d \right ) x -\left (k^{2}+3 d \right ) x^{2}+\left (k^{2}-d \right ) x^{3}\right )}d x\]
[In]
[Out]
Timed out. \[ \int \frac {\left (1+2 x+x^2\right ) \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {\left (1+2 x+x^2\right ) \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\left (1+2 x+x^2\right ) \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx=\int { \frac {{\left (2 \, k^{2} x^{2} - {\left (k + 1\right )} {\left (k - 1\right )} x - 2\right )} {\left (x^{2} + 2 \, x + 1\right )}}{{\left ({\left (k^{2} - d\right )} x^{3} - {\left (k^{2} + 3 \, d\right )} x^{2} - {\left (3 \, d + 1\right )} x - d + 1\right )} \left ({\left (k^{2} x^{2} - 1\right )} {\left (x^{2} - 1\right )}\right )^{\frac {3}{4}}} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (1+2 x+x^2\right ) \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx=\int { \frac {{\left (2 \, k^{2} x^{2} - {\left (k + 1\right )} {\left (k - 1\right )} x - 2\right )} {\left (x^{2} + 2 \, x + 1\right )}}{{\left ({\left (k^{2} - d\right )} x^{3} - {\left (k^{2} + 3 \, d\right )} x^{2} - {\left (3 \, d + 1\right )} x - d + 1\right )} \left ({\left (k^{2} x^{2} - 1\right )} {\left (x^{2} - 1\right )}\right )^{\frac {3}{4}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (1+2 x+x^2\right ) \left (-2-(-1+k) (1+k) x+2 k^2 x^2\right )}{\left (\left (1-x^2\right ) \left (1-k^2 x^2\right )\right )^{3/4} \left (1-d-(1+3 d) x-\left (3 d+k^2\right ) x^2+\left (-d+k^2\right ) x^3\right )} \, dx=\int \frac {\left (x^2+2\,x+1\right )\,\left (x\,\left (k-1\right )\,\left (k+1\right )-2\,k^2\,x^2+2\right )}{{\left (\left (x^2-1\right )\,\left (k^2\,x^2-1\right )\right )}^{3/4}\,\left (\left (d-k^2\right )\,x^3+\left (k^2+3\,d\right )\,x^2+\left (3\,d+1\right )\,x+d-1\right )} \,d x \]
[In]
[Out]