Integrand size = 58, antiderivative size = 55 \[ \int \frac {1-2 x+k^2 x^2}{\left (-1+2 x-2 x^2+k^2 x^2\right ) \sqrt {x-x^2-k^2 x^2+k^2 x^3}} \, dx=\frac {2 \arctan \left (\frac {\sqrt {-2+k^2} \sqrt {x+\left (-1-k^2\right ) x^2+k^2 x^3}}{-1+k^2 x}\right )}{\sqrt {-2+k^2}} \] Output:
2*arctan((k^2-2)^(1/2)*(x+(-k^2-1)*x^2+k^2*x^3)^(1/2)/(k^2*x-1))/(k^2-2)^( 1/2)
Time = 0.01 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.76 \[ \int \frac {1-2 x+k^2 x^2}{\left (-1+2 x-2 x^2+k^2 x^2\right ) \sqrt {x-x^2-k^2 x^2+k^2 x^3}} \, dx=\frac {2 \arctan \left (\frac {\sqrt {-2+k^2} (-1+x) x}{\sqrt {(-1+x) x \left (-1+k^2 x\right )}}\right )}{\sqrt {-2+k^2}} \] Input:
Integrate[(1 - 2*x + k^2*x^2)/((-1 + 2*x - 2*x^2 + k^2*x^2)*Sqrt[x - x^2 - k^2*x^2 + k^2*x^3]),x]
Output:
(2*ArcTan[(Sqrt[-2 + k^2]*(-1 + x)*x)/Sqrt[(-1 + x)*x*(-1 + k^2*x)]])/Sqrt [-2 + k^2]
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 3.49 (sec) , antiderivative size = 1277, normalized size of antiderivative = 23.22, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {6, 6, 2467, 25, 2035, 7279, 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 \frac {k^2 x^2-2 x+1}{\left (k^2 x^2-2 x^2+2 x-1\right ) \sqrt {k^2 x^3-k^2 x^2-x^2+x}} \, dx\) |
\(\Big \downarrow \) 6 |
\(\displaystyle \int \frac {k^2 x^2-2 x+1}{\left (\left (k^2-2\right ) x^2+2 x-1\right ) \sqrt {k^2 x^3-k^2 x^2-x^2+x}}dx\) |
\(\Big \downarrow \) 6 |
\(\displaystyle \int \frac {k^2 x^2-2 x+1}{\left (\left (k^2-2\right ) x^2+2 x-1\right ) \sqrt {k^2 x^3+\left (-k^2-1\right ) x^2+x}}dx\) |
\(\Big \downarrow \) 2467 |
\(\displaystyle \frac {\sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \int -\frac {k^2 x^2-2 x+1}{\sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \left (\left (2-k^2\right ) x^2-2 x+1\right )}dx}{\sqrt {k^2 x^3-\left (k^2+1\right ) x^2+x}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \int \frac {k^2 x^2-2 x+1}{\sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \left (\left (2-k^2\right ) x^2-2 x+1\right )}dx}{\sqrt {k^2 x^3-\left (k^2+1\right ) x^2+x}}\) |
\(\Big \downarrow \) 2035 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \int \frac {k^2 x^2-2 x+1}{\sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \left (\left (2-k^2\right ) x^2-2 x+1\right )}d\sqrt {x}}{\sqrt {k^2 x^3-\left (k^2+1\right ) x^2+x}}\) |
\(\Big \downarrow \) 7279 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \int \left (\frac {k^2}{\left (2-k^2\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}+\frac {2 \left (k^2-1\right ) (1-2 x)}{\left (k^2-2\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \left (\left (2-k^2\right ) x^2-2 x+1\right )}\right )d\sqrt {x}}{\sqrt {k^2 x^3-\left (k^2+1\right ) x^2+x}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \left (\frac {(k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right ) k^{3/2}}{2 \left (2-k^2\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}+\frac {\left (1-k^2\right ) \left (2-\frac {k^2}{\sqrt {k^2-1}}\right ) (k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right ) \sqrt {k}}{2 \left (2-k^2\right ) \left (-k^2-\sqrt {k^2-1} k+k+2\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}+\frac {\left (1-k^2\right ) \left (\frac {k^2}{\sqrt {k^2-1}}+2\right ) (k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticF}\left (2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right ) \sqrt {k}}{2 \left (2-k^2\right ) \left (-k^2+\sqrt {k^2-1} k+k+2\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}+\frac {\sqrt {\frac {1-k^2}{2-k^2}} \left (k^2+2 \sqrt {k^2-1}\right ) \text {arctanh}\left (\frac {\sqrt {\frac {1-k^2}{2-k^2}} \sqrt {-3 k^2-\sqrt {k^2-1} \left (k^2+2\right )+2} \sqrt {x}}{\sqrt {\sqrt {k^2-1}+1} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}\right )}{2 \sqrt {k^2-1} \sqrt {\sqrt {k^2-1}+1} \sqrt {-3 k^2-\sqrt {k^2-1} \left (k^2+2\right )+2}}-\frac {\sqrt {\frac {1-k^2}{2-k^2}} \left (k^2-2 \sqrt {k^2-1}\right ) \text {arctanh}\left (\frac {\sqrt {\frac {1-k^2}{2-k^2}} \sqrt {-3 k^2+\sqrt {k^2-1} \left (k^2+2\right )+2} \sqrt {x}}{\sqrt {1-\sqrt {k^2-1}} \sqrt {k^2 x^2-\left (k^2+1\right ) x+1}}\right )}{2 \sqrt {k^2-1} \sqrt {1-\sqrt {k^2-1}} \sqrt {-3 k^2+\sqrt {k^2-1} \left (k^2+2\right )+2}}-\frac {\sqrt {k^2-1} \left (k^2+2 \sqrt {k^2-1}\right ) \left (-k^2-\sqrt {k^2-1} k-k+2\right ) (k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticPi}\left (\frac {\left (-k^2+\sqrt {k^2-1} k+k+2\right )^2}{4 k \left (2-k^2\right ) \left (\sqrt {k^2-1}+1\right )},2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right )}{4 \left (2-k^2\right ) \left (\sqrt {k^2-1}+1\right ) \left (-k^2+\sqrt {k^2-1} k+k+2\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \sqrt {k}}+\frac {\sqrt {k^2-1} \left (k^2-2 \sqrt {k^2-1}\right ) \left (-k^2-\left (1-\sqrt {k^2-1}\right ) k+2\right ) (k x+1) \sqrt {\frac {k^2 x^2-\left (k^2+1\right ) x+1}{(k x+1)^2}} \operatorname {EllipticPi}\left (\frac {\left (-k^2+\left (1-\sqrt {k^2-1}\right ) k+2\right )^2}{4 k \left (2-k^2\right ) \left (1-\sqrt {k^2-1}\right )},2 \arctan \left (\sqrt {k} \sqrt {x}\right ),\frac {(k+1)^2}{4 k}\right )}{4 \left (2-k^2\right ) \left (1-\sqrt {k^2-1}\right ) \left (-k^2+\left (1-\sqrt {k^2-1}\right ) k+2\right ) \sqrt {k^2 x^2-\left (k^2+1\right ) x+1} \sqrt {k}}\right )}{\sqrt {k^2 x^3-\left (k^2+1\right ) x^2+x}}\) |
Input:
Int[(1 - 2*x + k^2*x^2)/((-1 + 2*x - 2*x^2 + k^2*x^2)*Sqrt[x - x^2 - k^2*x ^2 + k^2*x^3]),x]
Output:
(-2*Sqrt[x]*Sqrt[1 - (1 + k^2)*x + k^2*x^2]*((Sqrt[(1 - k^2)/(2 - k^2)]*(k ^2 + 2*Sqrt[-1 + k^2])*ArcTanh[(Sqrt[(1 - k^2)/(2 - k^2)]*Sqrt[2 - 3*k^2 - Sqrt[-1 + k^2]*(2 + k^2)]*Sqrt[x])/(Sqrt[1 + Sqrt[-1 + k^2]]*Sqrt[1 - (1 + k^2)*x + k^2*x^2])])/(2*Sqrt[-1 + k^2]*Sqrt[1 + Sqrt[-1 + k^2]]*Sqrt[2 - 3*k^2 - Sqrt[-1 + k^2]*(2 + k^2)]) - (Sqrt[(1 - k^2)/(2 - k^2)]*(k^2 - 2* Sqrt[-1 + k^2])*ArcTanh[(Sqrt[(1 - k^2)/(2 - k^2)]*Sqrt[2 - 3*k^2 + Sqrt[- 1 + k^2]*(2 + k^2)]*Sqrt[x])/(Sqrt[1 - Sqrt[-1 + k^2]]*Sqrt[1 - (1 + k^2)* x + k^2*x^2])])/(2*Sqrt[-1 + k^2]*Sqrt[1 - Sqrt[-1 + k^2]]*Sqrt[2 - 3*k^2 + Sqrt[-1 + k^2]*(2 + k^2)]) + (k^(3/2)*(1 + k*x)*Sqrt[(1 - (1 + k^2)*x + k^2*x^2)/(1 + k*x)^2]*EllipticF[2*ArcTan[Sqrt[k]*Sqrt[x]], (1 + k)^2/(4*k) ])/(2*(2 - k^2)*Sqrt[1 - (1 + k^2)*x + k^2*x^2]) + (Sqrt[k]*(1 - k^2)*(2 - k^2/Sqrt[-1 + k^2])*(1 + k*x)*Sqrt[(1 - (1 + k^2)*x + k^2*x^2)/(1 + k*x)^ 2]*EllipticF[2*ArcTan[Sqrt[k]*Sqrt[x]], (1 + k)^2/(4*k)])/(2*(2 - k^2)*(2 + k - k^2 - k*Sqrt[-1 + k^2])*Sqrt[1 - (1 + k^2)*x + k^2*x^2]) + (Sqrt[k]* (1 - k^2)*(2 + k^2/Sqrt[-1 + k^2])*(1 + k*x)*Sqrt[(1 - (1 + k^2)*x + k^2*x ^2)/(1 + k*x)^2]*EllipticF[2*ArcTan[Sqrt[k]*Sqrt[x]], (1 + k)^2/(4*k)])/(2 *(2 - k^2)*(2 + k - k^2 + k*Sqrt[-1 + k^2])*Sqrt[1 - (1 + k^2)*x + k^2*x^2 ]) - (Sqrt[-1 + k^2]*(k^2 + 2*Sqrt[-1 + k^2])*(2 - k - k^2 - k*Sqrt[-1 + k ^2])*(1 + k*x)*Sqrt[(1 - (1 + k^2)*x + k^2*x^2)/(1 + k*x)^2]*EllipticPi[(2 + k - k^2 + k*Sqrt[-1 + k^2])^2/(4*k*(2 - k^2)*(1 + Sqrt[-1 + k^2])), ...
Int[(u_.)*((v_.) + (a_.)*(Fx_) + (b_.)*(Fx_))^(p_.), x_Symbol] :> Int[u*(v + (a + b)*Fx)^p, x] /; FreeQ[{a, b}, x] && !FreeQ[Fx, x]
Int[(Fx_)*(x_)^(m_), x_Symbol] :> With[{k = Denominator[m]}, Simp[k Subst [Int[x^(k*(m + 1) - 1)*SubstPower[Fx, x, k], x], x, x^(1/k)], x]] /; Fracti onQ[m] && AlgebraicFunctionQ[Fx, x]
Int[(Fx_.)*(Px_)^(p_), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Simp[Px^F racPart[p]/(x^(r*FracPart[p])*ExpandToSum[Px/x^r, x]^FracPart[p]) Int[x^( p*r)*ExpandToSum[Px/x^r, x]^p*Fx, x], x] /; IGtQ[r, 0]] /; FreeQ[p, x] && P olyQ[Px, x] && !IntegerQ[p] && !MonomialQ[Px, x] && !PolyQ[Fx, x]
Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[ {v = RationalFunctionExpand[u/(a + b*x^n + c*x^(2*n)), x]}, Int[v, x] /; Su mQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]
Result contains higher order function than in optimal. Order 4 vs. order 3.
Time = 0.93 (sec) , antiderivative size = 2705, normalized size of antiderivative = 49.18
method | result | size |
default | \(\text {Expression too large to display}\) | \(2705\) |
elliptic | \(\text {Expression too large to display}\) | \(2727\) |
Input:
int((k^2*x^2-2*x+1)/(k^2*x^2-2*x^2+2*x-1)/(k^2*x^3-k^2*x^2-x^2+x)^(1/2),x, method=_RETURNVERBOSE)
Output:
-2/(k^2-2)*(-(x-1/k^2)*k^2)^(1/2)*((-1+x)/(1/k^2-1))^(1/2)*(k^2*x)^(1/2)/( k^2*x^3-k^2*x^2-x^2+x)^(1/2)*EllipticF((-(x-1/k^2)*k^2)^(1/2),(1/k^2/(1/k^ 2-1))^(1/2))-2/(k^2-2)*(4/(-2*k^2/(k^2-2)+2/(k^2-2)*k^2*(k^2-1)^(1/2)+4/(k ^2-2)-4/(k^2-2)*(k^2-1)^(1/2)+2)*(-k^2*x+1)^(1/2)*(-1/(1/k^2-1)+1/(1/k^2-1 )*x)^(1/2)*(k^2*x)^(1/2)/(k^2*x^3-k^2*x^2-x^2+x)^(1/2)/(1/k^2+1/(k^2-2)-1/ (k^2-2)*(k^2-1)^(1/2))*EllipticPi((-(x-1/k^2)*k^2)^(1/2),1/k^2/(1/k^2-(-1+ (k^2-1)^(1/2))/(k^2-2)),(1/k^2/(1/k^2-1))^(1/2))/(k^2-2)-4/(-2*k^2/(k^2-2) +2/(k^2-2)*k^2*(k^2-1)^(1/2)+4/(k^2-2)-4/(k^2-2)*(k^2-1)^(1/2)+2)/k^2*(-k^ 2*x+1)^(1/2)*(-1/(1/k^2-1)+1/(1/k^2-1)*x)^(1/2)*(k^2*x)^(1/2)/(k^2*x^3-k^2 *x^2-x^2+x)^(1/2)/(1/k^2+1/(k^2-2)-1/(k^2-2)*(k^2-1)^(1/2))*EllipticPi((-( x-1/k^2)*k^2)^(1/2),1/k^2/(1/k^2-(-1+(k^2-1)^(1/2))/(k^2-2)),(1/k^2/(1/k^2 -1))^(1/2))/(k^2-2)-4/(-2*k^2/(k^2-2)+2/(k^2-2)*k^2*(k^2-1)^(1/2)+4/(k^2-2 )-4/(k^2-2)*(k^2-1)^(1/2)+2)*(-k^2*x+1)^(1/2)*(-1/(1/k^2-1)+1/(1/k^2-1)*x) ^(1/2)*(k^2*x)^(1/2)/(k^2*x^3-k^2*x^2-x^2+x)^(1/2)/(1/k^2+1/(k^2-2)-1/(k^2 -2)*(k^2-1)^(1/2))*EllipticPi((-(x-1/k^2)*k^2)^(1/2),1/k^2/(1/k^2-(-1+(k^2 -1)^(1/2))/(k^2-2)),(1/k^2/(1/k^2-1))^(1/2))/(k^2-2)*(k^2-1)^(1/2)+4/(-2*k ^2/(k^2-2)+2/(k^2-2)*k^2*(k^2-1)^(1/2)+4/(k^2-2)-4/(k^2-2)*(k^2-1)^(1/2)+2 )/k^2*(-k^2*x+1)^(1/2)*(-1/(1/k^2-1)+1/(1/k^2-1)*x)^(1/2)*(k^2*x)^(1/2)/(k ^2*x^3-k^2*x^2-x^2+x)^(1/2)/(1/k^2+1/(k^2-2)-1/(k^2-2)*(k^2-1)^(1/2))*Elli pticPi((-(x-1/k^2)*k^2)^(1/2),1/k^2/(1/k^2-(-1+(k^2-1)^(1/2))/(k^2-2)),...
Time = 0.13 (sec) , antiderivative size = 269, normalized size of antiderivative = 4.89 \[ \int \frac {1-2 x+k^2 x^2}{\left (-1+2 x-2 x^2+k^2 x^2\right ) \sqrt {x-x^2-k^2 x^2+k^2 x^3}} \, dx=\left [-\frac {\sqrt {-k^{2} + 2} \log \left (\frac {{\left (k^{4} - 4 \, k^{2} + 4\right )} x^{4} - 4 \, {\left (2 \, k^{4} - 5 \, k^{2} + 2\right )} x^{3} + 2 \, {\left (4 \, k^{4} - 5 \, k^{2} - 4\right )} x^{2} - 4 \, \sqrt {k^{2} x^{3} - {\left (k^{2} + 1\right )} x^{2} + x} {\left ({\left (k^{2} - 2\right )} x^{2} - 2 \, {\left (k^{2} - 1\right )} x + 1\right )} \sqrt {-k^{2} + 2} - 4 \, {\left (2 \, k^{2} - 3\right )} x + 1}{{\left (k^{4} - 4 \, k^{2} + 4\right )} x^{4} + 4 \, {\left (k^{2} - 2\right )} x^{3} - 2 \, {\left (k^{2} - 4\right )} x^{2} - 4 \, x + 1}\right )}{2 \, {\left (k^{2} - 2\right )}}, \frac {\arctan \left (\frac {\sqrt {k^{2} x^{3} - {\left (k^{2} + 1\right )} x^{2} + x} {\left ({\left (k^{2} - 2\right )} x^{2} - 2 \, {\left (k^{2} - 1\right )} x + 1\right )} \sqrt {k^{2} - 2}}{2 \, {\left ({\left (k^{4} - 2 \, k^{2}\right )} x^{3} - {\left (k^{4} - k^{2} - 2\right )} x^{2} + {\left (k^{2} - 2\right )} x\right )}}\right )}{\sqrt {k^{2} - 2}}\right ] \] Input:
integrate((k^2*x^2-2*x+1)/(k^2*x^2-2*x^2+2*x-1)/(k^2*x^3-k^2*x^2-x^2+x)^(1 /2),x, algorithm="fricas")
Output:
[-1/2*sqrt(-k^2 + 2)*log(((k^4 - 4*k^2 + 4)*x^4 - 4*(2*k^4 - 5*k^2 + 2)*x^ 3 + 2*(4*k^4 - 5*k^2 - 4)*x^2 - 4*sqrt(k^2*x^3 - (k^2 + 1)*x^2 + x)*((k^2 - 2)*x^2 - 2*(k^2 - 1)*x + 1)*sqrt(-k^2 + 2) - 4*(2*k^2 - 3)*x + 1)/((k^4 - 4*k^2 + 4)*x^4 + 4*(k^2 - 2)*x^3 - 2*(k^2 - 4)*x^2 - 4*x + 1))/(k^2 - 2) , arctan(1/2*sqrt(k^2*x^3 - (k^2 + 1)*x^2 + x)*((k^2 - 2)*x^2 - 2*(k^2 - 1 )*x + 1)*sqrt(k^2 - 2)/((k^4 - 2*k^2)*x^3 - (k^4 - k^2 - 2)*x^2 + (k^2 - 2 )*x))/sqrt(k^2 - 2)]
\[ \int \frac {1-2 x+k^2 x^2}{\left (-1+2 x-2 x^2+k^2 x^2\right ) \sqrt {x-x^2-k^2 x^2+k^2 x^3}} \, dx=\int \frac {k^{2} x^{2} - 2 x + 1}{\sqrt {x \left (x - 1\right ) \left (k^{2} x - 1\right )} \left (k^{2} x^{2} - 2 x^{2} + 2 x - 1\right )}\, dx \] Input:
integrate((k**2*x**2-2*x+1)/(k**2*x**2-2*x**2+2*x-1)/(k**2*x**3-k**2*x**2- x**2+x)**(1/2),x)
Output:
Integral((k**2*x**2 - 2*x + 1)/(sqrt(x*(x - 1)*(k**2*x - 1))*(k**2*x**2 - 2*x**2 + 2*x - 1)), x)
Exception generated. \[ \int \frac {1-2 x+k^2 x^2}{\left (-1+2 x-2 x^2+k^2 x^2\right ) \sqrt {x-x^2-k^2 x^2+k^2 x^3}} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((k^2*x^2-2*x+1)/(k^2*x^2-2*x^2+2*x-1)/(k^2*x^3-k^2*x^2-x^2+x)^(1 /2),x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(k-1>0)', see `assume?` for more details)Is
\[ \int \frac {1-2 x+k^2 x^2}{\left (-1+2 x-2 x^2+k^2 x^2\right ) \sqrt {x-x^2-k^2 x^2+k^2 x^3}} \, dx=\int { \frac {k^{2} x^{2} - 2 \, x + 1}{\sqrt {k^{2} x^{3} - k^{2} x^{2} - x^{2} + x} {\left (k^{2} x^{2} - 2 \, x^{2} + 2 \, x - 1\right )}} \,d x } \] Input:
integrate((k^2*x^2-2*x+1)/(k^2*x^2-2*x^2+2*x-1)/(k^2*x^3-k^2*x^2-x^2+x)^(1 /2),x, algorithm="giac")
Output:
integrate((k^2*x^2 - 2*x + 1)/(sqrt(k^2*x^3 - k^2*x^2 - x^2 + x)*(k^2*x^2 - 2*x^2 + 2*x - 1)), x)
Time = 9.32 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.53 \[ \int \frac {1-2 x+k^2 x^2}{\left (-1+2 x-2 x^2+k^2 x^2\right ) \sqrt {x-x^2-k^2 x^2+k^2 x^3}} \, dx=\frac {\ln \left (\frac {x\,2{}\mathrm {i}+k^2\,x^2\,1{}\mathrm {i}-k^2\,x\,2{}\mathrm {i}-x^2\,2{}\mathrm {i}-2\,\sqrt {k^2-2}\,\sqrt {x\,\left (k^2\,x-1\right )\,\left (x-1\right )}+1{}\mathrm {i}}{2\,k^2\,x^2-4\,x^2+4\,x-2}\right )\,1{}\mathrm {i}}{\sqrt {k^2-2}} \] Input:
int((k^2*x^2 - 2*x + 1)/((x - k^2*x^2 + k^2*x^3 - x^2)^(1/2)*(2*x + k^2*x^ 2 - 2*x^2 - 1)),x)
Output:
(log((x*2i + k^2*x^2*1i - k^2*x*2i - x^2*2i - 2*(k^2 - 2)^(1/2)*(x*(k^2*x - 1)*(x - 1))^(1/2) + 1i)/(4*x + 2*k^2*x^2 - 4*x^2 - 2))*1i)/(k^2 - 2)^(1/ 2)
\[ \int \frac {1-2 x+k^2 x^2}{\left (-1+2 x-2 x^2+k^2 x^2\right ) \sqrt {x-x^2-k^2 x^2+k^2 x^3}} \, dx=\left (\int \frac {\sqrt {x}\, \sqrt {x -1}\, \sqrt {k^{2} x -1}\, x}{k^{4} x^{4}-k^{4} x^{3}-2 k^{2} x^{4}+3 k^{2} x^{3}-2 k^{2} x^{2}+k^{2} x +2 x^{3}-4 x^{2}+3 x -1}d x \right ) k^{2}+\int \frac {\sqrt {x}\, \sqrt {x -1}\, \sqrt {k^{2} x -1}}{k^{4} x^{5}-k^{4} x^{4}-2 k^{2} x^{5}+3 k^{2} x^{4}-2 k^{2} x^{3}+k^{2} x^{2}+2 x^{4}-4 x^{3}+3 x^{2}-x}d x -2 \left (\int \frac {\sqrt {x}\, \sqrt {x -1}\, \sqrt {k^{2} x -1}}{k^{4} x^{4}-k^{4} x^{3}-2 k^{2} x^{4}+3 k^{2} x^{3}-2 k^{2} x^{2}+k^{2} x +2 x^{3}-4 x^{2}+3 x -1}d x \right ) \] Input:
int((k^2*x^2-2*x+1)/(k^2*x^2-2*x^2+2*x-1)/(k^2*x^3-k^2*x^2-x^2+x)^(1/2),x)
Output:
int((sqrt(x)*sqrt(x - 1)*sqrt(k**2*x - 1)*x)/(k**4*x**4 - k**4*x**3 - 2*k* *2*x**4 + 3*k**2*x**3 - 2*k**2*x**2 + k**2*x + 2*x**3 - 4*x**2 + 3*x - 1), x)*k**2 + int((sqrt(x)*sqrt(x - 1)*sqrt(k**2*x - 1))/(k**4*x**5 - k**4*x** 4 - 2*k**2*x**5 + 3*k**2*x**4 - 2*k**2*x**3 + k**2*x**2 + 2*x**4 - 4*x**3 + 3*x**2 - x),x) - 2*int((sqrt(x)*sqrt(x - 1)*sqrt(k**2*x - 1))/(k**4*x**4 - k**4*x**3 - 2*k**2*x**4 + 3*k**2*x**3 - 2*k**2*x**2 + k**2*x + 2*x**3 - 4*x**2 + 3*x - 1),x)