3.1015 \(\int \frac {-\sqrt {-4+x}-4 \sqrt {-1+x}+\sqrt {-4+x} x+\sqrt {-1+x} x}{(1+\sqrt {-4+x}+\sqrt {-1+x}) (4-5 x+x^2)} \, dx\)

Optimal. Leaf size=19 \[ 2 \log \left (\sqrt {x-4}+\sqrt {x-1}+1\right ) \]

[Out]

2*ln(1+(-4+x)^(1/2)+(-1+x)^(1/2))

________________________________________________________________________________________

Rubi [A]  time = 0.56, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 66, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {6688, 1586, 6684} \[ 2 \log \left (\sqrt {x-4}+\sqrt {x-1}+1\right ) \]

Antiderivative was successfully verified.

[In]

Int[(-Sqrt[-4 + x] - 4*Sqrt[-1 + x] + Sqrt[-4 + x]*x + Sqrt[-1 + x]*x)/((1 + Sqrt[-4 + x] + Sqrt[-1 + x])*(4 -
 5*x + x^2)),x]

[Out]

2*Log[1 + Sqrt[-4 + x] + Sqrt[-1 + x]]

Rule 1586

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rule 6684

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*Log[RemoveContent[y, x]], x] /;  !Fa
lseQ[q]]

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rubi steps

