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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [C] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 138 \[ \int \frac {1}{\left (\sqrt {a+b x}+\sqrt {a+c x}\right )^2} \, dx=-\frac {2 a}{(b-c)^2 x}+\frac {2 \sqrt {a+b x} \sqrt {a+c x}}{(b-c)^2 x}+\frac {2 (b+c) \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a+c x}}\right )}{(b-c)^2}-\frac {4 \sqrt {b} \sqrt {c} \text {arctanh}\left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {b} \sqrt {a+c x}}\right )}{(b-c)^2}+\frac {(b+c) \log (x)}{(b-c)^2} \] Output:

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

Mathematica [A] (verified)

Time = 1.74 (sec) , antiderivative size = 239, normalized size of antiderivative = 1.73 \[ \int \frac {1}{\left (\sqrt {a+b x}+\sqrt {a+c x}\right )^2} \, dx=\frac {-2 a-2 c x+2 \sqrt {a+b x} \sqrt {a+c x}+8 \sqrt {b} \sqrt {c} x \text {arctanh}\left (\frac {\sqrt {b} \sqrt {a+c x}}{\sqrt {c} \left (\sqrt {a-\frac {a b}{c}}-\sqrt {a+b x}\right )}\right )+4 (b+c) x \text {arctanh}\left (\frac {-a b-b c x+c \sqrt {a+c x} \left (\sqrt {a-\frac {a b}{c}}-\sqrt {a+b x}\right )}{a (b-2 c)-b c x+2 \sqrt {a-\frac {a b}{c}} c \sqrt {a+b x}+\sqrt {a-\frac {a b}{c}} c \sqrt {a+c x}-c \sqrt {a+b x} \sqrt {a+c x}}\right )}{(b-c)^2 x} \] Input:

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

Output:

(-2*a - 2*c*x + 2*Sqrt[a + b*x]*Sqrt[a + c*x] + 8*Sqrt[b]*Sqrt[c]*x*ArcTan 
h[(Sqrt[b]*Sqrt[a + c*x])/(Sqrt[c]*(Sqrt[a - (a*b)/c] - Sqrt[a + b*x]))] + 
 4*(b + c)*x*ArcTanh[(-(a*b) - b*c*x + c*Sqrt[a + c*x]*(Sqrt[a - (a*b)/c] 
- Sqrt[a + b*x]))/(a*(b - 2*c) - b*c*x + 2*Sqrt[a - (a*b)/c]*c*Sqrt[a + b* 
x] + Sqrt[a - (a*b)/c]*c*Sqrt[a + c*x] - c*Sqrt[a + b*x]*Sqrt[a + c*x])])/ 
((b - c)^2*x)
 

Rubi [A] (verified)

Time = 0.52 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.80, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {7241, 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 {1}{\left (\sqrt {a+b x}+\sqrt {a+c x}\right )^2} \, dx\)

\(\Big \downarrow \) 7241

\(\displaystyle \frac {\int \left (\frac {2 a}{x^2}-\frac {2 \sqrt {a+b x} \sqrt {a+c x}}{x^2}+\frac {b+c}{x}\right )dx}{(b-c)^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 (b+c) \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a+c x}}\right )-4 \sqrt {b} \sqrt {c} \text {arctanh}\left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {b} \sqrt {a+c x}}\right )+\frac {2 \sqrt {a+b x} \sqrt {a+c x}}{x}-\frac {2 a}{x}+(b+c) \log (x)}{(b-c)^2}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 7241
Int[(u_.)*((e_.)*Sqrt[(a_.) + (b_.)*(x_)^(n_.)] + (f_.)*Sqrt[(c_.) + (d_.)* 
(x_)^(n_.)])^(m_), x_Symbol] :> Simp[(b*e^2 - d*f^2)^m   Int[ExpandIntegran 
d[(u*x^(m*n))/(e*Sqrt[a + b*x^n] - f*Sqrt[c + d*x^n])^m, x], x], x] /; Free 
Q[{a, b, c, d, e, f, n}, x] && ILtQ[m, 0] && EqQ[a*e^2 - c*f^2, 0]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.01 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.97

