Optimal. Leaf size=63 \[ \frac {(a-c)^2}{8 b \left (\sqrt {a+b x}+\sqrt {c+b x}\right )^4}+\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {c+b x}}\right )}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 114, normalized size of antiderivative = 1.81, number of steps
used = 7, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {6821, 52, 65,
223, 212} \begin {gather*} \frac {b x^2}{(a-c)^2}-\frac {(a+b x)^{3/2} \sqrt {b x+c}}{b (a-c)^2}+\frac {\sqrt {a+b x} \sqrt {b x+c}}{2 b (a-c)}+\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {b x+c}}\right )}{2 b}+\frac {x (a+c)}{(a-c)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 52
Rule 65
Rule 212
Rule 223
Rule 6821
Rubi steps
\begin {align*} \int \frac {1}{\left (\sqrt {a+b x}+\sqrt {c+b x}\right )^2} \, dx &=\frac {\int \left (a \left (1+\frac {c}{a}\right )+2 b x-2 \sqrt {a+b x} \sqrt {c+b x}\right ) \, dx}{(a-c)^2}\\ &=\frac {(a+c) x}{(a-c)^2}+\frac {b x^2}{(a-c)^2}-\frac {2 \int \sqrt {a+b x} \sqrt {c+b x} \, dx}{(a-c)^2}\\ &=\frac {(a+c) x}{(a-c)^2}+\frac {b x^2}{(a-c)^2}-\frac {(a+b x)^{3/2} \sqrt {c+b x}}{b (a-c)^2}+\frac {\int \frac {\sqrt {a+b x}}{\sqrt {c+b x}} \, dx}{2 (a-c)}\\ &=\frac {(a+c) x}{(a-c)^2}+\frac {b x^2}{(a-c)^2}+\frac {\sqrt {a+b x} \sqrt {c+b x}}{2 b (a-c)}-\frac {(a+b x)^{3/2} \sqrt {c+b x}}{b (a-c)^2}+\frac {1}{4} \int \frac {1}{\sqrt {a+b x} \sqrt {c+b x}} \, dx\\ &=\frac {(a+c) x}{(a-c)^2}+\frac {b x^2}{(a-c)^2}+\frac {\sqrt {a+b x} \sqrt {c+b x}}{2 b (a-c)}-\frac {(a+b x)^{3/2} \sqrt {c+b x}}{b (a-c)^2}+\frac {\text {Subst}\left (\int \frac {1}{\sqrt {-a+c+x^2}} \, dx,x,\sqrt {a+b x}\right )}{2 b}\\ &=\frac {(a+c) x}{(a-c)^2}+\frac {b x^2}{(a-c)^2}+\frac {\sqrt {a+b x} \sqrt {c+b x}}{2 b (a-c)}-\frac {(a+b x)^{3/2} \sqrt {c+b x}}{b (a-c)^2}+\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sqrt {a+b x}}{\sqrt {c+b x}}\right )}{2 b}\\ &=\frac {(a+c) x}{(a-c)^2}+\frac {b x^2}{(a-c)^2}+\frac {\sqrt {a+b x} \sqrt {c+b x}}{2 b (a-c)}-\frac {(a+b x)^{3/2} \sqrt {c+b x}}{b (a-c)^2}+\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {c+b x}}\right )}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.21, size = 81, normalized size = 1.29 \begin {gather*} \frac {\frac {2 (a+b x) (c+b x)}{(a-c)^2}-\frac {\sqrt {a+b x} \sqrt {c+b x} (a+c+2 b x)}{(a-c)^2}+\tanh ^{-1}\left (\frac {\sqrt {c+b x}}{\sqrt {a+b x}}\right )}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(376\) vs.
\(2(51)=102\).
time = 0.02, size = 377, normalized size = 5.98
method | result | size |
default | \(\frac {x a}{\left (a -c \right )^{2}}+\frac {x c}{\left (a -c \right )^{2}}+\frac {b \,x^{2}}{\left (a -c \right )^{2}}-\frac {\sqrt {b x +a}\, \left (b x +c \right )^{\frac {3}{2}}}{\left (a -c \right )^{2} b}-\frac {\sqrt {b x +c}\, \sqrt {b x +a}\, a}{2 \left (a -c \right )^{2} b}+\frac {\sqrt {b x +c}\, \sqrt {b x +a}\, c}{2 \left (a -c \right )^{2} b}+\frac {\sqrt {\left (b x +a \right ) \left (b x +c \right )}\, \ln \left (\frac {\frac {1}{2} a b +\frac {1}{2} b c +b^{2} x}{\sqrt {b^{2}}}+\sqrt {b^{2} x^{2}+\left (a b +b c \right ) x +a c}\right ) a^{2}}{4 \left (a -c \right )^{2} \sqrt {b x +c}\, \sqrt {b x +a}\, \sqrt {b^{2}}}-\frac {\sqrt {\left (b x +a \right ) \left (b x +c \right )}\, \ln \left (\frac {\frac {1}{2} a b +\frac {1}{2} b c +b^{2} x}{\sqrt {b^{2}}}+\sqrt {b^{2} x^{2}+\left (a b +b c \right ) x +a c}\right ) a c}{2 \left (a -c \right )^{2} \sqrt {b x +c}\, \sqrt {b x +a}\, \sqrt {b^{2}}}+\frac {\sqrt {\left (b x +a \right ) \left (b x +c \right )}\, \ln \left (\frac {\frac {1}{2} a b +\frac {1}{2} b c +b^{2} x}{\sqrt {b^{2}}}+\sqrt {b^{2} x^{2}+\left (a b +b c \right ) x +a c}\right ) c^{2}}{4 \left (a -c \right )^{2} \sqrt {b x +c}\, \sqrt {b x +a}\, \sqrt {b^{2}}}\) | \(377\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 103 vs.
\(2 (51) = 102\).
time = 0.35, size = 103, normalized size = 1.63 \begin {gather*} \frac {4 \, b^{2} x^{2} - 2 \, {\left (2 \, b x + a + c\right )} \sqrt {b x + a} \sqrt {b x + c} + 4 \, {\left (a b + b c\right )} x - {\left (a^{2} - 2 \, a c + c^{2}\right )} \log \left (-2 \, b x + 2 \, \sqrt {b x + a} \sqrt {b x + c} - a - c\right )}{4 \, {\left (a^{2} b - 2 \, a b c + b c^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 388 vs.
\(2 (48) = 96\).
time = 0.51, size = 388, normalized size = 6.16 \begin {gather*} \begin {cases} \frac {2 a \log {\left (\sqrt {a + b x} + \sqrt {b x + c} \right )}}{4 a b + 8 b^{2} x + 4 b c + 8 b \sqrt {a + b x} \sqrt {b x + c}} + \frac {a}{4 a b + 8 b^{2} x + 4 b c + 8 b \sqrt {a + b x} \sqrt {b x + c}} + \frac {4 b x \log {\left (\sqrt {a + b x} + \sqrt {b x + c} \right )}}{4 a b + 8 b^{2} x + 4 b c + 8 b \sqrt {a + b x} \sqrt {b x + c}} + \frac {2 b x}{4 a b + 8 b^{2} x + 4 b c + 8 b \sqrt {a + b x} \sqrt {b x + c}} + \frac {2 c \log {\left (\sqrt {a + b x} + \sqrt {b x + c} \right )}}{4 a b + 8 b^{2} x + 4 b c + 8 b \sqrt {a + b x} \sqrt {b x + c}} + \frac {c}{4 a b + 8 b^{2} x + 4 b c + 8 b \sqrt {a + b x} \sqrt {b x + c}} + \frac {4 \sqrt {a + b x} \sqrt {b x + c} \log {\left (\sqrt {a + b x} + \sqrt {b x + c} \right )}}{4 a b + 8 b^{2} x + 4 b c + 8 b \sqrt {a + b x} \sqrt {b x + c}} & \text {for}\: b \neq 0 \\\frac {x}{\left (\sqrt {a} + \sqrt {c}\right )^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 189 vs.
\(2 (51) = 102\).
time = 3.76, size = 189, normalized size = 3.00 \begin {gather*} -\frac {1}{2} \, \sqrt {b x + a} \sqrt {b x + c} {\left (\frac {2 \, {\left (a b - b c\right )} {\left (b x + a\right )}}{a^{3} b^{2} - 3 \, a^{2} b^{2} c + 3 \, a b^{2} c^{2} - b^{2} c^{3}} - \frac {a^{2} b - 2 \, a b c + b c^{2}}{a^{3} b^{2} - 3 \, a^{2} b^{2} c + 3 \, a b^{2} c^{2} - b^{2} c^{3}}\right )} + \frac {{\left (b x + a\right )}^{2} - {\left (b x + a\right )} a + {\left (b x + a\right )} c}{a^{2} b - 2 \, a b c + b c^{2}} - \frac {\log \left ({\left | -\sqrt {b x + a} + \sqrt {b x + c} \right |}\right )}{2 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.24, size = 110, normalized size = 1.75 \begin {gather*} \frac {b\,x^2}{{\left (a-c\right )}^2}+\frac {x\,\left (a+c\right )}{{\left (a-c\right )}^2}+\frac {\ln \left (a+c+2\,\sqrt {a+b\,x}\,\sqrt {c+b\,x}+2\,b\,x\right )\,{\left (a\,b-b\,c\right )}^2}{4\,b^3\,{\left (a-c\right )}^2}-\frac {2\,\sqrt {a+b\,x}\,\sqrt {c+b\,x}\,\left (\frac {x}{2}+\frac {a\,b+b\,c}{4\,b^2}\right )}{{\left (a-c\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________