Integrand size = 7, antiderivative size = 85 \[ \int \sec (6 x) \sin (x) \, dx=-\frac {\text {arctanh}\left (\sqrt {2} \cos (x)\right )}{3 \sqrt {2}}+\frac {\text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {3}}}\right )}{6 \sqrt {2-\sqrt {3}}}+\frac {\text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2+\sqrt {3}}}\right )}{6 \sqrt {2+\sqrt {3}}} \]
-1/6*arctanh(cos(x)*2^(1/2))*2^(1/2)+1/6*arctanh(2*cos(x)/(1/2*6^(1/2)-1/2 *2^(1/2)))/(1/2*6^(1/2)-1/2*2^(1/2))+1/6*arctanh(2*cos(x)/(1/2*6^(1/2)+1/2 *2^(1/2)))/(1/2*6^(1/2)+1/2*2^(1/2))
Result contains complex when optimal does not.
Time = 7.33 (sec) , antiderivative size = 627, normalized size of antiderivative = 7.38 \[ \int \sec (6 x) \sin (x) \, dx=\frac {1}{24} \left ((-4-4 i) (-1)^{3/4} \text {arctanh}\left (\frac {-1+\tan \left (\frac {x}{2}\right )}{\sqrt {2}}\right )-(4-4 i) \sqrt [4]{-1} \text {arctanh}\left (\frac {1+\tan \left (\frac {x}{2}\right )}{\sqrt {2}}\right )+\frac {2 \left (1+\sqrt {2}\right ) \left (x+2 \sqrt {3} \text {arctanh}\left (\frac {2+\left (2+\sqrt {2}\right ) \tan \left (\frac {x}{2}\right )}{\sqrt {6}}\right )-\log \left (\sec ^2\left (\frac {x}{2}\right )\right )+\log \left (-\sec ^2\left (\frac {x}{2}\right ) \left (\sqrt {2}-2 \cos (x)+2 \sin (x)\right )\right )\right )}{2+\sqrt {2}}-\sqrt {2} \left (x-2 \sqrt {3} \text {arctanh}\left (\frac {\sqrt {2}+\left (-1+\sqrt {2}\right ) \tan \left (\frac {x}{2}\right )}{\sqrt {3}}\right )-\log \left (\sec ^2\left (\frac {x}{2}\right )\right )+\log \left (\sec ^2\left (\frac {x}{2}\right ) \left (1+\sqrt {2} \cos (x)-\sqrt {2} \sin (x)\right )\right )\right )+\frac {2 \left (2 \left (\sqrt {2}+\sqrt {3}\right ) \text {arctanh}\left (\frac {2+\left (2+\sqrt {6}\right ) \tan \left (\frac {x}{2}\right )}{\sqrt {2}}\right )+\left (3+\sqrt {6}\right ) \left (x-\log \left (\sec ^2\left (\frac {x}{2}\right )\right )+\log \left (-\sec ^2\left (\frac {x}{2}\right ) \left (\sqrt {6}-2 \cos (x)+2 \sin (x)\right )\right )\right )\right ) \left (1+\sqrt {6} \sin (x)\right ) \left (3+\sqrt {6}-\left (2+\sqrt {6}\right ) \cos (x)+\left (2+\sqrt {6}\right ) \sin (x)\right )}{\left (12+5 \sqrt {6}\right ) \cos (2 x)+2 \cos (x) \left (5+2 \sqrt {6}+5 \sqrt {6} \sin (x)\right )-2 \left (12+5 \sqrt {6}+4 \left (5+2 \sqrt {6}\right ) \sin (x)-6 \sin (2 x)\right )}+\frac {\left (-2 \left (-2+\sqrt {6}\right ) \text {arctanh}\left (\sqrt {2}+\left (\sqrt {2}-\sqrt {3}\right ) \tan \left (\frac {x}{2}\right )\right )+\left (3 \sqrt {2}-2 \sqrt {3}\right ) \left (x-\log \left (\sec ^2\left (\frac {x}{2}\right )\right )+\log \left (-\sec ^2\left (\frac {x}{2}\right ) \left (\sqrt {3}+\sqrt {2} \cos (x)-\sqrt {2} \sin (x)\right )\right )\right )\right ) \left (\sqrt {2}-2 \sqrt {3} \sin (x)\right ) \left (-3+\sqrt {6}-\left (-2+\sqrt {6}\right ) \cos (x)+\left (-2+\sqrt {6}\right ) \sin (x)\right )}{\left (-12+5 \sqrt {6}\right ) \cos (2 x)+2 \cos (x) \left (-5+2 \sqrt {6}+5 \sqrt {6} \sin (x)\right )-2 \left (-12+5 \sqrt {6}+4 \left (-5+2 \sqrt {6}\right ) \sin (x)+6 \sin (2 x)\right )}\right ) \]
((-4 - 4*I)*(-1)^(3/4)*ArcTanh[(-1 + Tan[x/2])/Sqrt[2]] - (4 - 4*I)*(-1)^( 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qrt[ 6] + 4*(-5 + 2*Sqrt[6])*Sin[x] + 6*Sin[2*x])))/24
Time = 0.28 (sec) , antiderivative size = 85, 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, 2460, 2009}
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 (6 x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (x)}{\cos (6 x)}dx\) |
\(\Big \downarrow \) 4857 |
\(\displaystyle -\int \frac {1}{32 \cos ^6(x)-48 \cos ^4(x)+18 \cos ^2(x)-1}d\cos (x)\) |
\(\Big \downarrow \) 2460 |
\(\displaystyle -\int \left (\frac {4 \left (2 \cos ^2(x)-1\right )}{3 \left (16 \cos ^4(x)-16 \cos ^2(x)+1\right )}-\frac {1}{3 \left (2 \cos ^2(x)-1\right )}\right )d\cos (x)\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\text {arctanh}\left (\sqrt {2} \cos (x)\right )}{3 \sqrt {2}}+\frac {\text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {3}}}\right )}{6 \sqrt {2-\sqrt {3}}}+\frac {\text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2+\sqrt {3}}}\right )}{6 \sqrt {2+\sqrt {3}}}\) |
-1/3*ArcTanh[Sqrt[2]*Cos[x]]/Sqrt[2] + ArcTanh[(2*Cos[x])/Sqrt[2 - Sqrt[3] ]]/(6*Sqrt[2 - Sqrt[3]]) + ArcTanh[(2*Cos[x])/Sqrt[2 + Sqrt[3]]]/(6*Sqrt[2 + Sqrt[3]])
3.1.89.3.1 Defintions of rubi rules used
Int[(u_.)*(Px_)^(p_), x_Symbol] :> With[{Qx = Factor[Px /. x -> Sqrt[x]]}, Int[ExpandIntegrand[u*(Qx /. x -> x^2)^p, x], x] /; !SumQ[NonfreeFactors[Q x, x]]] /; PolyQ[Px, x^2] && GtQ[Expon[Px, x], 2] && !BinomialQ[Px, x] && !TrinomialQ[Px, x] && ILtQ[p, 0] && RationalFunctionQ[u, x]
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])
Time = 1.83 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.94
method | result | size |
default | \(\frac {2 \,\operatorname {arctanh}\left (\frac {8 \cos \left (x \right )}{2 \sqrt {6}+2 \sqrt {2}}\right )}{3 \left (2 \sqrt {6}+2 \sqrt {2}\right )}+\frac {2 \,\operatorname {arctanh}\left (\frac {8 \cos \left (x \right )}{2 \sqrt {6}-2 \sqrt {2}}\right )}{3 \left (2 \sqrt {6}-2 \sqrt {2}\right )}-\frac {\operatorname {arctanh}\left (\cos \left (x \right ) \sqrt {2}\right ) \sqrt {2}}{6}\) | \(80\) |
risch | \(\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 i x}-\sqrt {2}\, {\mathrm e}^{i x}+1\right )}{12}-\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 i x}+\sqrt {2}\, {\mathrm e}^{i x}+1\right )}{12}-i \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (20736 \textit {\_Z}^{4}+576 \textit {\_Z}^{2}+1\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i x}+\left (-1728 i \textit {\_R}^{3}-48 i \textit {\_R} \right ) {\mathrm e}^{i x}+1\right )\right )\) | \(93\) |
2/3/(2*6^(1/2)+2*2^(1/2))*arctanh(8*cos(x)/(2*6^(1/2)+2*2^(1/2)))+2/3/(2*6 ^(1/2)-2*2^(1/2))*arctanh(8*cos(x)/(2*6^(1/2)-2*2^(1/2)))-1/6*arctanh(cos( x)*2^(1/2))*2^(1/2)
Leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (67) = 134\).
Time = 0.28 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.80 \[ \int \sec (6 x) \sin (x) \, dx=-\frac {1}{12} \, \sqrt {\sqrt {3} + 2} \log \left (\sqrt {\sqrt {3} + 2} {\left (\sqrt {3} - 2\right )} + 2 \, \cos \left (x\right )\right ) + \frac {1}{12} \, \sqrt {\sqrt {3} + 2} \log \left (\sqrt {\sqrt {3} + 2} {\left (\sqrt {3} - 2\right )} - 2 \, \cos \left (x\right )\right ) + \frac {1}{12} \, \sqrt {-\sqrt {3} + 2} \log \left ({\left (\sqrt {3} + 2\right )} \sqrt {-\sqrt {3} + 2} + 2 \, \cos \left (x\right )\right ) - \frac {1}{12} \, \sqrt {-\sqrt {3} + 2} \log \left ({\left (\sqrt {3} + 2\right )} \sqrt {-\sqrt {3} + 2} - 2 \, \cos \left (x\right )\right ) + \frac {1}{12} \, \sqrt {2} \log \left (\frac {2 \, \cos \left (x\right )^{2} - 2 \, \sqrt {2} \cos \left (x\right ) + 1}{2 \, \cos \left (x\right )^{2} - 1}\right ) \]
-1/12*sqrt(sqrt(3) + 2)*log(sqrt(sqrt(3) + 2)*(sqrt(3) - 2) + 2*cos(x)) + 1/12*sqrt(sqrt(3) + 2)*log(sqrt(sqrt(3) + 2)*(sqrt(3) - 2) - 2*cos(x)) + 1 /12*sqrt(-sqrt(3) + 2)*log((sqrt(3) + 2)*sqrt(-sqrt(3) + 2) + 2*cos(x)) - 1/12*sqrt(-sqrt(3) + 2)*log((sqrt(3) + 2)*sqrt(-sqrt(3) + 2) - 2*cos(x)) + 1/12*sqrt(2)*log((2*cos(x)^2 - 2*sqrt(2)*cos(x) + 1)/(2*cos(x)^2 - 1))
\[ \int \sec (6 x) \sin (x) \, dx=\int \sin {\left (x \right )} \sec {\left (6 x \right )}\, dx \]
\[ \int \sec (6 x) \sin (x) \, dx=\int { \sec \left (6 \, x\right ) \sin \left (x\right ) \,d x } \]
-1/24*sqrt(2)*log(2*sqrt(2)*sin(2*x)*sin(x) + 2*(sqrt(2)*cos(x) + 1)*cos(2 *x) + cos(2*x)^2 + 2*cos(x)^2 + sin(2*x)^2 + 2*sin(x)^2 + 2*sqrt(2)*cos(x) + 1) + 1/24*sqrt(2)*log(-2*sqrt(2)*sin(2*x)*sin(x) - 2*(sqrt(2)*cos(x) - 1)*cos(2*x) + cos(2*x)^2 + 2*cos(x)^2 + sin(2*x)^2 + 2*sin(x)^2 - 2*sqrt(2 )*cos(x) + 1) - integrate(1/3*((sin(7*x) - sin(5*x) + sin(3*x) - sin(x))*c os(8*x) - (sin(3*x) - sin(x))*cos(4*x) - (cos(7*x) - cos(5*x) + cos(3*x) - cos(x))*sin(8*x) - (cos(4*x) - 1)*sin(7*x) + (cos(4*x) - 1)*sin(5*x) + (c os(3*x) - cos(x))*sin(4*x) + cos(7*x)*sin(4*x) - cos(5*x)*sin(4*x) + sin(3 *x) - sin(x))/(2*(cos(4*x) - 1)*cos(8*x) - cos(8*x)^2 - cos(4*x)^2 - sin(8 *x)^2 + 2*sin(8*x)*sin(4*x) - sin(4*x)^2 + 2*cos(4*x) - 1), x)
Leaf count of result is larger than twice the leaf count of optimal. 182 vs. \(2 (67) = 134\).
Time = 0.28 (sec) , antiderivative size = 182, normalized size of antiderivative = 2.14 \[ \int \sec (6 x) \sin (x) \, dx=-\frac {1}{12} \, \sqrt {2} \log \left (\frac {{\left | -4 \, \sqrt {2} - \frac {2 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} - 6 \right |}}{{\left | 4 \, \sqrt {2} - \frac {2 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} - 6 \right |}}\right ) - \frac {2.39014968180000 \, \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} - 0.0173323801210000\right )}{\frac {268 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} + 60.0540532247402} + \frac {5.82951931426000 \, \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} - 0.588790706481000\right )}{\frac {268 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} + 121.584934401100} + \frac {16.8155413244667 \, \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} - 1.69839637242000\right )}{\frac {268 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} + 559.622604171000} - \frac {7956.25491093333 \, \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} - 57.6954805410000\right )}{\frac {268 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} - 168981.261592000} \]
-1/12*sqrt(2)*log(abs(-4*sqrt(2) - 2*(cos(x) - 1)/(cos(x) + 1) - 6)/abs(4* sqrt(2) - 2*(cos(x) - 1)/(cos(x) + 1) - 6)) - 2.39014968180000*log(-(cos(x ) - 1)/(cos(x) + 1) - 0.0173323801210000)/(268*(cos(x) - 1)/(cos(x) + 1) + 60.0540532247402) + 5.82951931426000*log(-(cos(x) - 1)/(cos(x) + 1) - 0.5 88790706481000)/(268*(cos(x) - 1)/(cos(x) + 1) + 121.584934401100) + 16.81 55413244667*log(-(cos(x) - 1)/(cos(x) + 1) - 1.69839637242000)/(268*(cos(x ) - 1)/(cos(x) + 1) + 559.622604171000) - 7956.25491093333*log(-(cos(x) - 1)/(cos(x) + 1) - 57.6954805410000)/(268*(cos(x) - 1)/(cos(x) + 1) - 16898 1.261592000)
Time = 27.36 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.39 \[ \int \sec (6 x) \sin (x) \, dx=\mathrm {atanh}\left (\frac {5\,\sqrt {2}\,\cos \left (x\right )}{2097152\,\left (\frac {\sqrt {2}\,\sqrt {6}}{4194304}+\frac {1}{1048576}\right )}+\frac {3\,\sqrt {6}\,\cos \left (x\right )}{2097152\,\left (\frac {\sqrt {2}\,\sqrt {6}}{4194304}+\frac {1}{1048576}\right )}\right )\,\left (\frac {\sqrt {2}}{12}+\frac {\sqrt {6}}{12}\right )-\mathrm {atanh}\left (\frac {5\,\sqrt {2}\,\cos \left (x\right )}{2097152\,\left (\frac {\sqrt {2}\,\sqrt {6}}{4194304}-\frac {1}{1048576}\right )}-\frac {3\,\sqrt {6}\,\cos \left (x\right )}{2097152\,\left (\frac {\sqrt {2}\,\sqrt {6}}{4194304}-\frac {1}{1048576}\right )}\right )\,\left (\frac {\sqrt {2}}{12}-\frac {\sqrt {6}}{12}\right )-\frac {\sqrt {2}\,\mathrm {atanh}\left (\sqrt {2}\,\cos \left (x\right )\right )}{6} \]
atanh((5*2^(1/2)*cos(x))/(2097152*((2^(1/2)*6^(1/2))/4194304 + 1/1048576)) + (3*6^(1/2)*cos(x))/(2097152*((2^(1/2)*6^(1/2))/4194304 + 1/1048576)))*( 2^(1/2)/12 + 6^(1/2)/12) - atanh((5*2^(1/2)*cos(x))/(2097152*((2^(1/2)*6^( 1/2))/4194304 - 1/1048576)) - (3*6^(1/2)*cos(x))/(2097152*((2^(1/2)*6^(1/2 ))/4194304 - 1/1048576)))*(2^(1/2)/12 - 6^(1/2)/12) - (2^(1/2)*atanh(2^(1/ 2)*cos(x)))/6