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

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

Optimal result

Integrand size = 22, antiderivative size = 133 \[ \int \frac {x^2}{\sqrt {a+b x} \sqrt {c+d x}} \, dx=-\frac {(3 b c+5 a d) \sqrt {a+b x} \sqrt {c+d x}}{4 b^2 d^2}+\frac {(a+b x)^{3/2} \sqrt {c+d x}}{2 b^2 d}+\frac {\left (3 b^2 c^2+2 a b c d+3 a^2 d^2\right ) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+b x}}{\sqrt {b} \sqrt {c+d x}}\right )}{4 b^{5/2} d^{5/2}} \] Output:

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

Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.83 \[ \int \frac {x^2}{\sqrt {a+b x} \sqrt {c+d x}} \, dx=\frac {\sqrt {a+b x} \sqrt {c+d x} (-3 b c-3 a d+2 b d x)}{4 b^2 d^2}+\frac {\left (3 b^2 c^2+2 a b c d+3 a^2 d^2\right ) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {a+b x}}\right )}{4 b^{5/2} d^{5/2}} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.24 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {101, 27, 90, 66, 221}

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 {x^2}{\sqrt {a+b x} \sqrt {c+d x}} \, dx\)

\(\Big \downarrow \) 101

\(\displaystyle \frac {\int -\frac {2 a c+3 (b c+a d) x}{2 \sqrt {a+b x} \sqrt {c+d x}}dx}{2 b d}+\frac {x \sqrt {a+b x} \sqrt {c+d x}}{2 b d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {x \sqrt {a+b x} \sqrt {c+d x}}{2 b d}-\frac {\int \frac {2 a c+3 (b c+a d) x}{\sqrt {a+b x} \sqrt {c+d x}}dx}{4 b d}\)

\(\Big \downarrow \) 90

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

\(\Big \downarrow \) 66

\(\displaystyle \frac {x \sqrt {a+b x} \sqrt {c+d x}}{2 b d}-\frac {\frac {\left (4 a b c d-3 (a d+b c)^2\right ) \int \frac {1}{b-\frac {d (a+b x)}{c+d x}}d\frac {\sqrt {a+b x}}{\sqrt {c+d x}}}{b d}+\frac {3 \sqrt {a+b x} \sqrt {c+d x} (a d+b c)}{b d}}{4 b d}\)

\(\Big \downarrow \) 221

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 66
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] &&  !GtQ[c - a*(d/b), 0]
 

rule 90
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), 
 x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p 
+ 2))   Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, 
p}, x] && NeQ[n + p + 2, 0]
 

rule 101
Int[((a_.) + (b_.)*(x_))^2*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^( 
p_), x_] :> Simp[b*(a + b*x)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + 
 p + 3))), x] + Simp[1/(d*f*(n + p + 3))   Int[(c + d*x)^n*(e + f*x)^p*Simp 
[a^2*d*f*(n + p + 3) - b*(b*c*e + a*(d*e*(n + 1) + c*f*(p + 1))) + b*(a*d*f 
*(n + p + 4) - b*(d*e*(n + 2) + c*f*(p + 2)))*x, x], x], x] /; FreeQ[{a, b, 
 c, d, e, f, n, p}, x] && NeQ[n + p + 3, 0]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(250\) vs. \(2(107)=214\).

Time = 0.26 (sec) , antiderivative size = 251, normalized size of antiderivative = 1.89

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 308, normalized size of antiderivative = 2.32 \[ \int \frac {x^2}{\sqrt {a+b x} \sqrt {c+d x}} \, dx=\left [\frac {{\left (3 \, b^{2} c^{2} + 2 \, a b c d + 3 \, a^{2} d^{2}\right )} \sqrt {b d} \log \left (8 \, b^{2} d^{2} x^{2} + b^{2} c^{2} + 6 \, a b c d + a^{2} d^{2} + 4 \, {\left (2 \, b d x + b c + a d\right )} \sqrt {b d} \sqrt {b x + a} \sqrt {d x + c} + 8 \, {\left (b^{2} c d + a b d^{2}\right )} x\right ) + 4 \, {\left (2 \, b^{2} d^{2} x - 3 \, b^{2} c d - 3 \, a b d^{2}\right )} \sqrt {b x + a} \sqrt {d x + c}}{16 \, b^{3} d^{3}}, -\frac {{\left (3 \, b^{2} c^{2} + 2 \, a b c d + 3 \, a^{2} d^{2}\right )} \sqrt {-b d} \arctan \left (\frac {{\left (2 \, b d x + b c + a d\right )} \sqrt {-b d} \sqrt {b x + a} \sqrt {d x + c}}{2 \, {\left (b^{2} d^{2} x^{2} + a b c d + {\left (b^{2} c d + a b d^{2}\right )} x\right )}}\right ) - 2 \, {\left (2 \, b^{2} d^{2} x - 3 \, b^{2} c d - 3 \, a b d^{2}\right )} \sqrt {b x + a} \sqrt {d x + c}}{8 \, b^{3} d^{3}}\right ] \] Input:

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

