3.5.33 \(\int \frac {x^2}{(\sqrt {a+b x}+\sqrt {a+c x})^2} \, dx\) [433]

Optimal. Leaf size=142 \[ \frac {2 a x}{(b-c)^2}+\frac {(b+c) x^2}{2 (b-c)^2}-\frac {a \sqrt {a+b x} \sqrt {a+c x}}{2 b (b-c) c}-\frac {(a+b x)^{3/2} \sqrt {a+c x}}{b (b-c)^2}+\frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {b} \sqrt {a+c x}}\right )}{2 b^{3/2} c^{3/2}} \]

[Out]

2*a*x/(b-c)^2+1/2*(b+c)*x^2/(b-c)^2+1/2*a^2*arctanh(c^(1/2)*(b*x+a)^(1/2)/b^(1/2)/(c*x+a)^(1/2))/b^(3/2)/c^(3/
2)-(b*x+a)^(3/2)*(c*x+a)^(1/2)/b/(b-c)^2-1/2*a*(b*x+a)^(1/2)*(c*x+a)^(1/2)/b/(b-c)/c

________________________________________________________________________________________

Rubi [A]
time = 0.17, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {6822, 52, 65, 223, 212} \begin {gather*} \frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {b} \sqrt {a+c x}}\right )}{2 b^{3/2} c^{3/2}}+\frac {2 a x}{(b-c)^2}-\frac {a \sqrt {a+b x} \sqrt {a+c x}}{2 b c (b-c)}-\frac {(a+b x)^{3/2} \sqrt {a+c x}}{b (b-c)^2}+\frac {x^2 (b+c)}{2 (b-c)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2/(Sqrt[a + b*x] + Sqrt[a + c*x])^2,x]

[Out]

(2*a*x)/(b - c)^2 + ((b + c)*x^2)/(2*(b - c)^2) - (a*Sqrt[a + b*x]*Sqrt[a + c*x])/(2*b*(b - c)*c) - ((a + b*x)
^(3/2)*Sqrt[a + c*x])/(b*(b - c)^2) + (a^2*ArcTanh[(Sqrt[c]*Sqrt[a + b*x])/(Sqrt[b]*Sqrt[a + c*x])])/(2*b^(3/2
)*c^(3/2))

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 212

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

Rule 223

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

Rule 6822

Int[(u_.)*((e_.)*Sqrt[(a_.) + (b_.)*(x_)^(n_.)] + (f_.)*Sqrt[(c_.) + (d_.)*(x_)^(n_.)])^(m_), x_Symbol] :> Dis
t[(b*e^2 - d*f^2)^m, Int[ExpandIntegrand[(u*x^(m*n))/(e*Sqrt[a + b*x^n] - f*Sqrt[c + d*x^n])^m, x], x], x] /;
FreeQ[{a, b, c, d, e, f, n}, x] && ILtQ[m, 0] && EqQ[a*e^2 - c*f^2, 0]

Rubi steps

