3.688 \(\int \frac {x (1+a+x^2+b x^2)}{(1+x^2) (a+b x^2)^{3/2}} \, dx\)

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.06, 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, 571, 78, 63, 208} \[ -\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}} \]

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 63

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 78

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] || LtQ
[p, n]))))

Rule 208

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

Rule 571

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} \operatorname {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} \operatorname {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 {\operatorname {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 = 71, normalized size = 1.42 \[ \frac {b \sqrt {a-b} \sqrt {a+b x^2} \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a-b}}\right )+a-b}{b (b-a) \sqrt {a+b x^2}} \]

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]

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

________________________________________________________________________________________

fricas [B]  time = 0.48, size = 268, normalized size = 5.36 \[ \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 ] \]

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)]

________________________________________________________________________________________

giac [A]  time = 0.38, size = 41, normalized size = 0.82 \[ \frac {\arctan \left (\frac {\sqrt {b x^{2} + a}}{\sqrt {-a + b}}\right )}{\sqrt {-a + b}} - \frac {1}{\sqrt {b x^{2} + a} b} \]

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)

________________________________________________________________________________________

maple [B]  time = 0.02, size = 133, normalized size = 2.66 \[ \frac {a \arctan \left (\frac {\sqrt {b \,x^{2}+a}}{\sqrt {-a +b}}\right )}{\left (a -b \right ) \sqrt {-a +b}}-\frac {b \arctan \left (\frac {\sqrt {b \,x^{2}+a}}{\sqrt {-a +b}}\right )}{\left (a -b \right ) \sqrt {-a +b}}+\frac {a}{\left (a -b \right ) \sqrt {b \,x^{2}+a}}-\frac {b}{\left (a -b \right ) \sqrt {b \,x^{2}+a}}-\frac {1}{\sqrt {b \,x^{2}+a}\, b}-\frac {1}{\sqrt {b \,x^{2}+a}} \]

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)

[Out]

-1/(b*x^2+a)^(1/2)-1/(b*x^2+a)^(1/2)/b-b/(-b+a)/(b*x^2+a)^(1/2)-b/(-b+a)/(-a+b)^(1/2)*arctan((b*x^2+a)^(1/2)/(
-a+b)^(1/2))+a/(-b+a)/(b*x^2+a)^(1/2)+a/(-b+a)/(-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 \[ \text {Exception raised: ValueError} \]

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 details)Is 4*a-4*b positive or negative?

________________________________________________________________________________________

mupad [B]  time = 4.52, size = 96, normalized size = 1.92 \[ \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}} \]

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)

________________________________________________________________________________________

sympy [A]  time = 79.83, size = 37, normalized size = 0.74 \[ \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}}} \]

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))

________________________________________________________________________________________