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 )}} \] Output:
-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)
Result contains complex when optimal does not.
Time = 51.79 (sec) , antiderivative size = 4814, normalized size of antiderivative = 67.80 \[ \int \sec (4 x) \sin (x) \, dx=\text {Result too large to show} \] Input:
Integrate[Sec[4*x]*Sin[x],x]
Output:
((-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*Sq rt[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]*Sqr t[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)^(1/4)*(1 + I)^(1/4)*Sin[x])/(((-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]))))/(-2*(-1)^(3/8)*(1 + Sqrt[2]) - (2...
Time = 0.24 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {3042, 4857, 1406, 220}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin (x) \sec (4 x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (x)}{\cos (4 x)}dx\) |
\(\Big \downarrow \) 4857 |
\(\displaystyle -\int \frac {1}{8 \cos ^4(x)-8 \cos ^2(x)+1}d\cos (x)\) |
\(\Big \downarrow \) 1406 |
\(\displaystyle \sqrt {2} \int \frac {1}{8 \cos ^2(x)-2 \left (2-\sqrt {2}\right )}d\cos (x)-\sqrt {2} \int \frac {1}{8 \cos ^2(x)-2 \left (2+\sqrt {2}\right )}d\cos (x)\) |
\(\Big \downarrow \) 220 |
\(\displaystyle \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 )}}\) |
Input:
Int[Sec[4*x]*Sin[x],x]
Output:
-1/2*ArcTanh[(2*Cos[x])/Sqrt[2 - Sqrt[2]]]/Sqrt[2*(2 - Sqrt[2])] + ArcTanh [(2*Cos[x])/Sqrt[2 + Sqrt[2]]]/(2*Sqrt[2*(2 + Sqrt[2])])
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])
Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^ 2 - 4*a*c, 2]}, Simp[c/q Int[1/(b/2 - q/2 + c*x^2), x], x] - Simp[c/q I nt[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]
Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFacto rs[Cos[c*(a + b*x)], x]}, Simp[-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])
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.31 (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\) |
Input:
int(sec(4*x)*sin(x),x,method=_RETURNVERBOSE)
Output:
-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))
Leaf count of result is larger than twice the leaf count of optimal. 121 vs. \(2 (49) = 98\).
Time = 0.09 (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 ) \] Input:
integrate(sec(4*x)*sin(x),x, algorithm="fricas")
Output:
-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))
\[ \int \sec (4 x) \sin (x) \, dx=\int \sin {\left (x \right )} \sec {\left (4 x \right )}\, dx \] Input:
integrate(sec(4*x)*sin(x),x)
Output:
Integral(sin(x)*sec(4*x), x)
\[ \int \sec (4 x) \sin (x) \, dx=\int { \sec \left (4 \, x\right ) \sin \left (x\right ) \,d x } \] Input:
integrate(sec(4*x)*sin(x),x, algorithm="maxima")
Output:
integrate(sec(4*x)*sin(x), x)
Leaf count of result is larger than twice the leaf count of optimal. 133 vs. \(2 (49) = 98\).
Time = 0.12 (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} \] Input:
integrate(sec(4*x)*sin(x),x, algorithm="giac")
Output:
-2.16139547686000*log(-(cos(x) - 1)/(cos(x) + 1) - 0.0395661298966000)/(14 0*(cos(x) - 1)/(cos(x) + 1) + 28.1312524456150) - 4.18450863968000*log(-(c os(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) - 138 0.66111446200*log(-(cos(x) - 1)/(cos(x) + 1) - 25.2741423691000)/(140*(cos (x) - 1)/(cos(x) + 1) - 10892.9855019000)
Time = 17.63 (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} \] Input:
int(sin(x)/cos(4*x),x)
Output:
(atanh((cos(x)*(2 - 2^(1/2))^(1/2))/(64*(2^(1/2)/128 - 1/64)) - (2^(1/2)*c os(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
\[ \int \sec (4 x) \sin (x) \, dx=\int \frac {\sin \left (x \right )}{\cos \left (4 x \right )}d x -1 \] Input:
int(sec(4*x)*sin(x),x)
Output:
int(sin(x)/cos(4*x),x) - 1