Integrand size = 29, antiderivative size = 138 \[ \int \frac {\cos (c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^4} \, dx=-\frac {(A-B) \sin (c+d x)}{7 d (a+a \cos (c+d x))^4}+\frac {(4 A-11 B) \sin (c+d x)}{35 a d (a+a \cos (c+d x))^3}+\frac {(8 A+13 B) \sin (c+d x)}{105 d \left (a^2+a^2 \cos (c+d x)\right )^2}+\frac {(8 A+13 B) \sin (c+d x)}{105 d \left (a^4+a^4 \cos (c+d x)\right )} \] Output:
-1/7*(A-B)*sin(d*x+c)/d/(a+a*cos(d*x+c))^4+1/35*(4*A-11*B)*sin(d*x+c)/a/d/ (a+a*cos(d*x+c))^3+1/105*(8*A+13*B)*sin(d*x+c)/d/(a^2+a^2*cos(d*x+c))^2+1/ 105*(8*A+13*B)*sin(d*x+c)/d/(a^4+a^4*cos(d*x+c))
Time = 1.79 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.18 \[ \int \frac {\cos (c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^4} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \left (140 (A+2 B) \sin \left (\frac {d x}{2}\right )-35 (4 A+5 B) \sin \left (c+\frac {d x}{2}\right )+168 A \sin \left (c+\frac {3 d x}{2}\right )+168 B \sin \left (c+\frac {3 d x}{2}\right )-105 B \sin \left (2 c+\frac {3 d x}{2}\right )+56 A \sin \left (2 c+\frac {5 d x}{2}\right )+91 B \sin \left (2 c+\frac {5 d x}{2}\right )+8 A \sin \left (3 c+\frac {7 d x}{2}\right )+13 B \sin \left (3 c+\frac {7 d x}{2}\right )\right )}{420 a^4 d (1+\cos (c+d x))^4} \] Input:
Integrate[(Cos[c + d*x]*(A + B*Cos[c + d*x]))/(a + a*Cos[c + d*x])^4,x]
Output:
(Cos[(c + d*x)/2]*Sec[c/2]*(140*(A + 2*B)*Sin[(d*x)/2] - 35*(4*A + 5*B)*Si n[c + (d*x)/2] + 168*A*Sin[c + (3*d*x)/2] + 168*B*Sin[c + (3*d*x)/2] - 105 *B*Sin[2*c + (3*d*x)/2] + 56*A*Sin[2*c + (5*d*x)/2] + 91*B*Sin[2*c + (5*d* x)/2] + 8*A*Sin[3*c + (7*d*x)/2] + 13*B*Sin[3*c + (7*d*x)/2]))/(420*a^4*d* (1 + Cos[c + d*x])^4)
Time = 0.66 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.99, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.379, Rules used = {3042, 3447, 3042, 3498, 25, 3042, 3229, 3042, 3129, 3042, 3127}
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 (c+d x) (A+B \cos (c+d x))}{(a \cos (c+d x)+a)^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^4}dx\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \int \frac {A \cos (c+d x)+B \cos ^2(c+d x)}{(a \cos (c+d x)+a)^4}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A \sin \left (c+d x+\frac {\pi }{2}\right )+B \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^4}dx\) |
\(\Big \downarrow \) 3498 |
\(\displaystyle -\frac {\int -\frac {4 a (A-B)+7 a B \cos (c+d x)}{(\cos (c+d x) a+a)^3}dx}{7 a^2}-\frac {(A-B) \sin (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {4 a (A-B)+7 a B \cos (c+d x)}{(\cos (c+d x) a+a)^3}dx}{7 a^2}-\frac {(A-B) \sin (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {4 a (A-B)+7 a B \sin \left (c+d x+\frac {\pi }{2}\right )}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3}dx}{7 a^2}-\frac {(A-B) \sin (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3229 |
\(\displaystyle \frac {\frac {1}{5} (8 A+13 B) \int \frac {1}{(\cos (c+d x) a+a)^2}dx+\frac {a (4 A-11 B) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \sin (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{5} (8 A+13 B) \int \frac {1}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx+\frac {a (4 A-11 B) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \sin (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3129 |
\(\displaystyle \frac {\frac {1}{5} (8 A+13 B) \left (\frac {\int \frac {1}{\cos (c+d x) a+a}dx}{3 a}+\frac {\sin (c+d x)}{3 d (a \cos (c+d x)+a)^2}\right )+\frac {a (4 A-11 B) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \sin (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{5} (8 A+13 B) \left (\frac {\int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a}+\frac {\sin (c+d x)}{3 d (a \cos (c+d x)+a)^2}\right )+\frac {a (4 A-11 B) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B) \sin (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3127 |
\(\displaystyle \frac {\frac {a (4 A-11 B) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}+\frac {1}{5} (8 A+13 B) \left (\frac {\sin (c+d x)}{3 a d (a \cos (c+d x)+a)}+\frac {\sin (c+d x)}{3 d (a \cos (c+d x)+a)^2}\right )}{7 a^2}-\frac {(A-B) \sin (c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
Input:
Int[(Cos[c + d*x]*(A + B*Cos[c + d*x]))/(a + a*Cos[c + d*x])^4,x]
Output:
-1/7*((A - B)*Sin[c + d*x])/(d*(a + a*Cos[c + d*x])^4) + ((a*(4*A - 11*B)* Sin[c + d*x])/(5*d*(a + a*Cos[c + d*x])^3) + ((8*A + 13*B)*(Sin[c + d*x]/( 3*d*(a + a*Cos[c + d*x])^2) + Sin[c + d*x]/(3*a*d*(a + a*Cos[c + d*x]))))/ 5)/(7*a^2)
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b ^2, 0]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*Cos[c + d*x]*((a + b*Sin[c + d*x])^n/(a*d*(2*n + 1))), x] + Simp[(n + 1)/(a*(2*n + 1)) Int[(a + b*Sin[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && LtQ[n, -1] && IntegerQ[2*n]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*Cos[e + f*x]*((a + b*Sin[e + f* x])^m/(a*f*(2*m + 1))), x] + Simp[(a*d*m + b*c*(m + 1))/(a*b*(2*m + 1)) I nt[(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*b - a* B + b*C)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(a*f*(2*m + 1))), x] + Simp[1 /(a^2*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[a*A*(m + 1) + m*(b *B - a*C) + b*C*(2*m + 1)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && LtQ[m, -1] && EqQ[a^2 - b^2, 0]
Time = 1.30 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.55
method | result | size |
parallelrisch | \(-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {7 \left (A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{5}+\frac {7 \left (-A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3}-7 A -7 B \right )}{56 a^{4} d}\) | \(76\) |
derivativedivides | \(\frac {\frac {\left (-A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{7}+\frac {\left (-A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}+\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B}{8 d \,a^{4}}\) | \(88\) |
default | \(\frac {\frac {\left (-A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{7}+\frac {\left (-A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}+\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B}{8 d \,a^{4}}\) | \(88\) |
risch | \(\frac {2 i \left (105 B \,{\mathrm e}^{5 i \left (d x +c \right )}+140 A \,{\mathrm e}^{4 i \left (d x +c \right )}+175 B \,{\mathrm e}^{4 i \left (d x +c \right )}+140 A \,{\mathrm e}^{3 i \left (d x +c \right )}+280 B \,{\mathrm e}^{3 i \left (d x +c \right )}+168 A \,{\mathrm e}^{2 i \left (d x +c \right )}+168 B \,{\mathrm e}^{2 i \left (d x +c \right )}+56 A \,{\mathrm e}^{i \left (d x +c \right )}+91 B \,{\mathrm e}^{i \left (d x +c \right )}+8 A +13 B \right )}{105 d \,a^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{7}}\) | \(138\) |
norman | \(\frac {-\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{56 a d}+\frac {\left (A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}+\frac {\left (7 A +5 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{24 a d}+\frac {\left (11 A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{60 a d}-\frac {\left (11 A +31 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{420 a d}-\frac {\left (17 A -3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{280 a d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} a^{3}}\) | \(167\) |
Input:
int(cos(d*x+c)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^4,x,method=_RETURNVERBOSE )
Output:
-1/56*tan(1/2*d*x+1/2*c)*((A-B)*tan(1/2*d*x+1/2*c)^6+7/5*(A+B)*tan(1/2*d*x +1/2*c)^4+7/3*(-A+B)*tan(1/2*d*x+1/2*c)^2-7*A-7*B)/a^4/d
Time = 0.07 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.90 \[ \int \frac {\cos (c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^4} \, dx=\frac {{\left ({\left (8 \, A + 13 \, B\right )} \cos \left (d x + c\right )^{3} + 4 \, {\left (8 \, A + 13 \, B\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left (13 \, A + 8 \, B\right )} \cos \left (d x + c\right ) + 13 \, A + 8 \, B\right )} \sin \left (d x + c\right )}{105 \, {\left (a^{4} d \cos \left (d x + c\right )^{4} + 4 \, a^{4} d \cos \left (d x + c\right )^{3} + 6 \, a^{4} d \cos \left (d x + c\right )^{2} + 4 \, a^{4} d \cos \left (d x + c\right ) + a^{4} d\right )}} \] Input:
integrate(cos(d*x+c)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^4,x, algorithm="fri cas")
Output:
1/105*((8*A + 13*B)*cos(d*x + c)^3 + 4*(8*A + 13*B)*cos(d*x + c)^2 + 4*(13 *A + 8*B)*cos(d*x + c) + 13*A + 8*B)*sin(d*x + c)/(a^4*d*cos(d*x + c)^4 + 4*a^4*d*cos(d*x + c)^3 + 6*a^4*d*cos(d*x + c)^2 + 4*a^4*d*cos(d*x + c) + a ^4*d)
Time = 1.73 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.29 \[ \int \frac {\cos (c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^4} \, dx=\begin {cases} - \frac {A \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{56 a^{4} d} - \frac {A \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{40 a^{4} d} + \frac {A \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{24 a^{4} d} + \frac {A \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{8 a^{4} d} + \frac {B \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{56 a^{4} d} - \frac {B \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{40 a^{4} d} - \frac {B \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{24 a^{4} d} + \frac {B \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{8 a^{4} d} & \text {for}\: d \neq 0 \\\frac {x \left (A + B \cos {\left (c \right )}\right ) \cos {\left (c \right )}}{\left (a \cos {\left (c \right )} + a\right )^{4}} & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))**4,x)
Output:
Piecewise((-A*tan(c/2 + d*x/2)**7/(56*a**4*d) - A*tan(c/2 + d*x/2)**5/(40* a**4*d) + A*tan(c/2 + d*x/2)**3/(24*a**4*d) + A*tan(c/2 + d*x/2)/(8*a**4*d ) + B*tan(c/2 + d*x/2)**7/(56*a**4*d) - B*tan(c/2 + d*x/2)**5/(40*a**4*d) - B*tan(c/2 + d*x/2)**3/(24*a**4*d) + B*tan(c/2 + d*x/2)/(8*a**4*d), Ne(d, 0)), (x*(A + B*cos(c))*cos(c)/(a*cos(c) + a)**4, True))
Time = 0.05 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.26 \[ \int \frac {\cos (c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^4} \, dx=\frac {\frac {A {\left (\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {35 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a^{4}} + \frac {B {\left (\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {35 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a^{4}}}{840 \, d} \] Input:
integrate(cos(d*x+c)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^4,x, algorithm="max ima")
Output:
1/840*(A*(105*sin(d*x + c)/(cos(d*x + c) + 1) + 35*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 21*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 15*sin(d*x + c)^7/ (cos(d*x + c) + 1)^7)/a^4 + B*(105*sin(d*x + c)/(cos(d*x + c) + 1) - 35*si n(d*x + c)^3/(cos(d*x + c) + 1)^3 - 21*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 15*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4)/d
Time = 0.31 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.85 \[ \int \frac {\cos (c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^4} \, dx=-\frac {15 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 21 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 21 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 35 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 35 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 105 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 105 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{840 \, a^{4} d} \] Input:
integrate(cos(d*x+c)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^4,x, algorithm="gia c")
Output:
-1/840*(15*A*tan(1/2*d*x + 1/2*c)^7 - 15*B*tan(1/2*d*x + 1/2*c)^7 + 21*A*t an(1/2*d*x + 1/2*c)^5 + 21*B*tan(1/2*d*x + 1/2*c)^5 - 35*A*tan(1/2*d*x + 1 /2*c)^3 + 35*B*tan(1/2*d*x + 1/2*c)^3 - 105*A*tan(1/2*d*x + 1/2*c) - 105*B *tan(1/2*d*x + 1/2*c))/(a^4*d)
Time = 41.64 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.61 \[ \int \frac {\cos (c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^4} \, dx=-\frac {\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (A+B\right )}{40\,a^4}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A-B\right )}{24\,a^4}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (A-B\right )}{56\,a^4}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A+B\right )}{8\,a^4}}{d} \] Input:
int((cos(c + d*x)*(A + B*cos(c + d*x)))/(a + a*cos(c + d*x))^4,x)
Output:
-((tan(c/2 + (d*x)/2)^5*(A + B))/(40*a^4) - (tan(c/2 + (d*x)/2)^3*(A - B)) /(24*a^4) + (tan(c/2 + (d*x)/2)^7*(A - B))/(56*a^4) - (tan(c/2 + (d*x)/2)* (A + B))/(8*a^4))/d
Time = 0.16 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.78 \[ \int \frac {\cos (c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^4} \, dx=\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (-15 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} a +15 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} b -21 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a -21 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} b +35 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -35 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +105 a +105 b \right )}{840 a^{4} d} \] Input:
int(cos(d*x+c)*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^4,x)
Output:
(tan((c + d*x)/2)*( - 15*tan((c + d*x)/2)**6*a + 15*tan((c + d*x)/2)**6*b - 21*tan((c + d*x)/2)**4*a - 21*tan((c + d*x)/2)**4*b + 35*tan((c + d*x)/2 )**2*a - 35*tan((c + d*x)/2)**2*b + 105*a + 105*b))/(840*a**4*d)