Integrand size = 7, antiderivative size = 38 \[ \int (\sin (x)+\tan (x))^3 \, dx=2 \cos (x)+\frac {3 \cos ^2(x)}{2}+\frac {\cos ^3(x)}{3}-2 \log (\cos (x))+3 \sec (x)+\frac {\sec ^2(x)}{2} \] Output:
2*cos(x)+3/2*cos(x)^2+1/3*cos(x)^3-2*ln(cos(x))+3*sec(x)+1/2*sec(x)^2
Time = 0.03 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.05 \[ \int (\sin (x)+\tan (x))^3 \, dx=\frac {9 \cos (x)}{4}+\frac {3}{4} \cos (2 x)+\frac {1}{12} \cos (3 x)-2 \log (\cos (x))+3 \sec (x)+\frac {\sec ^2(x)}{2} \] Input:
Integrate[(Sin[x] + Tan[x])^3,x]
Output:
(9*Cos[x])/4 + (3*Cos[2*x])/4 + Cos[3*x]/12 - 2*Log[Cos[x]] + 3*Sec[x] + S ec[x]^2/2
Time = 0.27 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {3042, 4897, 3042, 25, 3186, 84, 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)+\tan (x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (\sin (x)+\tan (x))^3dx\) |
\(\Big \downarrow \) 4897 |
\(\displaystyle \int (\cos (x)+1)^3 \tan ^3(x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\left (1-\sin \left (x-\frac {\pi }{2}\right )\right )^3}{\tan \left (x-\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\left (1-\sin \left (x-\frac {\pi }{2}\right )\right )^3}{\tan \left (x-\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 3186 |
\(\displaystyle -\int (1-\cos (x)) (\cos (x)+1)^4 \sec ^3(x)d\cos (x)\) |
\(\Big \downarrow \) 84 |
\(\displaystyle -\int \left (\sec ^3(x)+3 \sec ^2(x)+2 \sec (x)-\cos ^2(x)-3 \cos (x)-2\right )d\cos (x)\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\cos ^3(x)}{3}+\frac {3 \cos ^2(x)}{2}+2 \cos (x)+\frac {\sec ^2(x)}{2}+3 \sec (x)-2 \log (\cos (x))\) |
Input:
Int[(Sin[x] + Tan[x])^3,x]
Output:
2*Cos[x] + (3*Cos[x]^2)/2 + Cos[x]^3/3 - 2*Log[Cos[x]] + 3*Sec[x] + Sec[x] ^2/2
Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_] : > Int[ExpandIntegrand[(a + b*x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && EqQ[b*e + a*f, 0] && !(ILtQ[n + p + 2, 0 ] && GtQ[n + 2*p, 0])
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p _.), x_Symbol] :> Simp[1/f Subst[Int[x^p*((a + x)^(m - (p + 1)/2)/(a - x) ^((p + 1)/2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && E qQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]
Time = 1.22 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.03
method | result | size |
default | \(\frac {8 \left (2+\sin \left (x \right )^{2}\right ) \cos \left (x \right )}{3}-\frac {3 \sin \left (x \right )^{2}}{2}-2 \ln \left (\cos \left (x \right )\right )+\frac {3 \sin \left (x \right )^{4}}{\cos \left (x \right )}+\frac {\tan \left (x \right )^{2}}{2}\) | \(39\) |
parts | \(\frac {8 \left (2+\sin \left (x \right )^{2}\right ) \cos \left (x \right )}{3}+\frac {\tan \left (x \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (x \right )^{2}\right )}{2}+\frac {3 \sin \left (x \right )^{4}}{\cos \left (x \right )}-\frac {3 \sin \left (x \right )^{2}}{2}-3 \ln \left (\cos \left (x \right )\right )\) | \(48\) |
risch | \(2 i x +\frac {{\mathrm e}^{3 i x}}{24}+\frac {3 \,{\mathrm e}^{2 i x}}{8}+\frac {9 \,{\mathrm e}^{i x}}{8}+\frac {9 \,{\mathrm e}^{-i x}}{8}+\frac {3 \,{\mathrm e}^{-2 i x}}{8}+\frac {{\mathrm e}^{-3 i x}}{24}+\frac {6 \,{\mathrm e}^{3 i x}+2 \,{\mathrm e}^{2 i x}+6 \,{\mathrm e}^{i x}}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}-2 \ln \left ({\mathrm e}^{2 i x}+1\right )\) | \(89\) |
Input:
int((sin(x)+tan(x))^3,x,method=_RETURNVERBOSE)
Output:
8/3*(2+sin(x)^2)*cos(x)-3/2*sin(x)^2-2*ln(cos(x))+3*sin(x)^4/cos(x)+1/2*ta n(x)^2
Time = 0.08 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.24 \[ \int (\sin (x)+\tan (x))^3 \, dx=\frac {4 \, \cos \left (x\right )^{5} + 18 \, \cos \left (x\right )^{4} + 24 \, \cos \left (x\right )^{3} - 24 \, \cos \left (x\right )^{2} \log \left (-\cos \left (x\right )\right ) - 9 \, \cos \left (x\right )^{2} + 36 \, \cos \left (x\right ) + 6}{12 \, \cos \left (x\right )^{2}} \] Input:
integrate((sin(x)+tan(x))^3,x, algorithm="fricas")
Output:
1/12*(4*cos(x)^5 + 18*cos(x)^4 + 24*cos(x)^3 - 24*cos(x)^2*log(-cos(x)) - 9*cos(x)^2 + 36*cos(x) + 6)/cos(x)^2
Time = 1.62 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.21 \[ \int (\sin (x)+\tan (x))^3 \, dx=- 3 \log {\left (\cos {\left (x \right )} \right )} - \frac {\log {\left (\sec ^{2}{\left (x \right )} \right )}}{2} + \frac {\cos ^{3}{\left (x \right )}}{3} + \frac {3 \cos ^{2}{\left (x \right )}}{2} + 2 \cos {\left (x \right )} + \frac {\sec ^{2}{\left (x \right )}}{2} + \frac {3}{\cos {\left (x \right )}} \] Input:
integrate((sin(x)+tan(x))**3,x)
Output:
-3*log(cos(x)) - log(sec(x)**2)/2 + cos(x)**3/3 + 3*cos(x)**2/2 + 2*cos(x) + sec(x)**2/2 + 3/cos(x)
Time = 0.03 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.11 \[ \int (\sin (x)+\tan (x))^3 \, dx=\frac {1}{3} \, \cos \left (x\right )^{3} - \frac {3}{2} \, \sin \left (x\right )^{2} - \frac {1}{2 \, {\left (\sin \left (x\right )^{2} - 1\right )}} + \frac {3}{\cos \left (x\right )} + 2 \, \cos \left (x\right ) - \log \left (\sin \left (x\right )^{2} - 1\right ) \] Input:
integrate((sin(x)+tan(x))^3,x, algorithm="maxima")
Output:
1/3*cos(x)^3 - 3/2*sin(x)^2 - 1/2/(sin(x)^2 - 1) + 3/cos(x) + 2*cos(x) - l og(sin(x)^2 - 1)
Leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (32) = 64\).
Time = 0.31 (sec) , antiderivative size = 173, normalized size of antiderivative = 4.55 \[ \int (\sin (x)+\tan (x))^3 \, dx=\frac {\tan \left (\frac {1}{2} \, x\right )^{4} \tan \left (x\right )^{4} - 2 \, \log \left (\frac {4}{\tan \left (x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{4} \tan \left (x\right )^{2} - 10 \, \tan \left (\frac {1}{2} \, x\right )^{4} \tan \left (x\right )^{2} - 2 \, \log \left (\frac {4}{\tan \left (x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{4} - 8 \, \tan \left (\frac {1}{2} \, x\right )^{4} - 3 \, \tan \left (\frac {1}{2} \, x\right )^{2} \tan \left (x\right )^{2} - \tan \left (x\right )^{4} + 2 \, \log \left (\frac {4}{\tan \left (x\right )^{2} + 1}\right ) \tan \left (x\right )^{2} - 3 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 11 \, \tan \left (x\right )^{2} + 2 \, \log \left (\frac {4}{\tan \left (x\right )^{2} + 1}\right ) - 13}{2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{4} \tan \left (x\right )^{2} + \tan \left (\frac {1}{2} \, x\right )^{4} - \tan \left (x\right )^{2} - 1\right )}} + \frac {1}{12} \, \cos \left (3 \, x\right ) \] Input:
integrate((sin(x)+tan(x))^3,x, algorithm="giac")
Output:
1/2*(tan(1/2*x)^4*tan(x)^4 - 2*log(4/(tan(x)^2 + 1))*tan(1/2*x)^4*tan(x)^2 - 10*tan(1/2*x)^4*tan(x)^2 - 2*log(4/(tan(x)^2 + 1))*tan(1/2*x)^4 - 8*tan (1/2*x)^4 - 3*tan(1/2*x)^2*tan(x)^2 - tan(x)^4 + 2*log(4/(tan(x)^2 + 1))*t an(x)^2 - 3*tan(1/2*x)^2 - 11*tan(x)^2 + 2*log(4/(tan(x)^2 + 1)) - 13)/(ta n(1/2*x)^4*tan(x)^2 + tan(1/2*x)^4 - tan(x)^2 - 1) + 1/12*cos(3*x)
Time = 15.55 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.71 \[ \int (\sin (x)+\tan (x))^3 \, dx=4\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2\right )+\frac {-4\,{\mathrm {tan}\left (\frac {x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6+\frac {20\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4}{3}+\frac {20\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{3}+\frac {32}{3}}{{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2-1\right )}^2\,{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )}^3} \] Input:
int((sin(x) + tan(x))^3,x)
Output:
4*atanh(tan(x/2)^2) + ((20*tan(x/2)^2)/3 + (20*tan(x/2)^4)/3 - 4*tan(x/2)^ 6 - 4*tan(x/2)^8 + 32/3)/((tan(x/2)^2 - 1)^2*(tan(x/2)^2 + 1)^3)
\[ \int (\sin (x)+\tan (x))^3 \, dx=\frac {2 \cos \left (x \right ) \left (\int \sin \left (x \right )^{3}d x \right )+6 \cos \left (x \right ) \mathrm {log}\left (\tan \left (\frac {x}{2}\right )^{2}+1\right )-\cos \left (x \right ) \mathrm {log}\left (\tan \left (x \right )^{2}+1\right )-6 \cos \left (x \right ) \mathrm {log}\left (\tan \left (\frac {x}{2}\right )-1\right )-6 \cos \left (x \right ) \mathrm {log}\left (\tan \left (\frac {x}{2}\right )+1\right )-3 \cos \left (x \right ) \sin \left (x \right )^{2}+\cos \left (x \right ) \tan \left (x \right )^{2}-12 \cos \left (x \right )-6 \sin \left (x \right )^{2}+12}{2 \cos \left (x \right )} \] Input:
int((sin(x)+tan(x))^3,x)
Output:
(2*cos(x)*int(sin(x)**3,x) + 6*cos(x)*log(tan(x/2)**2 + 1) - cos(x)*log(ta n(x)**2 + 1) - 6*cos(x)*log(tan(x/2) - 1) - 6*cos(x)*log(tan(x/2) + 1) - 3 *cos(x)*sin(x)**2 + cos(x)*tan(x)**2 - 12*cos(x) - 6*sin(x)**2 + 12)/(2*co s(x))