3.805 \(\int \frac {(2 \sqrt {3-x}+\frac {3}{\sqrt {1+x}})^2}{x} \, dx\)

Optimal. Leaf size=56 \[ -4 x+21 \log (x)-9 \log (x+1)+12 \sin ^{-1}\left (\frac {1-x}{2}\right )-24 \sqrt {3} \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {x+1}}{\sqrt {3-x}}\right ) \]

[Out]

-4*x-12*arcsin(-1/2+1/2*x)+21*ln(x)-9*ln(1+x)-24*arctanh(3^(1/2)*(1+x)^(1/2)/(3-x)^(1/2))*3^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.21, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 10, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.370, Rules used = {6742, 36, 29, 31, 105, 53, 619, 216, 93, 207} \[ -4 x+21 \log (x)-9 \log (x+1)+12 \sin ^{-1}\left (\frac {1-x}{2}\right )-24 \sqrt {3} \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {x+1}}{\sqrt {3-x}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-4*x + 12*ArcSin[(1 - x)/2] - 24*Sqrt[3]*ArcTanh[(Sqrt[3]*Sqrt[1 + x])/Sqrt[3 - x]] + 21*Log[x] - 9*Log[1 + x]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 53

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 93

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 105

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> Dist[b/f, Int[(a
+ b*x)^(m - 1)*(c + d*x)^n, x], x] - Dist[(b*e - a*f)/f, Int[((a + b*x)^(m - 1)*(c + d*x)^n)/(e + f*x), x], x]
 /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[Simplify[m + n + 1], 0] && (GtQ[m, 0] || ( !RationalQ[m] && (Su
mSimplerQ[m, -1] ||  !SumSimplerQ[n, -1])))

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 619

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*((-4*c)/(b^2 - 4*a*c))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rule 6742

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

Rubi steps

\begin {align*} \int \frac {\left (2 \sqrt {3-x}+\frac {3}{\sqrt {1+x}}\right )^2}{x} \, dx &=\int \left (-4+\frac {12}{x}+\frac {9}{x (1+x)}+\frac {12 \sqrt {3-x}}{x \sqrt {1+x}}\right ) \, dx\\ &=-4 x+12 \log (x)+9 \int \frac {1}{x (1+x)} \, dx+12 \int \frac {\sqrt {3-x}}{x \sqrt {1+x}} \, dx\\ &=-4 x+12 \log (x)+9 \int \frac {1}{x} \, dx-9 \int \frac {1}{1+x} \, dx-12 \int \frac {1}{\sqrt {3-x} \sqrt {1+x}} \, dx+36 \int \frac {1}{\sqrt {3-x} x \sqrt {1+x}} \, dx\\ &=-4 x+21 \log (x)-9 \log (1+x)-12 \int \frac {1}{\sqrt {3+2 x-x^2}} \, dx+72 \operatorname {Subst}\left (\int \frac {1}{-1+3 x^2} \, dx,x,\frac {\sqrt {1+x}}{\sqrt {3-x}}\right )\\ &=-4 x-24 \sqrt {3} \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {1+x}}{\sqrt {3-x}}\right )+21 \log (x)-9 \log (1+x)+3 \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{16}}} \, dx,x,2-2 x\right )\\ &=-4 x+12 \sin ^{-1}\left (\frac {1-x}{2}\right )-24 \sqrt {3} \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {1+x}}{\sqrt {3-x}}\right )+21 \log (x)-9 \log (1+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 57, normalized size = 1.02 \[ -4 x+21 \log (x)-9 \log (x+1)+24 \sin ^{-1}\left (\frac {\sqrt {3-x}}{2}\right )-24 \sqrt {3} \tanh ^{-1}\left (\frac {\sqrt {1-\frac {x}{3}}}{\sqrt {x+1}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-4*x + 24*ArcSin[Sqrt[3 - x]/2] - 24*Sqrt[3]*ArcTanh[Sqrt[1 - x/3]/Sqrt[1 + x]] + 21*Log[x] - 9*Log[1 + x]

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 81, normalized size = 1.45 \[ 6 \, \sqrt {3} \log \left (-\frac {\sqrt {3} {\left (x + 3\right )} \sqrt {x + 1} \sqrt {-x + 3} + x^{2} - 6 \, x - 9}{x^{2}}\right ) - 4 \, x + 12 \, \arctan \left (\frac {\sqrt {x + 1} {\left (x - 1\right )} \sqrt {-x + 3}}{x^{2} - 2 \, x - 3}\right ) - 9 \, \log \left (x + 1\right ) + 21 \, \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

6*sqrt(3)*log(-(sqrt(3)*(x + 3)*sqrt(x + 1)*sqrt(-x + 3) + x^2 - 6*x - 9)/x^2) - 4*x + 12*arctan(sqrt(x + 1)*(
x - 1)*sqrt(-x + 3)/(x^2 - 2*x - 3)) - 9*log(x + 1) + 21*log(x)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Warning, choosing root of [1,0,-8,0,%%%{
4,[2]%%%}+%%%{-8,[1]%%%}+%%%{4,[0]%%%}] at parameters values [-91.616423693]Warning, choosing root of [1,0,-8,
0,%%%{4,[2]%%%}+%%%{-8,[1]%%%}+%%%{4,[0]%%%}] at parameters values [-15.8804557086]-9*ln(abs(-x-1))+21*ln(abs(
x))+4*(-x+3)+36*ln(abs(-4*sqrt(3)+6*(2*sqrt(-x+3)/(-2*sqrt(x+1)+4)-1/2*(-2*sqrt(x+1)+4)/sqrt(-x+3)))/abs(4*sqr
t(3)+6*(2*sqrt(-x+3)/(-2*sqrt(x+1)+4)-1/2*(-2*sqrt(x+1)+4)/sqrt(-x+3))))/sqrt(3)-24*(-1/2*pi-atan(sqrt(-x+3)*(
(-1/2*(-2*sqrt(x+1)+4)/sqrt(-x+3))^2-1)/(-2*sqrt(x+1)+4)))

________________________________________________________________________________________

maple [A]  time = 0.02, size = 76, normalized size = 1.36 \[ -4 x +21 \ln \relax (x )-9 \ln \left (x +1\right )+\frac {12 \sqrt {x +1}\, \sqrt {-x +3}\, \left (-\sqrt {3}\, \arctanh \left (\frac {\left (x +3\right ) \sqrt {3}}{3 \sqrt {-x^{2}+2 x +3}}\right )-\arcsin \left (\frac {x}{2}-\frac {1}{2}\right )\right )}{\sqrt {-x^{2}+2 x +3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*x+21*ln(x)+12*(x+1)^(1/2)*(3-x)^(1/2)/(-x^2+2*x+3)^(1/2)*(-arcsin(-1/2+1/2*x)-3^(1/2)*arctanh(1/3*(x+3)*3^(
1/2)/(-x^2+2*x+3)^(1/2)))-9*ln(x+1)

________________________________________________________________________________________

maxima [A]  time = 0.96, size = 57, normalized size = 1.02 \[ -12 \, \sqrt {3} \log \left (\frac {2 \, \sqrt {3} \sqrt {-x^{2} + 2 \, x + 3}}{{\left | x \right |}} + \frac {6}{{\left | x \right |}} + 2\right ) - 4 \, x + 12 \, \arcsin \left (-\frac {1}{2} \, x + \frac {1}{2}\right ) - 9 \, \log \left (x + 1\right ) + 21 \, \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-12*sqrt(3)*log(2*sqrt(3)*sqrt(-x^2 + 2*x + 3)/abs(x) + 6/abs(x) + 2) - 4*x + 12*arcsin(-1/2*x + 1/2) - 9*log(
x + 1) + 21*log(x)

________________________________________________________________________________________

mupad [B]  time = 7.91, size = 158, normalized size = 2.82 \[ 48\,\mathrm {atan}\left (\frac {\sqrt {3-x}-4\,\sqrt {3}+3\,\sqrt {3}\,\sqrt {x+1}}{\sqrt {x+1}-3\,\sqrt {3}\,\sqrt {3-x}+8}\right )-9\,\ln \left (x+1\right )-4\,x+21\,\ln \relax (x)+12\,\sqrt {3}\,\ln \left (\frac {6\,x-12\,\sqrt {x+1}+4\,\sqrt {3}\,\sqrt {3-x}+2\,\sqrt {3}\,\sqrt {x+1}\,\sqrt {3-x}-6}{3\,x+6\,\sqrt {3}\,\sqrt {3-x}-18}\right )-12\,\sqrt {3}\,\ln \left (\frac {\sqrt {x+1}-1}{\sqrt {3}-\sqrt {3-x}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

48*atan(((3 - x)^(1/2) - 4*3^(1/2) + 3*3^(1/2)*(x + 1)^(1/2))/((x + 1)^(1/2) - 3*3^(1/2)*(3 - x)^(1/2) + 8)) -
 9*log(x + 1) - 4*x + 21*log(x) + 12*3^(1/2)*log((6*x - 12*(x + 1)^(1/2) + 4*3^(1/2)*(3 - x)^(1/2) + 2*3^(1/2)
*(x + 1)^(1/2)*(3 - x)^(1/2) - 6)/(3*x + 6*3^(1/2)*(3 - x)^(1/2) - 18)) - 12*3^(1/2)*log(((x + 1)^(1/2) - 1)/(
3^(1/2) - (3 - x)^(1/2)))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (2 \sqrt {3 - x} \sqrt {x + 1} + 3\right )^{2}}{x \left (x + 1\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*(3-x)**(1/2)+3/(1+x)**(1/2))**2/x,x)

[Out]

Integral((2*sqrt(3 - x)*sqrt(x + 1) + 3)**2/(x*(x + 1)), x)

________________________________________________________________________________________