Integrand size = 7, antiderivative size = 26 \[ \int \frac {1}{(\sec (x)+\tan (x))^4} \, dx=x-\frac {2 \cos ^3(x)}{3 (1+\sin (x))^3}+\frac {2 \cos (x)}{1+\sin (x)} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4476, 2759, 8} \[ \int \frac {1}{(\sec (x)+\tan (x))^4} \, dx=x-\frac {2 \cos ^3(x)}{3 (\sin (x)+1)^3}+\frac {2 \cos (x)}{\sin (x)+1} \]
[In]
[Out]
Rule 8
Rule 2759
Rule 4476
Rubi steps \begin{align*} \text {integral}& = \int \frac {\cos ^4(x)}{(1+\sin (x))^4} \, dx \\ & = -\frac {2 \cos ^3(x)}{3 (1+\sin (x))^3}-\int \frac {\cos ^2(x)}{(1+\sin (x))^2} \, dx \\ & = -\frac {2 \cos ^3(x)}{3 (1+\sin (x))^3}+\frac {2 \cos (x)}{1+\sin (x)}+\int 1 \, dx \\ & = x-\frac {2 \cos ^3(x)}{3 (1+\sin (x))^3}+\frac {2 \cos (x)}{1+\sin (x)} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(62\) vs. \(2(26)=52\).
Time = 0.07 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.38 \[ \int \frac {1}{(\sec (x)+\tan (x))^4} \, dx=\frac {3 (-8+3 x) \cos \left (\frac {x}{2}\right )+(16-3 x) \cos \left (\frac {3 x}{2}\right )+6 (-4+2 x+x \cos (x)) \sin \left (\frac {x}{2}\right )}{6 \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^3} \]
[In]
[Out]
Time = 2.80 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.12
method | result | size |
default | \(2 \arctan \left (\tan \left (\frac {x}{2}\right )\right )-\frac {16}{3 \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}+\frac {8}{\left (\tan \left (\frac {x}{2}\right )+1\right )^{2}}\) | \(29\) |
risch | \(x +\frac {-\frac {16}{3}+8 i {\mathrm e}^{i x}+8 \,{\mathrm e}^{2 i x}}{\left (i+{\mathrm e}^{i x}\right )^{3}}\) | \(32\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (24) = 48\).
Time = 0.25 (sec) , antiderivative size = 63, normalized size of antiderivative = 2.42 \[ \int \frac {1}{(\sec (x)+\tan (x))^4} \, dx=\frac {{\left (3 \, x - 8\right )} \cos \left (x\right )^{2} - {\left (3 \, x + 4\right )} \cos \left (x\right ) - {\left ({\left (3 \, x + 8\right )} \cos \left (x\right ) + 6 \, x + 4\right )} \sin \left (x\right ) - 6 \, x + 4}{3 \, {\left (\cos \left (x\right )^{2} - {\left (\cos \left (x\right ) + 2\right )} \sin \left (x\right ) - \cos \left (x\right ) - 2\right )}} \]
[In]
[Out]
\[ \int \frac {1}{(\sec (x)+\tan (x))^4} \, dx=\int \frac {1}{\left (\tan {\left (x \right )} + \sec {\left (x \right )}\right )^{4}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 64 vs. \(2 (24) = 48\).
Time = 0.31 (sec) , antiderivative size = 64, normalized size of antiderivative = 2.46 \[ \int \frac {1}{(\sec (x)+\tan (x))^4} \, dx=\frac {8 \, {\left (\frac {3 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + 1\right )}}{3 \, {\left (\frac {3 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {3 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {\sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + 1\right )}} + 2 \, \arctan \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.77 \[ \int \frac {1}{(\sec (x)+\tan (x))^4} \, dx=x + \frac {8 \, {\left (3 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{3 \, {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}^{3}} \]
[In]
[Out]
Time = 31.76 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.73 \[ \int \frac {1}{(\sec (x)+\tan (x))^4} \, dx=x+\frac {8\,\mathrm {tan}\left (\frac {x}{2}\right )+\frac {8}{3}}{{\left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}^3} \]
[In]
[Out]