\begin {align*} \int \frac {x^2}{\left (\sqrt {a+b x}+\sqrt {a+c x}\right )^2} \, dx &=\frac {\int \left (2 a+b \left (1+\frac {c}{b}\right ) x-2 \sqrt {a+b x} \sqrt {a+c x}\right ) \, dx}{(b-c)^2}\\ &=\frac {2 a x}{(b-c)^2}+\frac {(b+c) x^2}{2 (b-c)^2}-\frac {2 \int \sqrt {a+b x} \sqrt {a+c x} \, dx}{(b-c)^2}\\ &=\frac {2 a x}{(b-c)^2}+\frac {(b+c) x^2}{2 (b-c)^2}-\frac {(a+b x)^{3/2} \sqrt {a+c x}}{b (b-c)^2}-\frac {a \int \frac {\sqrt {a+b x}}{\sqrt {a+c x}} \, dx}{2 b (b-c)}\\ &=\frac {2 a x}{(b-c)^2}+\frac {(b+c) x^2}{2 (b-c)^2}-\frac {a \sqrt {a+b x} \sqrt {a+c x}}{2 b (b-c) c}-\frac {(a+b x)^{3/2} \sqrt {a+c x}}{b (b-c)^2}+\frac {a^2 \int \frac {1}{\sqrt {a+b x} \sqrt {a+c x}} \, dx}{4 b c}\\ &=\frac {2 a x}{(b-c)^2}+\frac {(b+c) x^2}{2 (b-c)^2}-\frac {a \sqrt {a+b x} \sqrt {a+c x}}{2 b (b-c) c}-\frac {(a+b x)^{3/2} \sqrt {a+c x}}{b (b-c)^2}+\frac {a^2 \text {Subst}\left (\int \frac {1}{\sqrt {a-\frac {a c}{b}+\frac {c x^2}{b}}} \, dx,x,\sqrt {a+b x}\right )}{2 b^2 c}\\ &=\frac {2 a x}{(b-c)^2}+\frac {(b+c) x^2}{2 (b-c)^2}-\frac {a \sqrt {a+b x} \sqrt {a+c x}}{2 b (b-c) c}-\frac {(a+b x)^{3/2} \sqrt {a+c x}}{b (b-c)^2}+\frac {a^2 \text {Subst}\left (\int \frac {1}{1-\frac {c x^2}{b}} \, dx,x,\frac {\sqrt {a+b x}}{\sqrt {a+c x}}\right )}{2 b^2 c}\\ &=\frac {2 a x}{(b-c)^2}+\frac {(b+c) x^2}{2 (b-c)^2}-\frac {a \sqrt {a+b x} \sqrt {a+c x}}{2 b (b-c) c}-\frac {(a+b x)^{3/2} \sqrt {a+c x}}{b (b-c)^2}+\frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {b} \sqrt {a+c x}}\right )}{2 b^{3/2} c^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.67, size = 161, normalized size = 1.13 \begin {gather*} \frac {\frac {b \left (-a^2 b (b-3 c)+b c^2 x \left (b x+c x-2 \sqrt {a+b x} \sqrt {a+c x}\right )-a c \left (-4 b c x+b \sqrt {a+b x} \sqrt {a+c x}+c \sqrt {a+b x} \sqrt {a+c x}\right )\right )}{(b-c)^2}-a^2 \sqrt {\frac {b}{c}} c \log \left (\sqrt {a+b x}-\sqrt {\frac {b}{c}} \sqrt {a+c x}\right )}{2 b^2 c^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2/(Sqrt[a + b*x] + Sqrt[a + c*x])^2,x]

[Out]

((b*(-(a^2*b*(b - 3*c)) + b*c^2*x*(b*x + c*x - 2*Sqrt[a + b*x]*Sqrt[a + c*x]) - a*c*(-4*b*c*x + b*Sqrt[a + b*x
]*Sqrt[a + c*x] + c*Sqrt[a + b*x]*Sqrt[a + c*x])))/(b - c)^2 - a^2*Sqrt[b/c]*c*Log[Sqrt[a + b*x] - Sqrt[b/c]*S
qrt[a + c*x]])/(2*b^2*c^2)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(384\) vs. \(2(116)=232\).
time = 0.01, size = 385, normalized size = 2.71

method result size
default \(\frac {x^{2} b}{2 \left (b -c \right )^{2}}+\frac {x^{2} c}{2 \left (b -c \right )^{2}}+\frac {2 a x}{\left (b -c \right )^{2}}-\frac {\sqrt {b x +a}\, \left (c x +a \right )^{\frac {3}{2}}}{\left (b -c \right )^{2} c}+\frac {\sqrt {c x +a}\, \sqrt {b x +a}\, a}{2 \left (b -c \right )^{2} c}-\frac {\sqrt {c x +a}\, \sqrt {b x +a}\, a}{2 \left (b -c \right )^{2} b}+\frac {\sqrt {\left (b x +a \right ) \left (c x +a \right )}\, \ln \left (\frac {\frac {1}{2} a b +\frac {1}{2} a c +b c x}{\sqrt {b c}}+\sqrt {b c \,x^{2}+\left (a b +a c \right ) x +a^{2}}\right ) a^{2} b}{4 \left (b -c \right )^{2} c \sqrt {c x +a}\, \sqrt {b x +a}\, \sqrt {b c}}-\frac {\sqrt {\left (b x +a \right ) \left (c x +a \right )}\, \ln \left (\frac {\frac {1}{2} a b +\frac {1}{2} a c +b c x}{\sqrt {b c}}+\sqrt {b c \,x^{2}+\left (a b +a c \right ) x +a^{2}}\right ) a^{2}}{2 \left (b -c \right )^{2} \sqrt {c x +a}\, \sqrt {b x +a}\, \sqrt {b c}}+\frac {c \sqrt {\left (b x +a \right ) \left (c x +a \right )}\, \ln \left (\frac {\frac {1}{2} a b +\frac {1}{2} a c +b c x}{\sqrt {b c}}+\sqrt {b c \,x^{2}+\left (a b +a c \right ) x +a^{2}}\right ) a^{2}}{4 \left (b -c \right )^{2} b \sqrt {c x +a}\, \sqrt {b x +a}\, \sqrt {b c}}\) \(385\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/((b*x+a)^(1/2)+(c*x+a)^(1/2))^2,x,method=_RETURNVERBOSE)

[Out]

1/2*x^2/(b-c)^2*b+1/2*x^2/(b-c)^2*c+2*a*x/(b-c)^2-1/(b-c)^2/c*(b*x+a)^(1/2)*(c*x+a)^(3/2)+1/2/(b-c)^2/c*(c*x+a
)^(1/2)*(b*x+a)^(1/2)*a-1/2/(b-c)^2/b*(c*x+a)^(1/2)*(b*x+a)^(1/2)*a+1/4/(b-c)^2/c*((b*x+a)*(c*x+a))^(1/2)/(c*x
+a)^(1/2)/(b*x+a)^(1/2)*ln((1/2*a*b+1/2*a*c+b*c*x)/(b*c)^(1/2)+(b*c*x^2+(a*b+a*c)*x+a^2)^(1/2))/(b*c)^(1/2)*a^
2*b-1/2/(b-c)^2*((b*x+a)*(c*x+a))^(1/2)/(c*x+a)^(1/2)/(b*x+a)^(1/2)*ln((1/2*a*b+1/2*a*c+b*c*x)/(b*c)^(1/2)+(b*
c*x^2+(a*b+a*c)*x+a^2)^(1/2))/(b*c)^(1/2)*a^2+1/4/(b-c)^2*c/b*((b*x+a)*(c*x+a))^(1/2)/(c*x+a)^(1/2)/(b*x+a)^(1
/2)*ln((1/2*a*b+1/2*a*c+b*c*x)/(b*c)^(1/2)+(b*c*x^2+(a*b+a*c)*x+a^2)^(1/2))/(b*c)^(1/2)*a^2

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/((b*x+a)^(1/2)+(c*x+a)^(1/2))^2,x, algorithm="maxima")