method result size
default \(\frac {b \ln \left (x \right )}{\left (b -c \right )^{2}}+\frac {c \ln \left (x \right )}{\left (b -c \right )^{2}}-\frac {2 a}{\left (b -c \right )^{2} x}-\frac {\sqrt {b x +a}\, \sqrt {c x +a}\, \left (2 \,\operatorname {csgn}\left (a \right ) \ln \left (\frac {2 b c x +2 \sqrt {b c \,x^{2}+a b x +a c x +a^{2}}\, \sqrt {b c}+a b +a c}{2 \sqrt {b c}}\right ) x b c -\ln \left (\frac {a \left (2 \sqrt {b c \,x^{2}+a b x +a c x +a^{2}}\, \operatorname {csgn}\left (a \right )+b x +c x +2 a \right )}{x}\right ) x b \sqrt {b c}-\ln \left (\frac {a \left (2 \sqrt {b c \,x^{2}+a b x +a c x +a^{2}}\, \operatorname {csgn}\left (a \right )+b x +c x +2 a \right )}{x}\right ) x c \sqrt {b c}-2 \sqrt {b c}\, \sqrt {b c \,x^{2}+a b x +a c x +a^{2}}\, \operatorname {csgn}\left (a \right )\right ) \operatorname {csgn}\left (a \right )}{\left (b -c \right )^{2} \sqrt {b c \,x^{2}+a b x +a c x +a^{2}}\, x \sqrt {b c}}\) \(272\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 317, normalized size of antiderivative = 2.30 \[ \int \frac {1}{\left (\sqrt {a+b x}+\sqrt {a+c x}\right )^2} \, dx=\left [\frac {2 \, {\left (b + c\right )} x \log \left (x\right ) - 2 \, {\left (b + c\right )} x \log \left (-\frac {{\left (b + c\right )} x - 2 \, \sqrt {b x + a} \sqrt {c x + a} + 2 \, a}{x}\right ) + 4 \, \sqrt {b c} x \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 ) + {\left (b + c\right )} x + 4 \, \sqrt {b x + a} \sqrt {c x + a} - 4 \, a}{2 \, {\left (b^{2} - 2 \, b c + c^{2}\right )} x}, \frac {2 \, {\left (b + c\right )} x \log \left (x\right ) - 2 \, {\left (b + c\right )} x \log \left (-\frac {{\left (b + c\right )} x - 2 \, \sqrt {b x + a} \sqrt {c x + a} + 2 \, a}{x}\right ) + 8 \, \sqrt {-b c} x \arctan \left (\frac {\sqrt {-b c} \sqrt {b x + a} \sqrt {c x + a} - \sqrt {-b c} a}{b c x}\right ) + {\left (b + c\right )} x + 4 \, \sqrt {b x + a} \sqrt {c x + a} - 4 \, a}{2 \, {\left (b^{2} - 2 \, b c + c^{2}\right )} x}\right ] \] Input:

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

Output:

[1/2*(2*(b + c)*x*log(x) - 2*(b + c)*x*log(-((b + c)*x - 2*sqrt(b*x + a)*s 
qrt(c*x + a) + 2*a)/x) + 4*sqrt(b*c)*x*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)) + (b + c)*x + 4*sqrt(b*x + a)*sqrt(c 
*x + a) - 4*a)/((b^2 - 2*b*c + c^2)*x), 1/2*(2*(b + c)*x*log(x) - 2*(b + c 
)*x*log(-((b + c)*x - 2*sqrt(b*x + a)*sqrt(c*x + a) + 2*a)/x) + 8*sqrt(-b* 
c)*x*arctan((sqrt(-b*c)*sqrt(b*x + a)*sqrt(c*x + a) - sqrt(-b*c)*a)/(b*c*x 
)) + (b + c)*x + 4*sqrt(b*x + a)*sqrt(c*x + a) - 4*a)/((b^2 - 2*b*c + c^2) 
*x)]
 

