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

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

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

Mathematica [A] (verified)

Time = 0.25 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.17 \[ \int \frac {(c+d x)^2}{x^2 \sqrt {a+b x^2}} \, dx=-\frac {c^2 \sqrt {a+b x^2}}{a x}+\frac {4 c d \text {arctanh}\left (\frac {\sqrt {b} x-\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {d^2 \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{\sqrt {b}} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.409, Rules used = {540, 25, 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)^2}{x^2 \sqrt {a+b x^2}} \, dx\)

\(\Big \downarrow \) 540

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 538

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

\(\Big \downarrow \) 224

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

\(\Big \downarrow \) 219

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

\(\Big \downarrow \) 243

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 221

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

Input:

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

Output:

-((c^2*Sqrt[a + b*x^2])/(a*x)) + d*((d*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2] 
])/Sqrt[b] - (2*c*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]])/Sqrt[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 540
Int[(x_)^(m_)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol 
] :> With[{Qx = PolynomialQuotient[(c + d*x)^n, x, x], R = PolynomialRemain 
der[(c + d*x)^n, x, x]}, Simp[R*x^(m + 1)*((a + b*x^2)^(p + 1)/(a*(m + 1))) 
, x] + Simp[1/(a*(m + 1))   Int[x^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*(m + 
1)*Qx - b*R*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d, p}, x] && IG 
tQ[n, 1] && ILtQ[m, -1] && GtQ[p, -1] && IntegerQ[2*p]
 
Maple [A] (verified)

Time = 0.36 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.96

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 369, normalized size of antiderivative = 4.73 \[ \int \frac {(c+d x)^2}{x^2 \sqrt {a+b x^2}} \, dx=\left [\frac {a \sqrt {b} d^{2} x \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + 2 \, \sqrt {a} b c d x \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) - 2 \, \sqrt {b x^{2} + a} b c^{2}}{2 \, a b x}, -\frac {a \sqrt {-b} d^{2} x \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - \sqrt {a} b c d x \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) + \sqrt {b x^{2} + a} b c^{2}}{a b x}, \frac {4 \, \sqrt {-a} b c d x \arctan \left (\frac {\sqrt {b x^{2} + a} \sqrt {-a}}{a}\right ) + a \sqrt {b} d^{2} x \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) - 2 \, \sqrt {b x^{2} + a} b c^{2}}{2 \, a b x}, -\frac {a \sqrt {-b} d^{2} x \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - 2 \, \sqrt {-a} b c d x \arctan \left (\frac {\sqrt {b x^{2} + a} \sqrt {-a}}{a}\right ) + \sqrt {b x^{2} + a} b c^{2}}{a b x}\right ] \] Input:

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

Output:

[1/2*(a*sqrt(b)*d^2*x*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + 2* 
sqrt(a)*b*c*d*x*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) - 2*sq 
rt(b*x^2 + a)*b*c^2)/(a*b*x), -(a*sqrt(-b)*d^2*x*arctan(sqrt(-b)*x/sqrt(b* 
x^2 + a)) - sqrt(a)*b*c*d*x*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a) 
/x^2) + sqrt(b*x^2 + a)*b*c^2)/(a*b*x), 1/2*(4*sqrt(-a)*b*c*d*x*arctan(sqr 
t(b*x^2 + a)*sqrt(-a)/a) + a*sqrt(b)*d^2*x*log(-2*b*x^2 - 2*sqrt(b*x^2 + a 
)*sqrt(b)*x - a) - 2*sqrt(b*x^2 + a)*b*c^2)/(a*b*x), -(a*sqrt(-b)*d^2*x*ar 
ctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - 2*sqrt(-a)*b*c*d*x*arctan(sqrt(b*x^2 + 
a)*sqrt(-a)/a) + sqrt(b*x^2 + a)*b*c^2)/(a*b*x)]
 

Sympy [A] (verification not implemented)

Time = 1.39 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.24 \[ \int \frac {(c+d x)^2}{x^2 \sqrt {a+b x^2}} \, dx=d^{2} \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 {\sqrt {b} c^{2} \sqrt {\frac {a}{b x^{2}} + 1}}{a} - \frac {2 c d \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{\sqrt {a}} \] Input:

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

Output:

d**2*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)) - sqrt( 
b)*c**2*sqrt(a/(b*x**2) + 1)/a - 2*c*d*asinh(sqrt(a)/(sqrt(b)*x))/sqrt(a)
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.72 \[ \int \frac {(c+d x)^2}{x^2 \sqrt {a+b x^2}} \, dx=\frac {d^{2} \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {b}} - \frac {2 \, c d \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right )}{\sqrt {a}} - \frac {\sqrt {b x^{2} + a} c^{2}}{a x} \] Input:

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

Output:

d^2*arcsinh(b*x/sqrt(a*b))/sqrt(b) - 2*c*d*arcsinh(a/(sqrt(a*b)*abs(x)))/s 
qrt(a) - sqrt(b*x^2 + a)*c^2/(a*x)
 

Giac [A] (verification not implemented)

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

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

Output:

4*c*d*arctan(-(sqrt(b)*x - sqrt(b*x^2 + a))/sqrt(-a))/sqrt(-a) - d^2*log(a 
bs(-sqrt(b)*x + sqrt(b*x^2 + a)))/sqrt(b) + 2*sqrt(b)*c^2/((sqrt(b)*x - sq 
rt(b*x^2 + a))^2 - a)
 

Mupad [F(-1)]

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

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

Output:

piecewise(0 < b, (d^2*log(b^(1/2)*x + (a + b*x^2)^(1/2)))/b^(1/2) - (2*c*d 
*log(((a + b*x^2)^(1/2) + a^(1/2))/x))/a^(1/2) - (c^2*(a + b*x^2)^(1/2))/( 
a*x), ~0 < b, int(d^2/(a + b*x^2)^(1/2) + c^2/(x^2*(a + b*x^2)^(1/2)) + (2 
*c*d)/(x*(a + b*x^2)^(1/2)), x))
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 194, normalized size of antiderivative = 2.49 \[ \int \frac {(c+d x)^2}{x^2 \sqrt {a+b x^2}} \, dx=\frac {-\sqrt {b \,x^{2}+a}\, b \,c^{2}+\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 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 ) b c d x +\sqrt {b}\, \mathrm {log}\left (\frac {\sqrt {b \,x^{2}+a}+\sqrt {b}\, x}{\sqrt {a}}\right ) a \,d^{2} x -\sqrt {b}\, b \,c^{2} x}{a b x} \] Input:

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

Output:

( - sqrt(a + b*x**2)*b*c**2 + sqrt(a)*log(( - sqrt(a)*sqrt(a + b*x**2) + s 
qrt(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*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)/(sq 
rt(a)*sqrt(a + b*x**2) + sqrt(b)*sqrt(a)*x))*b*c*d*x + sqrt(b)*log((sqrt(a 
 + b*x**2) + sqrt(b)*x)/sqrt(a))*a*d**2*x - sqrt(b)*b*c**2*x)/(a*b*x)