[Out]

integrate(x^2/(sqrt(b*x + a) + sqrt(c*x + a))^2, x)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 372, normalized size = 2.62 \begin {gather*} \left [\frac {8 \, a b^{2} c^{2} x + 2 \, {\left (b^{3} c^{2} + b^{2} c^{3}\right )} x^{2} + {\left (a^{2} b^{2} - 2 \, a^{2} b c + a^{2} c^{2}\right )} \sqrt {b c} \log \left (a b^{2} + 2 \, a b c + a c^{2} + 2 \, {\left (2 \, b c + \sqrt {b c} {\left (b + c\right )}\right )} \sqrt {b x + a} \sqrt {c x + a} + 2 \, {\left (b^{2} c + b c^{2}\right )} x + 2 \, {\left (2 \, b c x + a b + a c\right )} \sqrt {b c}\right ) - 2 \, {\left (2 \, b^{2} c^{2} x + a b^{2} c + a b c^{2}\right )} \sqrt {b x + a} \sqrt {c x + a}}{4 \, {\left (b^{4} c^{2} - 2 \, b^{3} c^{3} + b^{2} c^{4}\right )}}, \frac {4 \, a b^{2} c^{2} x + {\left (b^{3} c^{2} + b^{2} c^{3}\right )} x^{2} - {\left (a^{2} b^{2} - 2 \, a^{2} b c + a^{2} c^{2}\right )} \sqrt {-b c} \arctan \left (\frac {\sqrt {-b c} \sqrt {b x + a} \sqrt {c x + a} - \sqrt {-b c} a}{b c x}\right ) - {\left (2 \, b^{2} c^{2} x + a b^{2} c + a b c^{2}\right )} \sqrt {b x + a} \sqrt {c x + a}}{2 \, {\left (b^{4} c^{2} - 2 \, b^{3} c^{3} + b^{2} c^{4}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/((b*x+a)^(1/2)+(c*x+a)^(1/2))^2,x, algorithm="fricas")

[Out]

[1/4*(8*a*b^2*c^2*x + 2*(b^3*c^2 + b^2*c^3)*x^2 + (a^2*b^2 - 2*a^2*b*c + a^2*c^2)*sqrt(b*c)*log(a*b^2 + 2*a*b*
c + a*c^2 + 2*(2*b*c + sqrt(b*c)*(b + c))*sqrt(b*x + a)*sqrt(c*x + a) + 2*(b^2*c + b*c^2)*x + 2*(2*b*c*x + a*b
 + a*c)*sqrt(b*c)) - 2*(2*b^2*c^2*x + a*b^2*c + a*b*c^2)*sqrt(b*x + a)*sqrt(c*x + a))/(b^4*c^2 - 2*b^3*c^3 + b
^2*c^4), 1/2*(4*a*b^2*c^2*x + (b^3*c^2 + b^2*c^3)*x^2 - (a^2*b^2 - 2*a^2*b*c + a^2*c^2)*sqrt(-b*c)*arctan((sqr
t(-b*c)*sqrt(b*x + a)*sqrt(c*x + a) - sqrt(-b*c)*a)/(b*c*x)) - (2*b^2*c^2*x + a*b^2*c + a*b*c^2)*sqrt(b*x + a)
*sqrt(c*x + a))/(b^4*c^2 - 2*b^3*c^3 + b^2*c^4)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2}}{\left (\sqrt {a + b x} + \sqrt {a + c x}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2/((b*x+a)**(1/2)+(c*x+a)**(1/2))**2,x)

[Out]

Integral(x**2/(sqrt(a + b*x) + sqrt(a + c*x))**2, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 272 vs. \(2 (116) = 232\).
time = 4.74, size = 272, normalized size = 1.92 \begin {gather*} -\frac {1}{2} \, \sqrt {a b^{2} + {\left (b x + a\right )} b c - a b c} \sqrt {b x + a} {\left (\frac {2 \, {\left (b^{4} c^{2} {\left | b \right |} - b^{3} c^{3} {\left | b \right |}\right )} {\left (b x + a\right )}}{b^{9} c^{2} - 3 \, b^{8} c^{3} + 3 \, b^{7} c^{4} - b^{6} c^{5}} + \frac {a b^{5} c {\left | b \right |} - 2 \, a b^{4} c^{2} {\left | b \right |} + a b^{3} c^{3} {\left | b \right |}}{b^{9} c^{2} - 3 \, b^{8} c^{3} + 3 \, b^{7} c^{4} - b^{6} c^{5}}\right )} - \frac {a^{2} {\left | b \right |} \log \left ({\left | -\sqrt {b c} \sqrt {b x + a} + \sqrt {a b^{2} + {\left (b x + a\right )} b c - a b c} \right |}\right )}{2 \, \sqrt {b c} b^{2} c} + \frac {{\left (b x + a\right )}^{2} b + 2 \, {\left (b x + a\right )} a b + {\left (b x + a\right )}^{2} c - 2 \, {\left (b x + a\right )} a c}{2 \, {\left (b^{4} - 2 \, b^{3} c + b^{2} c^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/((b*x+a)^(1/2)+(c*x+a)^(1/2))^2,x, algorithm="giac")

[Out]

-1/2*sqrt(a*b^2 + (b*x + a)*b*c - a*b*c)*sqrt(b*x + a)*(2*(b^4*c^2*abs(b) - b^3*c^3*abs(b))*(b*x + a)/(b^9*c^2
 - 3*b^8*c^3 + 3*b^7*c^4 - b^6*c^5) + (a*b^5*c*abs(b) - 2*a*b^4*c^2*abs(b) + a*b^3*c^3*abs(b))/(b^9*c^2 - 3*b^
8*c^3 + 3*b^7*c^4 - b^6*c^5)) - 1/2*a^2*abs(b)*log(abs(-sqrt(b*c)*sqrt(b*x + a) + sqrt(a*b^2 + (b*x + a)*b*c -
 a*b*c)))/(sqrt(b*c)*b^2*c) + 1/2*((b*x + a)^2*b + 2*(b*x + a)*a*b + (b*x + a)^2*c - 2*(b*x + a)*a*c)/(b^4 - 2
*b^3*c + b^2*c^2)

________________________________________________________________________________________

Mupad [B]
time = 0.25, size = 129, normalized size = 0.91 \begin {gather*} \frac {2\,a\,x}{{\left (b-c\right )}^2}+\frac {x^2\,\left (b+c\right )}{2\,{\left (b-c\right )}^2}-\frac {2\,\left (\frac {x}{2}+\frac {a\,b+a\,c}{4\,b\,c}\right )\,\sqrt {a+b\,x}\,\sqrt {a+c\,x}}{{\left (b-c\right )}^2}+\frac {\ln \left (a\,b+a\,c+2\,b\,c\,x+2\,\sqrt {b}\,\sqrt {c}\,\sqrt {a+b\,x}\,\sqrt {a+c\,x}\right )\,{\left (a\,b-a\,c\right )}^2}{4\,b^{3/2}\,c^{3/2}\,{\left (b-c\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/((a + b*x)^(1/2) + (a + c*x)^(1/2))^2,x)

[Out]

(2*a*x)/(b - c)^2 + (x^2*(b + c))/(2*(b - c)^2) - (2*(x/2 + (a*b + a*c)/(4*b*c))*(a + b*x)^(1/2)*(a + c*x)^(1/
2))/(b - c)^2 + (log(a*b + a*c + 2*b*c*x + 2*b^(1/2)*c^(1/2)*(a + b*x)^(1/2)*(a + c*x)^(1/2))*(a*b - a*c)^2)/(
4*b^(3/2)*c^(3/2)*(b - c)^2)

________________________________________________________________________________________