### 3.212 $$\int \frac{\cos ^2(x) \sin (x)}{5+\cos ^2(x)} \, dx$$

Optimal. Leaf size=20 $\sqrt{5} \tan ^{-1}\left (\frac{\cos (x)}{\sqrt{5}}\right )-\cos (x)$

[Out]

Sqrt[5]*ArcTan[Cos[x]/Sqrt[5]] - Cos[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0517718, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.2, Rules used = {4335, 321, 203} $\sqrt{5} \tan ^{-1}\left (\frac{\cos (x)}{\sqrt{5}}\right )-\cos (x)$

Antiderivative was successfully veriﬁed.

[In]

Int[(Cos[x]^2*Sin[x])/(5 + Cos[x]^2),x]

[Out]

Sqrt[5]*ArcTan[Cos[x]/Sqrt[5]] - Cos[x]

Rule 4335

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Cos[c*(a + b*x)], x]}, -Dist[d/(
b*c), Subst[Int[SubstFor[1, Cos[c*(a + b*x)]/d, u, x], x], x, Cos[c*(a + b*x)]/d], x] /; FunctionOfQ[Cos[c*(a
+ b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Sin] || EqQ[F, sin])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
c, n, m, p, x]

Rule 203

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

Rubi steps

\begin{align*} \int \frac{\cos ^2(x) \sin (x)}{5+\cos ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{x^2}{5+x^2} \, dx,x,\cos (x)\right )\\ &=-\cos (x)+5 \operatorname{Subst}\left (\int \frac{1}{5+x^2} \, dx,x,\cos (x)\right )\\ &=\sqrt{5} \tan ^{-1}\left (\frac{\cos (x)}{\sqrt{5}}\right )-\cos (x)\\ \end{align*}

Mathematica [B]  time = 0.16288, size = 82, normalized size = 4.1 $\frac{1}{20} \left (-20 \cos (x)+21 \sqrt{5} \tan ^{-1}\left (\frac{1}{\sqrt{5}}-\sqrt{\frac{6}{5}} \tan \left (\frac{x}{2}\right )\right )+21 \sqrt{5} \tan ^{-1}\left (\sqrt{\frac{6}{5}} \tan \left (\frac{x}{2}\right )+\frac{1}{\sqrt{5}}\right )-\sqrt{5} \tan ^{-1}\left (\frac{\cos (x)}{\sqrt{5}}\right )\right )$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(Cos[x]^2*Sin[x])/(5 + Cos[x]^2),x]

[Out]

(-(Sqrt[5]*ArcTan[Cos[x]/Sqrt[5]]) + 21*Sqrt[5]*ArcTan[1/Sqrt[5] - Sqrt[6/5]*Tan[x/2]] + 21*Sqrt[5]*ArcTan[1/S
qrt[5] + Sqrt[6/5]*Tan[x/2]] - 20*Cos[x])/20

________________________________________________________________________________________

Maple [A]  time = 0.015, size = 18, normalized size = 0.9 \begin{align*} -\cos \left ( x \right ) +\arctan \left ({\frac{\cos \left ( x \right ) \sqrt{5}}{5}} \right ) \sqrt{5} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^2*sin(x)/(5+cos(x)^2),x)

[Out]

-cos(x)+arctan(1/5*cos(x)*5^(1/2))*5^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.40769, size = 23, normalized size = 1.15 \begin{align*} \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} \cos \left (x\right )\right ) - \cos \left (x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^2*sin(x)/(5+cos(x)^2),x, algorithm="maxima")

[Out]

sqrt(5)*arctan(1/5*sqrt(5)*cos(x)) - cos(x)

________________________________________________________________________________________

Fricas [A]  time = 1.99236, size = 61, normalized size = 3.05 \begin{align*} \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} \cos \left (x\right )\right ) - \cos \left (x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^2*sin(x)/(5+cos(x)^2),x, algorithm="fricas")

[Out]

sqrt(5)*arctan(1/5*sqrt(5)*cos(x)) - cos(x)

________________________________________________________________________________________

Sympy [A]  time = 0.576645, size = 19, normalized size = 0.95 \begin{align*} - \cos{\left (x \right )} + \sqrt{5} \operatorname{atan}{\left (\frac{\sqrt{5} \cos{\left (x \right )}}{5} \right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**2*sin(x)/(5+cos(x)**2),x)

[Out]

-cos(x) + sqrt(5)*atan(sqrt(5)*cos(x)/5)

________________________________________________________________________________________

Giac [A]  time = 1.05913, size = 23, normalized size = 1.15 \begin{align*} \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} \cos \left (x\right )\right ) - \cos \left (x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^2*sin(x)/(5+cos(x)^2),x, algorithm="giac")

[Out]

sqrt(5)*arctan(1/5*sqrt(5)*cos(x)) - cos(x)