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

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

Optimal result

Integrand size = 29, antiderivative size = 130 \[ \int \frac {A+B x+C x^2}{(c+d x) \sqrt {a+b x^2}} \, dx=\frac {C \sqrt {a+b x^2}}{b d}-\frac {(c C-B d) \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b} d^2}-\frac {\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 )}{d^2 \sqrt {b c^2+a d^2}} \] Output:

C*(b*x^2+a)^(1/2)/b/d-(-B*d+C*c)*arctanh(b^(1/2)*x/(b*x^2+a)^(1/2))/b^(1/2 
)/d^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))/d^2/(a*d^2+b*c^2)^(1/2)
 

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.59 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.04, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {2185, 27, 719, 224, 219, 488, 219}

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

\(\Big \downarrow \) 2185

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 719

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

\(\Big \downarrow \) 224

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

\(\Big \downarrow \) 219

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

\(\Big \downarrow \) 488

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

\(\Big \downarrow \) 219

\(\displaystyle \frac {-\frac {\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 )}{d \sqrt {a d^2+b c^2}}-\frac {\text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right ) (c C-B d)}{\sqrt {b} d}}{d}+\frac {C \sqrt {a+b x^2}}{b d}\)

Input:

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

Output:

(C*Sqrt[a + b*x^2])/(b*d) + (-(((c*C - B*d)*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b 
*x^2]])/(Sqrt[b]*d)) - ((c^2*C - B*c*d + A*d^2)*ArcTanh[(a*d - b*c*x)/(Sqr 
t[b*c^2 + a*d^2]*Sqrt[a + b*x^2])])/(d*Sqrt[b*c^2 + a*d^2]))/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 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

rule 488
Int[1/(((c_) + (d_.)*(x_))*Sqrt[(a_) + (b_.)*(x_)^2]), x_Symbol] :> -Subst[ 
Int[1/(b*c^2 + a*d^2 - x^2), x], x, (a*d - b*c*x)/Sqrt[a + b*x^2]] /; FreeQ 
[{a, b, c, d}, x]
 

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

rule 2185
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] : 
> With[{q = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[f*(d + e*x) 
^(m + q - 1)*((a + b*x^2)^(p + 1)/(b*e^(q - 1)*(m + q + 2*p + 1))), x] + Si 
mp[1/(b*e^q*(m + q + 2*p + 1))   Int[(d + e*x)^m*(a + b*x^2)^p*ExpandToSum[ 
b*e^q*(m + q + 2*p + 1)*Pq - b*f*(m + q + 2*p + 1)*(d + e*x)^q - f*(d + e*x 
)^(q - 2)*(a*e^2*(m + q - 1) - b*d^2*(m + q + 2*p + 1) - 2*b*d*e*(m + q + p 
)*x), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, d 
, e, m, p}, x] && PolyQ[Pq, x] && NeQ[b*d^2 + a*e^2, 0] &&  !(EqQ[d, 0] && 
True) &&  !(IGtQ[m, 0] && RationalQ[a, b, d, e] && (IntegerQ[p] || ILtQ[p + 
 1/2, 0]))
 
Maple [A] (verified)

Time = 0.19 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.52

method result size
risch \(\frac {C \sqrt {b \,x^{2}+a}}{b d}+\frac {\frac {\left (B d -C c \right ) \ln \left (\sqrt {b}\, x +\sqrt {b \,x^{2}+a}\right )}{d \sqrt {b}}-\frac {\left (A \,d^{2}-B c d +C \,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}}}}}{d}\) \(197\)
default \(\frac {\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}}}{d^{2}}-\frac {\left (A \,d^{2}-B c d +C \,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^{3} \sqrt {\frac {a \,d^{2}+b \,c^{2}}{d^{2}}}}\) \(209\)

Input:

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

Output:

C*(b*x^2+a)^(1/2)/b/d+1/d*((B*d-C*c)/d*ln(b^(1/2)*x+(b*x^2+a)^(1/2))/b^(1/ 
2)-(A*d^2-B*c*d+C*c^2)/d^2/((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)))
 

Fricas [A] (verification not implemented)

Time = 120.08 (sec) , antiderivative size = 881, normalized size of antiderivative = 6.78 \[ \int \frac {A+B x+C x^2}{(c+d x) \sqrt {a+b x^2}} \, dx =\text {Too large to display} \] Input:

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

Output:

