Integrand size = 7, antiderivative size = 71 \[ \int \cos (x) \tan (4 x) \, dx=\frac {1}{4} \sqrt {2-\sqrt {2}} \text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {2}}}\right )+\frac {1}{4} \sqrt {2+\sqrt {2}} \text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2+\sqrt {2}}}\right )-\cos (x) \]
-cos(x)+1/4*arctanh(2*cos(x)/(2-2^(1/2))^(1/2))*(2-2^(1/2))^(1/2)+1/4*arct anh(2*cos(x)/(2+2^(1/2))^(1/2))*(2+2^(1/2))^(1/2)
Result contains complex when optimal does not.
Time = 57.69 (sec) , antiderivative size = 6161, normalized size of antiderivative = 86.77 \[ \int \cos (x) \tan (4 x) \, dx=\text {Result too large to show} \]
Time = 0.26 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.13, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {3042, 4879, 27, 1602, 27, 1480, 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 \cos (x) \tan (4 x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (4 x)}{\sec (x)}dx\) |
\(\Big \downarrow \) 4879 |
\(\displaystyle -\int -\frac {4 \cos ^2(x) \left (1-2 \cos ^2(x)\right )}{8 \cos ^4(x)-8 \cos ^2(x)+1}d\cos (x)\) |
\(\Big \downarrow \) 27 |
\(\displaystyle 4 \int \frac {\cos ^2(x) \left (1-2 \cos ^2(x)\right )}{8 \cos ^4(x)-8 \cos ^2(x)+1}d\cos (x)\) |
\(\Big \downarrow \) 1602 |
\(\displaystyle 4 \left (-\frac {1}{8} \int -\frac {2 \left (1-4 \cos ^2(x)\right )}{8 \cos ^4(x)-8 \cos ^2(x)+1}d\cos (x)-\frac {\cos (x)}{4}\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle 4 \left (\frac {1}{4} \int \frac {1-4 \cos ^2(x)}{8 \cos ^4(x)-8 \cos ^2(x)+1}d\cos (x)-\frac {\cos (x)}{4}\right )\) |
\(\Big \downarrow \) 1480 |
\(\displaystyle 4 \left (\frac {1}{4} \left (-\left (\left (2-\sqrt {2}\right ) \int \frac {1}{8 \cos ^2(x)-2 \left (2-\sqrt {2}\right )}d\cos (x)\right )-\left (2+\sqrt {2}\right ) \int \frac {1}{8 \cos ^2(x)-2 \left (2+\sqrt {2}\right )}d\cos (x)\right )-\frac {\cos (x)}{4}\right )\) |
\(\Big \downarrow \) 220 |
\(\displaystyle 4 \left (\frac {1}{4} \left (\frac {1}{4} \sqrt {2-\sqrt {2}} \text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2-\sqrt {2}}}\right )+\frac {1}{4} \sqrt {2+\sqrt {2}} \text {arctanh}\left (\frac {2 \cos (x)}{\sqrt {2+\sqrt {2}}}\right )\right )-\frac {\cos (x)}{4}\right )\) |
4*(((Sqrt[2 - Sqrt[2]]*ArcTanh[(2*Cos[x])/Sqrt[2 - Sqrt[2]]])/4 + (Sqrt[2 + Sqrt[2]]*ArcTanh[(2*Cos[x])/Sqrt[2 + Sqrt[2]]])/4)/4 - Cos[x]/4)
3.2.7.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : > With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(e/2 + (2*c*d - b*e)/(2*q)) Int[1/( b/2 - q/2 + c*x^2), x], x] + Simp[(e/2 - (2*c*d - b*e)/(2*q)) Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^2 - 4*a*c]
Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*( x_)^4)^(p_), x_Symbol] :> Simp[e*f*(f*x)^(m - 1)*((a + b*x^2 + c*x^4)^(p + 1)/(c*(m + 4*p + 3))), x] - Simp[f^2/(c*(m + 4*p + 3)) Int[(f*x)^(m - 2)* (a + b*x^2 + c*x^4)^p*Simp[a*e*(m - 1) + (b*e*(m + 2*p + 1) - c*d*(m + 4*p + 3))*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && NeQ[b^2 - 4*a*c , 0] && GtQ[m, 1] && NeQ[m + 4*p + 3, 0] && IntegerQ[2*p] && (IntegerQ[p] | | IntegerQ[m])
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 = 1.39 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.76
method | result | size |
risch | \(-\frac {{\mathrm e}^{i x}}{2}-\frac {{\mathrm e}^{-i x}}{2}-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}-8 i \textit {\_R} \,{\mathrm e}^{i x}+1\right )\right )\) | \(54\) |
default | \(-\frac {\sqrt {2}\, \sqrt {2+\sqrt {2}}\, \operatorname {arctanh}\left (\frac {2 \cos \left (x \right )}{\sqrt {2+\sqrt {2}}}\right )}{4}-\frac {\left (\sqrt {2}-2\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {2 \cos \left (x \right )}{\sqrt {2-\sqrt {2}}}\right )}{4 \sqrt {2-\sqrt {2}}}-\cos \left (x \right )+\frac {\left (2 \sqrt {2}+3\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {2 \cos \left (x \right )}{\sqrt {2+\sqrt {2}}}\right )}{4 \sqrt {2+\sqrt {2}}}+\frac {\left (-3+2 \sqrt {2}\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {2 \cos \left (x \right )}{\sqrt {2-\sqrt {2}}}\right )}{4 \sqrt {2-\sqrt {2}}}\) | \(129\) |
-1/2*exp(I*x)-1/2*exp(-I*x)-I*sum(_R*ln(exp(2*I*x)-8*I*_R*exp(I*x)+1),_R=R ootOf(2048*_Z^4+128*_Z^2+1))
Time = 0.27 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.42 \[ \int \cos (x) \tan (4 x) \, dx=\frac {1}{8} \, \sqrt {\sqrt {2} + 2} \log \left (\sqrt {\sqrt {2} + 2} + 2 \, \cos \left (x\right )\right ) - \frac {1}{8} \, \sqrt {\sqrt {2} + 2} \log \left (\sqrt {\sqrt {2} + 2} - 2 \, \cos \left (x\right )\right ) + \frac {1}{8} \, \sqrt {-\sqrt {2} + 2} \log \left (\sqrt {-\sqrt {2} + 2} + 2 \, \cos \left (x\right )\right ) - \frac {1}{8} \, \sqrt {-\sqrt {2} + 2} \log \left (\sqrt {-\sqrt {2} + 2} - 2 \, \cos \left (x\right )\right ) - \cos \left (x\right ) \]
1/8*sqrt(sqrt(2) + 2)*log(sqrt(sqrt(2) + 2) + 2*cos(x)) - 1/8*sqrt(sqrt(2) + 2)*log(sqrt(sqrt(2) + 2) - 2*cos(x)) + 1/8*sqrt(-sqrt(2) + 2)*log(sqrt( -sqrt(2) + 2) + 2*cos(x)) - 1/8*sqrt(-sqrt(2) + 2)*log(sqrt(-sqrt(2) + 2) - 2*cos(x)) - cos(x)
\[ \int \cos (x) \tan (4 x) \, dx=\int \cos {\left (x \right )} \tan {\left (4 x \right )}\, dx \]
\[ \int \cos (x) \tan (4 x) \, dx=\int { \cos \left (x\right ) \tan \left (4 \, x\right ) \,d x } \]
-cos(x) - integrate(-((sin(7*x) - sin(x))*cos(8*x) - (cos(7*x) - cos(x))*s in(8*x) + sin(7*x) - sin(x))/(cos(8*x)^2 + sin(8*x)^2 + 2*cos(8*x) + 1), x )
\[ \int \cos (x) \tan (4 x) \, dx=\int { \cos \left (x\right ) \tan \left (4 \, x\right ) \,d x } \]
Time = 27.72 (sec) , antiderivative size = 295, normalized size of antiderivative = 4.15 \[ \int \cos (x) \tan (4 x) \, dx=-\frac {\mathrm {atanh}\left (\frac {219747975168\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\sqrt {2-\sqrt {2}}}{6098518016\,\sqrt {2}-254015438848\,\sqrt {2}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+386664497152\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-20887633920}-\frac {15971909632\,\sqrt {2-\sqrt {2}}}{6098518016\,\sqrt {2}-254015438848\,\sqrt {2}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+386664497152\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-20887633920}-\frac {130056978432\,\sqrt {2}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\sqrt {2-\sqrt {2}}}{6098518016\,\sqrt {2}-254015438848\,\sqrt {2}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+386664497152\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-20887633920}\right )\,\sqrt {2-\sqrt {2}}}{4}-\frac {2}{{\mathrm {tan}\left (\frac {x}{2}\right )}^2+1}-\frac {\mathrm {atanh}\left (\frac {15971909632\,\sqrt {\sqrt {2}+2}}{6098518016\,\sqrt {2}-254015438848\,\sqrt {2}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-386664497152\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+20887633920}-\frac {219747975168\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\sqrt {\sqrt {2}+2}}{6098518016\,\sqrt {2}-254015438848\,\sqrt {2}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-386664497152\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+20887633920}-\frac {130056978432\,\sqrt {2}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\sqrt {\sqrt {2}+2}}{6098518016\,\sqrt {2}-254015438848\,\sqrt {2}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-386664497152\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+20887633920}\right )\,\sqrt {\sqrt {2}+2}}{4} \]
- (atanh((219747975168*tan(x/2)^2*(2 - 2^(1/2))^(1/2))/(6098518016*2^(1/2) - 254015438848*2^(1/2)*tan(x/2)^2 + 386664497152*tan(x/2)^2 - 20887633920 ) - (15971909632*(2 - 2^(1/2))^(1/2))/(6098518016*2^(1/2) - 254015438848*2 ^(1/2)*tan(x/2)^2 + 386664497152*tan(x/2)^2 - 20887633920) - (130056978432 *2^(1/2)*tan(x/2)^2*(2 - 2^(1/2))^(1/2))/(6098518016*2^(1/2) - 25401543884 8*2^(1/2)*tan(x/2)^2 + 386664497152*tan(x/2)^2 - 20887633920))*(2 - 2^(1/2 ))^(1/2))/4 - 2/(tan(x/2)^2 + 1) - (atanh((15971909632*(2^(1/2) + 2)^(1/2) )/(6098518016*2^(1/2) - 254015438848*2^(1/2)*tan(x/2)^2 - 386664497152*tan (x/2)^2 + 20887633920) - (219747975168*tan(x/2)^2*(2^(1/2) + 2)^(1/2))/(60 98518016*2^(1/2) - 254015438848*2^(1/2)*tan(x/2)^2 - 386664497152*tan(x/2) ^2 + 20887633920) - (130056978432*2^(1/2)*tan(x/2)^2*(2^(1/2) + 2)^(1/2))/ (6098518016*2^(1/2) - 254015438848*2^(1/2)*tan(x/2)^2 - 386664497152*tan(x /2)^2 + 20887633920))*(2^(1/2) + 2)^(1/2))/4