Integrand size = 11, antiderivative size = 100 \[ \int (a \sec (x)+b \tan (x))^4 \, dx=b^4 x+\frac {4}{3} a b \left (a^2-2 b^2\right ) \cos (x)+\frac {1}{3} b^2 \left (2 a^2-3 b^2\right ) \cos (x) \sin (x)+\frac {1}{3} \sec ^3(x) (b+a \sin (x)) (a+b \sin (x))^3-\frac {1}{3} \sec (x) (a+b \sin (x))^2 \left (a b-\left (2 a^2-3 b^2\right ) \sin (x)\right ) \]
[Out]
Time = 0.21 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {4476, 2770, 2940, 2813} \[ \int (a \sec (x)+b \tan (x))^4 \, dx=\frac {4}{3} a b \left (a^2-2 b^2\right ) \cos (x)+\frac {1}{3} b^2 \left (2 a^2-3 b^2\right ) \sin (x) \cos (x)-\frac {1}{3} \sec (x) (a+b \sin (x))^2 \left (a b-\left (2 a^2-3 b^2\right ) \sin (x)\right )+\frac {1}{3} \sec ^3(x) (a \sin (x)+b) (a+b \sin (x))^3+b^4 x \]
[In]
[Out]
Rule 2770
Rule 2813
Rule 2940
Rule 4476
Rubi steps \begin{align*} \text {integral}& = \int \sec ^4(x) (a+b \sin (x))^4 \, dx \\ & = \frac {1}{3} \sec ^3(x) (b+a \sin (x)) (a+b \sin (x))^3-\frac {1}{3} \int \sec ^2(x) (a+b \sin (x))^2 \left (-2 a^2+3 b^2+a b \sin (x)\right ) \, dx \\ & = \frac {1}{3} \sec ^3(x) (b+a \sin (x)) (a+b \sin (x))^3-\frac {1}{3} \sec (x) (a+b \sin (x))^2 \left (a b-\left (2 a^2-3 b^2\right ) \sin (x)\right )+\frac {1}{3} \int (a+b \sin (x)) \left (2 a b^2-2 b \left (2 a^2-3 b^2\right ) \sin (x)\right ) \, dx \\ & = b^4 x+\frac {4}{3} a b \left (a^2-2 b^2\right ) \cos (x)+\frac {1}{3} b^2 \left (2 a^2-3 b^2\right ) \cos (x) \sin (x)+\frac {1}{3} \sec ^3(x) (b+a \sin (x)) (a+b \sin (x))^3-\frac {1}{3} \sec (x) (a+b \sin (x))^2 \left (a b-\left (2 a^2-3 b^2\right ) \sin (x)\right ) \\ \end{align*}
Time = 0.27 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.96 \[ \int (a \sec (x)+b \tan (x))^4 \, dx=\frac {1}{12} \sec ^3(x) \left (16 a^3 b-8 a b^3+9 b^4 x \cos (x)-24 a b^3 \cos (2 x)+3 b^4 x \cos (3 x)+6 a^4 \sin (x)+18 a^2 b^2 \sin (x)+2 a^4 \sin (3 x)-6 a^2 b^2 \sin (3 x)-4 b^4 \sin (3 x)\right ) \]
[In]
[Out]
Time = 17.59 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.74
method | result | size |
parts | \(-a^{4} \left (-\frac {2}{3}-\frac {\sec \left (x \right )^{2}}{3}\right ) \tan \left (x \right )+b^{4} \left (\frac {\tan \left (x \right )^{3}}{3}-\tan \left (x \right )+\arctan \left (\tan \left (x \right )\right )\right )+\frac {4 a^{3} b \sec \left (x \right )^{3}}{3}+2 a^{2} b^{2} \tan \left (x \right )^{3}+4 a \,b^{3} \left (\frac {\sec \left (x \right )^{3}}{3}-\sec \left (x \right )\right )\) | \(74\) |
default | \(-a^{4} \left (-\frac {2}{3}-\frac {\sec \left (x \right )^{2}}{3}\right ) \tan \left (x \right )+\frac {4 a^{3} b}{3 \cos \left (x \right )^{3}}+\frac {2 a^{2} b^{2} \sin \left (x \right )^{3}}{\cos \left (x \right )^{3}}+4 a \,b^{3} \left (\frac {\sin \left (x \right )^{4}}{3 \cos \left (x \right )^{3}}-\frac {\sin \left (x \right )^{4}}{3 \cos \left (x \right )}-\frac {\left (2+\sin \left (x \right )^{2}\right ) \cos \left (x \right )}{3}\right )+b^{4} \left (\frac {\tan \left (x \right )^{3}}{3}-\tan \left (x \right )+x \right )\) | \(96\) |
risch | \(b^{4} x -\frac {4 \left (9 i a^{2} b^{2} {\mathrm e}^{4 i x}+3 i b^{4} {\mathrm e}^{4 i x}+6 a \,b^{3} {\mathrm e}^{5 i x}-3 i a^{4} {\mathrm e}^{2 i x}+3 i b^{4} {\mathrm e}^{2 i x}-8 a^{3} b \,{\mathrm e}^{3 i x}+4 a \,b^{3} {\mathrm e}^{3 i x}-i a^{4}+3 i a^{2} b^{2}+2 i b^{4}+6 a \,b^{3} {\mathrm e}^{i x}\right )}{3 \left ({\mathrm e}^{2 i x}+1\right )^{3}}\) | \(131\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.80 \[ \int (a \sec (x)+b \tan (x))^4 \, dx=\frac {3 \, b^{4} x \cos \left (x\right )^{3} - 12 \, a b^{3} \cos \left (x\right )^{2} + 4 \, a^{3} b + 4 \, a b^{3} + {\left (a^{4} + 6 \, a^{2} b^{2} + b^{4} + 2 \, {\left (a^{4} - 3 \, a^{2} b^{2} - 2 \, b^{4}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}{3 \, \cos \left (x\right )^{3}} \]
[In]
[Out]
Time = 1.19 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.97 \[ \int (a \sec (x)+b \tan (x))^4 \, dx=\frac {a^{4} \tan ^{3}{\left (x \right )}}{3} + a^{4} \tan {\left (x \right )} + \frac {4 a^{3} b \sec ^{3}{\left (x \right )}}{3} + 2 a^{2} b^{2} \tan ^{3}{\left (x \right )} + \frac {4 a b^{3} \sec ^{3}{\left (x \right )}}{3} - 4 a b^{3} \sec {\left (x \right )} + b^{4} x + \frac {b^{4} \sin ^{3}{\left (x \right )}}{3 \cos ^{3}{\left (x \right )}} - \frac {b^{4} \sin {\left (x \right )}}{\cos {\left (x \right )}} \]
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.72 \[ \int (a \sec (x)+b \tan (x))^4 \, dx=2 \, a^{2} b^{2} \tan \left (x\right )^{3} + \frac {1}{3} \, {\left (\tan \left (x\right )^{3} + 3 \, \tan \left (x\right )\right )} a^{4} + \frac {1}{3} \, {\left (\tan \left (x\right )^{3} + 3 \, x - 3 \, \tan \left (x\right )\right )} b^{4} - \frac {4 \, {\left (3 \, \cos \left (x\right )^{2} - 1\right )} a b^{3}}{3 \, \cos \left (x\right )^{3}} + \frac {4 \, a^{3} b}{3 \, \cos \left (x\right )^{3}} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.31 \[ \int (a \sec (x)+b \tan (x))^4 \, dx=b^{4} x - \frac {2 \, {\left (3 \, a^{4} \tan \left (\frac {1}{2} \, x\right )^{5} - 3 \, b^{4} \tan \left (\frac {1}{2} \, x\right )^{5} + 12 \, a^{3} b \tan \left (\frac {1}{2} \, x\right )^{4} - 2 \, a^{4} \tan \left (\frac {1}{2} \, x\right )^{3} + 24 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, x\right )^{3} + 10 \, b^{4} \tan \left (\frac {1}{2} \, x\right )^{3} + 24 \, a b^{3} \tan \left (\frac {1}{2} \, x\right )^{2} + 3 \, a^{4} \tan \left (\frac {1}{2} \, x\right ) - 3 \, b^{4} \tan \left (\frac {1}{2} \, x\right ) + 4 \, a^{3} b - 8 \, a b^{3}\right )}}{3 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 1\right )}^{3}} \]
[In]
[Out]
Time = 28.72 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.15 \[ \int (a \sec (x)+b \tan (x))^4 \, dx=b^4\,x-\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (2\,a^4-2\,b^4\right )-\frac {16\,a\,b^3}{3}+\frac {8\,a^3\,b}{3}+{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,\left (-\frac {4\,a^4}{3}+16\,a^2\,b^2+\frac {20\,b^4}{3}\right )+{\mathrm {tan}\left (\frac {x}{2}\right )}^5\,\left (2\,a^4-2\,b^4\right )+16\,a\,b^3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+8\,a^3\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4}{{\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2-1\right )}^3} \]
[In]
[Out]