[-1/2*((C*b*c^3 - B*b*c^2*d + C*a*c*d^2 - B*a*d^3)*sqrt(b)*log(-2*b*x^2 - 
2*sqrt(b*x^2 + a)*sqrt(b)*x - a) - (C*b*c^2 - B*b*c*d + A*b*d^2)*sqrt(b*c^ 
2 + a*d^2)*log((2*a*b*c*d*x - a*b*c^2 - 2*a^2*d^2 - (2*b^2*c^2 + a*b*d^2)* 
x^2 - 2*sqrt(b*c^2 + a*d^2)*(b*c*x - a*d)*sqrt(b*x^2 + a))/(d^2*x^2 + 2*c* 
d*x + c^2)) - 2*(C*b*c^2*d + C*a*d^3)*sqrt(b*x^2 + a))/(b^2*c^2*d^2 + a*b* 
d^4), 1/2*(2*(C*b*c^3 - B*b*c^2*d + C*a*c*d^2 - B*a*d^3)*sqrt(-b)*arctan(s 
qrt(-b)*x/sqrt(b*x^2 + a)) + (C*b*c^2 - B*b*c*d + A*b*d^2)*sqrt(b*c^2 + a* 
d^2)*log((2*a*b*c*d*x - a*b*c^2 - 2*a^2*d^2 - (2*b^2*c^2 + a*b*d^2)*x^2 - 
2*sqrt(b*c^2 + a*d^2)*(b*c*x - a*d)*sqrt(b*x^2 + a))/(d^2*x^2 + 2*c*d*x + 
c^2)) + 2*(C*b*c^2*d + C*a*d^3)*sqrt(b*x^2 + a))/(b^2*c^2*d^2 + a*b*d^4), 
-1/2*(2*(C*b*c^2 - B*b*c*d + A*b*d^2)*sqrt(-b*c^2 - a*d^2)*arctan(sqrt(-b* 
c^2 - a*d^2)*(b*c*x - a*d)*sqrt(b*x^2 + a)/(a*b*c^2 + a^2*d^2 + (b^2*c^2 + 
 a*b*d^2)*x^2)) + (C*b*c^3 - B*b*c^2*d + C*a*c*d^2 - B*a*d^3)*sqrt(b)*log( 
-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) - 2*(C*b*c^2*d + C*a*d^3)*sqrt 
(b*x^2 + a))/(b^2*c^2*d^2 + a*b*d^4), -((C*b*c^2 - B*b*c*d + A*b*d^2)*sqrt 
(-b*c^2 - a*d^2)*arctan(sqrt(-b*c^2 - a*d^2)*(b*c*x - a*d)*sqrt(b*x^2 + a) 
/(a*b*c^2 + a^2*d^2 + (b^2*c^2 + a*b*d^2)*x^2)) - (C*b*c^3 - B*b*c^2*d + C 
*a*c*d^2 - B*a*d^3)*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - (C*b*c^2 
*d + C*a*d^3)*sqrt(b*x^2 + a))/(b^2*c^2*d^2 + a*b*d^4)]
 

Sympy [F]

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

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.68 \[ \int \frac {A+B x+C x^2}{(c+d x) \sqrt {a+b x^2}} \, dx=-\frac {C c \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {b} d^{2}} + \frac {B \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {b} d} + \frac {C c^{2} \operatorname {arsinh}\left (\frac {b c x}{\sqrt {a b} {\left | d x + c \right |}} - \frac {a d}{\sqrt {a b} {\left | d x + c \right |}}\right )}{\sqrt {a + \frac {b c^{2}}{d^{2}}} d^{3}} - \frac {B c \operatorname {arsinh}\left (\frac {b c x}{\sqrt {a b} {\left | d x + c \right |}} - \frac {a d}{\sqrt {a b} {\left | d x + c \right |}}\right )}{\sqrt {a + \frac {b c^{2}}{d^{2}}} d^{2}} + \frac {A \operatorname {arsinh}\left (\frac {b c x}{\sqrt {a b} {\left | d x + c \right |}} - \frac {a d}{\sqrt {a b} {\left | d x + c \right |}}\right )}{\sqrt {a + \frac {b c^{2}}{d^{2}}} d} + \frac {\sqrt {b x^{2} + a} C}{b d} \] Input:

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

Output:

