Integrand size = 7, antiderivative size = 89 \[ \int \cos (x) \tan (6 x) \, dx=\frac {\text {arctanh}\left (\sqrt {2} \cos (x)\right )}{3 \sqrt {2}}+\frac {\text {arctanh}\left (2 \sqrt {2-\sqrt {3}} \cos (x)\right )}{6 \sqrt {2-\sqrt {3}}}+\frac {\text {arctanh}\left (2 \sqrt {2+\sqrt {3}} \cos (x)\right )}{6 \sqrt {2+\sqrt {3}}}-\cos (x) \] Output:
1/6*arctanh(cos(x)*2^(1/2))*2^(1/2)+1/6*arctanh(2*(1/2*6^(1/2)-1/2*2^(1/2) )*cos(x))/(1/2*6^(1/2)-1/2*2^(1/2))+1/6*arctanh(2*(1/2*6^(1/2)+1/2*2^(1/2) )*cos(x))/(1/2*6^(1/2)+1/2*2^(1/2))-cos(x)
Result contains complex when optimal does not.
Time = 7.01 (sec) , antiderivative size = 628, normalized size of antiderivative = 7.06 \[ \int \cos (x) \tan (6 x) \, dx =\text {Too large to display} \] Input:
Integrate[Cos[x]*Tan[6*x],x]
Output:
((4 + 4*I)*(-1)^(3/4)*ArcTanh[(-1 + Tan[x/2])/Sqrt[2]] + (4 - 4*I)*(-1)^(1 /4)*ArcTanh[(1 + Tan[x/2])/Sqrt[2]] - 24*Cos[x] - (2*(1 + Sqrt[2])*(x - 2* Sqrt[3]*ArcTanh[(2 + (2 + Sqrt[2])*Tan[x/2])/Sqrt[6]] - Log[Sec[x/2]^2] + Log[-(Sec[x/2]^2*(Sqrt[2] - 2*Cos[x] + 2*Sin[x]))]))/(2 + Sqrt[2]) + Sqrt[ 2]*(x + 2*Sqrt[3]*ArcTanh[(Sqrt[2] + (-1 + Sqrt[2])*Tan[x/2])/Sqrt[3]] - L og[Sec[x/2]^2] + Log[Sec[x/2]^2*(1 + Sqrt[2]*Cos[x] - Sqrt[2]*Sin[x])]) - (2*(2*(-2 + Sqrt[6])*ArcTanh[Sqrt[2] + (Sqrt[2] - Sqrt[3])*Tan[x/2]] + (3* Sqrt[2] - 2*Sqrt[3])*(x - Log[Sec[x/2]^2] + Log[-(Sec[x/2]^2*(Sqrt[3] + Sq rt[2]*Cos[x] - Sqrt[2]*Sin[x]))]))*(Sqrt[2] - Sqrt[3]*Sin[x])*(-3 + Sqrt[6 ] - (-2 + Sqrt[6])*Cos[x] + (-2 + Sqrt[6])*Sin[x]))/(-36 + 15*Sqrt[6] + (2 0 - 8*Sqrt[6])*Cos[x] + (12 - 5*Sqrt[6])*Cos[2*x] - 50*Sin[x] + 20*Sqrt[6] *Sin[x] + 12*Sin[2*x] - 5*Sqrt[6]*Sin[2*x]) + (2*(-2*(Sqrt[2] + Sqrt[3])*A rcTanh[(2 + (2 + Sqrt[6])*Tan[x/2])/Sqrt[2]] + (3 + Sqrt[6])*(x - Log[Sec[ x/2]^2] + Log[-(Sec[x/2]^2*(Sqrt[6] - 2*Cos[x] + 2*Sin[x]))]))*(2 + Sqrt[6 ]*Sin[x])*(3 + Sqrt[6] - (2 + Sqrt[6])*Cos[x] + (2 + Sqrt[6])*Sin[x]))/(-3 6 - 15*Sqrt[6] + 4*(5 + 2*Sqrt[6])*Cos[x] + (12 + 5*Sqrt[6])*Cos[2*x] - 50 *Sin[x] - 20*Sqrt[6]*Sin[x] + 12*Sin[2*x] + 5*Sqrt[6]*Sin[2*x]))/24
Time = 0.34 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.04, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.714, Rules used = {3042, 4879, 27, 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 \cos (x) \tan (6 x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (6 x)}{\sec (x)}dx\) |
\(\Big \downarrow \) 4879 |
\(\displaystyle -\int -\frac {2 \cos ^2(x) \left (16 \cos ^4(x)-16 \cos ^2(x)+3\right )}{-32 \cos ^6(x)+48 \cos ^4(x)-18 \cos ^2(x)+1}d\cos (x)\) |
\(\Big \downarrow \) 27 |
\(\displaystyle 2 \int \frac {\cos ^2(x) \left (16 \cos ^4(x)-16 \cos ^2(x)+3\right )}{-32 \cos ^6(x)+48 \cos ^4(x)-18 \cos ^2(x)+1}d\cos (x)\) |
\(\Big \downarrow \) 2460 |
\(\displaystyle 2 \int \left (\frac {1-8 \cos ^2(x)}{3 \left (16 \cos ^4(x)-16 \cos ^2(x)+1\right )}-\frac {1}{6 \left (2 \cos ^2(x)-1\right )}-\frac {1}{2}\right )d\cos (x)\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle 2 \left (\frac {\text {arctanh}\left (\sqrt {2} \cos (x)\right )}{6 \sqrt {2}}+\frac {1}{12} \sqrt {2-\sqrt {3}} \text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {3}}}\right )+\frac {1}{12} \sqrt {2+\sqrt {3}} \text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2+\sqrt {3}}}\right )-\frac {\cos (x)}{2}\right )\) |
Input:
Int[Cos[x]*Tan[6*x],x]
Output:
2*(ArcTanh[Sqrt[2]*Cos[x]]/(6*Sqrt[2]) + (Sqrt[2 - Sqrt[3]]*ArcTanh[(2*Cos [x])/Sqrt[2 - Sqrt[3]]])/12 + (Sqrt[2 + Sqrt[3]]*ArcTanh[(2*Cos[x])/Sqrt[2 + Sqrt[3]]])/12 - Cos[x]/2)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, Simp[With[{d = FreeFa ctors[Cos[v], x]}, -d/Coefficient[v, x, 1] Subst[Int[SubstFor[1, Cos[v]/d , u/Sin[v], x], x], x, Cos[v]/d]], x] /; !FalseQ[v] && FunctionOfQ[Nonfree Factors[Cos[v], x], u/Sin[v], x]]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.20 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.11
method | result | size |
risch | \(-\frac {{\mathrm e}^{i x}}{2}-\frac {{\mathrm e}^{-i x}}{2}-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}-12 i \textit {\_R} \,{\mathrm e}^{i x}+1\right )\right )+\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}\) | \(99\) |
Input:
int(cos(x)*tan(6*x),x,method=_RETURNVERBOSE)
Output:
-1/2*exp(I*x)-1/2*exp(-I*x)-I*sum(_R*ln(exp(2*I*x)-12*I*_R*exp(I*x)+1),_R= RootOf(20736*_Z^4+576*_Z^2+1))+1/12*2^(1/2)*ln(exp(2*I*x)+2^(1/2)*exp(I*x) +1)-1/12*2^(1/2)*ln(exp(2*I*x)-2^(1/2)*exp(I*x)+1)
Leaf count of result is larger than twice the leaf count of optimal. 134 vs. \(2 (65) = 130\).
Time = 0.10 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.51 \[ \int \cos (x) \tan (6 x) \, dx=\frac {1}{12} \, \sqrt {\sqrt {3} + 2} \log \left (\sqrt {\sqrt {3} + 2} + 2 \, \cos \left (x\right )\right ) - \frac {1}{12} \, \sqrt {\sqrt {3} + 2} \log \left (\sqrt {\sqrt {3} + 2} - 2 \, \cos \left (x\right )\right ) + \frac {1}{12} \, \sqrt {-\sqrt {3} + 2} \log \left (\sqrt {-\sqrt {3} + 2} + 2 \, \cos \left (x\right )\right ) - \frac {1}{12} \, \sqrt {-\sqrt {3} + 2} \log \left (\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 ) - \cos \left (x\right ) \] Input:
integrate(cos(x)*tan(6*x),x, algorithm="fricas")
Output:
1/12*sqrt(sqrt(3) + 2)*log(sqrt(sqrt(3) + 2) + 2*cos(x)) - 1/12*sqrt(sqrt( 3) + 2)*log(sqrt(sqrt(3) + 2) - 2*cos(x)) + 1/12*sqrt(-sqrt(3) + 2)*log(sq rt(-sqrt(3) + 2) + 2*cos(x)) - 1/12*sqrt(-sqrt(3) + 2)*log(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)) - cos(x)
\[ \int \cos (x) \tan (6 x) \, dx=\int \cos {\left (x \right )} \tan {\left (6 x \right )}\, dx \] Input:
integrate(cos(x)*tan(6*x),x)
Output:
Integral(cos(x)*tan(6*x), x)
\[ \int \cos (x) \tan (6 x) \, dx=\int { \cos \left (x\right ) \tan \left (6 \, x\right ) \,d x } \] Input:
integrate(cos(x)*tan(6*x),x, algorithm="maxima")
Output:
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) - cos(x) - integrate(1/3*((2*sin(7*x) + sin(5*x) - sin(3*x) - 2*sin(x))*cos(8*x) + (sin(3*x) + 2*sin(x))*cos(4*x) - (2*cos(7*x) + cos(5 *x) - cos(3*x) - 2*cos(x))*sin(8*x) - 2*(cos(4*x) - 1)*sin(7*x) - (cos(4*x ) - 1)*sin(5*x) - (cos(3*x) + 2*cos(x))*sin(4*x) + 2*cos(7*x)*sin(4*x) + c os(5*x)*sin(4*x) - sin(3*x) - 2*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)
\[ \int \cos (x) \tan (6 x) \, dx=\int { \cos \left (x\right ) \tan \left (6 \, x\right ) \,d x } \] Input:
integrate(cos(x)*tan(6*x),x, algorithm="giac")
Output:
integrate(cos(x)*tan(6*x), x)
Time = 19.79 (sec) , antiderivative size = 787, normalized size of antiderivative = 8.84 \[ \int \cos (x) \tan (6 x) \, dx=\text {Too large to display} \] Input:
int(tan(6*x)*cos(x),x)
Output:
(6^(1/2)*(atan((2^(1/2)*321030945816576i)/(213254896304333030400*tan(x/2)^ 4 - 129275829262795438080*tan(x/2)^2 + 2176593611144037376) + (6^(1/2)*888 405273481134080i)/(213254896304333030400*tan(x/2)^4 - 12927582926279543808 0*tan(x/2)^2 + 2176593611144037376) - (2^(1/2)*tan(x/2)^2*1871105472480256 0i)/(213254896304333030400*tan(x/2)^4 - 129275829262795438080*tan(x/2)^2 + 2176593611144037376) + (2^(1/2)*tan(x/2)^4*10905601889064960i)/(213254896 304333030400*tan(x/2)^4 - 129275829262795438080*tan(x/2)^2 + 2176593611144 037376) - (6^(1/2)*tan(x/2)^2*52765833462352287744i)/(21325489630433303040 0*tan(x/2)^4 - 129275829262795438080*tan(x/2)^2 + 2176593611144037376) + ( 6^(1/2)*tan(x/2)^4*87054650497106012160i)/(213254896304333030400*tan(x/2)^ 4 - 129275829262795438080*tan(x/2)^2 + 2176593611144037376)) + atan((2^(1/ 2)*1443325504589801788190484332544i)/(589232404262260650654553866240*2^(1/ 2)*6^(1/2) + 119129717169909888440949339586560*tan(x/2)^2 - 34367271726987 959946466862039040*2^(1/2)*6^(1/2)*tan(x/2)^2 - 20870903094507989978345572 92544) - (6^(1/2)*852047139771204346616741888000i)/(5892324042622606506545 53866240*2^(1/2)*6^(1/2) + 119129717169909888440949339586560*tan(x/2)^2 - 34367271726987959946466862039040*2^(1/2)*6^(1/2)*tan(x/2)^2 - 208709030945 0798997834557292544) - (2^(1/2)*tan(x/2)^2*8418228357130530454356858241024 0i)/(589232404262260650654553866240*2^(1/2)*6^(1/2) + 11912971716990988844 0949339586560*tan(x/2)^2 - 34367271726987959946466862039040*2^(1/2)*6^(...
\[ \int \cos (x) \tan (6 x) \, dx=\int \cos \left (x \right ) \tan \left (6 x \right )d x \] Input:
int(cos(x)*tan(6*x),x)
Output:
int(cos(x)*tan(6*x),x)