Optimal. Leaf size=78 \[ -\frac {3 a x}{b^3}+\frac {(a+b x)^2}{2 b^4}-\frac {a \left (a^2-3 c\right ) \tan ^{-1}\left (\frac {a+b x}{\sqrt {c}}\right )}{b^4 \sqrt {c}}+\frac {\left (3 a^2-c\right ) \log \left (c+(a+b x)^2\right )}{2 b^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {378, 716, 649,
209, 266} \begin {gather*} -\frac {a \left (a^2-3 c\right ) \text {ArcTan}\left (\frac {a+b x}{\sqrt {c}}\right )}{b^4 \sqrt {c}}+\frac {\left (3 a^2-c\right ) \log \left ((a+b x)^2+c\right )}{2 b^4}+\frac {(a+b x)^2}{2 b^4}-\frac {3 a x}{b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 378
Rule 649
Rule 716
Rubi steps
\begin {align*} \int \frac {x^3}{c+(a+b x)^2} \, dx &=\frac {\text {Subst}\left (\int \frac {(-a+x)^3}{c+x^2} \, dx,x,a+b x\right )}{b^4}\\ &=\frac {\text {Subst}\left (\int \left (-3 a+x-\frac {a^3-3 a c-\left (3 a^2-c\right ) x}{c+x^2}\right ) \, dx,x,a+b x\right )}{b^4}\\ &=-\frac {3 a x}{b^3}+\frac {(a+b x)^2}{2 b^4}-\frac {\text {Subst}\left (\int \frac {a^3-3 a c-\left (3 a^2-c\right ) x}{c+x^2} \, dx,x,a+b x\right )}{b^4}\\ &=-\frac {3 a x}{b^3}+\frac {(a+b x)^2}{2 b^4}-\frac {\left (a \left (a^2-3 c\right )\right ) \text {Subst}\left (\int \frac {1}{c+x^2} \, dx,x,a+b x\right )}{b^4}+\frac {\left (3 a^2-c\right ) \text {Subst}\left (\int \frac {x}{c+x^2} \, dx,x,a+b x\right )}{b^4}\\ &=-\frac {3 a x}{b^3}+\frac {(a+b x)^2}{2 b^4}-\frac {a \left (a^2-3 c\right ) \tan ^{-1}\left (\frac {a+b x}{\sqrt {c}}\right )}{b^4 \sqrt {c}}+\frac {\left (3 a^2-c\right ) \log \left (c+(a+b x)^2\right )}{2 b^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 73, normalized size = 0.94 \begin {gather*} \frac {b x (-4 a+b x)-\frac {2 \left (a^3-3 a c\right ) \tan ^{-1}\left (\frac {a+b x}{\sqrt {c}}\right )}{\sqrt {c}}+\left (3 a^2-c\right ) \log \left (a^2+c+2 a b x+b^2 x^2\right )}{2 b^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.28, size = 111, normalized size = 1.42
method | result | size |
default | \(-\frac {-\frac {1}{2} b \,x^{2}+2 a x}{b^{3}}+\frac {\frac {\left (3 a^{2} b -b c \right ) \ln \left (b^{2} x^{2}+2 a b x +a^{2}+c \right )}{2 b^{2}}+\frac {\left (2 a^{3}+2 a c -\frac {\left (3 a^{2} b -b c \right ) a}{b}\right ) \arctan \left (\frac {2 b^{2} x +2 a b}{2 b \sqrt {c}}\right )}{b \sqrt {c}}}{b^{3}}\) | \(111\) |
risch | \(\frac {x^{2}}{2 b^{2}}-\frac {2 a x}{b^{3}}+\frac {3 \ln \left (-a^{3} c -\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, b x +3 c^{2} a -\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, a \right ) a^{2}}{2 b^{4}}-\frac {c \ln \left (-a^{3} c -\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, b x +3 c^{2} a -\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, a \right )}{2 b^{4}}+\frac {\ln \left (-a^{3} c -\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, b x +3 c^{2} a -\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, a \right ) \sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}}{2 b^{4} c}+\frac {3 \ln \left (-a^{3} c +\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, b x +3 c^{2} a +\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, a \right ) a^{2}}{2 b^{4}}-\frac {c \ln \left (-a^{3} c +\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, b x +3 c^{2} a +\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, a \right )}{2 b^{4}}-\frac {\ln \left (-a^{3} c +\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, b x +3 c^{2} a +\sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}\, a \right ) \sqrt {-a^{2} c \left (a^{2}-3 c \right )^{2}}}{2 b^{4} c}\) | \(419\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 81, normalized size = 1.04 \begin {gather*} \frac {b x^{2} - 4 \, a x}{2 \, b^{3}} + \frac {{\left (3 \, a^{2} - c\right )} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + c\right )}{2 \, b^{4}} - \frac {{\left (a^{3} - 3 \, a c\right )} \arctan \left (\frac {b^{2} x + a b}{b \sqrt {c}}\right )}{b^{4} \sqrt {c}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 198, normalized size = 2.54 \begin {gather*} \left [\frac {b^{2} c x^{2} - 4 \, a b c x + {\left (a^{3} - 3 \, a c\right )} \sqrt {-c} \log \left (\frac {b^{2} x^{2} + 2 \, a b x + a^{2} - 2 \, {\left (b x + a\right )} \sqrt {-c} - c}{b^{2} x^{2} + 2 \, a b x + a^{2} + c}\right ) + {\left (3 \, a^{2} c - c^{2}\right )} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + c\right )}{2 \, b^{4} c}, \frac {b^{2} c x^{2} - 4 \, a b c x - 2 \, {\left (a^{3} - 3 \, a c\right )} \sqrt {c} \arctan \left (\frac {b x + a}{\sqrt {c}}\right ) + {\left (3 \, a^{2} c - c^{2}\right )} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + c\right )}{2 \, b^{4} c}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 209 vs.
\(2 (71) = 142\).
time = 0.38, size = 209, normalized size = 2.68 \begin {gather*} - \frac {2 a x}{b^{3}} + \left (- \frac {a \sqrt {- c} \left (a^{2} - 3 c\right )}{2 b^{4} c} + \frac {3 a^{2} - c}{2 b^{4}}\right ) \log {\left (x + \frac {a^{4} - 2 b^{4} c \left (- \frac {a \sqrt {- c} \left (a^{2} - 3 c\right )}{2 b^{4} c} + \frac {3 a^{2} - c}{2 b^{4}}\right ) - c^{2}}{a^{3} b - 3 a b c} \right )} + \left (\frac {a \sqrt {- c} \left (a^{2} - 3 c\right )}{2 b^{4} c} + \frac {3 a^{2} - c}{2 b^{4}}\right ) \log {\left (x + \frac {a^{4} - 2 b^{4} c \left (\frac {a \sqrt {- c} \left (a^{2} - 3 c\right )}{2 b^{4} c} + \frac {3 a^{2} - c}{2 b^{4}}\right ) - c^{2}}{a^{3} b - 3 a b c} \right )} + \frac {x^{2}}{2 b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.29, size = 77, normalized size = 0.99 \begin {gather*} \frac {{\left (3 \, a^{2} - c\right )} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + c\right )}{2 \, b^{4}} - \frac {{\left (a^{3} - 3 \, a c\right )} \arctan \left (\frac {b x + a}{\sqrt {c}}\right )}{b^{4} \sqrt {c}} + \frac {b^{2} x^{2} - 4 \, a b x}{2 \, b^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.27, size = 87, normalized size = 1.12 \begin {gather*} \frac {x^2}{2\,b^2}-\frac {2\,a\,x}{b^3}-\frac {\ln \left (a^2+2\,a\,b\,x+b^2\,x^2+c\right )\,\left (4\,b^4\,c^2-12\,a^2\,b^4\,c\right )}{8\,b^8\,c}+\frac {a\,\mathrm {atan}\left (\frac {a+b\,x}{\sqrt {c}}\right )\,\left (3\,c-a^2\right )}{b^4\,\sqrt {c}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________