Sympy [F]

\[ \int \frac {1}{\left (\sqrt {a+b x}+\sqrt {a+c x}\right )^2} \, dx=\int \frac {1}{\left (\sqrt {a + b x} + \sqrt {a + c x}\right )^{2}}\, dx \] Input:

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

Output:

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

Maxima [F]

\[ \int \frac {1}{\left (\sqrt {a+b x}+\sqrt {a+c x}\right )^2} \, dx=\int { \frac {1}{{\left (\sqrt {b x + a} + \sqrt {c x + a}\right )}^{2}} \,d x } \] Input:

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 438 vs. \(2 (118) = 236\).

Time = 0.65 (sec) , antiderivative size = 438, normalized size of antiderivative = 3.17 \[ \int \frac {1}{\left (\sqrt {a+b x}+\sqrt {a+c x}\right )^2} \, dx=\frac {2 \, \sqrt {b c} {\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 )}^{2}\right )}{b^{3} - 2 \, b^{2} c + b c^{2}} + \frac {2 \, \sqrt {b c} {\left (b + c\right )} {\left | b \right |} \arctan \left (-\frac {a b^{2} + a b c - {\left (\sqrt {b c} \sqrt {b x + a} - \sqrt {a b^{2} + {\left (b x + a\right )} b c - a b c}\right )}^{2}}{2 \, \sqrt {-b c} a b}\right )}{{\left (b^{2} - 2 \, b c + c^{2}\right )} \sqrt {-b c} b} + \frac {{\left (b + c\right )} \log \left ({\left | b x \right |}\right )}{b^{2} - 2 \, b c + c^{2}} - \frac {4 \, {\left (\sqrt {b c} {\left (\sqrt {b c} \sqrt {b x + a} - \sqrt {a b^{2} + {\left (b x + a\right )} b c - a b c}\right )}^{2} a {\left (b + c\right )} {\left | b \right |} - {\left (b^{3} - 2 \, b^{2} c + b c^{2}\right )} \sqrt {b c} a^{2} {\left | b \right |}\right )}}{{\left ({\left (\sqrt {b c} \sqrt {b x + a} - \sqrt {a b^{2} + {\left (b x + a\right )} b c - a b c}\right )}^{4} - 2 \, {\left (b^{2} + b c\right )} {\left (\sqrt {b c} \sqrt {b x + a} - \sqrt {a b^{2} + {\left (b x + a\right )} b c - a b c}\right )}^{2} a + {\left (b^{4} - 2 \, b^{3} c + b^{2} c^{2}\right )} a^{2}\right )} {\left (b^{2} - 2 \, b c + c^{2}\right )}} - \frac {{\left (b x + a\right )} b + a b + {\left (b x + a\right )} c - a c}{{\left (b^{2} - 2 \, b c + c^{2}\right )} b x} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 38.59 (sec) , antiderivative size = 4285, normalized size of antiderivative = 31.05 \[ \int \frac {1}{\left (\sqrt {a+b x}+\sqrt {a+c x}\right )^2} \, dx=\text {Too large to display} \] Input:

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

Output:

