Integrand size = 39, antiderivative size = 38 \[ \int \frac {1+k x^2}{\left (-1+k x^2\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\frac {\arctan \left (\frac {(-1+k) x}{\sqrt {1+\left (-1-k^2\right ) x^2+k^2 x^4}}\right )}{1-k} \] Output:
arctan((-1+k)*x/(1+(-k^2-1)*x^2+k^2*x^4)^(1/2))/(1-k)
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 5.28 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.61 \[ \int \frac {1+k x^2}{\left (-1+k x^2\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\frac {\sqrt {1-x^2} \sqrt {1-k^2 x^2} \left (\operatorname {EllipticF}\left (\arcsin (x),k^2\right )-2 \operatorname {EllipticPi}\left (k,\arcsin (x),k^2\right )\right )}{\sqrt {\left (-1+x^2\right ) \left (-1+k^2 x^2\right )}} \] Input:
Integrate[(1 + k*x^2)/((-1 + k*x^2)*Sqrt[(1 - x^2)*(1 - k^2*x^2)]),x]
Output:
(Sqrt[1 - x^2]*Sqrt[1 - k^2*x^2]*(EllipticF[ArcSin[x], k^2] - 2*EllipticPi [k, ArcSin[x], k^2]))/Sqrt[(-1 + x^2)*(-1 + k^2*x^2)]
Time = 0.31 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.05, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {2048, 2212, 217}
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 \frac {k x^2+1}{\left (k x^2-1\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx\) |
\(\Big \downarrow \) 2048 |
\(\displaystyle \int \frac {k x^2+1}{\left (k x^2-1\right ) \sqrt {k^2 x^4+\left (-k^2-1\right ) x^2+1}}dx\) |
\(\Big \downarrow \) 2212 |
\(\displaystyle \int \frac {1}{-\frac {(1-k)^2 x^2}{k^2 x^4-\left (k^2+1\right ) x^2+1}-1}d\frac {x}{\sqrt {k^2 x^4-\left (k^2+1\right ) x^2+1}}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle -\frac {\arctan \left (\frac {(1-k) x}{\sqrt {k^2 x^4-\left (k^2+1\right ) x^2+1}}\right )}{1-k}\) |
Input:
Int[(1 + k*x^2)/((-1 + k*x^2)*Sqrt[(1 - x^2)*(1 - k^2*x^2)]),x]
Output:
-(ArcTan[((1 - k)*x)/Sqrt[1 - (1 + k^2)*x^2 + k^2*x^4]]/(1 - k))
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[(u_.)*((e_.)*((a_.) + (b_.)*(x_)^(n_.))*((c_) + (d_.)*(x_)^(n_.)))^(p_) , x_Symbol] :> Int[u*(a*c*e + (b*c + a*d)*e*x^n + b*d*e*x^(2*n))^p, x] /; F reeQ[{a, b, c, d, e, n, p}, x]
Int[((A_) + (B_.)*(x_)^2)/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4]), x_Symbol] :> Simp[A Subst[Int[1/(d - (b*d - 2*a*e)*x^2), x], x, x/Sqrt[a + b*x^2 + c*x^4]], x] /; FreeQ[{a, b, c, d, e, A, B}, x] & & EqQ[c*d^2 - a*e^2, 0] && EqQ[B*d + A*e, 0]
Time = 2.40 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.97
method | result | size |
elliptic | \(\frac {\arctan \left (\frac {\sqrt {\left (-x^{2}+1\right ) \left (-k^{2} x^{2}+1\right )}}{x \left (-1+k \right )}\right )}{-1+k}\) | \(37\) |
default | \(-\frac {2 \ln \left (2\right )+\ln \left (\frac {\sqrt {-\left (-1+k \right )^{2}}\, \sqrt {\left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}+2 k^{\frac {3}{2}} x^{2}+2 \sqrt {k}+\left (-k^{2}-2 k -1\right ) x}{k \,x^{2}-2 \sqrt {k}\, x +1}\right )+\ln \left (\frac {\sqrt {-\left (-1+k \right )^{2}}\, \sqrt {\left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}-2 k^{\frac {3}{2}} x^{2}-2 \sqrt {k}+\left (-k^{2}-2 k -1\right ) x}{k \,x^{2}+2 \sqrt {k}\, x +1}\right )}{2 \sqrt {-\left (-1+k \right )^{2}}}\) | \(157\) |
pseudoelliptic | \(-\frac {2 \ln \left (2\right )+\ln \left (\frac {\sqrt {-\left (-1+k \right )^{2}}\, \sqrt {\left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}+2 k^{\frac {3}{2}} x^{2}+2 \sqrt {k}+\left (-k^{2}-2 k -1\right ) x}{k \,x^{2}-2 \sqrt {k}\, x +1}\right )+\ln \left (\frac {\sqrt {-\left (-1+k \right )^{2}}\, \sqrt {\left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}-2 k^{\frac {3}{2}} x^{2}-2 \sqrt {k}+\left (-k^{2}-2 k -1\right ) x}{k \,x^{2}+2 \sqrt {k}\, x +1}\right )}{2 \sqrt {-\left (-1+k \right )^{2}}}\) | \(157\) |
Input:
int((k*x^2+1)/(k*x^2-1)/((-x^2+1)*(-k^2*x^2+1))^(1/2),x,method=_RETURNVERB OSE)
Output:
1/(-1+k)*arctan(((-x^2+1)*(-k^2*x^2+1))^(1/2)/x/(-1+k))
Time = 0.13 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.89 \[ \int \frac {1+k x^2}{\left (-1+k x^2\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=-\frac {\arctan \left (\frac {{\left (k - 1\right )} x}{\sqrt {k^{2} x^{4} - {\left (k^{2} + 1\right )} x^{2} + 1}}\right )}{k - 1} \] Input:
integrate((k*x^2+1)/(k*x^2-1)/((-x^2+1)*(-k^2*x^2+1))^(1/2),x, algorithm=" fricas")
Output:
-arctan((k - 1)*x/sqrt(k^2*x^4 - (k^2 + 1)*x^2 + 1))/(k - 1)
\[ \int \frac {1+k x^2}{\left (-1+k x^2\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\int \frac {k x^{2} + 1}{\sqrt {\left (x - 1\right ) \left (x + 1\right ) \left (k x - 1\right ) \left (k x + 1\right )} \left (k x^{2} - 1\right )}\, dx \] Input:
integrate((k*x**2+1)/(k*x**2-1)/((-x**2+1)*(-k**2*x**2+1))**(1/2),x)
Output:
Integral((k*x**2 + 1)/(sqrt((x - 1)*(x + 1)*(k*x - 1)*(k*x + 1))*(k*x**2 - 1)), x)
\[ \int \frac {1+k x^2}{\left (-1+k x^2\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\int { \frac {k x^{2} + 1}{{\left (k x^{2} - 1\right )} \sqrt {{\left (k^{2} x^{2} - 1\right )} {\left (x^{2} - 1\right )}}} \,d x } \] Input:
integrate((k*x^2+1)/(k*x^2-1)/((-x^2+1)*(-k^2*x^2+1))^(1/2),x, algorithm=" maxima")
Output:
integrate((k*x^2 + 1)/((k*x^2 - 1)*sqrt((k^2*x^2 - 1)*(x^2 - 1))), x)
\[ \int \frac {1+k x^2}{\left (-1+k x^2\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\int { \frac {k x^{2} + 1}{{\left (k x^{2} - 1\right )} \sqrt {{\left (k^{2} x^{2} - 1\right )} {\left (x^{2} - 1\right )}}} \,d x } \] Input:
integrate((k*x^2+1)/(k*x^2-1)/((-x^2+1)*(-k^2*x^2+1))^(1/2),x, algorithm=" giac")
Output:
integrate((k*x^2 + 1)/((k*x^2 - 1)*sqrt((k^2*x^2 - 1)*(x^2 - 1))), x)
Timed out. \[ \int \frac {1+k x^2}{\left (-1+k x^2\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\int \frac {k\,x^2+1}{\left (k\,x^2-1\right )\,\sqrt {\left (x^2-1\right )\,\left (k^2\,x^2-1\right )}} \,d x \] Input:
int((k*x^2 + 1)/((k*x^2 - 1)*((x^2 - 1)*(k^2*x^2 - 1))^(1/2)),x)
Output:
int((k*x^2 + 1)/((k*x^2 - 1)*((x^2 - 1)*(k^2*x^2 - 1))^(1/2)), x)
\[ \int \frac {1+k x^2}{\left (-1+k x^2\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\left (\int \frac {\sqrt {k^{2} x^{2}-1}\, \sqrt {x^{2}-1}\, x^{2}}{k^{3} x^{6}-k^{3} x^{4}-k^{2} x^{4}-k \,x^{4}+k^{2} x^{2}+k \,x^{2}+x^{2}-1}d x \right ) k +\int \frac {\sqrt {k^{2} x^{2}-1}\, \sqrt {x^{2}-1}}{k^{3} x^{6}-k^{3} x^{4}-k^{2} x^{4}-k \,x^{4}+k^{2} x^{2}+k \,x^{2}+x^{2}-1}d x \] Input:
int((k*x^2+1)/(k*x^2-1)/((-x^2+1)*(-k^2*x^2+1))^(1/2),x)
Output:
int((sqrt(k**2*x**2 - 1)*sqrt(x**2 - 1)*x**2)/(k**3*x**6 - k**3*x**4 - k** 2*x**4 + k**2*x**2 - k*x**4 + k*x**2 + x**2 - 1),x)*k + int((sqrt(k**2*x** 2 - 1)*sqrt(x**2 - 1))/(k**3*x**6 - k**3*x**4 - k**2*x**4 + k**2*x**2 - k* x**4 + k*x**2 + x**2 - 1),x)