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

Optimal. Leaf size=96 \[ -\frac {\sqrt {a} c \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b} \left (b c^2+a d^2\right )}+\frac {c^2 \log (c+d x)}{d \left (b c^2+a d^2\right )}+\frac {a d \log \left (a+b x^2\right )}{2 b \left (b c^2+a d^2\right )} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1643, 649, 211, 266} \begin {gather*} -\frac {\sqrt {a} c \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b} \left (a d^2+b c^2\right )}+\frac {a d \log \left (a+b x^2\right )}{2 b \left (a d^2+b c^2\right )}+\frac {c^2 \log (c+d x)}{d \left (a d^2+b c^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 649

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[(-a)*c]

Rule 1643

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*
Pq*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {x^2}{(c+d x) \left (a+b x^2\right )} \, dx &=\int \left (\frac {c^2}{\left (b c^2+a d^2\right ) (c+d x)}-\frac {a (c-d x)}{\left (b c^2+a d^2\right ) \left (a+b x^2\right )}\right ) \, dx\\ &=\frac {c^2 \log (c+d x)}{d \left (b c^2+a d^2\right )}-\frac {a \int \frac {c-d x}{a+b x^2} \, dx}{b c^2+a d^2}\\ &=\frac {c^2 \log (c+d x)}{d \left (b c^2+a d^2\right )}-\frac {(a c) \int \frac {1}{a+b x^2} \, dx}{b c^2+a d^2}+\frac {(a d) \int \frac {x}{a+b x^2} \, dx}{b c^2+a d^2}\\ &=-\frac {\sqrt {a} c \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {b} \left (b c^2+a d^2\right )}+\frac {c^2 \log (c+d x)}{d \left (b c^2+a d^2\right )}+\frac {a d \log \left (a+b x^2\right )}{2 b \left (b c^2+a d^2\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 73, normalized size = 0.76 \begin {gather*} \frac {-2 \sqrt {a} \sqrt {b} c d \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )+2 b c^2 \log (c+d x)+a d^2 \log \left (a+b x^2\right )}{2 b^2 c^2 d+2 a b d^3} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.22, size = 75, normalized size = 0.78

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 84, normalized size = 0.88 \begin {gather*} \frac {a d \log \left (b x^{2} + a\right )}{2 \, {\left (b^{2} c^{2} + a b d^{2}\right )}} + \frac {c^{2} \log \left (d x + c\right )}{b c^{2} d + a d^{3}} - \frac {a c \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{{\left (b c^{2} + a d^{2}\right )} \sqrt {a b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*a*d*log(b*x^2 + a)/(b^2*c^2 + a*b*d^2) + c^2*log(d*x + c)/(b*c^2*d + a*d^3) - a*c*arctan(b*x/sqrt(a*b))/((
b*c^2 + a*d^2)*sqrt(a*b))

________________________________________________________________________________________

Fricas [A]
time = 0.46, size = 162, normalized size = 1.69 \begin {gather*} \left [\frac {b c d \sqrt {-\frac {a}{b}} \log \left (\frac {b x^{2} - 2 \, b x \sqrt {-\frac {a}{b}} - a}{b x^{2} + a}\right ) + a d^{2} \log \left (b x^{2} + a\right ) + 2 \, b c^{2} \log \left (d x + c\right )}{2 \, {\left (b^{2} c^{2} d + a b d^{3}\right )}}, -\frac {2 \, b c d \sqrt {\frac {a}{b}} \arctan \left (\frac {b x \sqrt {\frac {a}{b}}}{a}\right ) - a d^{2} \log \left (b x^{2} + a\right ) - 2 \, b c^{2} \log \left (d x + c\right )}{2 \, {\left (b^{2} c^{2} d + a b d^{3}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[1/2*(b*c*d*sqrt(-a/b)*log((b*x^2 - 2*b*x*sqrt(-a/b) - a)/(b*x^2 + a)) + a*d^2*log(b*x^2 + a) + 2*b*c^2*log(d*
x + c))/(b^2*c^2*d + a*b*d^3), -1/2*(2*b*c*d*sqrt(a/b)*arctan(b*x*sqrt(a/b)/a) - a*d^2*log(b*x^2 + a) - 2*b*c^
2*log(d*x + c))/(b^2*c^2*d + a*b*d^3)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 4.50, size = 85, normalized size = 0.89 \begin {gather*} \frac {a d \log \left (b x^{2} + a\right )}{2 \, {\left (b^{2} c^{2} + a b d^{2}\right )}} + \frac {c^{2} \log \left ({\left | d x + c \right |}\right )}{b c^{2} d + a d^{3}} - \frac {a c \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{{\left (b c^{2} + a d^{2}\right )} \sqrt {a b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*a*d*log(b*x^2 + a)/(b^2*c^2 + a*b*d^2) + c^2*log(abs(d*x + c))/(b*c^2*d + a*d^3) - a*c*arctan(b*x/sqrt(a*b
))/((b*c^2 + a*d^2)*sqrt(a*b))

________________________________________________________________________________________

Mupad [B]
time = 1.13, size = 347, normalized size = 3.61 \begin {gather*} \frac {\ln \left (a\,c+a\,d\,x+\frac {\left (c\,\sqrt {-a\,b^3}+a\,b\,d\right )\,\left (x\,\left (2\,b^2\,c^2-5\,a\,b\,d^2\right )-5\,a\,b\,c\,d+\frac {2\,b^2\,d\,\left (c\,\sqrt {-a\,b^3}+a\,b\,d\right )\,\left (-b\,x\,c^2+4\,a\,c\,d+3\,a\,x\,d^2\right )}{2\,b^3\,c^2+2\,a\,b^2\,d^2}\right )}{2\,b^3\,c^2+2\,a\,b^2\,d^2}\right )\,\left (c\,\sqrt {-a\,b^3}+a\,b\,d\right )}{2\,b^3\,c^2+2\,a\,b^2\,d^2}-\frac {\ln \left (a\,c+a\,d\,x+\frac {\left (c\,\sqrt {-a\,b^3}-a\,b\,d\right )\,\left (b\,x\,\left (5\,a\,d^2-2\,b\,c^2\right )+5\,a\,b\,c\,d+\frac {d\,\left (c\,\sqrt {-a\,b^3}-a\,b\,d\right )\,\left (-b\,x\,c^2+4\,a\,c\,d+3\,a\,x\,d^2\right )}{b\,c^2+a\,d^2}\right )}{2\,b^2\,\left (b\,c^2+a\,d^2\right )}\right )\,\left (c\,\sqrt {-a\,b^3}-a\,b\,d\right )}{2\,\left (b^3\,c^2+a\,b^2\,d^2\right )}+\frac {c^2\,\ln \left (c+d\,x\right )}{b\,c^2\,d+a\,d^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log(a*c + a*d*x + ((c*(-a*b^3)^(1/2) + a*b*d)*(x*(2*b^2*c^2 - 5*a*b*d^2) - 5*a*b*c*d + (2*b^2*d*(c*(-a*b^3)^(
1/2) + a*b*d)*(4*a*c*d + 3*a*d^2*x - b*c^2*x))/(2*b^3*c^2 + 2*a*b^2*d^2)))/(2*b^3*c^2 + 2*a*b^2*d^2))*(c*(-a*b
^3)^(1/2) + a*b*d))/(2*b^3*c^2 + 2*a*b^2*d^2) - (log(a*c + a*d*x + ((c*(-a*b^3)^(1/2) - a*b*d)*(b*x*(5*a*d^2 -
 2*b*c^2) + 5*a*b*c*d + (d*(c*(-a*b^3)^(1/2) - a*b*d)*(4*a*c*d + 3*a*d^2*x - b*c^2*x))/(a*d^2 + b*c^2)))/(2*b^
2*(a*d^2 + b*c^2)))*(c*(-a*b^3)^(1/2) - a*b*d))/(2*(b^3*c^2 + a*b^2*d^2)) + (c^2*log(c + d*x))/(a*d^3 + b*c^2*
d)

________________________________________________________________________________________