\(\int \frac {A+B x+C x^2+D x^3}{\sqrt {c x} \sqrt {a x+b x^2}} \, dx\) [5]

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

Optimal result

Integrand size = 36, antiderivative size = 154 \[ \int \frac {A+B x+C x^2+D x^3}{\sqrt {c x} \sqrt {a x+b x^2}} \, dx=\frac {2 \left (b^2 B-a b C+a^2 D\right ) \sqrt {a x+b x^2}}{b^3 \sqrt {c x}}+\frac {2 c (b C-2 a D) \left (a x+b x^2\right )^{3/2}}{3 b^3 (c x)^{3/2}}+\frac {2 c^2 D \left (a x+b x^2\right )^{5/2}}{5 b^3 (c x)^{5/2}}-\frac {2 A \text {arctanh}\left (\frac {\sqrt {c} \sqrt {a x+b x^2}}{\sqrt {a} \sqrt {c x}}\right )}{\sqrt {a} \sqrt {c}} \] Output:

2*(B*b^2-C*a*b+D*a^2)*(b*x^2+a*x)^(1/2)/b^3/(c*x)^(1/2)+2/3*c*(C*b-2*D*a)* 
(b*x^2+a*x)^(3/2)/b^3/(c*x)^(3/2)+2/5*c^2*D*(b*x^2+a*x)^(5/2)/b^3/(c*x)^(5 
/2)-2*A*arctanh(c^(1/2)*(b*x^2+a*x)^(1/2)/a^(1/2)/(c*x)^(1/2))/a^(1/2)/c^( 
1/2)
 

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.72 \[ \int \frac {A+B x+C x^2+D x^3}{\sqrt {c x} \sqrt {a x+b x^2}} \, dx=\frac {2 x \left (\sqrt {a} (a+b x) \left (8 a^2 D-2 a b (5 C+2 D x)+b^2 \left (15 B+5 C x+3 D x^2\right )\right )-15 A b^3 \sqrt {a+b x} \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )\right )}{15 \sqrt {a} b^3 \sqrt {c x} \sqrt {x (a+b x)}} \] Input:

Integrate[(A + B*x + C*x^2 + D*x^3)/(Sqrt[c*x]*Sqrt[a*x + b*x^2]),x]
 

Output:

(2*x*(Sqrt[a]*(a + b*x)*(8*a^2*D - 2*a*b*(5*C + 2*D*x) + b^2*(15*B + 5*C*x 
 + 3*D*x^2)) - 15*A*b^3*Sqrt[a + b*x]*ArcTanh[Sqrt[a + b*x]/Sqrt[a]]))/(15 
*Sqrt[a]*b^3*Sqrt[c*x]*Sqrt[x*(a + b*x)])
 

Rubi [A] (verified)

Time = 0.91 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.19, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {2169, 27, 2169, 27, 1221, 1136, 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 {A+B x+C x^2+D x^3}{\sqrt {c x} \sqrt {a x+b x^2}} \, dx\)

\(\Big \downarrow \) 2169

\(\displaystyle \frac {2 \int \frac {(5 b C-4 a D) x^2 c^3+5 A b c^3+5 b B x c^3}{2 \sqrt {c x} \sqrt {b x^2+a x}}dx}{5 b c^3}+\frac {2 D (c x)^{3/2} \sqrt {a x+b x^2}}{5 b c^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {(5 b C-4 a D) x^2 c^3+5 A b c^3+5 b B x c^3}{\sqrt {c x} \sqrt {b x^2+a x}}dx}{5 b c^3}+\frac {2 D (c x)^{3/2} \sqrt {a x+b x^2}}{5 b c^2}\)

\(\Big \downarrow \) 2169