(atan((((b*c)^(1/2)*((4*(b*c)^(1/2)*((4*(b^4*c^12 + 16*b^5*c^11 - 42*b^6*c 
^10 + 25*b^7*c^9 + 25*b^8*c^8 - 42*b^9*c^7 + 16*b^10*c^6 + b^11*c^5))/(b^4 
 - 4*b^3*c - 4*b*c^3 + c^4 + 6*b^2*c^2) + (4*(b*c)^(1/2)*((4*(4*b^5*c^12 - 
 36*b^7*c^10 + 64*b^8*c^9 - 36*b^9*c^8 + 4*b^11*c^6))/(b^4 - 4*b^3*c - 4*b 
*c^3 + c^4 + 6*b^2*c^2) + (4*(b*c)^(1/2)*((4*(4*b^5*c^13 - b^4*c^14 - 5*b^ 
6*c^12 + b^7*c^11 + b^8*c^10 + b^9*c^9 + b^10*c^8 - 5*b^11*c^7 + 4*b^12*c^ 
6 - b^13*c^5))/(b^4 - 4*b^3*c - 4*b*c^3 + c^4 + 6*b^2*c^2) + (2*((a + b*x) 
^(1/2) - a^(1/2))*(4*b^3*c^15 - 31*b^4*c^14 + 120*b^5*c^13 - 300*b^6*c^12 
+ 516*b^7*c^11 - 618*b^8*c^10 + 516*b^9*c^9 - 300*b^10*c^8 + 120*b^11*c^7 
- 31*b^12*c^6 + 4*b^13*c^5))/(((a + c*x)^(1/2) - a^(1/2))*(b^4 - 4*b^3*c - 
 4*b*c^3 + c^4 + 6*b^2*c^2))))/(b - c)^2 - (2*((a + b*x)^(1/2) - a^(1/2))* 
(4*b^3*c^14 - 27*b^4*c^13 + 99*b^5*c^12 - 175*b^6*c^11 + 99*b^7*c^10 + 99* 
b^8*c^9 - 175*b^9*c^8 + 99*b^10*c^7 - 27*b^11*c^6 + 4*b^12*c^5))/(((a + c* 
x)^(1/2) - a^(1/2))*(b^4 - 4*b^3*c - 4*b*c^3 + c^4 + 6*b^2*c^2))))/(b - c) 
^2 - (2*((a + b*x)^(1/2) - a^(1/2))*(73*b^4*c^12 - 278*b^5*c^11 + 503*b^6* 
c^10 - 596*b^7*c^9 + 503*b^8*c^8 - 278*b^9*c^7 + 73*b^10*c^6))/(((a + c*x) 
^(1/2) - a^(1/2))*(b^4 - 4*b^3*c - 4*b*c^3 + c^4 + 6*b^2*c^2))))/(b - c)^2 
 - (4*(4*b^5*c^10 + 24*b^6*c^9 + 40*b^7*c^8 + 24*b^8*c^7 + 4*b^9*c^6))/(b^ 
4 - 4*b^3*c - 4*b*c^3 + c^4 + 6*b^2*c^2) + (2*((a + b*x)^(1/2) - a^(1/2))* 
(65*b^4*c^11 - 167*b^5*c^10 + 198*b^6*c^9 + 198*b^7*c^8 - 167*b^8*c^7 +...
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.98 \[ \int \frac {1}{\left (\sqrt {a+b x}+\sqrt {a+c x}\right )^2} \, dx=\frac {2 \sqrt {c x +a}\, \sqrt {b x +a}+2 \sqrt {c}\, \sqrt {b}\, \mathrm {log}\left (-\sqrt {c}\, \sqrt {b x +a}+\sqrt {b}\, \sqrt {c x +a}\right ) x -2 \sqrt {c}\, \sqrt {b}\, \mathrm {log}\left (\sqrt {c}\, \sqrt {b x +a}+\sqrt {b}\, \sqrt {c x +a}\right ) x +2 \,\mathrm {log}\left (\sqrt {b x +a}\, b +\sqrt {c x +a}\, b \right ) b x +2 \,\mathrm {log}\left (\sqrt {b x +a}\, b +\sqrt {c x +a}\, b \right ) c x -2 a -2 b x}{x \left (b^{2}-2 b c +c^{2}\right )} \] Input:

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

Output:

(2*(sqrt(a + c*x)*sqrt(a + b*x) + sqrt(c)*sqrt(b)*log( - sqrt(c)*sqrt(a + 
b*x) + sqrt(b)*sqrt(a + c*x))*x - sqrt(c)*sqrt(b)*log(sqrt(c)*sqrt(a + b*x 
) + sqrt(b)*sqrt(a + c*x))*x + log(sqrt(a + b*x)*b + sqrt(a + c*x)*b)*b*x 
+ log(sqrt(a + b*x)*b + sqrt(a + c*x)*b)*c*x - a - b*x))/(x*(b**2 - 2*b*c 
+ c**2))