\begin {align*} \int \frac {-\sqrt {-4+x}-4 \sqrt {-1+x}+\sqrt {-4+x} x+\sqrt {-1+x} x}{\left (1+\sqrt {-4+x}+\sqrt {-1+x}\right ) \left (4-5 x+x^2\right )} \, dx &=\int \frac {\sqrt {-1+x} \left (-4+\sqrt {-4+x} \sqrt {-1+x}+x\right )}{\left (1+\sqrt {-4+x}+\sqrt {-1+x}\right ) \left (4-5 x+x^2\right )} \, dx\\ &=\int \frac {-4+\sqrt {-4+x} \sqrt {-1+x}+x}{\left (1+\sqrt {-4+x}+\sqrt {-1+x}\right ) (-4+x) \sqrt {-1+x}} \, dx\\ &=2 \log \left (1+\sqrt {-4+x}+\sqrt {-1+x}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 1.38, size = 75, normalized size = 3.95 \[ \frac {1}{2} \log \left (-5 x-4 \sqrt {x-4} \sqrt {x-1}+17\right )+\frac {1}{2} \log \left (-2 x-2 \sqrt {x-4} \sqrt {x-1}+5\right )-\tanh ^{-1}\left (\sqrt {x-4}\right )+\tanh ^{-1}\left (\frac {\sqrt {x-1}}{2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(-Sqrt[-4 + x] - 4*Sqrt[-1 + x] + Sqrt[-4 + x]*x + Sqrt[-1 + x]*x)/((1 + Sqrt[-4 + x] + Sqrt[-1 + x]
)*(4 - 5*x + x^2)),x]

[Out]

-ArcTanh[Sqrt[-4 + x]] + ArcTanh[Sqrt[-1 + x]/2] + Log[17 - 4*Sqrt[-4 + x]*Sqrt[-1 + x] - 5*x]/2 + Log[5 - 2*S
qrt[-4 + x]*Sqrt[-1 + x] - 2*x]/2

________________________________________________________________________________________

fricas [B]  time = 0.97, size = 96, normalized size = 5.05 \[ -\frac {1}{2} \, \log \left (-{\left (4 \, x - 11\right )} \sqrt {x - 1} \sqrt {x - 4} + 4 \, x^{2} - 21 \, x + 23\right ) + \frac {1}{2} \, \log \left (\sqrt {x - 1} \sqrt {x - 4} - x + 7\right ) + \frac {1}{2} \, \log \left (x - 5\right ) + \frac {1}{2} \, \log \left (\sqrt {x - 1} + 2\right ) - \frac {1}{2} \, \log \left (\sqrt {x - 1} - 2\right ) - \frac {1}{2} \, \log \left (\sqrt {x - 4} + 1\right ) + \frac {1}{2} \, \log \left (\sqrt {x - 4} - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-(-4+x)^(1/2)+x*(-4+x)^(1/2)-4*(-1+x)^(1/2)+x*(-1+x)^(1/2))/(x^2-5*x+4)/(1+(-4+x)^(1/2)+(-1+x)^(1/2
)),x, algorithm="fricas")

[Out]

-1/2*log(-(4*x - 11)*sqrt(x - 1)*sqrt(x - 4) + 4*x^2 - 21*x + 23) + 1/2*log(sqrt(x - 1)*sqrt(x - 4) - x + 7) +
 1/2*log(x - 5) + 1/2*log(sqrt(x - 1) + 2) - 1/2*log(sqrt(x - 1) - 2) - 1/2*log(sqrt(x - 4) + 1) + 1/2*log(sqr
t(x - 4) - 1)

________________________________________________________________________________________

giac [B]  time = 0.62, size = 58, normalized size = 3.05 \[ -\log \left (\sqrt {x - 1} - \sqrt {x - 4} + 1\right ) - \log \left (\sqrt {x - 1} - \sqrt {x - 4}\right ) + \log \left (\sqrt {x - 1} + 2\right ) + \log \left ({\left | -\sqrt {x - 1} + \sqrt {x - 4} - 3 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-(-4+x)^(1/2)+x*(-4+x)^(1/2)-4*(-1+x)^(1/2)+x*(-1+x)^(1/2))/(x^2-5*x+4)/(1+(-4+x)^(1/2)+(-1+x)^(1/2
)),x, algorithm="giac")

[Out]

-log(sqrt(x - 1) - sqrt(x - 4) + 1) - log(sqrt(x - 1) - sqrt(x - 4)) + log(sqrt(x - 1) + 2) + log(abs(-sqrt(x
- 1) + sqrt(x - 4) - 3))

________________________________________________________________________________________

maple [B]  time = 0.06, size = 147, normalized size = 7.74 \[ \frac {7 \sqrt {x -4}\, \sqrt {x -1}\, \arctanh \left (\frac {5 x -17}{4 \sqrt {x^{2}-5 x +4}}\right )}{4 \sqrt {x^{2}-5 x +4}}+\frac {\ln \left (x -5\right )}{2}-\frac {\ln \left (-2+\sqrt {x -1}\right )}{2}+\frac {\ln \left (-1+\sqrt {x -4}\right )}{2}-\frac {\ln \left (1+\sqrt {x -4}\right )}{2}+\frac {\ln \left (\sqrt {x -1}+2\right )}{2}+\frac {\sqrt {x -4}\, \sqrt {x -1}\, \left (-5 \arctanh \left (\frac {5 x -17}{4 \sqrt {x^{2}-5 x +4}}\right )+2 \ln \left (x -\frac {5}{2}+\sqrt {x^{2}-5 x +4}\right )\right )}{4 \sqrt {x^{2}-5 x +4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-(x-4)^(1/2)+x*(x-4)^(1/2)-4*(x-1)^(1/2)+x*(x-1)^(1/2))/(x^2-5*x+4)/(1+(x-4)^(1/2)+(x-1)^(1/2)),x)

[Out]

1/2*ln(x-5)+1/2*ln(-1+(x-4)^(1/2))-1/2*ln(1+(x-4)^(1/2))-1/2*ln(-2+(x-1)^(1/2))+1/2*ln((x-1)^(1/2)+2)+7/4*(x-4
)^(1/2)*(x-1)^(1/2)/(x^2-5*x+4)^(1/2)*arctanh(1/4*(-17+5*x)/(x^2-5*x+4)^(1/2))+1/4*(x-4)^(1/2)*(x-1)^(1/2)*(2*
ln(-5/2+x+(x^2-5*x+4)^(1/2))-5*arctanh(1/4*(-17+5*x)/(x^2-5*x+4)^(1/2)))/(x^2-5*x+4)^(1/2)

________________________________________________________________________________________

maxima [B]  time = 0.65, size = 94, normalized size = 4.95 \[ \frac {1}{2} \, \log \left (x - 1\right ) + \frac {1}{2} \, \log \left (\frac {2 \, x^{2} + 2 \, {\left ({\left (x - 1\right )} \sqrt {x - 4} + 2 \, x - 6\right )} \sqrt {x - 1} + 2 \, {\left (2 \, x - 3\right )} \sqrt {x - 4} - 7 \, x + 3}{2 \, {\left ({\left (x - 1\right )} \sqrt {x - 4} + 2 \, x - 6\right )}}\right ) + \frac {1}{2} \, \log \left (\frac {{\left (x - 1\right )} \sqrt {x - 4} + 2 \, x - 6}{x - 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-(-4+x)^(1/2)+x*(-4+x)^(1/2)-4*(-1+x)^(1/2)+x*(-1+x)^(1/2))/(x^2-5*x+4)/(1+(-4+x)^(1/2)+(-1+x)^(1/2
)),x, algorithm="maxima")

[Out]

1/2*log(x - 1) + 1/2*log(1/2*(2*x^2 + 2*((x - 1)*sqrt(x - 4) + 2*x - 6)*sqrt(x - 1) + 2*(2*x - 3)*sqrt(x - 4)
- 7*x + 3)/((x - 1)*sqrt(x - 4) + 2*x - 6)) + 1/2*log(((x - 1)*sqrt(x - 4) + 2*x - 6)/(x - 1))

________________________________________________________________________________________

mupad [B]  time = 6.10, size = 132, normalized size = 6.95 \[ \frac {\ln \left (x-5\right )}{2}+2\,\mathrm {atanh}\left (\frac {\sqrt {x-1}-\sqrt {3}}{\sqrt {x-4}}\right )+\frac {7\,\mathrm {atanh}\left (\frac {4\,\left (\sqrt {x-1}-\sqrt {3}\right )}{\left (\frac {{\left (\sqrt {x-1}-\sqrt {3}\right )}^2}{x-4}+1\right )\,\sqrt {x-4}}\right )}{2}-\frac {5\,\mathrm {atanh}\left (\frac {194400\,\left (\sqrt {x-1}-\sqrt {3}\right )}{\left (\frac {48600\,{\left (\sqrt {x-1}-\sqrt {3}\right )}^2}{x-4}+48600\right )\,\sqrt {x-4}}\right )}{2}-\mathrm {atanh}\left (\sqrt {x-4}\right )+\mathrm {atanh}\left (\frac {\sqrt {x-1}}{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(x - 1)^(1/2) + x*(x - 4)^(1/2) - 4*(x - 1)^(1/2) - (x - 4)^(1/2))/((x^2 - 5*x + 4)*((x - 1)^(1/2) + (x
 - 4)^(1/2) + 1)),x)

[Out]

log(x - 5)/2 + 2*atanh(((x - 1)^(1/2) - 3^(1/2))/(x - 4)^(1/2)) + (7*atanh((4*((x - 1)^(1/2) - 3^(1/2)))/((((x
 - 1)^(1/2) - 3^(1/2))^2/(x - 4) + 1)*(x - 4)^(1/2))))/2 - (5*atanh((194400*((x - 1)^(1/2) - 3^(1/2)))/(((4860
0*((x - 1)^(1/2) - 3^(1/2))^2)/(x - 4) + 48600)*(x - 4)^(1/2))))/2 - atanh((x - 4)^(1/2)) + atanh((x - 1)^(1/2
)/2)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-(-4+x)**(1/2)+x*(-4+x)**(1/2)-4*(-1+x)**(1/2)+x*(-1+x)**(1/2))/(x**2-5*x+4)/(1+(-4+x)**(1/2)+(-1+x
)**(1/2)),x)

[Out]

Timed out

________________________________________________________________________________________