\(\int \cos (x) \sec (\sin (x)) \, dx\) [676]

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

Optimal result

Integrand size = 6, antiderivative size = 4 \[ \int \cos (x) \sec (\sin (x)) \, dx=\text {arctanh}(\sin (\sin (x))) \]

[Out]

arctanh(sin(sin(x)))

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 4, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4419, 3855} \[ \int \cos (x) \sec (\sin (x)) \, dx=\text {arctanh}(\sin (\sin (x))) \]

[In]

Int[Cos[x]*Sec[Sin[x]],x]

[Out]

ArcTanh[Sin[Sin[x]]]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4419

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

Rubi steps \begin{align*} \text {integral}& = \text {Subst}(\int \sec (x) \, dx,x,\sin (x)) \\ & = \text {arctanh}(\sin (\sin (x))) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 4, normalized size of antiderivative = 1.00 \[ \int \cos (x) \sec (\sin (x)) \, dx=\text {arctanh}(\sin (\sin (x))) \]

[In]

Integrate[Cos[x]*Sec[Sin[x]],x]

[Out]

ArcTanh[Sin[Sin[x]]]

Maple [A] (verified)

Time = 0.37 (sec) , antiderivative size = 9, normalized size of antiderivative = 2.25

method result size
derivativedivides \(\ln \left (\sec \left (\sin \left (x \right )\right )+\tan \left (\sin \left (x \right )\right )\right )\) \(9\)
default \(\ln \left (\sec \left (\sin \left (x \right )\right )+\tan \left (\sin \left (x \right )\right )\right )\) \(9\)
parallelrisch \(-\ln \left (\tan \left (\frac {\sin \left (x \right )}{2}\right )-1\right )+\ln \left (\tan \left (\frac {\sin \left (x \right )}{2}\right )+1\right )\) \(20\)
risch \(\ln \left ({\mathrm e}^{i \sin \left (x \right )}+i\right )-\ln \left ({\mathrm e}^{i \sin \left (x \right )}-i\right )\) \(24\)
norman \(-\ln \left (\tan \left (\frac {\tan \left (\frac {x}{2}\right )}{1+\tan \left (\frac {x}{2}\right )^{2}}\right )-1\right )+\ln \left (\tan \left (\frac {\tan \left (\frac {x}{2}\right )}{1+\tan \left (\frac {x}{2}\right )^{2}}\right )+1\right )\) \(42\)

[In]

int(cos(x)*sec(sin(x)),x,method=_RETURNVERBOSE)

[Out]

ln(sec(sin(x))+tan(sin(x)))

Fricas [B] (verification not implemented)

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

Time = 0.25 (sec) , antiderivative size = 47, normalized size of antiderivative = 11.75 \[ \int \cos (x) \sec (\sin (x)) \, dx=\frac {1}{2} \, \log \left (\sin \left (\frac {2 \, \tan \left (\frac {1}{2} \, x\right )}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) + 1\right ) - \frac {1}{2} \, \log \left (-\sin \left (\frac {2 \, \tan \left (\frac {1}{2} \, x\right )}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) + 1\right ) \]

[In]

integrate(cos(x)*sec(sin(x)),x, algorithm="fricas")

[Out]

1/2*log(sin(2*tan(1/2*x)/(tan(1/2*x)^2 + 1)) + 1) - 1/2*log(-sin(2*tan(1/2*x)/(tan(1/2*x)^2 + 1)) + 1)

Sympy [A] (verification not implemented)

Time = 0.62 (sec) , antiderivative size = 10, normalized size of antiderivative = 2.50 \[ \int \cos (x) \sec (\sin (x)) \, dx=\log {\left (\tan {\left (\sin {\left (x \right )} \right )} + \sec {\left (\sin {\left (x \right )} \right )} \right )} \]

[In]

integrate(cos(x)*sec(sin(x)),x)

[Out]

log(tan(sin(x)) + sec(sin(x)))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 8, normalized size of antiderivative = 2.00 \[ \int \cos (x) \sec (\sin (x)) \, dx=\log \left (\sec \left (\sin \left (x\right )\right ) + \tan \left (\sin \left (x\right )\right )\right ) \]

[In]

integrate(cos(x)*sec(sin(x)),x, algorithm="maxima")

[Out]

log(sec(sin(x)) + tan(sin(x)))

Giac [B] (verification not implemented)

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

Time = 0.28 (sec) , antiderivative size = 29, normalized size of antiderivative = 7.25 \[ \int \cos (x) \sec (\sin (x)) \, dx=\frac {1}{4} \, \log \left ({\left | \frac {1}{\sin \left (\sin \left (x\right )\right )} + \sin \left (\sin \left (x\right )\right ) + 2 \right |}\right ) - \frac {1}{4} \, \log \left ({\left | \frac {1}{\sin \left (\sin \left (x\right )\right )} + \sin \left (\sin \left (x\right )\right ) - 2 \right |}\right ) \]

[In]

integrate(cos(x)*sec(sin(x)),x, algorithm="giac")

[Out]

1/4*log(abs(1/sin(sin(x)) + sin(sin(x)) + 2)) - 1/4*log(abs(1/sin(sin(x)) + sin(sin(x)) - 2))

Mupad [B] (verification not implemented)

Time = 27.37 (sec) , antiderivative size = 21, normalized size of antiderivative = 5.25 \[ \int \cos (x) \sec (\sin (x)) \, dx=-\mathrm {atan}\left ({\mathrm {e}}^{-\frac {{\mathrm {e}}^{-x\,1{}\mathrm {i}}}{2}}\,{\mathrm {e}}^{\frac {{\mathrm {e}}^{x\,1{}\mathrm {i}}}{2}}\right )\,2{}\mathrm {i} \]

[In]

int(cos(x)/cos(sin(x)),x)

[Out]

-atan(exp(-exp(-x*1i)/2)*exp(exp(x*1i)/2))*2i