\(\int \frac {\sec ^4(x) \tan (x)}{4+\sec ^4(x)} \, dx\) [228]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 11 \[ \int \frac {\sec ^4(x) \tan (x)}{4+\sec ^4(x)} \, dx=\frac {1}{4} \log \left (4+\sec ^4(x)\right ) \]

[Out]

1/4*ln(sec(x)^4+4)

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.73, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4424, 272, 36, 29, 31} \[ \int \frac {\sec ^4(x) \tan (x)}{4+\sec ^4(x)} \, dx=\frac {1}{4} \log \left (4 \cos ^4(x)+1\right )-\log (\cos (x)) \]

[In]

Int[(Sec[x]^4*Tan[x])/(4 + Sec[x]^4),x]

[Out]

-Log[Cos[x]] + Log[1 + 4*Cos[x]^4]/4

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4424

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Cos[c*(a + b*x)], x]}, Dist[-(b*
c)^(-1), Subst[Int[SubstFor[1/x, 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, Tan] || EqQ[F, tan])

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {1}{x \left (1+4 x^4\right )} \, dx,x,\cos (x)\right ) \\ & = -\left (\frac {1}{4} \text {Subst}\left (\int \frac {1}{x (1+4 x)} \, dx,x,\cos ^4(x)\right )\right ) \\ & = -\left (\frac {1}{4} \text {Subst}\left (\int \frac {1}{x} \, dx,x,\cos ^4(x)\right )\right )+\text {Subst}\left (\int \frac {1}{1+4 x} \, dx,x,\cos ^4(x)\right ) \\ & = -\log (\cos (x))+\frac {1}{4} \log \left (1+4 \cos ^4(x)\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.73 \[ \int \frac {\sec ^4(x) \tan (x)}{4+\sec ^4(x)} \, dx=-\log (\cos (x))+\frac {1}{4} \log \left (1+4 \cos ^4(x)\right ) \]

[In]

Integrate[(Sec[x]^4*Tan[x])/(4 + Sec[x]^4),x]

[Out]

-Log[Cos[x]] + Log[1 + 4*Cos[x]^4]/4

Maple [A] (verified)

Time = 3.91 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.91

method result size
derivativedivides \(\frac {\ln \left (\sec \left (x \right )^{4}+4\right )}{4}\) \(10\)
default \(\frac {\ln \left (\sec \left (x \right )^{4}+4\right )}{4}\) \(10\)
risch \(-\ln \left ({\mathrm e}^{2 i x}+1\right )+\frac {\ln \left ({\mathrm e}^{8 i x}+4 \,{\mathrm e}^{6 i x}+10 \,{\mathrm e}^{4 i x}+4 \,{\mathrm e}^{2 i x}+1\right )}{4}\) \(43\)

[In]

int(sec(x)^4*tan(x)/(sec(x)^4+4),x,method=_RETURNVERBOSE)

[Out]

1/4*ln(sec(x)^4+4)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 19 vs. \(2 (9) = 18\).

Time = 0.26 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.73 \[ \int \frac {\sec ^4(x) \tan (x)}{4+\sec ^4(x)} \, dx=\frac {1}{4} \, \log \left (4 \, \cos \left (x\right )^{4} + 1\right ) - \log \left (-\cos \left (x\right )\right ) \]

[In]

integrate(sec(x)^4*tan(x)/(sec(x)^4+4),x, algorithm="fricas")

[Out]

1/4*log(4*cos(x)^4 + 1) - log(-cos(x))

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 29 vs. \(2 (8) = 16\).

Time = 0.25 (sec) , antiderivative size = 29, normalized size of antiderivative = 2.64 \[ \int \frac {\sec ^4(x) \tan (x)}{4+\sec ^4(x)} \, dx=\frac {\log {\left (\sec ^{2}{\left (x \right )} - 2 \sec {\left (x \right )} + 2 \right )}}{4} + \frac {\log {\left (\sec ^{2}{\left (x \right )} + 2 \sec {\left (x \right )} + 2 \right )}}{4} \]

[In]

integrate(sec(x)**4*tan(x)/(sec(x)**4+4),x)

[Out]

log(sec(x)**2 - 2*sec(x) + 2)/4 + log(sec(x)**2 + 2*sec(x) + 2)/4

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.82 \[ \int \frac {\sec ^4(x) \tan (x)}{4+\sec ^4(x)} \, dx=\frac {1}{4} \, \log \left (\sec \left (x\right )^{4} + 4\right ) \]

[In]

integrate(sec(x)^4*tan(x)/(sec(x)^4+4),x, algorithm="maxima")

[Out]

1/4*log(sec(x)^4 + 4)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 19 vs. \(2 (9) = 18\).

Time = 0.26 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.73 \[ \int \frac {\sec ^4(x) \tan (x)}{4+\sec ^4(x)} \, dx=\frac {1}{4} \, \log \left (4 \, \cos \left (x\right )^{4} + 1\right ) - \frac {1}{4} \, \log \left (\cos \left (x\right )^{4}\right ) \]

[In]

integrate(sec(x)^4*tan(x)/(sec(x)^4+4),x, algorithm="giac")

[Out]

1/4*log(4*cos(x)^4 + 1) - 1/4*log(cos(x)^4)

Mupad [B] (verification not implemented)

Time = 15.04 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.36 \[ \int \frac {\sec ^4(x) \tan (x)}{4+\sec ^4(x)} \, dx=\frac {\ln \left ({\mathrm {tan}\left (x\right )}^4+2\,{\mathrm {tan}\left (x\right )}^2+5\right )}{4} \]

[In]

int(tan(x)/(cos(x)^4*(1/cos(x)^4 + 4)),x)

[Out]

log(2*tan(x)^2 + tan(x)^4 + 5)/4