3.7.88 \(\int \frac {x (1+a+x^2+b x^2)}{(1+x^2) (a+b x^2)^{3/2}} \, dx\) [688]

Optimal. Leaf size=50 \[ -\frac {1}{b \sqrt {a+b x^2}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a-b}}\right )}{\sqrt {a-b}} \]

[Out]

-arctanh((b*x^2+a)^(1/2)/(a-b)^(1/2))/(a-b)^(1/2)-1/b/(b*x^2+a)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {6, 585, 79, 65, 214} \begin {gather*} -\frac {1}{b \sqrt {a+b x^2}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a-b}}\right )}{\sqrt {a-b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(1 + a + x^2 + b*x^2))/((1 + x^2)*(a + b*x^2)^(3/2)),x]

[Out]

-(1/(b*Sqrt[a + b*x^2])) - ArcTanh[Sqrt[a + b*x^2]/Sqrt[a - b]]/Sqrt[a - b]

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 79

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e,
f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || L
tQ[p, n]))))

Rule 214

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

Rule 585

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_))^(r_.), x
_Symbol] :> Dist[1/n, Subst[Int[(a + b*x)^p*(c + d*x)^q*(e + f*x)^r, x], x, x^n], x] /; FreeQ[{a, b, c, d, e,
f, m, n, p, q, r}, x] && EqQ[m - n + 1, 0]

Rubi steps

\begin {align*} \int \frac {x \left (1+a+x^2+b x^2\right )}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx &=\int \frac {x \left (1+a+(1+b) x^2\right )}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {1+a+(1+b) x}{(1+x) (a+b x)^{3/2}} \, dx,x,x^2\right )\\ &=-\frac {1}{b \sqrt {a+b x^2}}+\frac {1}{2} \text {Subst}\left (\int \frac {1}{(1+x) \sqrt {a+b x}} \, dx,x,x^2\right )\\ &=-\frac {1}{b \sqrt {a+b x^2}}+\frac {\text {Subst}\left (\int \frac {1}{1-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x^2}\right )}{b}\\ &=-\frac {1}{b \sqrt {a+b x^2}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a-b}}\right )}{\sqrt {a-b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 49, normalized size = 0.98 \begin {gather*} -\frac {1}{b \sqrt {a+b x^2}}+\frac {\tan ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {-a+b}}\right )}{\sqrt {-a+b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(1 + a + x^2 + b*x^2))/((1 + x^2)*(a + b*x^2)^(3/2)),x]

[Out]

-(1/(b*Sqrt[a + b*x^2])) + ArcTan[Sqrt[a + b*x^2]/Sqrt[-a + b]]/Sqrt[-a + b]

________________________________________________________________________________________

Maple [A]
time = 0.40, size = 76, normalized size = 1.52

method result size
default \(-\frac {b +1}{b \sqrt {b \,x^{2}+a}}+\left (a -b \right ) \left (\frac {1}{\left (a -b \right ) \sqrt {b \,x^{2}+a}}+\frac {\arctan \left (\frac {\sqrt {b \,x^{2}+a}}{\sqrt {-a +b}}\right )}{\left (a -b \right ) \sqrt {-a +b}}\right )\) \(76\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(b*x^2+x^2+a+1)/(x^2+1)/(b*x^2+a)^(3/2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a-4*b>0)', see `assume?` for
 more detail

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 121 vs. \(2 (42) = 84\).
time = 0.41, size = 268, normalized size = 5.36 \begin {gather*} \left [\frac {{\left (b^{2} x^{2} + a b\right )} \sqrt {a - b} \log \left (\frac {b^{2} x^{4} + 2 \, {\left (4 \, a b - 3 \, b^{2}\right )} x^{2} - 4 \, {\left (b x^{2} + 2 \, a - b\right )} \sqrt {b x^{2} + a} \sqrt {a - b} + 8 \, a^{2} - 8 \, a b + b^{2}}{x^{4} + 2 \, x^{2} + 1}\right ) - 4 \, \sqrt {b x^{2} + a} {\left (a - b\right )}}{4 \, {\left (a^{2} b - a b^{2} + {\left (a b^{2} - b^{3}\right )} x^{2}\right )}}, -\frac {{\left (b^{2} x^{2} + a b\right )} \sqrt {-a + b} \arctan \left (-\frac {{\left (b x^{2} + 2 \, a - b\right )} \sqrt {b x^{2} + a} \sqrt {-a + b}}{2 \, {\left ({\left (a b - b^{2}\right )} x^{2} + a^{2} - a b\right )}}\right ) + 2 \, \sqrt {b x^{2} + a} {\left (a - b\right )}}{2 \, {\left (a^{2} b - a b^{2} + {\left (a b^{2} - b^{3}\right )} x^{2}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 35.72, size = 37, normalized size = 0.74 \begin {gather*} \frac {\operatorname {atan}{\left (\frac {\sqrt {a + b x^{2}}}{\sqrt {- a + b}} \right )}}{\sqrt {- a + b}} - \frac {1}{b \sqrt {a + b x^{2}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b*x**2+x**2+a+1)/(x**2+1)/(b*x**2+a)**(3/2),x)

[Out]

atan(sqrt(a + b*x**2)/sqrt(-a + b))/sqrt(-a + b) - 1/(b*sqrt(a + b*x**2))

________________________________________________________________________________________

Giac [A]
time = 1.56, size = 41, normalized size = 0.82 \begin {gather*} \frac {\arctan \left (\frac {\sqrt {b x^{2} + a}}{\sqrt {-a + b}}\right )}{\sqrt {-a + b}} - \frac {1}{\sqrt {b x^{2} + a} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(sqrt(b*x^2 + a)/sqrt(-a + b))/sqrt(-a + b) - 1/(sqrt(b*x^2 + a)*b)

________________________________________________________________________________________

Mupad [B]
time = 4.52, size = 96, normalized size = 1.92 \begin {gather*} \frac {1}{\sqrt {b\,x^2+a}\,\left (a-b\right )}-\frac {a}{\sqrt {b\,x^2+a}\,\left (a\,b-b^2\right )}-\frac {a\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a-b}}\right )}{{\left (a-b\right )}^{3/2}}+\frac {b\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a-b}}\right )}{{\left (a-b\right )}^{3/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(a + b*x^2 + x^2 + 1))/((x^2 + 1)*(a + b*x^2)^(3/2)),x)

[Out]

1/((a + b*x^2)^(1/2)*(a - b)) - a/((a + b*x^2)^(1/2)*(a*b - b^2)) - (a*atanh((a + b*x^2)^(1/2)/(a - b)^(1/2)))
/(a - b)^(3/2) + (b*atanh((a + b*x^2)^(1/2)/(a - b)^(1/2)))/(a - b)^(3/2)

________________________________________________________________________________________