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

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

Optimal result

Integrand size = 32, antiderivative size = 186 \[ \int \frac {\sqrt {a+b x^2} \left (A+B x+C x^2\right )}{x^2 (c+d x)} \, dx=\frac {C \sqrt {a+b x^2}}{d}-\frac {A \sqrt {a+b x^2}}{c x}-\frac {\sqrt {b} (c C-B d) \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{d^2}-\frac {\sqrt {b c^2+a d^2} \left (c^2 C-B c d+A d^2\right ) \text {arctanh}\left (\frac {a d-b c x}{\sqrt {b c^2+a d^2} \sqrt {a+b x^2}}\right )}{c^2 d^2}-\frac {\sqrt {a} (B c-A d) \text {arctanh}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{c^2} \] Output:

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

Mathematica [A] (verified)

Time = 0.85 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.08 \[ \int \frac {\sqrt {a+b x^2} \left (A+B x+C x^2\right )}{x^2 (c+d x)} \, dx=\frac {2 \sqrt {-b c^2-a d^2} \left (c^2 C-B c d+A d^2\right ) x \arctan \left (\frac {\sqrt {b} (c+d x)-d \sqrt {a+b x^2}}{\sqrt {-b c^2-a d^2}}\right )+2 \sqrt {a} d^2 (-B c+A d) x \text {arctanh}\left (\frac {-\sqrt {b} x+\sqrt {a+b x^2}}{\sqrt {a}}\right )+c \left (d (-A d+c C x) \sqrt {a+b x^2}+\sqrt {b} c (c C-B d) x \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )\right )}{c^2 d^2 x} \] Input:

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

Output:

(2*Sqrt[-(b*c^2) - a*d^2]*(c^2*C - B*c*d + A*d^2)*x*ArcTan[(Sqrt[b]*(c + d 
*x) - d*Sqrt[a + b*x^2])/Sqrt[-(b*c^2) - a*d^2]] + 2*Sqrt[a]*d^2*(-(B*c) + 
 A*d)*x*ArcTanh[(-(Sqrt[b]*x) + Sqrt[a + b*x^2])/Sqrt[a]] + c*(d*(-(A*d) + 
 c*C*x)*Sqrt[a + b*x^2] + Sqrt[b]*c*(c*C - B*d)*x*Log[-(Sqrt[b]*x) + Sqrt[ 
a + b*x^2]]))/(c^2*d^2*x)
 

Rubi [A] (verified)

Time = 0.96 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.44, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {2353, 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 {\sqrt {a+b x^2} \left (A+B x+C x^2\right )}{x^2 (c+d x)} \, dx\)

\(\Big \downarrow \) 2353

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right ) \left (A d^2-B c d+c^2 C\right )}{c d^2}-\frac {\sqrt {a d^2+b c^2} \left (A d^2-B c d+c^2 C\right ) \text {arctanh}\left (\frac {a d-b c x}{\sqrt {a+b x^2} \sqrt {a d^2+b c^2}}\right )}{c^2 d^2}-\frac {\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right ) (B c-A d)}{c^2}+\frac {A \sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{c}+\frac {\sqrt {a+b x^2} \left (A d^2-B c d+c^2 C\right )}{c^2 d}+\frac {\sqrt {a+b x^2} (B c-A d)}{c^2}-\frac {A \sqrt {a+b x^2}}{c x}\)

Input:

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

Output:

((B*c - A*d)*Sqrt[a + b*x^2])/c^2 + ((c^2*C - B*c*d + A*d^2)*Sqrt[a + b*x^ 
2])/(c^2*d) - (A*Sqrt[a + b*x^2])/(c*x) + (A*Sqrt[b]*ArcTanh[(Sqrt[b]*x)/S 
qrt[a + b*x^2]])/c - (Sqrt[b]*(c^2*C - B*c*d + A*d^2)*ArcTanh[(Sqrt[b]*x)/ 
Sqrt[a + b*x^2]])/(c*d^2) - (Sqrt[b*c^2 + a*d^2]*(c^2*C - B*c*d + A*d^2)*A 
rcTanh[(a*d - b*c*x)/(Sqrt[b*c^2 + a*d^2]*Sqrt[a + b*x^2])])/(c^2*d^2) - ( 
Sqrt[a]*(B*c - A*d)*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]])/c^2
 

Defintions of rubi rules used

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

