Integrand size = 22, antiderivative size = 67 \[ \int \cos ^4(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {3 a x}{8}-\frac {i a \cos ^4(c+d x)}{4 d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d} \] Output:
3/8*a*x-1/4*I*a*cos(d*x+c)^4/d+3/8*a*cos(d*x+c)*sin(d*x+c)/d+1/4*a*cos(d*x +c)^3*sin(d*x+c)/d
Time = 0.06 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.69 \[ \int \cos ^4(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {a \left (12 c+12 d x-8 i \cos ^4(c+d x)+8 \sin (2 (c+d x))+\sin (4 (c+d x))\right )}{32 d} \] Input:
Integrate[Cos[c + d*x]^4*(a + I*a*Tan[c + d*x]),x]
Output:
(a*(12*c + 12*d*x - (8*I)*Cos[c + d*x]^4 + 8*Sin[2*(c + d*x)] + Sin[4*(c + d*x)]))/(32*d)
Time = 0.34 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.07, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.318, Rules used = {3042, 3967, 3042, 3115, 3042, 3115, 24}
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 ^4(c+d x) (a+i a \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+i a \tan (c+d x)}{\sec (c+d x)^4}dx\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle a \int \cos ^4(c+d x)dx-\frac {i a \cos ^4(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx-\frac {i a \cos ^4(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a \left (\frac {3}{4} \int \cos ^2(c+d x)dx+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {i a \cos ^4(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \left (\frac {3}{4} \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {i a \cos ^4(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle a \left (\frac {3}{4} \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {i a \cos ^4(c+d x)}{4 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a \left (\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3}{4} \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\right )-\frac {i a \cos ^4(c+d x)}{4 d}\) |
Input:
Int[Cos[c + d*x]^4*(a + I*a*Tan[c + d*x]),x]
Output:
((-1/4*I)*a*Cos[c + d*x]^4)/d + a*((Cos[c + d*x]^3*Sin[c + d*x])/(4*d) + ( 3*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)))/4)
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a Int[(d *Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] || NeQ[a^2 + b^2, 0])
Time = 2.94 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.79
method | result | size |
derivativedivides | \(\frac {-\frac {i a \cos \left (d x +c \right )^{4}}{4}+a \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(53\) |
default | \(\frac {-\frac {i a \cos \left (d x +c \right )^{4}}{4}+a \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(53\) |
risch | \(\frac {3 a x}{8}-\frac {i a \,{\mathrm e}^{4 i \left (d x +c \right )}}{32 d}-\frac {i a \cos \left (2 d x +2 c \right )}{8 d}+\frac {a \sin \left (2 d x +2 c \right )}{4 d}\) | \(53\) |
Input:
int(cos(d*x+c)^4*(a+I*a*tan(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(-1/4*I*a*cos(d*x+c)^4+a*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c) +3/8*d*x+3/8*c))
Time = 0.07 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.84 \[ \int \cos ^4(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {{\left (12 \, a d x e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a e^{\left (6 i \, d x + 6 i \, c\right )} - 6 i \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 2 i \, a\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{32 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+I*a*tan(d*x+c)),x, algorithm="fricas")
Output:
1/32*(12*a*d*x*e^(2*I*d*x + 2*I*c) - I*a*e^(6*I*d*x + 6*I*c) - 6*I*a*e^(4* I*d*x + 4*I*c) + 2*I*a)*e^(-2*I*d*x - 2*I*c)/d
Time = 0.18 (sec) , antiderivative size = 136, normalized size of antiderivative = 2.03 \[ \int \cos ^4(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {3 a x}{8} + \begin {cases} \frac {\left (- 256 i a d^{2} e^{6 i c} e^{4 i d x} - 1536 i a d^{2} e^{4 i c} e^{2 i d x} + 512 i a d^{2} e^{- 2 i d x}\right ) e^{- 2 i c}}{8192 d^{3}} & \text {for}\: d^{3} e^{2 i c} \neq 0 \\x \left (- \frac {3 a}{8} + \frac {\left (a e^{6 i c} + 3 a e^{4 i c} + 3 a e^{2 i c} + a\right ) e^{- 2 i c}}{8}\right ) & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**4*(a+I*a*tan(d*x+c)),x)
Output:
3*a*x/8 + Piecewise(((-256*I*a*d**2*exp(6*I*c)*exp(4*I*d*x) - 1536*I*a*d** 2*exp(4*I*c)*exp(2*I*d*x) + 512*I*a*d**2*exp(-2*I*d*x))*exp(-2*I*c)/(8192* d**3), Ne(d**3*exp(2*I*c), 0)), (x*(-3*a/8 + (a*exp(6*I*c) + 3*a*exp(4*I*c ) + 3*a*exp(2*I*c) + a)*exp(-2*I*c)/8), True))
Time = 0.11 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.91 \[ \int \cos ^4(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {3 \, {\left (d x + c\right )} a + \frac {3 \, a \tan \left (d x + c\right )^{3} + 5 \, a \tan \left (d x + c\right ) - 2 i \, a}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+I*a*tan(d*x+c)),x, algorithm="maxima")
Output:
1/8*(3*(d*x + c)*a + (3*a*tan(d*x + c)^3 + 5*a*tan(d*x + c) - 2*I*a)/(tan( d*x + c)^4 + 2*tan(d*x + c)^2 + 1))/d
Time = 0.13 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.15 \[ \int \cos ^4(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {1}{16} i \, a {\left (\frac {3 \, \log \left (\tan \left (d x + c\right ) + i\right )}{d} - \frac {3 \, \log \left (\tan \left (d x + c\right ) - i\right )}{d} - \frac {2 \, {\left (3 i \, \tan \left (d x + c\right )^{2} - 3 \, \tan \left (d x + c\right ) + 2 i\right )}}{d {\left (\tan \left (d x + c\right ) + i\right )}^{2} {\left (\tan \left (d x + c\right ) - i\right )}}\right )} \] Input:
integrate(cos(d*x+c)^4*(a+I*a*tan(d*x+c)),x, algorithm="giac")
Output:
1/16*I*a*(3*log(tan(d*x + c) + I)/d - 3*log(tan(d*x + c) - I)/d - 2*(3*I*t an(d*x + c)^2 - 3*tan(d*x + c) + 2*I)/(d*(tan(d*x + c) + I)^2*(tan(d*x + c ) - I)))
Time = 0.43 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.96 \[ \int \cos ^4(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {3\,a\,x}{8}+\frac {\frac {3\,a\,{\mathrm {tan}\left (c+d\,x\right )}^2}{8}+\frac {3{}\mathrm {i}\,a\,\mathrm {tan}\left (c+d\,x\right )}{8}+\frac {a}{4}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^3+{\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}+\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \] Input:
int(cos(c + d*x)^4*(a + a*tan(c + d*x)*1i),x)
Output:
(3*a*x)/8 + (a/4 + (a*tan(c + d*x)*3i)/8 + (3*a*tan(c + d*x)^2)/8)/(d*(tan (c + d*x) + tan(c + d*x)^2*1i + tan(c + d*x)^3 + 1i))
Time = 0.15 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.94 \[ \int \cos ^4(c+d x) (a+i a \tan (c+d x)) \, dx=\frac {a \left (-2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+5 \cos \left (d x +c \right ) \sin \left (d x +c \right )-2 \sin \left (d x +c \right )^{4} i +4 \sin \left (d x +c \right )^{2} i +3 d x \right )}{8 d} \] Input:
int(cos(d*x+c)^4*(a+I*a*tan(d*x+c)),x)
Output:
(a*( - 2*cos(c + d*x)*sin(c + d*x)**3 + 5*cos(c + d*x)*sin(c + d*x) - 2*si n(c + d*x)**4*i + 4*sin(c + d*x)**2*i + 3*d*x))/(8*d)