\(\displaystyle \frac {\frac {2 \int \frac {c^5 \left (15 A b^2+\left (8 D a^2-10 b C a+15 b^2 B\right ) x\right )}{2 \sqrt {c x} \sqrt {b x^2+a x}}dx}{3 b c^2}+\frac {2 c^2 \sqrt {c x} \sqrt {a x+b x^2} (5 b C-4 a D)}{3 b}}{5 b c^3}+\frac {2 D (c x)^{3/2} \sqrt {a x+b x^2}}{5 b c^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {c^3 \int \frac {15 A b^2+\left (8 D a^2-10 b C a+15 b^2 B\right ) x}{\sqrt {c x} \sqrt {b x^2+a x}}dx}{3 b}+\frac {2 c^2 \sqrt {c x} \sqrt {a x+b x^2} (5 b C-4 a D)}{3 b}}{5 b c^3}+\frac {2 D (c x)^{3/2} \sqrt {a x+b x^2}}{5 b c^2}\)

\(\Big \downarrow \) 1221

\(\displaystyle \frac {\frac {c^3 \left (15 A b^2 \int \frac {1}{\sqrt {c x} \sqrt {b x^2+a x}}dx+\frac {2 \sqrt {a x+b x^2} \left (8 a^2 D-10 a b C+15 b^2 B\right )}{b \sqrt {c x}}\right )}{3 b}+\frac {2 c^2 \sqrt {c x} \sqrt {a x+b x^2} (5 b C-4 a D)}{3 b}}{5 b c^3}+\frac {2 D (c x)^{3/2} \sqrt {a x+b x^2}}{5 b c^2}\)

\(\Big \downarrow \) 1136

\(\displaystyle \frac {\frac {c^3 \left (30 A b^2 c \int \frac {1}{\frac {c \left (b x^2+a x\right )}{x}-a c}d\frac {\sqrt {b x^2+a x}}{\sqrt {c x}}+\frac {2 \sqrt {a x+b x^2} \left (8 a^2 D-10 a b C+15 b^2 B\right )}{b \sqrt {c x}}\right )}{3 b}+\frac {2 c^2 \sqrt {c x} \sqrt {a x+b x^2} (5 b C-4 a D)}{3 b}}{5 b c^3}+\frac {2 D (c x)^{3/2} \sqrt {a x+b x^2}}{5 b c^2}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {\frac {c^3 \left (\frac {2 \sqrt {a x+b x^2} \left (8 a^2 D-10 a b C+15 b^2 B\right )}{b \sqrt {c x}}-\frac {30 A b^2 \text {arctanh}\left (\frac {\sqrt {c} \sqrt {a x+b x^2}}{\sqrt {a} \sqrt {c x}}\right )}{\sqrt {a} \sqrt {c}}\right )}{3 b}+\frac {2 c^2 \sqrt {c x} \sqrt {a x+b x^2} (5 b C-4 a D)}{3 b}}{5 b c^3}+\frac {2 D (c x)^{3/2} \sqrt {a x+b x^2}}{5 b c^2}\)

Input:

Int[(A + B*x + C*x^2 + D*x^3)/(Sqrt[c*x]*Sqrt[a*x + b*x^2]),x]
 

Output:

(2*D*(c*x)^(3/2)*Sqrt[a*x + b*x^2])/(5*b*c^2) + ((2*c^2*(5*b*C - 4*a*D)*Sq 
rt[c*x]*Sqrt[a*x + b*x^2])/(3*b) + (c^3*((2*(15*b^2*B - 10*a*b*C + 8*a^2*D 
)*Sqrt[a*x + b*x^2])/(b*Sqrt[c*x]) - (30*A*b^2*ArcTanh[(Sqrt[c]*Sqrt[a*x + 
 b*x^2])/(Sqrt[a]*Sqrt[c*x])])/(Sqrt[a]*Sqrt[c])))/(3*b))/(5*b*c^3)
 

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 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]
 

rule 1136
Int[1/(Sqrt[(d_.) + (e_.)*(x_)]*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x 
_Symbol] :> Simp[2*e   Subst[Int[1/(2*c*d - b*e + e^2*x^2), x], x, Sqrt[a + 
 b*x + c*x^2]/Sqrt[d + e*x]], x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[c*d^2 
- b*d*e + a*e^2, 0]
 

rule 1221
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_), x_Symbol] :> Simp[g*(d + e*x)^m*((a + b*x + c*x^2)^(p + 1 
)/(c*(m + 2*p + 2))), x] + Simp[(m*(g*(c*d - b*e) + c*e*f) + e*(p + 1)*(2*c 
*f - b*g))/(c*e*(m + 2*p + 2))   Int[(d + e*x)^m*(a + b*x + c*x^2)^p, x], x 
] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[c*d^2 - b*d*e + a*e^2, 0] 
 && NeQ[m + 2*p + 2, 0]
 