rule 2353
Int[(Px_)*((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2) 
^(p_), x_Symbol] :> Int[ExpandIntegrand[Px*(e*x)^m*(c + d*x)^n*(a + b*x^2)^ 
p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && PolyQ[Px, x] && (Integer 
Q[p] || (IntegerQ[2*p] && IntegerQ[m] && ILtQ[n, 0]))
 
Maple [A] (verified)

Time = 0.25 (sec) , antiderivative size = 306, normalized size of antiderivative = 1.65

method result size
risch \(-\frac {A \sqrt {b \,x^{2}+a}}{c x}+\frac {\frac {b c \left (\frac {B d \ln \left (\sqrt {b}\, x +\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}+\frac {C d \sqrt {b \,x^{2}+a}}{b}-\frac {C c \ln \left (\sqrt {b}\, x +\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}\right )}{d^{2}}-\frac {\left (A a \,d^{4}+A b \,c^{2} d^{2}-B a c \,d^{3}-c^{3} B b d +C a \,c^{2} d^{2}+c^{4} C b \right ) \ln \left (\frac {\frac {2 a \,d^{2}+2 b \,c^{2}}{d^{2}}-\frac {2 b c \left (x +\frac {c}{d}\right )}{d}+2 \sqrt {\frac {a \,d^{2}+b \,c^{2}}{d^{2}}}\, \sqrt {b \left (x +\frac {c}{d}\right )^{2}-\frac {2 b c \left (x +\frac {c}{d}\right )}{d}+\frac {a \,d^{2}+b \,c^{2}}{d^{2}}}}{x +\frac {c}{d}}\right )}{d^{3} c \sqrt {\frac {a \,d^{2}+b \,c^{2}}{d^{2}}}}+\frac {\sqrt {a}\, \left (A d -B c \right ) \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right )}{c}}{c}\) \(306\)
default \(\frac {A \left (-\frac {\left (b \,x^{2}+a \right )^{\frac {3}{2}}}{a x}+\frac {2 b \left (\frac {x \sqrt {b \,x^{2}+a}}{2}+\frac {a \ln \left (\sqrt {b}\, x +\sqrt {b \,x^{2}+a}\right )}{2 \sqrt {b}}\right )}{a}\right )}{c}-\frac {\left (A d -B c \right ) \left (\sqrt {b \,x^{2}+a}-\sqrt {a}\, \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right )\right )}{c^{2}}+\frac {\left (A \,d^{2}-B c d +C \,c^{2}\right ) \left (\sqrt {b \left (x +\frac {c}{d}\right )^{2}-\frac {2 b c \left (x +\frac {c}{d}\right )}{d}+\frac {a \,d^{2}+b \,c^{2}}{d^{2}}}-\frac {\sqrt {b}\, c \ln \left (\frac {-\frac {b c}{d}+b \left (x +\frac {c}{d}\right )}{\sqrt {b}}+\sqrt {b \left (x +\frac {c}{d}\right )^{2}-\frac {2 b c \left (x +\frac {c}{d}\right )}{d}+\frac {a \,d^{2}+b \,c^{2}}{d^{2}}}\right )}{d}-\frac {\left (a \,d^{2}+b \,c^{2}\right ) \ln \left (\frac {\frac {2 a \,d^{2}+2 b \,c^{2}}{d^{2}}-\frac {2 b c \left (x +\frac {c}{d}\right )}{d}+2 \sqrt {\frac {a \,d^{2}+b \,c^{2}}{d^{2}}}\, \sqrt {b \left (x +\frac {c}{d}\right )^{2}-\frac {2 b c \left (x +\frac {c}{d}\right )}{d}+\frac {a \,d^{2}+b \,c^{2}}{d^{2}}}}{x +\frac {c}{d}}\right )}{d^{2} \sqrt {\frac {a \,d^{2}+b \,c^{2}}{d^{2}}}}\right )}{c^{2} d}\) \(396\)

Input:

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

Output:

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

Fricas [F(-1)]

Timed out. \[ \int \frac {\sqrt {a+b x^2} \left (A+B x+C x^2\right )}{x^2 (c+d x)} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

integrate((C*x^2 + B*x + A)*sqrt(b*x^2 + a)/((d*x + c)*x^2), x)
 

Giac [F(-2)]

Exception generated. \[ \int \frac {\sqrt {a+b x^2} \left (A+B x+C x^2\right )}{x^2 (c+d x)} \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:index.cc index_m i_lex_is_greater E 
rror: Bad Argument Value
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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