-C*c*arcsinh(b*x/sqrt(a*b))/(sqrt(b)*d^2) + B*arcsinh(b*x/sqrt(a*b))/(sqrt 
(b)*d) + C*c^2*arcsinh(b*c*x/(sqrt(a*b)*abs(d*x + c)) - a*d/(sqrt(a*b)*abs 
(d*x + c)))/(sqrt(a + b*c^2/d^2)*d^3) - B*c*arcsinh(b*c*x/(sqrt(a*b)*abs(d 
*x + c)) - a*d/(sqrt(a*b)*abs(d*x + c)))/(sqrt(a + b*c^2/d^2)*d^2) + A*arc 
sinh(b*c*x/(sqrt(a*b)*abs(d*x + c)) - a*d/(sqrt(a*b)*abs(d*x + c)))/(sqrt( 
a + b*c^2/d^2)*d) + sqrt(b*x^2 + a)*C/(b*d)
 

Giac [F(-2)]

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

integrate((C*x^2+B*x+A)/(d*x+c)/(b*x^2+a)^(1/2),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 {A+B x+C x^2}{(c+d x) \sqrt {a+b x^2}} \, dx=\int \frac {C\,x^2+B\,x+A}{\sqrt {b\,x^2+a}\,\left (c+d\,x\right )} \,d x \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 3317, normalized size of antiderivative = 25.52 \[ \int \frac {A+B x+C x^2}{(c+d x) \sqrt {a+b x^2}} \, dx =\text {Too large to display} \] Input:

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

Output:

( - 2*sqrt(b)*sqrt(2*sqrt(b)*sqrt(a*d**2 + b*c**2)*c - a*d**2 - 2*b*c**2)* 
sqrt(a*d**2 + b*c**2)*atan((sqrt(a + b*x**2)*d + sqrt(b)*d*x)/sqrt(2*sqrt( 
b)*sqrt(a*d**2 + b*c**2)*c - a*d**2 - 2*b*c**2))*a*b*c*d**2 + 2*sqrt(b)*sq 
rt(2*sqrt(b)*sqrt(a*d**2 + b*c**2)*c - a*d**2 - 2*b*c**2)*sqrt(a*d**2 + b* 
c**2)*atan((sqrt(a + b*x**2)*d + sqrt(b)*d*x)/sqrt(2*sqrt(b)*sqrt(a*d**2 + 
 b*c**2)*c - a*d**2 - 2*b*c**2))*b**2*c**2*d - 2*sqrt(b)*sqrt(2*sqrt(b)*sq 
rt(a*d**2 + b*c**2)*c - a*d**2 - 2*b*c**2)*sqrt(a*d**2 + b*c**2)*atan((sqr 
t(a + b*x**2)*d + sqrt(b)*d*x)/sqrt(2*sqrt(b)*sqrt(a*d**2 + b*c**2)*c - a* 
d**2 - 2*b*c**2))*b*c**4 - 2*sqrt(2*sqrt(b)*sqrt(a*d**2 + b*c**2)*c - a*d* 
*2 - 2*b*c**2)*atan((sqrt(a + b*x**2)*d + sqrt(b)*d*x)/sqrt(2*sqrt(b)*sqrt 
(a*d**2 + b*c**2)*c - a*d**2 - 2*b*c**2))*a**2*b*d**4 - 2*sqrt(2*sqrt(b)*s 
qrt(a*d**2 + b*c**2)*c - a*d**2 - 2*b*c**2)*atan((sqrt(a + b*x**2)*d + sqr 
t(b)*d*x)/sqrt(2*sqrt(b)*sqrt(a*d**2 + b*c**2)*c - a*d**2 - 2*b*c**2))*a*b 
**2*c**2*d**2 + 2*sqrt(2*sqrt(b)*sqrt(a*d**2 + b*c**2)*c - a*d**2 - 2*b*c* 
*2)*atan((sqrt(a + b*x**2)*d + sqrt(b)*d*x)/sqrt(2*sqrt(b)*sqrt(a*d**2 + b 
*c**2)*c - a*d**2 - 2*b*c**2))*a*b**2*c*d**3 - 2*sqrt(2*sqrt(b)*sqrt(a*d** 
2 + b*c**2)*c - a*d**2 - 2*b*c**2)*atan((sqrt(a + b*x**2)*d + sqrt(b)*d*x) 
/sqrt(2*sqrt(b)*sqrt(a*d**2 + b*c**2)*c - a*d**2 - 2*b*c**2))*a*b*c**3*d** 
2 + 2*sqrt(2*sqrt(b)*sqrt(a*d**2 + b*c**2)*c - a*d**2 - 2*b*c**2)*atan((sq 
rt(a + b*x**2)*d + sqrt(b)*d*x)/sqrt(2*sqrt(b)*sqrt(a*d**2 + b*c**2)*c ...