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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.80 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.09, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2338, 25, 2340, 27, 538, 224, 219, 243, 73, 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 {(c+d x) \left (A+B x+C x^2\right )}{x^2 \sqrt {a+b x^2}} \, dx\)

\(\Big \downarrow \) 2338

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 2340

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 538

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

\(\Big \downarrow \) 224

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

\(\Big \downarrow \) 219

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

\(\Big \downarrow \) 243

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 221

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, 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 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 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 243
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2   Subst[In 
t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I 
ntegerQ[(m - 1)/2]
 

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

rule 2338
Int[(Pq_)*((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{ 
Q = PolynomialQuotient[Pq, c*x, x], R = PolynomialRemainder[Pq, c*x, x]}, S 
imp[R*(c*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] + Simp[1/(a*c*( 
m + 1))   Int[(c*x)^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*c*(m + 1)*Q - b*R*( 
m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && Lt 
Q[m, -1] && (IntegerQ[2*p] || NeQ[Expon[Pq, x], 1])
 

rule 2340
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[ 
{q = Expon[Pq, x], f = Coeff[Pq, x, Expon[Pq, x]]}, Simp[f*(c*x)^(m + q - 1 
)*((a + b*x^2)^(p + 1)/(b*c^(q - 1)*(m + q + 2*p + 1))), x] + Simp[1/(b*(m 
+ q + 2*p + 1))   Int[(c*x)^m*(a + b*x^2)^p*ExpandToSum[b*(m + q + 2*p + 1) 
*Pq - b*f*(m + q + 2*p + 1)*x^q - a*f*(m + q - 1)*x^(q - 2), x], x], x] /; 
GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, b, c, m, p}, x] && PolyQ 
[Pq, x] && ( !IGtQ[m, 0] || IGtQ[p + 1/2, -1])
 
Maple [A] (verified)

Time = 0.21 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.12

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

[1/2*((C*a*c + B*a*d)*sqrt(b)*x*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x 
 - a) + (B*b*c + A*b*d)*sqrt(a)*x*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) 
+ 2*a)/x^2) + 2*(C*a*d*x - A*b*c)*sqrt(b*x^2 + a))/(a*b*x), -1/2*(2*(C*a*c 
 + B*a*d)*sqrt(-b)*x*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - (B*b*c + A*b*d)* 
sqrt(a)*x*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) - 2*(C*a*d*x 
 - A*b*c)*sqrt(b*x^2 + a))/(a*b*x), 1/2*(2*(B*b*c + A*b*d)*sqrt(-a)*x*arct 
an(sqrt(b*x^2 + a)*sqrt(-a)/a) + (C*a*c + B*a*d)*sqrt(b)*x*log(-2*b*x^2 - 
2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + 2*(C*a*d*x - A*b*c)*sqrt(b*x^2 + a))/(a 
*b*x), -((C*a*c + B*a*d)*sqrt(-b)*x*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - ( 
B*b*c + A*b*d)*sqrt(-a)*x*arctan(sqrt(b*x^2 + a)*sqrt(-a)/a) - (C*a*d*x - 
A*b*c)*sqrt(b*x^2 + a))/(a*b*x)]
 

Sympy [A] (verification not implemented)

Time = 2.24 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.90 \[ \int \frac {(c+d x) \left (A+B x+C x^2\right )}{x^2 \sqrt {a+b x^2}} \, dx=- \frac {A \sqrt {b} c \sqrt {\frac {a}{b x^{2}} + 1}}{a} - \frac {A d \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{\sqrt {a}} + B d \left (\begin {cases} \frac {\log {\left (2 \sqrt {b} \sqrt {a + b x^{2}} + 2 b x \right )}}{\sqrt {b}} & \text {for}\: a \neq 0 \wedge b \neq 0 \\\frac {x \log {\left (x \right )}}{\sqrt {b x^{2}}} & \text {for}\: b \neq 0 \\\frac {x}{\sqrt {a}} & \text {otherwise} \end {cases}\right ) - \frac {B c \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{\sqrt {a}} + C c \left (\begin {cases} \frac {\log {\left (2 \sqrt {b} \sqrt {a + b x^{2}} + 2 b x \right )}}{\sqrt {b}} & \text {for}\: a \neq 0 \wedge b \neq 0 \\\frac {x \log {\left (x \right )}}{\sqrt {b x^{2}}} & \text {for}\: b \neq 0 \\\frac {x}{\sqrt {a}} & \text {otherwise} \end {cases}\right ) + C d \left (\begin {cases} \frac {\sqrt {a + b x^{2}}}{b} & \text {for}\: b \neq 0 \\\frac {x^{2}}{2 \sqrt {a}} & \text {otherwise} \end {cases}\right ) \] Input:

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

Output:

-A*sqrt(b)*c*sqrt(a/(b*x**2) + 1)/a - A*d*asinh(sqrt(a)/(sqrt(b)*x))/sqrt( 
a) + B*d*Piecewise((log(2*sqrt(b)*sqrt(a + b*x**2) + 2*b*x)/sqrt(b), Ne(a, 
 0) & Ne(b, 0)), (x*log(x)/sqrt(b*x**2), Ne(b, 0)), (x/sqrt(a), True)) - B 
*c*asinh(sqrt(a)/(sqrt(b)*x))/sqrt(a) + C*c*Piecewise((log(2*sqrt(b)*sqrt( 
a + b*x**2) + 2*b*x)/sqrt(b), Ne(a, 0) & Ne(b, 0)), (x*log(x)/sqrt(b*x**2) 
, Ne(b, 0)), (x/sqrt(a), True)) + C*d*Piecewise((sqrt(a + b*x**2)/b, Ne(b, 
 0)), (x**2/(2*sqrt(a)), True))
 

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [A] (verification not implemented)

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

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

Output:

2*A*sqrt(b)*c/((sqrt(b)*x - sqrt(b*x^2 + a))^2 - a) + sqrt(b*x^2 + a)*C*d/ 
b + 2*(B*c + A*d)*arctan(-(sqrt(b)*x - sqrt(b*x^2 + a))/sqrt(-a))/sqrt(-a) 
 - (C*c + B*d)*log(abs(-sqrt(b)*x + sqrt(b*x^2 + a)))/sqrt(b)
                                                                                    
                                                                                    
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(c+d x) \left (A+B x+C x^2\right )}{x^2 \sqrt {a+b x^2}} \, dx=\left \{\begin {array}{cl} \frac {C\,d\,\sqrt {b\,x^2+a}}{b}-\frac {B\,c\,\ln \left (\frac {\sqrt {b\,x^2+a}+\sqrt {a}}{x}\right )}{\sqrt {a}}-\frac {A\,d\,\ln \left (\frac {\sqrt {b\,x^2+a}+\sqrt {a}}{x}\right )}{\sqrt {a}}+\frac {B\,d\,\ln \left (\sqrt {b}\,x+\sqrt {b\,x^2+a}\right )}{\sqrt {b}}+\frac {C\,c\,\ln \left (\sqrt {b}\,x+\sqrt {b\,x^2+a}\right )}{\sqrt {b}}-\frac {A\,c\,\sqrt {b\,x^2+a}}{a\,x} & \text {\ if\ \ }0<b\\ \int \frac {\left (c+d\,x\right )\,\left (C\,x^2+B\,x+A\right )}{x^2\,\sqrt {b\,x^2+a}} \,d x & \text {\ if\ \ }\neg 0<b \end {array}\right . \] Input:

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

Output:

piecewise(0 < b, - (A*d*log(((a + b*x^2)^(1/2) + a^(1/2))/x))/a^(1/2) - (B 
*c*log(((a + b*x^2)^(1/2) + a^(1/2))/x))/a^(1/2) + (C*d*(a + b*x^2)^(1/2)) 
/b + (B*d*log(b^(1/2)*x + (a + b*x^2)^(1/2)))/b^(1/2) + (C*c*log(b^(1/2)*x 
 + (a + b*x^2)^(1/2)))/b^(1/2) - (A*c*(a + b*x^2)^(1/2))/(a*x), ~0 < b, in 
t(((c + d*x)*(A + B*x + C*x^2))/(x^2*(a + b*x^2)^(1/2)), x))
 

Reduce [B] (verification not implemented)

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

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

Output:

( - 2*sqrt(a + b*x**2)*a*b*c + 2*sqrt(a + b*x**2)*a*c*d*x + sqrt(a)*log(( 
- sqrt(a)*sqrt(a + b*x**2) + sqrt(b)*sqrt(a + b*x**2)*x - sqrt(b)*sqrt(a)* 
x + a + b*x**2)/(sqrt(a)*sqrt(a + b*x**2) + sqrt(b)*sqrt(a)*x))*a*b*d*x + 
sqrt(a)*log(( - sqrt(a)*sqrt(a + b*x**2) + sqrt(b)*sqrt(a + b*x**2)*x - sq 
rt(b)*sqrt(a)*x + a + b*x**2)/(sqrt(a)*sqrt(a + b*x**2) + sqrt(b)*sqrt(a)* 
x))*b**2*c*x - sqrt(a)*log((sqrt(a)*sqrt(a + b*x**2) + sqrt(b)*sqrt(a + b* 
x**2)*x + sqrt(b)*sqrt(a)*x + a + b*x**2)/(sqrt(a)*sqrt(a + b*x**2) + sqrt 
(b)*sqrt(a)*x))*a*b*d*x - sqrt(a)*log((sqrt(a)*sqrt(a + b*x**2) + sqrt(b)* 
sqrt(a + b*x**2)*x + sqrt(b)*sqrt(a)*x + a + b*x**2)/(sqrt(a)*sqrt(a + b*x 
**2) + sqrt(b)*sqrt(a)*x))*b**2*c*x + 2*sqrt(b)*log((sqrt(a + b*x**2) + sq 
rt(b)*x)/sqrt(a))*a*b*d*x + 2*sqrt(b)*log((sqrt(a + b*x**2) + sqrt(b)*x)/s 
qrt(a))*a*c**2*x - 2*sqrt(b)*a*b*c*x)/(2*a*b*x)