Exception generated. \[ \int \frac {x^2}{\sqrt {a+b x} \sqrt {c+d x}} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(a*d-b*c>0)', see `assume?` for m 
ore detail
 

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.11 \[ \int \frac {x^2}{\sqrt {a+b x} \sqrt {c+d x}} \, dx=\frac {\sqrt {b^{2} c + {\left (b x + a\right )} b d - a b d} \sqrt {b x + a} {\left (\frac {2 \, {\left (b x + a\right )}}{b d} - \frac {3 \, b^{2} c d + 5 \, a b d^{2}}{b^{2} d^{3}}\right )} - \frac {{\left (3 \, b^{2} c^{2} + 2 \, a b c d + 3 \, a^{2} d^{2}\right )} \log \left ({\left | -\sqrt {b d} \sqrt {b x + a} + \sqrt {b^{2} c + {\left (b x + a\right )} b d - a b d} \right |}\right )}{\sqrt {b d} d^{2}}}{4 \, b {\left | b \right |}} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 11.61 (sec) , antiderivative size = 508, normalized size of antiderivative = 3.82 \[ \int \frac {x^2}{\sqrt {a+b x} \sqrt {c+d x}} \, dx=\frac {\mathrm {atanh}\left (\frac {\sqrt {d}\,\left (\sqrt {a+b\,x}-\sqrt {a}\right )}{\sqrt {b}\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}\right )\,\left (3\,a^2\,d^2+2\,a\,b\,c\,d+3\,b^2\,c^2\right )}{2\,b^{5/2}\,d^{5/2}}-\frac {\frac {\left (\sqrt {a+b\,x}-\sqrt {a}\right )\,\left (\frac {3\,a^2\,b\,d^2}{2}+a\,b^2\,c\,d+\frac {3\,b^3\,c^2}{2}\right )}{d^6\,\left (\sqrt {c+d\,x}-\sqrt {c}\right )}-\frac {{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^3\,\left (\frac {11\,a^2\,d^2}{2}+25\,a\,b\,c\,d+\frac {11\,b^2\,c^2}{2}\right )}{d^5\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^3}+\frac {{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^7\,\left (\frac {3\,a^2\,d^2}{2}+a\,b\,c\,d+\frac {3\,b^2\,c^2}{2}\right )}{b^2\,d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^7}-\frac {{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^5\,\left (\frac {11\,a^2\,d^2}{2}+25\,a\,b\,c\,d+\frac {11\,b^2\,c^2}{2}\right )}{b\,d^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^5}+\frac {\sqrt {a}\,\sqrt {c}\,\left (32\,a\,d+32\,b\,c\right )\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^4}{d^4\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}}{\frac {{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^8}{{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^8}+\frac {b^4}{d^4}-\frac {4\,b^3\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^2}{d^3\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}+\frac {6\,b^2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^4}{d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}-\frac {4\,b\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^6}{d\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}} \] Input:

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

Output:

(atanh((d^(1/2)*((a + b*x)^(1/2) - a^(1/2)))/(b^(1/2)*((c + d*x)^(1/2) - c 
^(1/2))))*(3*a^2*d^2 + 3*b^2*c^2 + 2*a*b*c*d))/(2*b^(5/2)*d^(5/2)) - ((((a 
 + b*x)^(1/2) - a^(1/2))*((3*b^3*c^2)/2 + (3*a^2*b*d^2)/2 + a*b^2*c*d))/(d 
^6*((c + d*x)^(1/2) - c^(1/2))) - (((a + b*x)^(1/2) - a^(1/2))^3*((11*a^2* 
d^2)/2 + (11*b^2*c^2)/2 + 25*a*b*c*d))/(d^5*((c + d*x)^(1/2) - c^(1/2))^3) 
 + (((a + b*x)^(1/2) - a^(1/2))^7*((3*a^2*d^2)/2 + (3*b^2*c^2)/2 + a*b*c*d 
))/(b^2*d^3*((c + d*x)^(1/2) - c^(1/2))^7) - (((a + b*x)^(1/2) - a^(1/2))^ 
5*((11*a^2*d^2)/2 + (11*b^2*c^2)/2 + 25*a*b*c*d))/(b*d^4*((c + d*x)^(1/2) 
- c^(1/2))^5) + (a^(1/2)*c^(1/2)*(32*a*d + 32*b*c)*((a + b*x)^(1/2) - a^(1 
/2))^4)/(d^4*((c + d*x)^(1/2) - c^(1/2))^4))/(((a + b*x)^(1/2) - a^(1/2))^ 
8/((c + d*x)^(1/2) - c^(1/2))^8 + b^4/d^4 - (4*b^3*((a + b*x)^(1/2) - a^(1 
/2))^2)/(d^3*((c + d*x)^(1/2) - c^(1/2))^2) + (6*b^2*((a + b*x)^(1/2) - a^ 
(1/2))^4)/(d^2*((c + d*x)^(1/2) - c^(1/2))^4) - (4*b*((a + b*x)^(1/2) - a^ 
(1/2))^6)/(d*((c + d*x)^(1/2) - c^(1/2))^6))
 

Reduce [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.49 \[ \int \frac {x^2}{\sqrt {a+b x} \sqrt {c+d x}} \, dx=\frac {-3 \sqrt {d x +c}\, \sqrt {b x +a}\, a b \,d^{2}-3 \sqrt {d x +c}\, \sqrt {b x +a}\, b^{2} c d +2 \sqrt {d x +c}\, \sqrt {b x +a}\, b^{2} d^{2} x +3 \sqrt {d}\, \sqrt {b}\, \mathrm {log}\left (\frac {\sqrt {d}\, \sqrt {b x +a}+\sqrt {b}\, \sqrt {d x +c}}{\sqrt {a d -b c}}\right ) a^{2} d^{2}+2 \sqrt {d}\, \sqrt {b}\, \mathrm {log}\left (\frac {\sqrt {d}\, \sqrt {b x +a}+\sqrt {b}\, \sqrt {d x +c}}{\sqrt {a d -b c}}\right ) a b c d +3 \sqrt {d}\, \sqrt {b}\, \mathrm {log}\left (\frac {\sqrt {d}\, \sqrt {b x +a}+\sqrt {b}\, \sqrt {d x +c}}{\sqrt {a d -b c}}\right ) b^{2} c^{2}}{4 b^{3} d^{3}} \] Input:

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

Output:

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