Integrand size = 43, antiderivative size = 54 \[ \int \frac {-1+\sqrt {k} x}{\left (1+\sqrt {k} x\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=-\frac {2 \arctan \left (\frac {(-1+k) x}{1+2 \sqrt {k} x+k x^2+\sqrt {1+\left (-1-k^2\right ) x^2+k^2 x^4}}\right )}{-1+k} \] Output:
-2*arctan((-1+k)*x/(1+2*k^(1/2)*x+k*x^2+(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 = 4.10 (sec) , antiderivative size = 151, normalized size of antiderivative = 2.80 \[ \int \frac {-1+\sqrt {k} x}{\left (1+\sqrt {k} x\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\frac {2 \sqrt {-1+x^2} \sqrt {-1+k^2 x^2} \arctan \left (\frac {\sqrt {-1+k^2 x^2}}{\sqrt {k} \sqrt {-1+x^2}}\right )+(-1+k) \sqrt {1-x^2} \sqrt {1-k^2 x^2} \operatorname {EllipticF}\left (\arcsin (x),k^2\right )-2 (-1+k) \sqrt {1-x^2} \sqrt {1-k^2 x^2} \operatorname {EllipticPi}\left (k,\arcsin (x),k^2\right )}{(-1+k) \sqrt {\left (-1+x^2\right ) \left (-1+k^2 x^2\right )}} \] Input:
Integrate[(-1 + Sqrt[k]*x)/((1 + Sqrt[k]*x)*Sqrt[(1 - x^2)*(1 - k^2*x^2)]) ,x]
Output:
(2*Sqrt[-1 + x^2]*Sqrt[-1 + k^2*x^2]*ArcTan[Sqrt[-1 + k^2*x^2]/(Sqrt[k]*Sq rt[-1 + x^2])] + (-1 + k)*Sqrt[1 - x^2]*Sqrt[1 - k^2*x^2]*EllipticF[ArcSin [x], k^2] - 2*(-1 + k)*Sqrt[1 - x^2]*Sqrt[1 - k^2*x^2]*EllipticPi[k, ArcSi n[x], k^2])/((-1 + k)*Sqrt[(-1 + x^2)*(-1 + k^2*x^2)])
Time = 0.58 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.74, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.186, Rules used = {2048, 2279, 27, 1576, 1154, 217, 2212, 216}
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 {\sqrt {k} x-1}{\left (\sqrt {k} x+1\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx\) |
\(\Big \downarrow \) 2048 |
\(\displaystyle \int \frac {\sqrt {k} x-1}{\left (\sqrt {k} x+1\right ) \sqrt {k^2 x^4+\left (-k^2-1\right ) x^2+1}}dx\) |
\(\Big \downarrow \) 2279 |
\(\displaystyle \int \frac {2 \sqrt {k} x}{\left (1-k x^2\right ) \sqrt {k^2 x^4+\left (-k^2-1\right ) x^2+1}}dx+\int \frac {-k x^2-1}{\left (1-k x^2\right ) \sqrt {k^2 x^4+\left (-k^2-1\right ) x^2+1}}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {-k x^2-1}{\left (1-k x^2\right ) \sqrt {k^2 x^4+\left (-k^2-1\right ) x^2+1}}dx+2 \sqrt {k} \int \frac {x}{\left (1-k x^2\right ) \sqrt {k^2 x^4-\left (k^2+1\right ) x^2+1}}dx\) |
\(\Big \downarrow \) 1576 |
\(\displaystyle \int \frac {-k x^2-1}{\left (1-k x^2\right ) \sqrt {k^2 x^4+\left (-k^2-1\right ) x^2+1}}dx+\sqrt {k} \int \frac {1}{\left (1-k x^2\right ) \sqrt {k^2 x^4-\left (k^2+1\right ) x^2+1}}dx^2\) |
\(\Big \downarrow \) 1154 |
\(\displaystyle \int \frac {-k x^2-1}{\left (1-k x^2\right ) \sqrt {k^2 x^4+\left (-k^2-1\right ) x^2+1}}dx-2 \sqrt {k} \int \frac {1}{-x^4-4 (1-k)^2 k}d\frac {(1-k)^2 \left (k x^2+1\right )}{\sqrt {k^2 x^4-\left (k^2+1\right ) x^2+1}}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \int \frac {-k x^2-1}{\left (1-k x^2\right ) \sqrt {k^2 x^4+\left (-k^2-1\right ) x^2+1}}dx+\frac {\arctan \left (\frac {(1-k) \left (k x^2+1\right )}{2 \sqrt {k} \sqrt {k^2 x^4-\left (k^2+1\right ) x^2+1}}\right )}{1-k}\) |
\(\Big \downarrow \) 2212 |
\(\displaystyle \frac {\arctan \left (\frac {(1-k) \left (k x^2+1\right )}{2 \sqrt {k} \sqrt {k^2 x^4-\left (k^2+1\right ) x^2+1}}\right )}{1-k}-\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 \) 216 |
\(\displaystyle \frac {\arctan \left (\frac {(1-k) \left (k x^2+1\right )}{2 \sqrt {k} \sqrt {k^2 x^4-\left (k^2+1\right ) x^2+1}}\right )}{1-k}-\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 + Sqrt[k]*x)/((1 + Sqrt[k]*x)*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)) + ArcTan[ ((1 - k)*(1 + k*x^2))/(2*Sqrt[k]*Sqrt[1 - (1 + k^2)*x^2 + k^2*x^4])]/(1 - k)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
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[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Sym bol] :> Simp[-2 Subst[Int[1/(4*c*d^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, ( 2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c , d, e}, x]
Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^( p_.), x_Symbol] :> Simp[1/2 Subst[Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x] , x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]
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]
Int[(Px_)/(((d_) + (e_.)*(x_))*Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4]), x _Symbol] :> With[{A = Coeff[Px, x, 0], B = Coeff[Px, x, 1], C = Coeff[Px, x , 2], D = Coeff[Px, x, 3]}, Int[(x*(B*d - A*e + (d*D - C*e)*x^2))/((d^2 - e ^2*x^2)*Sqrt[a + b*x^2 + c*x^4]), x] + Int[(A*d + (C*d - B*e)*x^2 - D*e*x^4 )/((d^2 - e^2*x^2)*Sqrt[a + b*x^2 + c*x^4]), x]] /; FreeQ[{a, b, c, d, e}, x] && PolyQ[Px, x] && LeQ[Expon[Px, x], 3] && NeQ[c*d^4 + b*d^2*e^2 + a*e^4 , 0]
Time = 0.88 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.57
method | result | size |
pseudoelliptic | \(-\frac {\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 )}{\sqrt {-\left (-1+k \right )^{2}}}\) | \(85\) |
elliptic | \(\frac {\left (-1+\sqrt {k}\, x \right ) \sqrt {k \left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}\, \left (k \,x^{2}-1\right ) \left (\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}+\frac {\ln \left (\frac {-2 k^{2}+4 k -2+\left (-k^{3}+2 k^{2}-k \right ) \left (x^{2}-\frac {1}{k}\right )+2 \sqrt {-\left (-1+k \right )^{2}}\, \sqrt {k^{3} \left (x^{2}-\frac {1}{k}\right )^{2}+\left (-k^{3}+2 k^{2}-k \right ) \left (x^{2}-\frac {1}{k}\right )-k^{2}+2 k -1}}{x^{2}-\frac {1}{k}}\right )}{\sqrt {-\left (-1+k \right )^{2}}}\right )}{\left (1+\sqrt {k}\, x \right ) \left (\sqrt {k \left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}\, k \,x^{2}-2 k x \sqrt {\left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}+\sqrt {k \left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}\right )}\) | \(264\) |
default | \(\frac {\sqrt {-x^{2}+1}\, \sqrt {-k^{2} x^{2}+1}\, \operatorname {EllipticF}\left (x , k\right )}{\sqrt {k^{2} x^{4}-k^{2} x^{2}-x^{2}+1}}-\frac {2 \sqrt {k \left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}\, \left (k \,x^{2}-1\right ) \left (-\frac {\ln \left (\frac {-2 k^{2}+4 k -2+\left (-k^{3}+2 k^{2}-k \right ) \left (x^{2}-\frac {1}{k}\right )+2 \sqrt {-\left (-1+k \right )^{2}}\, \sqrt {k^{3} \left (x^{2}-\frac {1}{k}\right )^{2}+\left (-k^{3}+2 k^{2}-k \right ) \left (x^{2}-\frac {1}{k}\right )-k^{2}+2 k -1}}{x^{2}-\frac {1}{k}}\right )}{2 \sqrt {-\left (-1+k \right )^{2}}}+\frac {\sqrt {-x^{2}+1}\, \sqrt {-k^{2} x^{2}+1}\, \operatorname {EllipticPi}\left (x , k , k\right )}{\sqrt {k^{2} x^{4}-k^{2} x^{2}-x^{2}+1}}\right )}{\left (1+\sqrt {k}\, x \right ) \left (k x \sqrt {\left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}-\sqrt {k \left (x^{2}-1\right ) \left (k^{2} x^{2}-1\right )}\right )}\) | \(301\) |
Input:
int((-1+k^(1/2)*x)/(1+k^(1/2)*x)/((-x^2+1)*(-k^2*x^2+1))^(1/2),x,method=_R ETURNVERBOSE)
Output:
-(ln(2)+ln(((-(-1+k)^2)^(1/2)*((x^2-1)*(k^2*x^2-1))^(1/2)-2*k^(3/2)*x^2-2* k^(1/2)+(-k^2-2*k-1)*x)/(k*x^2+2*k^(1/2)*x+1)))/(-(-1+k)^2)^(1/2)
Leaf count of result is larger than twice the leaf count of optimal. 100 vs. \(2 (49) = 98\).
Time = 0.25 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.85 \[ \int \frac {-1+\sqrt {k} x}{\left (1+\sqrt {k} x\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\frac {\arctan \left (-\frac {\sqrt {k^{2} x^{4} - {\left (k^{2} + 1\right )} x^{2} + 1} {\left ({\left (k^{3} + k^{2} - k - 1\right )} x - 2 \, {\left ({\left (k^{2} - k\right )} x^{2} + k - 1\right )} \sqrt {k}\right )}}{4 \, k^{3} x^{4} - {\left (k^{4} + 4 \, k^{3} - 2 \, k^{2} + 4 \, k + 1\right )} x^{2} + 4 \, k}\right )}{k - 1} \] Input:
integrate((-1+k^(1/2)*x)/(1+k^(1/2)*x)/((-x^2+1)*(-k^2*x^2+1))^(1/2),x, al gorithm="fricas")
Output:
arctan(-sqrt(k^2*x^4 - (k^2 + 1)*x^2 + 1)*((k^3 + k^2 - k - 1)*x - 2*((k^2 - k)*x^2 + k - 1)*sqrt(k))/(4*k^3*x^4 - (k^4 + 4*k^3 - 2*k^2 + 4*k + 1)*x ^2 + 4*k))/(k - 1)
\[ \int \frac {-1+\sqrt {k} x}{\left (1+\sqrt {k} x\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\int \frac {\sqrt {k} x - 1}{\sqrt {\left (x - 1\right ) \left (x + 1\right ) \left (k x - 1\right ) \left (k x + 1\right )} \left (\sqrt {k} x + 1\right )}\, dx \] Input:
integrate((-1+k**(1/2)*x)/(1+k**(1/2)*x)/((-x**2+1)*(-k**2*x**2+1))**(1/2) ,x)
Output:
Integral((sqrt(k)*x - 1)/(sqrt((x - 1)*(x + 1)*(k*x - 1)*(k*x + 1))*(sqrt( k)*x + 1)), x)
\[ \int \frac {-1+\sqrt {k} x}{\left (1+\sqrt {k} x\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\int { \frac {\sqrt {k} x - 1}{\sqrt {{\left (k^{2} x^{2} - 1\right )} {\left (x^{2} - 1\right )}} {\left (\sqrt {k} x + 1\right )}} \,d x } \] Input:
integrate((-1+k^(1/2)*x)/(1+k^(1/2)*x)/((-x^2+1)*(-k^2*x^2+1))^(1/2),x, al gorithm="maxima")
Output:
integrate((sqrt(k)*x - 1)/(sqrt((k^2*x^2 - 1)*(x^2 - 1))*(sqrt(k)*x + 1)), x)
\[ \int \frac {-1+\sqrt {k} x}{\left (1+\sqrt {k} x\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\int { \frac {\sqrt {k} x - 1}{\sqrt {{\left (k^{2} x^{2} - 1\right )} {\left (x^{2} - 1\right )}} {\left (\sqrt {k} x + 1\right )}} \,d x } \] Input:
integrate((-1+k^(1/2)*x)/(1+k^(1/2)*x)/((-x^2+1)*(-k^2*x^2+1))^(1/2),x, al gorithm="giac")
Output:
integrate((sqrt(k)*x - 1)/(sqrt((k^2*x^2 - 1)*(x^2 - 1))*(sqrt(k)*x + 1)), x)
Timed out. \[ \int \frac {-1+\sqrt {k} x}{\left (1+\sqrt {k} x\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=\int \frac {\sqrt {k}\,x-1}{\left (\sqrt {k}\,x+1\right )\,\sqrt {\left (x^2-1\right )\,\left (k^2\,x^2-1\right )}} \,d x \] Input:
int((k^(1/2)*x - 1)/((k^(1/2)*x + 1)*((x^2 - 1)*(k^2*x^2 - 1))^(1/2)),x)
Output:
int((k^(1/2)*x - 1)/((k^(1/2)*x + 1)*((x^2 - 1)*(k^2*x^2 - 1))^(1/2)), x)
\[ \int \frac {-1+\sqrt {k} x}{\left (1+\sqrt {k} x\right ) \sqrt {\left (1-x^2\right ) \left (1-k^2 x^2\right )}} \, dx=-2 \sqrt {k}\, \left (\int \frac {\sqrt {k^{2} x^{2}-1}\, \sqrt {x^{2}-1}\, x}{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 )+\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((-1+k^(1/2)*x)/(1+k^(1/2)*x)/((-x^2+1)*(-k^2*x^2+1))^(1/2),x)
Output:
- 2*sqrt(k)*int((sqrt(k**2*x**2 - 1)*sqrt(x**2 - 1)*x)/(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) + 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)*sqr t(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)