\(\int \sec (4 x) \sin (x) \, dx\) [87]
Optimal result
Integrand size = 7, antiderivative size = 71 \[
\int \sec (4 x) \sin (x) \, dx=-\frac {\text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {2}}}\right )}{2 \sqrt {2 \left (2-\sqrt {2}\right )}}+\frac {\text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2 \left (2+\sqrt {2}\right )}}
\]
[Out]
-1/2*arctanh(2*cos(x)/(2-2^(1/2))^(1/2))/(4-2*2^(1/2))^(1/2)+1/2*arctanh(2*cos(x)/(2+2^(1/2))^(1/2))/(4+2*2^(1
/2))^(1/2)
Rubi [A] (verified)
Time = 0.08 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of
steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4442, 1107, 213}
\[
\int \sec (4 x) \sin (x) \, dx=\frac {\text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2 \left (2+\sqrt {2}\right )}}-\frac {\text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {2}}}\right )}{2 \sqrt {2 \left (2-\sqrt {2}\right )}}
\]
[In]
Int[Sec[4*x]*Sin[x],x]
[Out]
-1/2*ArcTanh[(2*Cos[x])/Sqrt[2 - Sqrt[2]]]/Sqrt[2*(2 - Sqrt[2])] + ArcTanh[(2*Cos[x])/Sqrt[2 + Sqrt[2]]]/(2*Sq
rt[2*(2 + Sqrt[2])])
Rule 213
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])
Rule 1107
Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/(b/
2 - q/2 + c*x^2), x], x] - Dist[c/q, Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && PosQ[b^2 - 4*a*c]
Rule 4442
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]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Sin] || EqQ[F, sin])
Rubi steps \begin{align*}
\text {integral}& = -\text {Subst}\left (\int \frac {1}{1-8 x^2+8 x^4} \, dx,x,\cos (x)\right ) \\ & = -\left (\sqrt {2} \text {Subst}\left (\int \frac {1}{-4-2 \sqrt {2}+8 x^2} \, dx,x,\cos (x)\right )\right )+\sqrt {2} \text {Subst}\left (\int \frac {1}{-4+2 \sqrt {2}+8 x^2} \, dx,x,\cos (x)\right ) \\ & = -\frac {\text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {2}}}\right )}{2 \sqrt {2 \left (2-\sqrt {2}\right )}}+\frac {\text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2+\sqrt {2}}}\right )}{2 \sqrt {2 \left (2+\sqrt {2}\right )}} \\
\end{align*}
Mathematica [C] (warning: unable to verify)
Result contains complex when optimal does not.
Time = 52.97 (sec) , antiderivative size = 4814, normalized size of antiderivative = 67.80
\[
\int \sec (4 x) \sin (x) \, dx=\text {Result too large to show}
\]
[In]
Integrate[Sec[4*x]*Sin[x],x]
[Out]
((-2*(-1)^(3/8)*(1 + Sqrt[2])*x - (2*(-1)^(1/4)*(-2 - (1 - I)*(-1)^(5/8) + (-1)^(5/8)*Sqrt[2])*ArcTan[(-Cos[x]
+ (1 + Sqrt[2])*Sin[x])/(2*(-1)^(3/8) + Cos[x] - Sqrt[2]*Cos[x] + Sin[x])])/((-1 + I) + 2*(-1)^(3/8) + Sqrt[2
]) - (2*(1 - I)^(3/2)*2^(1/4)*((-3 - I) + 2*(-1)^(5/8) + (2 + I)*Sqrt[2] - (2 + 2*I)*(-1)^(3/8)*Sqrt[2] + 2*(-
1)^(5/8)*Sqrt[2])*ArcTan[((1 + I) + I*Sqrt[2] + ((-1 + I) + 2*(-1)^(3/8) + Sqrt[2])*Tan[x/2])/(Sqrt[1 - I]*2^(
3/4))])/((-1 + I) + 2*(-1)^(3/8) + Sqrt[2]) + 2*(-1)^(3/8)*Log[Sec[x/2]^2] + ((-1)^(3/4)*(-2 - (1 - I)*(-1)^(5
/8) + (-1)^(5/8)*Sqrt[2])*Log[-(Sec[x/2]^4*(-2 + (1 - I)*Sqrt[2] + 2*(-1)^(3/8)*(-1 + Sqrt[2])*Cos[x] + Sqrt[2
]*Cos[2*x] - 2*(-1)^(3/8)*Sin[x] + Sqrt[2]*Sin[2*x]))])/((-1 + I) + 2*(-1)^(3/8) + Sqrt[2]))*((-1/2 - I/2)/(((
-1 + I) + Sqrt[1 - I]*Sqrt[1 + I])*(-((-1 - I)^(3/2)*(1 - I)^(1/4)*(1 + I)^(1/4)) - (1 + I)*Cos[x] + I*Sqrt[1
- I]*Sqrt[1 + I]*Cos[x] + (1 - I)*Sin[x] + Sqrt[1 - I]*Sqrt[1 + I]*Sin[x])) - Sin[x]/(Sqrt[-1 - I]*(1 - I)^(1/
4)*(1 + I)^(1/4)*((-1 + I) + Sqrt[1 - I]*Sqrt[1 + I])*(-((-1 - I)^(3/2)*(1 - I)^(1/4)*(1 + I)^(1/4)) - (1 + I)
*Cos[x] + I*Sqrt[1 - I]*Sqrt[1 + I]*Cos[x] + (1 - I)*Sin[x] + Sqrt[1 - I]*Sqrt[1 + I]*Sin[x])) - ((I/2)*Sqrt[-
1 - I]*(1 - I)^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*Cos[2*x] - 2*(-1)^(3/8)*Sin[x] + Sqrt[2]*Sin[2*x])) - ((1 - I)*((-3 - I) + 2*(-
1)^(5/8) + (2 + I)*Sqrt[2] - (2 + 2*I)*(-1)^(3/8)*Sqrt[2] + 2*(-1)^(5/8)*Sqrt[2])*Sec[x/2]^2)/(Sqrt[2]*(1 + ((
1/4 + I/4)*((1 + I) + I*Sqrt[2] + ((-1 + I) + 2*(-1)^(3/8) + Sqrt[2])*Tan[x/2])^2)/Sqrt[2]))) + ((-4*Sqrt[-1 -
I]*(-1 + Sqrt[2])*ArcTanh[((-I)*((1 + I) + Sqrt[2]) + ((1 + I) + 2*(-1)^(5/8) - Sqrt[2])*Tan[x/2])/(Sqrt[-1 -
I]*2^(3/4))] + (-1)^(1/8)*2^(1/4)*(2*ArcTan[(Cos[x] + (1 + Sqrt[2])*Sin[x])/(2*(-1)^(5/8) + (-1 + Sqrt[2])*Co
s[x] + Sin[x])] - I*(2*(1 + Sqrt[2])*x + 2*Log[Sec[x/2]^2] - Log[Sec[x/2]^4*(2 - (1 + I)*Sqrt[2] + 2*(-1)^(5/8
)*(-1 + Sqrt[2])*Cos[x] - Sqrt[2]*Cos[2*x] + 2*(-1)^(5/8)*Sin[x] + Sqrt[2]*Sin[2*x])])))*((-1 - I) + Sqrt[2] -
(2*2^(1/4)*Sin[x])/Sqrt[-1 + I]))/(2^(1/4)*((-1 - I) + Sqrt[2])*(2*Sqrt[-1 + I]*2^(1/4)*((-1 - I) + Sqrt[2])
- 4*(-1 + Sqrt[2])*Cos[x] - 4*Sin[x])*((2*(-1)^(1/8)*(-2 - (1 + I)*Sqrt[2] + (-1)^(1/8)*((1 + I) + I*Sqrt[2])*
Cos[x] + (2*I)*(1 + Sqrt[2])*Cos[2*x] + (-1)^(1/8)*Sin[x] - (-1)^(5/8)*Sin[x] + 3*(-1)^(1/8)*Sqrt[2]*Sin[x] -
(2*I)*Sin[2*x]))/(2 - (1 + I)*Sqrt[2] + 2*(-1)^(5/8)*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])*Sec[x/2]^2)/(1 + ((-1)^(3/4)*(-1 - (-1)^(1/4) + (-
I + (-1)^(3/4) + (-1)^(1/8)*Sqrt[2])*Tan[x/2])^2)/2)) + ((-2*(-1 + (-1)^(3/4))*x + (2*(2 - Sqrt[2] - (-1)^(3/8
)*Sqrt[2] + (-1)^(5/8)*Sqrt[2])*ArcTan[Cos[x]/(-((-1)^(1/8)*Sqrt[2]) + (-1)^(3/4)*Cos[x] - (1 + (-1)^(1/4))*Si
n[x])])/(1 - (-1)^(1/4) + (-1)^(5/8)*Sqrt[2]) - ((4 + 4*I)*(-1)^(1/4)*(3*I + (-1)^(1/8) - (-1)^(3/8) - (1 + I)
*(-1)^(5/8) - (2*I)*Sqrt[2] + (1 + I)*(-1)^(5/8)*Sqrt[2])*ArcTanh[(1/2 + I/2)*(-1)^(5/8)*(1 + (-1)^(1/4) + (-I
+ (-1)^(3/4) + (-1)^(1/8)*Sqrt[2])*Tan[x/2])])/(-I + (-1)^(3/4) + (-1)^(1/8)*Sqrt[2]) - (2*I)*(1 + (-1)^(3/4)
)*Log[Sec[x/2]^2] + ((2 - Sqrt[2] - (-1)^(3/8)*Sqrt[2] + (-1)^(5/8)*Sqrt[2])*Log[(1/4 + I/4)*Sec[x/2]^4*((2 -
2*I) + 6*Sqrt[2] - (4 - 4*I)*(-1)^(7/8)*Sqrt[2]*Cos[x] - 2*((1 + I) + Sqrt[2])*Cos[2*x] + (4 - 4*I)*(-1)^(1/8)
*((1 + I) + Sqrt[2])*Sin[x] + (2 - 2*I)*Sin[2*x] - (2*I)*Sqrt[2]*Sin[2*x])])/(-I + (-1)^(3/4) + (-1)^(1/8)*Sqr
t[2]))*(1/(Sqrt[1 - I]*((-1 - I) + Sqrt[1 - I]*Sqrt[1 + I])^2*(-(Sqrt[-1 + I]*(1 - I)^(1/4)*(1 + I)^(3/4)) + S
qrt[1 - I]*Cos[x] - Sqrt[1 + I]*Cos[x] - I*Sqrt[1 - I]*Sin[x] - I*Sqrt[1 + I]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[2]*Sin[x] + 4*(
(1 + I) + Sqrt[2])*Sin[2*x]) + (1/2 + I/2)*Sec[x/2]^4*((2 - 2*I) + 6*Sqrt[2] - (4 - 4*I)*(-1)^(7/8)*Sqrt[2]*Co
s[x] - 2*((1 + I) + Sqrt[2])*Cos[2*x] + (4 - 4*I)*(-1)^(1/8)*((1 + I) + Sqrt[2])*Sin[x] + (2 - 2*I)*Sin[2*x] -
(2*I)*Sqrt[2]*Sin[2*x])*Tan[x/2]))/((-I + (-1)^(3/4) + (-1)^(1/8)*Sqrt[2])*((2 - 2*I) + 6*Sqrt[2] - (4 - 4*I)
*(-1)^(7/8)*Sqrt[2]*Cos[x] - 2*((1 + I) + Sqrt[2])*Cos[2*x] + (4 - 4*I)*(-1)^(1/8)*((1 + I) + Sqrt[2])*Sin[x]
+ (2 - 2*I)*Sin[2*x] - (2*I)*Sqrt[2]*Sin[2*x])) + (2*(-1)^(3/8)*(3*I + (-1)^(1/8) - (-1)^(3/8) - (1 + I)*(-1)^
(5/8) - (2*I)*Sqrt[2] + (1 + I)*(-1)^(5/8)*Sqrt[2])*Sec[x/2]^2)/(1 + ((-1)^(3/4)*(1 + (-1)^(1/4) + (-I + (-1)^
(3/4) + (-1)^(1/8)*Sqrt[2])*Tan[x/2])^2)/2))
Maple [C] (verified)
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 1.75 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.66
| | |
method | result | size |
| | |
risch |
\(-i \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (2048 \textit {\_Z}^{4}+128 \textit {\_Z}^{2}+1\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i x}+\left (-512 i \textit {\_R}^{3}-24 i \textit {\_R} \right ) {\mathrm e}^{i x}+1\right )\right )\) |
\(47\) |
default |
\(\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {2 \cos \left (x \right )}{\sqrt {2+\sqrt {2}}}\right )}{4 \sqrt {2+\sqrt {2}}}-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {2 \cos \left (x \right )}{\sqrt {2-\sqrt {2}}}\right )}{4 \sqrt {2-\sqrt {2}}}\) |
\(54\) |
| | |
|
|
|
[In]
int(sec(4*x)*sin(x),x,method=_RETURNVERBOSE)
[Out]
-I*sum(_R*ln(exp(2*I*x)+(-512*I*_R^3-24*I*_R)*exp(I*x)+1),_R=RootOf(2048*_Z^4+128*_Z^2+1))
Fricas [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 121 vs. \(2 (49) = 98\).
Time = 0.27 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.70
\[
\int \sec (4 x) \sin (x) \, dx=-\frac {1}{8} \, \sqrt {\sqrt {2} + 2} \log \left (\sqrt {\sqrt {2} + 2} {\left (\sqrt {2} - 1\right )} + 2 \, \cos \left (x\right )\right ) + \frac {1}{8} \, \sqrt {\sqrt {2} + 2} \log \left (\sqrt {\sqrt {2} + 2} {\left (\sqrt {2} - 1\right )} - 2 \, \cos \left (x\right )\right ) + \frac {1}{8} \, \sqrt {-\sqrt {2} + 2} \log \left ({\left (\sqrt {2} + 1\right )} \sqrt {-\sqrt {2} + 2} + 2 \, \cos \left (x\right )\right ) - \frac {1}{8} \, \sqrt {-\sqrt {2} + 2} \log \left ({\left (\sqrt {2} + 1\right )} \sqrt {-\sqrt {2} + 2} - 2 \, \cos \left (x\right )\right )
\]
[In]
integrate(sec(4*x)*sin(x),x, algorithm="fricas")
[Out]
-1/8*sqrt(sqrt(2) + 2)*log(sqrt(sqrt(2) + 2)*(sqrt(2) - 1) + 2*cos(x)) + 1/8*sqrt(sqrt(2) + 2)*log(sqrt(sqrt(2
) + 2)*(sqrt(2) - 1) - 2*cos(x)) + 1/8*sqrt(-sqrt(2) + 2)*log((sqrt(2) + 1)*sqrt(-sqrt(2) + 2) + 2*cos(x)) - 1
/8*sqrt(-sqrt(2) + 2)*log((sqrt(2) + 1)*sqrt(-sqrt(2) + 2) - 2*cos(x))
Sympy [F]
\[
\int \sec (4 x) \sin (x) \, dx=\int \sin {\left (x \right )} \sec {\left (4 x \right )}\, dx
\]
[In]
integrate(sec(4*x)*sin(x),x)
[Out]
Integral(sin(x)*sec(4*x), x)
Maxima [F]
\[
\int \sec (4 x) \sin (x) \, dx=\int { \sec \left (4 \, x\right ) \sin \left (x\right ) \,d x }
\]
[In]
integrate(sec(4*x)*sin(x),x, algorithm="maxima")
[Out]
integrate(sec(4*x)*sin(x), x)
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 133 vs. \(2 (49) = 98\).
Time = 0.27 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.87
\[
\int \sec (4 x) \sin (x) \, dx=-\frac {2.16139547686000 \, \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} - 0.0395661298966000\right )}{\frac {140 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} + 28.1312524456150} - \frac {4.18450863968000 \, \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} - 0.446462692172000\right )}{\frac {140 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} + 44.3876588494000} - \frac {20.9929814212000 \, \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} - 2.23982880884000\right )}{\frac {140 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} + 404.466590643000} - \frac {1380.66111446200 \, \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} - 25.2741423691000\right )}{\frac {140 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} - 10892.9855019000}
\]
[In]
integrate(sec(4*x)*sin(x),x, algorithm="giac")
[Out]
-2.16139547686000*log(-(cos(x) - 1)/(cos(x) + 1) - 0.0395661298966000)/(140*(cos(x) - 1)/(cos(x) + 1) + 28.131
2524456150) - 4.18450863968000*log(-(cos(x) - 1)/(cos(x) + 1) - 0.446462692172000)/(140*(cos(x) - 1)/(cos(x) +
1) + 44.3876588494000) - 20.9929814212000*log(-(cos(x) - 1)/(cos(x) + 1) - 2.23982880884000)/(140*(cos(x) - 1
)/(cos(x) + 1) + 404.466590643000) - 1380.66111446200*log(-(cos(x) - 1)/(cos(x) + 1) - 25.2741423691000)/(140*
(cos(x) - 1)/(cos(x) + 1) - 10892.9855019000)
Mupad [B] (verification not implemented)
Time = 27.29 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.58
\[
\int \sec (4 x) \sin (x) \, dx=\frac {\mathrm {atanh}\left (\frac {\cos \left (x\right )\,\sqrt {2-\sqrt {2}}}{64\,\left (\frac {\sqrt {2}}{128}-\frac {1}{64}\right )}-\frac {\sqrt {2}\,\cos \left (x\right )\,\sqrt {2-\sqrt {2}}}{64\,\left (\frac {\sqrt {2}}{128}-\frac {1}{64}\right )}\right )\,\sqrt {2-\sqrt {2}}}{4}-\frac {\mathrm {atanh}\left (\frac {\cos \left (x\right )\,\sqrt {\sqrt {2}+2}}{64\,\left (\frac {\sqrt {2}}{128}+\frac {1}{64}\right )}+\frac {\sqrt {2}\,\cos \left (x\right )\,\sqrt {\sqrt {2}+2}}{64\,\left (\frac {\sqrt {2}}{128}+\frac {1}{64}\right )}\right )\,\sqrt {\sqrt {2}+2}}{4}
\]
[In]
int(sin(x)/cos(4*x),x)
[Out]
(atanh((cos(x)*(2 - 2^(1/2))^(1/2))/(64*(2^(1/2)/128 - 1/64)) - (2^(1/2)*cos(x)*(2 - 2^(1/2))^(1/2))/(64*(2^(1
/2)/128 - 1/64)))*(2 - 2^(1/2))^(1/2))/4 - (atanh((cos(x)*(2^(1/2) + 2)^(1/2))/(64*(2^(1/2)/128 + 1/64)) + (2^
(1/2)*cos(x)*(2^(1/2) + 2)^(1/2))/(64*(2^(1/2)/128 + 1/64)))*(2^(1/2) + 2)^(1/2))/4