Optimal. Leaf size=50 \[ \frac{\left (a^2-c\right ) \tan ^{-1}\left (\frac{a+b x}{\sqrt{c}}\right )}{b^3 \sqrt{c}}-\frac{a \log \left ((a+b x)^2+c\right )}{b^3}+\frac{x}{b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0387091, antiderivative size = 50, normalized size of antiderivative = 1., 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 = {371, 702, 635, 203, 260} \[ \frac{\left (a^2-c\right ) \tan ^{-1}\left (\frac{a+b x}{\sqrt{c}}\right )}{b^3 \sqrt{c}}-\frac{a \log \left ((a+b x)^2+c\right )}{b^3}+\frac{x}{b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 371
Rule 702
Rule 635
Rule 203
Rule 260
Rubi steps
\begin{align*} \int \frac{x^2}{c+(a+b x)^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{(-a+x)^2}{c+x^2} \, dx,x,a+b x\right )}{b^3}\\ &=\frac{\operatorname{Subst}\left (\int \left (1+\frac{a^2-c-2 a x}{c+x^2}\right ) \, dx,x,a+b x\right )}{b^3}\\ &=\frac{x}{b^2}+\frac{\operatorname{Subst}\left (\int \frac{a^2-c-2 a x}{c+x^2} \, dx,x,a+b x\right )}{b^3}\\ &=\frac{x}{b^2}-\frac{(2 a) \operatorname{Subst}\left (\int \frac{x}{c+x^2} \, dx,x,a+b x\right )}{b^3}+\frac{\left (a^2-c\right ) \operatorname{Subst}\left (\int \frac{1}{c+x^2} \, dx,x,a+b x\right )}{b^3}\\ &=\frac{x}{b^2}+\frac{\left (a^2-c\right ) \tan ^{-1}\left (\frac{a+b x}{\sqrt{c}}\right )}{b^3 \sqrt{c}}-\frac{a \log \left (c+(a+b x)^2\right )}{b^3}\\ \end{align*}
Mathematica [A] time = 0.0276808, size = 54, normalized size = 1.08 \[ \frac{-a \log \left (a^2+2 a b x+b^2 x^2+c\right )+\frac{\left (a^2-c\right ) \tan ^{-1}\left (\frac{a+b x}{\sqrt{c}}\right )}{\sqrt{c}}+b x}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.002, size = 89, normalized size = 1.8 \begin{align*}{\frac{x}{{b}^{2}}}-{\frac{a\ln \left ({b}^{2}{x}^{2}+2\,abx+{a}^{2}+c \right ) }{{b}^{3}}}+{\frac{{a}^{2}}{{b}^{3}}\arctan \left ({\frac{2\,{b}^{2}x+2\,ab}{2\,b}{\frac{1}{\sqrt{c}}}} \right ){\frac{1}{\sqrt{c}}}}-{\frac{1}{{b}^{3}}\sqrt{c}\arctan \left ({\frac{2\,{b}^{2}x+2\,ab}{2\,b}{\frac{1}{\sqrt{c}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.77995, size = 377, normalized size = 7.54 \begin{align*} \left [\frac{2 \, b c x - 2 \, a c \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + c\right ) +{\left (a^{2} - 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 )}{2 \, b^{3} c}, \frac{b c x - a c \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + c\right ) +{\left (a^{2} - c\right )} \sqrt{c} \arctan \left (\frac{b x + a}{\sqrt{c}}\right )}{b^{3} c}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.577375, size = 153, normalized size = 3.06 \begin{align*} \left (- \frac{a}{b^{3}} - \frac{\sqrt{- c} \left (a^{2} - c\right )}{2 b^{3} c}\right ) \log{\left (x + \frac{a^{3} + a c + 2 b^{3} c \left (- \frac{a}{b^{3}} - \frac{\sqrt{- c} \left (a^{2} - c\right )}{2 b^{3} c}\right )}{a^{2} b - b c} \right )} + \left (- \frac{a}{b^{3}} + \frac{\sqrt{- c} \left (a^{2} - c\right )}{2 b^{3} c}\right ) \log{\left (x + \frac{a^{3} + a c + 2 b^{3} c \left (- \frac{a}{b^{3}} + \frac{\sqrt{- c} \left (a^{2} - c\right )}{2 b^{3} c}\right )}{a^{2} b - b c} \right )} + \frac{x}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17294, size = 73, normalized size = 1.46 \begin{align*} \frac{x}{b^{2}} - \frac{a \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + c\right )}{b^{3}} + \frac{{\left (a^{2} - c\right )} \arctan \left (\frac{b x + a}{\sqrt{c}}\right )}{b^{3} \sqrt{c}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]