rule 2169
Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p 
_), x_Symbol] :> With[{q = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, S 
imp[f*(d + e*x)^(m + q - 1)*((a + b*x + c*x^2)^(p + 1)/(c*e^(q - 1)*(m + q 
+ 2*p + 1))), x] + Simp[1/(c*e^q*(m + q + 2*p + 1))   Int[(d + e*x)^m*(a + 
b*x + c*x^2)^p*ExpandToSum[c*e^q*(m + q + 2*p + 1)*Pq - c*f*(m + q + 2*p + 
1)*(d + e*x)^q + e*f*(m + p + q)*(d + e*x)^(q - 2)*(b*d - 2*a*e + (2*c*d - 
b*e)*x), x], x], x] /; NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, c, d, e, m, 
 p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - b*d*e + a*e^2 
, 0]
 
Maple [A] (verified)

Time = 0.44 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.18

method result size
default \(-\frac {2 \sqrt {x \left (b x +a \right )}\, \left (-3 D b^{2} x^{2} \sqrt {c \left (b x +a \right )}\, \sqrt {a c}+15 A \,b^{3} c \,\operatorname {arctanh}\left (\frac {\sqrt {c \left (b x +a \right )}}{\sqrt {a c}}\right )-5 C \,b^{2} x \sqrt {c \left (b x +a \right )}\, \sqrt {a c}+4 D a b x \sqrt {c \left (b x +a \right )}\, \sqrt {a c}-15 B \,b^{2} \sqrt {c \left (b x +a \right )}\, \sqrt {a c}+10 C a b \sqrt {c \left (b x +a \right )}\, \sqrt {a c}-8 D a^{2} \sqrt {c \left (b x +a \right )}\, \sqrt {a c}\right )}{15 \sqrt {c x}\, \sqrt {c \left (b x +a \right )}\, b^{3} \sqrt {a c}}\) \(181\)

Input:

int((D*x^3+C*x^2+B*x+A)/(c*x)^(1/2)/(b*x^2+a*x)^(1/2),x,method=_RETURNVERB 
OSE)
 

Output:

-2/15*(x*(b*x+a))^(1/2)*(-3*D*b^2*x^2*(c*(b*x+a))^(1/2)*(a*c)^(1/2)+15*A*b 
^3*c*arctanh((c*(b*x+a))^(1/2)/(a*c)^(1/2))-5*C*b^2*x*(c*(b*x+a))^(1/2)*(a 
*c)^(1/2)+4*D*a*b*x*(c*(b*x+a))^(1/2)*(a*c)^(1/2)-15*B*b^2*(c*(b*x+a))^(1/ 
2)*(a*c)^(1/2)+10*C*a*b*(c*(b*x+a))^(1/2)*(a*c)^(1/2)-8*D*a^2*(c*(b*x+a))^ 
(1/2)*(a*c)^(1/2))/(c*x)^(1/2)/(c*(b*x+a))^(1/2)/b^3/(a*c)^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 263, normalized size of antiderivative = 1.71 \[ \int \frac {A+B x+C x^2+D x^3}{\sqrt {c x} \sqrt {a x+b x^2}} \, dx=\left [\frac {15 \, \sqrt {a c} A b^{3} x \log \left (-\frac {b c x^{2} + 2 \, a c x - 2 \, \sqrt {b x^{2} + a x} \sqrt {a c} \sqrt {c x}}{x^{2}}\right ) + 2 \, {\left (3 \, D a b^{2} x^{2} + 8 \, D a^{3} - 10 \, C a^{2} b + 15 \, B a b^{2} - {\left (4 \, D a^{2} b - 5 \, C a b^{2}\right )} x\right )} \sqrt {b x^{2} + a x} \sqrt {c x}}{15 \, a b^{3} c x}, \frac {2 \, {\left (15 \, \sqrt {-a c} A b^{3} x \arctan \left (\frac {\sqrt {b x^{2} + a x} \sqrt {-a c} \sqrt {c x}}{a c x}\right ) + {\left (3 \, D a b^{2} x^{2} + 8 \, D a^{3} - 10 \, C a^{2} b + 15 \, B a b^{2} - {\left (4 \, D a^{2} b - 5 \, C a b^{2}\right )} x\right )} \sqrt {b x^{2} + a x} \sqrt {c x}\right )}}{15 \, a b^{3} c x}\right ] \] Input:

integrate((D*x^3+C*x^2+B*x+A)/(c*x)^(1/2)/(b*x^2+a*x)^(1/2),x, algorithm=" 
fricas")
 

Output:

[1/15*(15*sqrt(a*c)*A*b^3*x*log(-(b*c*x^2 + 2*a*c*x - 2*sqrt(b*x^2 + a*x)* 
sqrt(a*c)*sqrt(c*x))/x^2) + 2*(3*D*a*b^2*x^2 + 8*D*a^3 - 10*C*a^2*b + 15*B 
*a*b^2 - (4*D*a^2*b - 5*C*a*b^2)*x)*sqrt(b*x^2 + a*x)*sqrt(c*x))/(a*b^3*c* 
x), 2/15*(15*sqrt(-a*c)*A*b^3*x*arctan(sqrt(b*x^2 + a*x)*sqrt(-a*c)*sqrt(c 
*x)/(a*c*x)) + (3*D*a*b^2*x^2 + 8*D*a^3 - 10*C*a^2*b + 15*B*a*b^2 - (4*D*a 
^2*b - 5*C*a*b^2)*x)*sqrt(b*x^2 + a*x)*sqrt(c*x))/(a*b^3*c*x)]
 

Sympy [F]

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

integrate((D*x**3+C*x**2+B*x+A)/(c*x)**(1/2)/(b*x**2+a*x)**(1/2),x)
 

Output:

Integral((A + B*x + C*x**2 + D*x**3)/(sqrt(c*x)*sqrt(x*(a + b*x))), x)
 

Maxima [F]

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

integrate((D*x^3+C*x^2+B*x+A)/(c*x)^(1/2)/(b*x^2+a*x)^(1/2),x, algorithm=" 
maxima")
 

Output:

2/15*((3*D*b^3*sqrt(c)*x^2 + D*a*b^2*sqrt(c)*x - 2*D*a^2*b*sqrt(c))*x^2 - 
(2*D*a^3*sqrt(c) + (2*D*a*b^2*sqrt(c) - 5*C*b^3*sqrt(c))*x^2 + (4*D*a^2*b* 
sqrt(c) - 5*C*a*b^2*sqrt(c))*x)*x)*sqrt(b*x + a)/(b^4*c*x^2 + a*b^3*c*x) + 
 integrate(1/3*(3*A*a*b^2*x + (2*D*a^3 - 2*C*a^2*b + (2*D*a^2*b - 2*C*a*b^ 
2 + 3*B*b^3)*x)*x^2 + 3*(B*a*b^2 + A*b^3)*x^2)*sqrt(b*x + a)/(b^4*sqrt(c)* 
x^4 + 2*a*b^3*sqrt(c)*x^3 + a^2*b^2*sqrt(c)*x^2), x)
 

Giac [A] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.59 \[ \int \frac {A+B x+C x^2+D x^3}{\sqrt {c x} \sqrt {a x+b x^2}} \, dx=\frac {2 \, c {\left (\frac {\frac {15 \, A c^{3} \arctan \left (\frac {\sqrt {b c x + a c}}{\sqrt {-a c}}\right )}{\sqrt {-a c}} + \frac {15 \, \sqrt {b c x + a c} D a^{2} b^{12} c^{2} - 15 \, \sqrt {b c x + a c} C a b^{13} c^{2} + 15 \, \sqrt {b c x + a c} B b^{14} c^{2} - 10 \, {\left (b c x + a c\right )}^{\frac {3}{2}} D a b^{12} c + 5 \, {\left (b c x + a c\right )}^{\frac {3}{2}} C b^{13} c + 3 \, {\left (b c x + a c\right )}^{\frac {5}{2}} D b^{12}}{b^{15}}}{c^{3}} - \frac {15 \, A b^{3} c \arctan \left (\frac {\sqrt {a c}}{\sqrt {-a c}}\right ) + 8 \, \sqrt {a c} \sqrt {-a c} D a^{2} - 10 \, \sqrt {a c} \sqrt {-a c} C a b + 15 \, \sqrt {a c} \sqrt {-a c} B b^{2}}{\sqrt {-a c} b^{3} c}\right )}}{15 \, {\left | c \right |}} \] Input:

integrate((D*x^3+C*x^2+B*x+A)/(c*x)^(1/2)/(b*x^2+a*x)^(1/2),x, algorithm=" 
giac")
 

Output:

2/15*c*((15*A*c^3*arctan(sqrt(b*c*x + a*c)/sqrt(-a*c))/sqrt(-a*c) + (15*sq 
rt(b*c*x + a*c)*D*a^2*b^12*c^2 - 15*sqrt(b*c*x + a*c)*C*a*b^13*c^2 + 15*sq 
rt(b*c*x + a*c)*B*b^14*c^2 - 10*(b*c*x + a*c)^(3/2)*D*a*b^12*c + 5*(b*c*x 
+ a*c)^(3/2)*C*b^13*c + 3*(b*c*x + a*c)^(5/2)*D*b^12)/b^15)/c^3 - (15*A*b^ 
3*c*arctan(sqrt(a*c)/sqrt(-a*c)) + 8*sqrt(a*c)*sqrt(-a*c)*D*a^2 - 10*sqrt( 
a*c)*sqrt(-a*c)*C*a*b + 15*sqrt(a*c)*sqrt(-a*c)*B*b^2)/(sqrt(-a*c)*b^3*c)) 
/abs(c)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {A+B x+C x^2+D x^3}{\sqrt {c x} \sqrt {a x+b x^2}} \, dx=\int \frac {A+B\,x+C\,x^2+x^3\,D}{\sqrt {b\,x^2+a\,x}\,\sqrt {c\,x}} \,d x \] Input:

int((A + B*x + C*x^2 + x^3*D)/((a*x + b*x^2)^(1/2)*(c*x)^(1/2)),x)
 

Output:

int((A + B*x + C*x^2 + x^3*D)/((a*x + b*x^2)^(1/2)*(c*x)^(1/2)), x)
 

Reduce [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.79 \[ \int \frac {A+B x+C x^2+D x^3}{\sqrt {c x} \sqrt {a x+b x^2}} \, dx=\frac {\sqrt {c}\, \left (16 \sqrt {b x +a}\, a^{2} d -20 \sqrt {b x +a}\, a b c -8 \sqrt {b x +a}\, a b d x +30 \sqrt {b x +a}\, b^{3}+10 \sqrt {b x +a}\, b^{2} c x +6 \sqrt {b x +a}\, b^{2} d \,x^{2}+15 \sqrt {a}\, \mathrm {log}\left (\sqrt {b x +a}-\sqrt {a}\right ) b^{3}-15 \sqrt {a}\, \mathrm {log}\left (\sqrt {b x +a}+\sqrt {a}\right ) b^{3}\right )}{15 b^{3} c} \] Input:

int((D*x^3+C*x^2+B*x+A)/(c*x)^(1/2)/(b*x^2+a*x)^(1/2),x)
 

Output:

(sqrt(c)*(16*sqrt(a + b*x)*a**2*d - 20*sqrt(a + b*x)*a*b*c - 8*sqrt(a + b* 
x)*a*b*d*x + 30*sqrt(a + b*x)*b**3 + 10*sqrt(a + b*x)*b**2*c*x + 6*sqrt(a 
+ b*x)*b**2*d*x**2 + 15*sqrt(a)*log(sqrt(a + b*x) - sqrt(a))*b**3 - 15*sqr 
t(a)*log(sqrt(a + b*x) + sqrt(a))*b**3))/(15*b**3*c)