3.369 \(\int \cos (4 x) \sec ^5(x) \, dx\)

Optimal. Leaf size=26 \[ \frac{35}{8} \tanh ^{-1}(\sin (x))+\frac{1}{4} \tan (x) \sec ^3(x)-\frac{29}{8} \tan (x) \sec (x) \]

[Out]

(35*ArcTanh[Sin[x]])/8 - (29*Sec[x]*Tan[x])/8 + (Sec[x]^3*Tan[x])/4

________________________________________________________________________________________

Rubi [A]  time = 0.0300102, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.444, Rules used = {4364, 1157, 385, 206} \[ \frac{35}{8} \tanh ^{-1}(\sin (x))+\frac{1}{4} \tan (x) \sec ^3(x)-\frac{29}{8} \tan (x) \sec (x) \]

Antiderivative was successfully verified.

[In]

Int[Cos[4*x]*Sec[x]^5,x]

[Out]

(35*ArcTanh[Sin[x]])/8 - (29*Sec[x]*Tan[x])/8 + (Sec[x]^3*Tan[x])/4

Rule 4364

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

Rule 1157

Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> With[{Qx = PolynomialQ
uotient[(a + b*x^2 + c*x^4)^p, d + e*x^2, x], R = Coeff[PolynomialRemainder[(a + b*x^2 + c*x^4)^p, d + e*x^2,
x], x, 0]}, -Simp[(R*x*(d + e*x^2)^(q + 1))/(2*d*(q + 1)), x] + Dist[1/(2*d*(q + 1)), Int[(d + e*x^2)^(q + 1)*
ExpandToSum[2*d*(q + 1)*Qx + R*(2*q + 3), x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && N
eQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && LtQ[q, -1]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 206

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

Rubi steps

\begin{align*} \int \cos (4 x) \sec ^5(x) \, dx &=\operatorname{Subst}\left (\int \frac{1-8 x^2+8 x^4}{\left (1-x^2\right )^3} \, dx,x,\sin (x)\right )\\ &=\frac{1}{4} \sec ^3(x) \tan (x)-\frac{1}{4} \operatorname{Subst}\left (\int \frac{-3+32 x^2}{\left (1-x^2\right )^2} \, dx,x,\sin (x)\right )\\ &=-\frac{29}{8} \sec (x) \tan (x)+\frac{1}{4} \sec ^3(x) \tan (x)+\frac{35}{8} \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\sin (x)\right )\\ &=\frac{35}{8} \tanh ^{-1}(\sin (x))-\frac{29}{8} \sec (x) \tan (x)+\frac{1}{4} \sec ^3(x) \tan (x)\\ \end{align*}

Mathematica [A]  time = 0.0497023, size = 26, normalized size = 1. \[ \frac{1}{8} \left (35 \tanh ^{-1}(\sin (x))-27 \tan (x) \sec ^3(x)+29 \tan ^3(x) \sec (x)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[4*x]*Sec[x]^5,x]

[Out]

(35*ArcTanh[Sin[x]] - 27*Sec[x]^3*Tan[x] + 29*Sec[x]*Tan[x]^3)/8

________________________________________________________________________________________

Maple [A]  time = 0.023, size = 31, normalized size = 1.2 \begin{align*} - \left ( -{\frac{ \left ( \sec \left ( x \right ) \right ) ^{3}}{4}}-{\frac{3\,\sec \left ( x \right ) }{8}} \right ) \tan \left ( x \right ) +{\frac{35\,\ln \left ( \sec \left ( x \right ) +\tan \left ( x \right ) \right ) }{8}}-4\,\sec \left ( x \right ) \tan \left ( x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(4*x)/cos(x)^5,x)

[Out]

-(-1/4*sec(x)^3-3/8*sec(x))*tan(x)+35/8*ln(sec(x)+tan(x))-4*sec(x)*tan(x)

________________________________________________________________________________________

Maxima [B]  time = 0.938973, size = 73, normalized size = 2.81 \begin{align*} \frac{5 \, \sin \left (x\right )^{3} - 3 \, \sin \left (x\right )}{8 \,{\left (\sin \left (x\right )^{4} - 2 \, \sin \left (x\right )^{2} + 1\right )}} + \frac{3 \, \sin \left (x\right )}{\sin \left (x\right )^{2} - 1} + \frac{35}{16} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac{35}{16} \, \log \left (\sin \left (x\right ) - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(4*x)/cos(x)^5,x, algorithm="maxima")

[Out]

1/8*(5*sin(x)^3 - 3*sin(x))/(sin(x)^4 - 2*sin(x)^2 + 1) + 3*sin(x)/(sin(x)^2 - 1) + 35/16*log(sin(x) + 1) - 35
/16*log(sin(x) - 1)

________________________________________________________________________________________

Fricas [B]  time = 2.45168, size = 142, normalized size = 5.46 \begin{align*} \frac{35 \, \cos \left (x\right )^{4} \log \left (\sin \left (x\right ) + 1\right ) - 35 \, \cos \left (x\right )^{4} \log \left (-\sin \left (x\right ) + 1\right ) - 2 \,{\left (29 \, \cos \left (x\right )^{2} - 2\right )} \sin \left (x\right )}{16 \, \cos \left (x\right )^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(4*x)/cos(x)^5,x, algorithm="fricas")

[Out]

1/16*(35*cos(x)^4*log(sin(x) + 1) - 35*cos(x)^4*log(-sin(x) + 1) - 2*(29*cos(x)^2 - 2)*sin(x))/cos(x)^4

________________________________________________________________________________________

Sympy [B]  time = 108.838, size = 75, normalized size = 2.88 \begin{align*} - \frac{35 \log{\left (\sin{\left (x \right )} - 1 \right )}}{16} + \frac{35 \log{\left (\sin{\left (x \right )} + 1 \right )}}{16} - \frac{3 \sin ^{3}{\left (x \right )}}{8 \sin ^{4}{\left (x \right )} - 16 \sin ^{2}{\left (x \right )} + 8} + \frac{5 \sin{\left (x \right )}}{8 \sin ^{4}{\left (x \right )} - 16 \sin ^{2}{\left (x \right )} + 8} + \frac{8 \sin{\left (x \right )}}{2 \sin ^{2}{\left (x \right )} - 2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(4*x)/cos(x)**5,x)

[Out]

-35*log(sin(x) - 1)/16 + 35*log(sin(x) + 1)/16 - 3*sin(x)**3/(8*sin(x)**4 - 16*sin(x)**2 + 8) + 5*sin(x)/(8*si
n(x)**4 - 16*sin(x)**2 + 8) + 8*sin(x)/(2*sin(x)**2 - 2)

________________________________________________________________________________________

Giac [A]  time = 1.07727, size = 51, normalized size = 1.96 \begin{align*} \frac{29 \, \sin \left (x\right )^{3} - 27 \, \sin \left (x\right )}{8 \,{\left (\sin \left (x\right )^{2} - 1\right )}^{2}} + \frac{35}{16} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac{35}{16} \, \log \left (-\sin \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(4*x)/cos(x)^5,x, algorithm="giac")

[Out]

1/8*(29*sin(x)^3 - 27*sin(x))/(sin(x)^2 - 1)^2 + 35/16*log(sin(x) + 1) - 35/16*log(-sin(x) + 1)