3.79 \(\int \frac{x^2}{c+(a+b x)^2} \, dx\)

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]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.0918802, 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 \[ \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]  Int[x^2/(c + (a + b*x)^2),x]

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 13.093, size = 49, normalized size = 0.98 \[ - \frac{a \log{\left (c + \left (a + b x\right )^{2} \right )}}{b^{3}} + \frac{a}{b^{3}} + \frac{x}{b^{2}} + \frac{\left (a^{2} - c\right ) \operatorname{atan}{\left (\frac{a + b x}{\sqrt{c}} \right )}}{b^{3} \sqrt{c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2/(c+(b*x+a)**2),x)

[Out]

-a*log(c + (a + b*x)**2)/b**3 + a/b**3 + x/b**2 + (a**2 - c)*atan((a + b*x)/sqrt
(c))/(b**3*sqrt(c))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0464113, 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]  Integrate[x^2/(c + (a + b*x)^2),x]

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.004, size = 89, normalized size = 1.8 \[{\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 ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2/(c+(b*x+a)^2),x)

[Out]

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

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.279845, size = 1, normalized size = 0.02 \[ \left [-\frac{{\left (a^{2} - c\right )} \log \left (-\frac{2 \, b c x + 2 \, a c -{\left (b^{2} x^{2} + 2 \, a b x + a^{2} - c\right )} \sqrt{-c}}{b^{2} x^{2} + 2 \, a b x + a^{2} + c}\right ) - 2 \,{\left (b x - a \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + c\right )\right )} \sqrt{-c}}{2 \, b^{3} \sqrt{-c}}, \frac{{\left (a^{2} - c\right )} \arctan \left (\frac{b x + a}{\sqrt{c}}\right ) +{\left (b x - a \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + c\right )\right )} \sqrt{c}}{b^{3} \sqrt{c}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 2.18159, size = 153, normalized size = 3.06 \[ \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}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2/(c+(b*x+a)**2),x)

[Out]

(-a/b**3 - sqrt(-c)*(a**2 - c)/(2*b**3*c))*log(x + (a**3 + a*c + 2*b**3*c*(-a/b*
*3 - sqrt(-c)*(a**2 - c)/(2*b**3*c)))/(a**2*b - b*c)) + (-a/b**3 + sqrt(-c)*(a**
2 - c)/(2*b**3*c))*log(x + (a**3 + a*c + 2*b**3*c*(-a/b**3 + sqrt(-c)*(a**2 - c)
/(2*b**3*c)))/(a**2*b - b*c)) + x/b**2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.26322, size = 73, normalized size = 1.46 \[ \frac{x}{b^{2}} - \frac{a{\rm ln}\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}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x/b^2 - a*ln(b^2*x^2 + 2*a*b*x + a^2 + c)/b^3 + (a^2 - c)*arctan((b*x + a)/sqrt(
c))/(b^3*sqrt(c))