Integrand size = 20, antiderivative size = 73 \[ \int \frac {(c+d x)^2}{x^2 \left (a+b x^2\right )} \, dx=-\frac {c^2}{a x}-\frac {\left (b c^2-a d^2\right ) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}}+\frac {2 c d \log (x)}{a}-\frac {c d \log \left (a+b x^2\right )}{a} \] Output:
-c^2/a/x-(-a*d^2+b*c^2)*arctan(b^(1/2)*x/a^(1/2))/a^(3/2)/b^(1/2)+2*c*d*ln (x)/a-c*d*ln(b*x^2+a)/a
Time = 0.05 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.89 \[ \int \frac {(c+d x)^2}{x^2 \left (a+b x^2\right )} \, dx=\frac {\left (-b c^2+a d^2\right ) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}}-\frac {c \left (c-2 d x \log (x)+d x \log \left (a+b x^2\right )\right )}{a x} \] Input:
Integrate[(c + d*x)^2/(x^2*(a + b*x^2)),x]
Output:
((-(b*c^2) + a*d^2)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(a^(3/2)*Sqrt[b]) - (c*(c - 2*d*x*Log[x] + d*x*Log[a + b*x^2]))/(a*x)
Time = 0.40 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {526, 523, 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 {(c+d x)^2}{x^2 \left (a+b x^2\right )} \, dx\) |
\(\Big \downarrow \) 526 |
\(\displaystyle \frac {\int \frac {2 a c d-\left (b c^2-a d^2\right ) x}{x \left (b x^2+a\right )}dx}{a}-\frac {c^2}{a x}\) |
\(\Big \downarrow \) 523 |
\(\displaystyle \frac {\int \left (\frac {2 c d}{x}+\frac {-b c^2-2 b d x c+a d^2}{b x^2+a}\right )dx}{a}-\frac {c^2}{a x}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {\arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (b c^2-a d^2\right )}{\sqrt {a} \sqrt {b}}-c d \log \left (a+b x^2\right )+2 c d \log (x)}{a}-\frac {c^2}{a x}\) |
Input:
Int[(c + d*x)^2/(x^2*(a + b*x^2)),x]
Output:
-(c^2/(a*x)) + (-(((b*c^2 - a*d^2)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*S qrt[b])) + 2*c*d*Log[x] - c*d*Log[a + b*x^2])/a
Int[((x_)^(m_.)*((c_) + (d_.)*(x_)))/((a_) + (b_.)*(x_)^2), x_Symbol] :> In t[ExpandIntegrand[x^m*((c + d*x)/(a + b*x^2)), x], x] /; FreeQ[{a, b, c, d} , x] && IntegerQ[m]
Int[((x_)^(m_)*((c_) + (d_.)*(x_))^(n_))/((a_) + (b_.)*(x_)^2), x_Symbol] : > With[{Qx = PolynomialQuotient[(c + d*x)^n, x, x], R = PolynomialRemainder [(c + d*x)^n, x, x]}, Simp[R*(x^(m + 1)/(a*(m + 1))), x] + Simp[1/a Int[x ^(m + 1)*(ExpandToSum[a*Qx - b*R*x, x]/(a + b*x^2)), x], x]] /; FreeQ[{a, b , c, d}, x] && IGtQ[n, 1] && ILtQ[m, -1]
Time = 0.28 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.90
method | result | size |
default | \(-\frac {c^{2}}{a x}+\frac {2 c d \ln \left (x \right )}{a}+\frac {-d c \ln \left (b \,x^{2}+a \right )+\frac {\left (a \,d^{2}-b \,c^{2}\right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}}}{a}\) | \(66\) |
risch | \(-\frac {c^{2}}{a x}-\frac {\ln \left (\left (-a^{2} b \,d^{4}+2 a \,b^{2} c^{2} d^{2}-b^{3} c^{4}-6 \sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, b c d \right ) x +6 a^{2} b c \,d^{3}-6 a \,b^{2} c^{3} d -\sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, a \,d^{2}+\sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, b \,c^{2}\right ) c d}{a}+\frac {\ln \left (\left (-a^{2} b \,d^{4}+2 a \,b^{2} c^{2} d^{2}-b^{3} c^{4}-6 \sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, b c d \right ) x +6 a^{2} b c \,d^{3}-6 a \,b^{2} c^{3} d -\sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, a \,d^{2}+\sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, b \,c^{2}\right ) \sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}}{2 a^{2} b}-\frac {\ln \left (\left (-a^{2} b \,d^{4}+2 a \,b^{2} c^{2} d^{2}-b^{3} c^{4}+6 \sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, b c d \right ) x +6 a^{2} b c \,d^{3}-6 a \,b^{2} c^{3} d +\sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, a \,d^{2}-\sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, b \,c^{2}\right ) c d}{a}-\frac {\ln \left (\left (-a^{2} b \,d^{4}+2 a \,b^{2} c^{2} d^{2}-b^{3} c^{4}+6 \sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, b c d \right ) x +6 a^{2} b c \,d^{3}-6 a \,b^{2} c^{3} d +\sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, a \,d^{2}-\sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}\, b \,c^{2}\right ) \sqrt {-a b \left (a \,d^{2}-b \,c^{2}\right )^{2}}}{2 a^{2} b}+\frac {2 c d \ln \left (x \right )}{a}\) | \(612\) |
Input:
int((d*x+c)^2/x^2/(b*x^2+a),x,method=_RETURNVERBOSE)
Output:
-c^2/a/x+2*c*d*ln(x)/a+1/a*(-d*c*ln(b*x^2+a)+(a*d^2-b*c^2)/(a*b)^(1/2)*arc tan(b*x/(a*b)^(1/2)))
Time = 0.16 (sec) , antiderivative size = 165, normalized size of antiderivative = 2.26 \[ \int \frac {(c+d x)^2}{x^2 \left (a+b x^2\right )} \, dx=\left [-\frac {2 \, a b c d x \log \left (b x^{2} + a\right ) - 4 \, a b c d x \log \left (x\right ) + 2 \, a b c^{2} - {\left (b c^{2} - a d^{2}\right )} \sqrt {-a b} x \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right )}{2 \, a^{2} b x}, -\frac {a b c d x \log \left (b x^{2} + a\right ) - 2 \, a b c d x \log \left (x\right ) + a b c^{2} + {\left (b c^{2} - a d^{2}\right )} \sqrt {a b} x \arctan \left (\frac {\sqrt {a b} x}{a}\right )}{a^{2} b x}\right ] \] Input:
integrate((d*x+c)^2/x^2/(b*x^2+a),x, algorithm="fricas")
Output:
[-1/2*(2*a*b*c*d*x*log(b*x^2 + a) - 4*a*b*c*d*x*log(x) + 2*a*b*c^2 - (b*c^ 2 - a*d^2)*sqrt(-a*b)*x*log((b*x^2 - 2*sqrt(-a*b)*x - a)/(b*x^2 + a)))/(a^ 2*b*x), -(a*b*c*d*x*log(b*x^2 + a) - 2*a*b*c*d*x*log(x) + a*b*c^2 + (b*c^2 - a*d^2)*sqrt(a*b)*x*arctan(sqrt(a*b)*x/a))/(a^2*b*x)]
Timed out. \[ \int \frac {(c+d x)^2}{x^2 \left (a+b x^2\right )} \, dx=\text {Timed out} \] Input:
integrate((d*x+c)**2/x**2/(b*x**2+a),x)
Output:
Timed out
Time = 0.11 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.92 \[ \int \frac {(c+d x)^2}{x^2 \left (a+b x^2\right )} \, dx=-\frac {c d \log \left (b x^{2} + a\right )}{a} + \frac {2 \, c d \log \left (x\right )}{a} - \frac {{\left (b c^{2} - a d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a} - \frac {c^{2}}{a x} \] Input:
integrate((d*x+c)^2/x^2/(b*x^2+a),x, algorithm="maxima")
Output:
-c*d*log(b*x^2 + a)/a + 2*c*d*log(x)/a - (b*c^2 - a*d^2)*arctan(b*x/sqrt(a *b))/(sqrt(a*b)*a) - c^2/(a*x)
Time = 0.13 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.93 \[ \int \frac {(c+d x)^2}{x^2 \left (a+b x^2\right )} \, dx=-\frac {c d \log \left (b x^{2} + a\right )}{a} + \frac {2 \, c d \log \left ({\left | x \right |}\right )}{a} - \frac {{\left (b c^{2} - a d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a} - \frac {c^{2}}{a x} \] Input:
integrate((d*x+c)^2/x^2/(b*x^2+a),x, algorithm="giac")
Output:
-c*d*log(b*x^2 + a)/a + 2*c*d*log(abs(x))/a - (b*c^2 - a*d^2)*arctan(b*x/s qrt(a*b))/(sqrt(a*b)*a) - c^2/(a*x)
Time = 0.43 (sec) , antiderivative size = 253, normalized size of antiderivative = 3.47 \[ \int \frac {(c+d x)^2}{x^2 \left (a+b x^2\right )} \, dx=\ln \left (a\,d^2\,\sqrt {-a^3\,b}-b\,c^2\,\sqrt {-a^3\,b}+6\,a^2\,b\,c\,d+a\,b^2\,c^2\,x-a^2\,b\,d^2\,x+6\,b\,c\,d\,x\,\sqrt {-a^3\,b}\right )\,\left (\frac {\frac {c^2\,\sqrt {-a^3\,b}}{2}-a^2\,c\,d}{a^3}-\frac {d^2\,\sqrt {-a^3\,b}}{2\,a^2\,b}\right )-\ln \left (a\,d^2\,\sqrt {-a^3\,b}-b\,c^2\,\sqrt {-a^3\,b}-6\,a^2\,b\,c\,d-a\,b^2\,c^2\,x+a^2\,b\,d^2\,x+6\,b\,c\,d\,x\,\sqrt {-a^3\,b}\right )\,\left (\frac {\frac {c^2\,\sqrt {-a^3\,b}}{2}+a^2\,c\,d}{a^3}-\frac {d^2\,\sqrt {-a^3\,b}}{2\,a^2\,b}\right )-\frac {c^2}{a\,x}+\frac {2\,c\,d\,\ln \left (x\right )}{a} \] Input:
int((c + d*x)^2/(x^2*(a + b*x^2)),x)
Output:
log(a*d^2*(-a^3*b)^(1/2) - b*c^2*(-a^3*b)^(1/2) + 6*a^2*b*c*d + a*b^2*c^2* x - a^2*b*d^2*x + 6*b*c*d*x*(-a^3*b)^(1/2))*(((c^2*(-a^3*b)^(1/2))/2 - a^2 *c*d)/a^3 - (d^2*(-a^3*b)^(1/2))/(2*a^2*b)) - log(a*d^2*(-a^3*b)^(1/2) - b *c^2*(-a^3*b)^(1/2) - 6*a^2*b*c*d - a*b^2*c^2*x + a^2*b*d^2*x + 6*b*c*d*x* (-a^3*b)^(1/2))*(((c^2*(-a^3*b)^(1/2))/2 + a^2*c*d)/a^3 - (d^2*(-a^3*b)^(1 /2))/(2*a^2*b)) - c^2/(a*x) + (2*c*d*log(x))/a
Time = 0.18 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.19 \[ \int \frac {(c+d x)^2}{x^2 \left (a+b x^2\right )} \, dx=\frac {\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) a \,d^{2} x -\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {b x}{\sqrt {b}\, \sqrt {a}}\right ) b \,c^{2} x -\mathrm {log}\left (b \,x^{2}+a \right ) a b c d x +2 \,\mathrm {log}\left (x \right ) a b c d x -a b \,c^{2}}{a^{2} b x} \] Input:
int((d*x+c)^2/x^2/(b*x^2+a),x)
Output:
(sqrt(b)*sqrt(a)*atan((b*x)/(sqrt(b)*sqrt(a)))*a*d**2*x - sqrt(b)*sqrt(a)* atan((b*x)/(sqrt(b)*sqrt(a)))*b*c**2*x - log(a + b*x**2)*a*b*c*d*x + 2*log (x)*a*b*c*d*x - a*b*c**2)/(a**2*b*x)