Integrand size = 31, antiderivative size = 101 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx=\frac {x}{4 a^2}-\frac {1}{16 a^2 d (i-\cot (c+d x))}-\frac {1}{12 a^2 d (i+\cot (c+d x))^3}-\frac {3 i}{8 a^2 d (i+\cot (c+d x))^2}+\frac {11}{16 a^2 d (i+\cot (c+d x))} \] Output:
1/4*x/a^2-1/16/a^2/d/(I-cot(d*x+c))-1/12/a^2/d/(I+cot(d*x+c))^3-3/8*I/a^2/ d/(I+cot(d*x+c))^2+11/16/a^2/d/(I+cot(d*x+c))
Time = 0.57 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.81 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx=\frac {24 c+24 d x+15 i \cos (2 (c+d x))+6 i \cos (4 (c+d x))+i \cos (6 (c+d x))+21 \sin (2 (c+d x))+6 \sin (4 (c+d x))+\sin (6 (c+d x))}{96 a^2 d} \] Input:
Integrate[Cos[c + d*x]^4/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^2,x]
Output:
(24*c + 24*d*x + (15*I)*Cos[2*(c + d*x)] + (6*I)*Cos[4*(c + d*x)] + I*Cos[ 6*(c + d*x)] + 21*Sin[2*(c + d*x)] + 6*Sin[4*(c + d*x)] + Sin[6*(c + d*x)] )/(96*a^2*d)
Time = 0.29 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.87, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3042, 3567, 27, 516, 99, 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 \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^4}{(a \cos (c+d x)+i a \sin (c+d x))^2}dx\) |
\(\Big \downarrow \) 3567 |
\(\displaystyle -\frac {\int \frac {\cot ^4(c+d x)}{a^2 (\cot (c+d x)+i)^2 \left (\cot ^2(c+d x)+1\right )^2}d\cot (c+d x)}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {\int \frac {\cot ^4(c+d x)}{(\cot (c+d x)+i)^2 \left (\cot ^2(c+d x)+1\right )^2}d\cot (c+d x)}{a^2 d}\) |
\(\Big \downarrow \) 516 |
\(\displaystyle -\frac {\int \frac {\cot ^4(c+d x)}{(\cot (c+d x)-i)^2 (\cot (c+d x)+i)^4}d\cot (c+d x)}{a^2 d}\) |
\(\Big \downarrow \) 99 |
\(\displaystyle -\frac {\int \left (\frac {1}{16 (\cot (c+d x)-i)^2}+\frac {11}{16 (\cot (c+d x)+i)^2}-\frac {3 i}{4 (\cot (c+d x)+i)^3}-\frac {1}{4 (\cot (c+d x)+i)^4}+\frac {1}{4 \left (\cot ^2(c+d x)+1\right )}\right )d\cot (c+d x)}{a^2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {1}{4} \arctan (\cot (c+d x))+\frac {1}{16 (-\cot (c+d x)+i)}-\frac {11}{16 (\cot (c+d x)+i)}+\frac {3 i}{8 (\cot (c+d x)+i)^2}+\frac {1}{12 (\cot (c+d x)+i)^3}}{a^2 d}\) |
Input:
Int[Cos[c + d*x]^4/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^2,x]
Output:
-((ArcTan[Cot[c + d*x]]/4 + 1/(16*(I - Cot[c + d*x])) + 1/(12*(I + Cot[c + d*x])^3) + ((3*I)/8)/(I + Cot[c + d*x])^2 - 11/(16*(I + Cot[c + d*x])))/( a^2*d))
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_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | | (GtQ[m, 0] && GeQ[n, -1]))
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. ), x_Symbol] :> Int[(e*x)^m*(c + d*x)^(n + p)*(a/c + (b/d)*x)^p, x] /; Free Q[{a, b, c, d, e, m, n, p}, x] && EqQ[b*c^2 + a*d^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[c, 0] && !IntegerQ[n]))
Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*si n[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[x^m*((b + a*x)^n/(1 + x^2)^((m + n + 2)/2)), x], x, Cot[c + d*x]], x] /; FreeQ[{a, b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] && !(GtQ[ n, 0] && GtQ[m, 1])
Time = 1.16 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.78
method | result | size |
risch | \(\frac {x}{4 a^{2}}+\frac {i {\mathrm e}^{-4 i \left (d x +c \right )}}{16 a^{2} d}+\frac {i {\mathrm e}^{-6 i \left (d x +c \right )}}{96 a^{2} d}+\frac {5 i \cos \left (2 d x +2 c \right )}{32 a^{2} d}+\frac {7 \sin \left (2 d x +2 c \right )}{32 a^{2} d}\) | \(79\) |
derivativedivides | \(\frac {-\frac {i \ln \left (\tan \left (d x +c \right )-i\right )}{8}-\frac {i}{8 \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {1}{12 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {3}{16 \left (\tan \left (d x +c \right )-i\right )}+\frac {i \ln \left (\tan \left (d x +c \right )+i\right )}{8}+\frac {1}{16 \tan \left (d x +c \right )+16 i}}{d \,a^{2}}\) | \(88\) |
default | \(\frac {-\frac {i \ln \left (\tan \left (d x +c \right )-i\right )}{8}-\frac {i}{8 \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {1}{12 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {3}{16 \left (\tan \left (d x +c \right )-i\right )}+\frac {i \ln \left (\tan \left (d x +c \right )+i\right )}{8}+\frac {1}{16 \tan \left (d x +c \right )+16 i}}{d \,a^{2}}\) | \(88\) |
orering | \(\text {Expression too large to display}\) | \(1972\) |
Input:
int(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/4*x/a^2+1/16*I/a^2/d*exp(-4*I*(d*x+c))+1/96*I/a^2/d*exp(-6*I*(d*x+c))+5/ 32*I/a^2/d*cos(2*d*x+2*c)+7/32/a^2/d*sin(2*d*x+2*c)
Time = 0.07 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.64 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx=\frac {{\left (24 \, d x e^{\left (6 i \, d x + 6 i \, c\right )} - 3 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 18 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 6 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )} e^{\left (-6 i \, d x - 6 i \, c\right )}}{96 \, a^{2} d} \] Input:
integrate(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x, algorithm="frica s")
Output:
1/96*(24*d*x*e^(6*I*d*x + 6*I*c) - 3*I*e^(8*I*d*x + 8*I*c) + 18*I*e^(4*I*d *x + 4*I*c) + 6*I*e^(2*I*d*x + 2*I*c) + I)*e^(-6*I*d*x - 6*I*c)/(a^2*d)
Time = 0.22 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.87 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx=\begin {cases} \frac {\left (- 24576 i a^{6} d^{3} e^{14 i c} e^{2 i d x} + 147456 i a^{6} d^{3} e^{10 i c} e^{- 2 i d x} + 49152 i a^{6} d^{3} e^{8 i c} e^{- 4 i d x} + 8192 i a^{6} d^{3} e^{6 i c} e^{- 6 i d x}\right ) e^{- 12 i c}}{786432 a^{8} d^{4}} & \text {for}\: a^{8} d^{4} e^{12 i c} \neq 0 \\x \left (\frac {\left (e^{8 i c} + 4 e^{6 i c} + 6 e^{4 i c} + 4 e^{2 i c} + 1\right ) e^{- 6 i c}}{16 a^{2}} - \frac {1}{4 a^{2}}\right ) & \text {otherwise} \end {cases} + \frac {x}{4 a^{2}} \] Input:
integrate(cos(d*x+c)**4/(a*cos(d*x+c)+I*a*sin(d*x+c))**2,x)
Output:
Piecewise(((-24576*I*a**6*d**3*exp(14*I*c)*exp(2*I*d*x) + 147456*I*a**6*d* *3*exp(10*I*c)*exp(-2*I*d*x) + 49152*I*a**6*d**3*exp(8*I*c)*exp(-4*I*d*x) + 8192*I*a**6*d**3*exp(6*I*c)*exp(-6*I*d*x))*exp(-12*I*c)/(786432*a**8*d** 4), Ne(a**8*d**4*exp(12*I*c), 0)), (x*((exp(8*I*c) + 4*exp(6*I*c) + 6*exp( 4*I*c) + 4*exp(2*I*c) + 1)*exp(-6*I*c)/(16*a**2) - 1/(4*a**2)), True)) + x /(4*a**2)
Exception generated. \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x, algorithm="maxim a")
Output:
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati ve exponent.
Time = 0.15 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.02 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx=-\frac {-\frac {6 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{a^{2}} + \frac {6 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a^{2}} + \frac {3 \, {\left (2 i \, \tan \left (d x + c\right ) - 3\right )}}{a^{2} {\left (\tan \left (d x + c\right ) + i\right )}} + \frac {-11 i \, \tan \left (d x + c\right )^{3} - 42 \, \tan \left (d x + c\right )^{2} + 57 i \, \tan \left (d x + c\right ) + 30}{a^{2} {\left (\tan \left (d x + c\right ) - i\right )}^{3}}}{48 \, d} \] Input:
integrate(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x, algorithm="giac" )
Output:
-1/48*(-6*I*log(tan(d*x + c) + I)/a^2 + 6*I*log(tan(d*x + c) - I)/a^2 + 3* (2*I*tan(d*x + c) - 3)/(a^2*(tan(d*x + c) + I)) + (-11*I*tan(d*x + c)^3 - 42*tan(d*x + c)^2 + 57*I*tan(d*x + c) + 30)/(a^2*(tan(d*x + c) - I)^3))/d
Time = 19.81 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.37 \[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx=\frac {x}{4\,a^2}-\frac {-\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{2}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,2{}\mathrm {i}+\frac {7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{6}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,4{}\mathrm {i}}{3}-\frac {7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,2{}\mathrm {i}+\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}}{a^2\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )}^2\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^6} \] Input:
int(cos(c + d*x)^4/(a*cos(c + d*x) + a*sin(c + d*x)*1i)^2,x)
Output:
x/(4*a^2) - ((3*tan(c/2 + (d*x)/2))/2 + tan(c/2 + (d*x)/2)^2*2i - (7*tan(c /2 + (d*x)/2)^3)/6 + (tan(c/2 + (d*x)/2)^4*4i)/3 + (7*tan(c/2 + (d*x)/2)^5 )/6 + tan(c/2 + (d*x)/2)^6*2i - (3*tan(c/2 + (d*x)/2)^7)/2)/(a^2*d*(tan(c/ 2 + (d*x)/2) + 1i)^2*(tan(c/2 + (d*x)/2)*1i + 1)^6)
\[ \int \frac {\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx=\frac {\int \frac {\cos \left (d x +c \right )^{4}}{\cos \left (d x +c \right )^{2}+2 \cos \left (d x +c \right ) \sin \left (d x +c \right ) i -\sin \left (d x +c \right )^{2}}d x}{a^{2}} \] Input:
int(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x)
Output:
int(cos(c + d*x)**4/(cos(c + d*x)**2 + 2*cos(c + d*x)*sin(c + d*x)*i - sin (c + d*x)**2),x)/a**2