Integrand size = 31, antiderivative size = 147 \[ \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^2} \, dx=-\frac {(4 A-7 B) x}{2 a^2}+\frac {2 (5 A-8 B) \sin (c+d x)}{3 a^2 d}-\frac {(4 A-7 B) \cos (c+d x) \sin (c+d x)}{2 a^2 d}+\frac {(5 A-8 B) \cos ^2(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}+\frac {(A-B) \cos ^3(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2} \] Output:
-1/2*(4*A-7*B)*x/a^2+2/3*(5*A-8*B)*sin(d*x+c)/a^2/d-1/2*(4*A-7*B)*cos(d*x+ c)*sin(d*x+c)/a^2/d+1/3*(5*A-8*B)*cos(d*x+c)^2*sin(d*x+c)/a^2/d/(1+cos(d*x +c))+1/3*(A-B)*cos(d*x+c)^3*sin(d*x+c)/d/(a+a*cos(d*x+c))^2
Leaf count is larger than twice the leaf count of optimal. \(315\) vs. \(2(147)=294\).
Time = 2.35 (sec) , antiderivative size = 315, normalized size of antiderivative = 2.14 \[ \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^2} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \left (-36 (4 A-7 B) d x \cos \left (\frac {d x}{2}\right )-36 (4 A-7 B) d x \cos \left (c+\frac {d x}{2}\right )-48 A d x \cos \left (c+\frac {3 d x}{2}\right )+84 B d x \cos \left (c+\frac {3 d x}{2}\right )-48 A d x \cos \left (2 c+\frac {3 d x}{2}\right )+84 B d x \cos \left (2 c+\frac {3 d x}{2}\right )+264 A \sin \left (\frac {d x}{2}\right )-381 B \sin \left (\frac {d x}{2}\right )-120 A \sin \left (c+\frac {d x}{2}\right )+147 B \sin \left (c+\frac {d x}{2}\right )+164 A \sin \left (c+\frac {3 d x}{2}\right )-239 B \sin \left (c+\frac {3 d x}{2}\right )+36 A \sin \left (2 c+\frac {3 d x}{2}\right )-63 B \sin \left (2 c+\frac {3 d x}{2}\right )+12 A \sin \left (2 c+\frac {5 d x}{2}\right )-15 B \sin \left (2 c+\frac {5 d x}{2}\right )+12 A \sin \left (3 c+\frac {5 d x}{2}\right )-15 B \sin \left (3 c+\frac {5 d x}{2}\right )+3 B \sin \left (3 c+\frac {7 d x}{2}\right )+3 B \sin \left (4 c+\frac {7 d x}{2}\right )\right )}{48 a^2 d (1+\cos (c+d x))^2} \] Input:
Integrate[(Cos[c + d*x]^3*(A + B*Cos[c + d*x]))/(a + a*Cos[c + d*x])^2,x]
Output:
(Cos[(c + d*x)/2]*Sec[c/2]*(-36*(4*A - 7*B)*d*x*Cos[(d*x)/2] - 36*(4*A - 7 *B)*d*x*Cos[c + (d*x)/2] - 48*A*d*x*Cos[c + (3*d*x)/2] + 84*B*d*x*Cos[c + (3*d*x)/2] - 48*A*d*x*Cos[2*c + (3*d*x)/2] + 84*B*d*x*Cos[2*c + (3*d*x)/2] + 264*A*Sin[(d*x)/2] - 381*B*Sin[(d*x)/2] - 120*A*Sin[c + (d*x)/2] + 147* B*Sin[c + (d*x)/2] + 164*A*Sin[c + (3*d*x)/2] - 239*B*Sin[c + (3*d*x)/2] + 36*A*Sin[2*c + (3*d*x)/2] - 63*B*Sin[2*c + (3*d*x)/2] + 12*A*Sin[2*c + (5 *d*x)/2] - 15*B*Sin[2*c + (5*d*x)/2] + 12*A*Sin[3*c + (5*d*x)/2] - 15*B*Si n[3*c + (5*d*x)/2] + 3*B*Sin[3*c + (7*d*x)/2] + 3*B*Sin[4*c + (7*d*x)/2])) /(48*a^2*d*(1 + Cos[c + d*x])^2)
Time = 0.65 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.03, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3042, 3456, 3042, 3456, 3042, 3213}
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 ^3(c+d x) (A+B \cos (c+d x))}{(a \cos (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^3 \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 )^2}dx\) |
\(\Big \downarrow \) 3456 |
\(\displaystyle \frac {\int \frac {\cos ^2(c+d x) (3 a (A-B)-a (2 A-5 B) \cos (c+d x))}{\cos (c+d x) a+a}dx}{3 a^2}+\frac {(A-B) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (3 a (A-B)-a (2 A-5 B) \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}+\frac {(A-B) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3456 |
\(\displaystyle \frac {\frac {\int \cos (c+d x) \left (2 a^2 (5 A-8 B)-3 a^2 (4 A-7 B) \cos (c+d x)\right )dx}{a^2}+\frac {(5 A-8 B) \sin (c+d x) \cos ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}+\frac {(A-B) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \sin \left (c+d x+\frac {\pi }{2}\right ) \left (2 a^2 (5 A-8 B)-3 a^2 (4 A-7 B) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}+\frac {(5 A-8 B) \sin (c+d x) \cos ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}+\frac {(A-B) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {\frac {\frac {2 a^2 (5 A-8 B) \sin (c+d x)}{d}-\frac {3 a^2 (4 A-7 B) \sin (c+d x) \cos (c+d x)}{2 d}-\frac {3}{2} a^2 x (4 A-7 B)}{a^2}+\frac {(5 A-8 B) \sin (c+d x) \cos ^2(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}+\frac {(A-B) \sin (c+d x) \cos ^3(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
Input:
Int[(Cos[c + d*x]^3*(A + B*Cos[c + d*x]))/(a + a*Cos[c + d*x])^2,x]
Output:
((A - B)*Cos[c + d*x]^3*Sin[c + d*x])/(3*d*(a + a*Cos[c + d*x])^2) + (((5* A - 8*B)*Cos[c + d*x]^2*Sin[c + d*x])/(d*(1 + Cos[c + d*x])) + ((-3*a^2*(4 *A - 7*B)*x)/2 + (2*a^2*(5*A - 8*B)*Sin[c + d*x])/d - (3*a^2*(4*A - 7*B)*C os[c + d*x]*Sin[c + d*x])/(2*d))/a^2)/(3*a^2)
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^n/( a*f*(2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n - 1)*Simp[A*(a*d*n - b*c*(m + 1)) - B*(a*c*m + b*d*n) - d*(a*B*(m - n) + A*b*(m + n + 1))*Sin[e + f*x], x], x], x] /; Fre eQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] & & NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && GtQ[n, 0] && IntegerQ[2*m] && (In tegerQ[2*n] || EqQ[c, 0])
Time = 1.26 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.60
method | result | size |
parallelrisch | \(\frac {7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\frac {3 \left (A -B \right ) \cos \left (2 d x +2 c \right )}{28}+\frac {3 B \cos \left (3 d x +3 c \right )}{112}+\left (A -\frac {163 B}{112}\right ) \cos \left (d x +c \right )+\frac {23 A}{28}-\frac {5 B}{4}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-6 x d \left (A -\frac {7 B}{4}\right )}{3 a^{2} d}\) | \(88\) |
derivativedivides | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -\frac {4 \left (\left (\frac {5 B}{2}-A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (\frac {3 B}{2}-A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}-2 \left (4 A -7 B \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(135\) |
default | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -\frac {4 \left (\left (\frac {5 B}{2}-A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (\frac {3 B}{2}-A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}-2 \left (4 A -7 B \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(135\) |
risch | \(-\frac {2 x A}{a^{2}}+\frac {7 B x}{2 a^{2}}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )} B}{8 a^{2} d}-\frac {i {\mathrm e}^{i \left (d x +c \right )} A}{2 a^{2} d}+\frac {i {\mathrm e}^{i \left (d x +c \right )} B}{a^{2} d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} A}{2 a^{2} d}-\frac {i {\mathrm e}^{-i \left (d x +c \right )} B}{a^{2} d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} B}{8 a^{2} d}+\frac {2 i \left (9 A \,{\mathrm e}^{2 i \left (d x +c \right )}-12 B \,{\mathrm e}^{2 i \left (d x +c \right )}+15 A \,{\mathrm e}^{i \left (d x +c \right )}-21 B \,{\mathrm e}^{i \left (d x +c \right )}+8 A -11 B \right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}\) | \(207\) |
norman | \(\frac {\frac {\left (11 A -18 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{a d}-\frac {\left (4 A -7 B \right ) x}{2 a}-\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{6 a d}-\frac {2 \left (4 A -7 B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a}-\frac {3 \left (4 A -7 B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{a}-\frac {2 \left (4 A -7 B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{a}-\frac {\left (4 A -7 B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2 a}+\frac {\left (9 A -13 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}+\frac {\left (11 A -17 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{6 a d}+\frac {\left (61 A -100 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 a d}+\frac {\left (95 A -149 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 a d}}{a \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4}}\) | \(281\) |
Input:
int(cos(d*x+c)^3*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^2,x,method=_RETURNVERBO SE)
Output:
1/3*(7*tan(1/2*d*x+1/2*c)*(3/28*(A-B)*cos(2*d*x+2*c)+3/112*B*cos(3*d*x+3*c )+(A-163/112*B)*cos(d*x+c)+23/28*A-5/4*B)*sec(1/2*d*x+1/2*c)^2-6*x*d*(A-7/ 4*B))/a^2/d
Time = 0.09 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.94 \[ \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^2} \, dx=-\frac {3 \, {\left (4 \, A - 7 \, B\right )} d x \cos \left (d x + c\right )^{2} + 6 \, {\left (4 \, A - 7 \, B\right )} d x \cos \left (d x + c\right ) + 3 \, {\left (4 \, A - 7 \, B\right )} d x - {\left (3 \, B \cos \left (d x + c\right )^{3} + 6 \, {\left (A - B\right )} \cos \left (d x + c\right )^{2} + {\left (28 \, A - 43 \, B\right )} \cos \left (d x + c\right ) + 20 \, A - 32 \, B\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \] Input:
integrate(cos(d*x+c)^3*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^2,x, algorithm="f ricas")
Output:
-1/6*(3*(4*A - 7*B)*d*x*cos(d*x + c)^2 + 6*(4*A - 7*B)*d*x*cos(d*x + c) + 3*(4*A - 7*B)*d*x - (3*B*cos(d*x + c)^3 + 6*(A - B)*cos(d*x + c)^2 + (28*A - 43*B)*cos(d*x + c) + 20*A - 32*B)*sin(d*x + c))/(a^2*d*cos(d*x + c)^2 + 2*a^2*d*cos(d*x + c) + a^2*d)
Leaf count of result is larger than twice the leaf count of optimal. 843 vs. \(2 (136) = 272\).
Time = 1.74 (sec) , antiderivative size = 843, normalized size of antiderivative = 5.73 \[ \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^2} \, dx =\text {Too large to display} \] Input:
integrate(cos(d*x+c)**3*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))**2,x)
Output:
Piecewise((-12*A*d*x*tan(c/2 + d*x/2)**4/(6*a**2*d*tan(c/2 + d*x/2)**4 + 1 2*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) - 24*A*d*x*tan(c/2 + d*x/2)**2/(6 *a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) - 12*A*d*x/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6 *a**2*d) - A*tan(c/2 + d*x/2)**7/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d *tan(c/2 + d*x/2)**2 + 6*a**2*d) + 13*A*tan(c/2 + d*x/2)**5/(6*a**2*d*tan( c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) + 41*A*tan(c/2 + d*x/2)**3/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) + 27*A*tan(c/2 + d*x/2)/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a* *2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) + 21*B*d*x*tan(c/2 + d*x/2)**4/(6*a** 2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) + 42*B *d*x*tan(c/2 + d*x/2)**2/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) + 21*B*d*x/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a** 2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) + B*tan(c/2 + d*x/2)**7/(6*a**2*d*tan( c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) - 19*B*tan(c/2 + d*x/2)**5/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) - 71*B*tan(c/2 + d*x/2)**3/(6*a**2*d*tan(c/2 + d*x/2)**4 + 12 *a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d) - 39*B*tan(c/2 + d*x/2)/(6*a**2*d* tan(c/2 + d*x/2)**4 + 12*a**2*d*tan(c/2 + d*x/2)**2 + 6*a**2*d), Ne(d, 0)) , (x*(A + B*cos(c))*cos(c)**3/(a*cos(c) + a)**2, True))
Leaf count of result is larger than twice the leaf count of optimal. 283 vs. \(2 (137) = 274\).
Time = 0.14 (sec) , antiderivative size = 283, normalized size of antiderivative = 1.93 \[ \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^2} \, dx=-\frac {B {\left (\frac {6 \, {\left (\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {5 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{2} + \frac {2 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {42 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}\right )} - A {\left (\frac {\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {24 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} + \frac {12 \, \sin \left (d x + c\right )}{{\left (a^{2} + \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{6 \, d} \] Input:
integrate(cos(d*x+c)^3*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^2,x, algorithm="m axima")
Output:
-1/6*(B*(6*(3*sin(d*x + c)/(cos(d*x + c) + 1) + 5*sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/(a^2 + 2*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a^2*sin(d* x + c)^4/(cos(d*x + c) + 1)^4) + (21*sin(d*x + c)/(cos(d*x + c) + 1) - sin (d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 42*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^2) - A*((15*sin(d*x + c)/(cos(d*x + c) + 1) - sin(d*x + c)^3/(c os(d*x + c) + 1)^3)/a^2 - 24*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^2 + 12*sin(d*x + c)/((a^2 + a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1))))/d
Time = 0.30 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.12 \[ \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^2} \, dx=-\frac {\frac {3 \, {\left (d x + c\right )} {\left (4 \, A - 7 \, B\right )}}{a^{2}} - \frac {6 \, {\left (2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} a^{2}} + \frac {A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 21 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \] Input:
integrate(cos(d*x+c)^3*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^2,x, algorithm="g iac")
Output:
-1/6*(3*(d*x + c)*(4*A - 7*B)/a^2 - 6*(2*A*tan(1/2*d*x + 1/2*c)^3 - 5*B*ta n(1/2*d*x + 1/2*c)^3 + 2*A*tan(1/2*d*x + 1/2*c) - 3*B*tan(1/2*d*x + 1/2*c) )/((tan(1/2*d*x + 1/2*c)^2 + 1)^2*a^2) + (A*a^4*tan(1/2*d*x + 1/2*c)^3 - B *a^4*tan(1/2*d*x + 1/2*c)^3 - 15*A*a^4*tan(1/2*d*x + 1/2*c) + 21*B*a^4*tan (1/2*d*x + 1/2*c))/a^6)/d
Time = 41.91 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.03 \[ \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^2} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,\left (A-B\right )}{2\,a^2}+\frac {2\,A-4\,B}{2\,a^2}\right )}{d}-\frac {x\,\left (4\,A-7\,B\right )}{2\,a^2}+\frac {\left (2\,A-5\,B\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,A-3\,B\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A-B\right )}{6\,a^2\,d} \] Input:
int((cos(c + d*x)^3*(A + B*cos(c + d*x)))/(a + a*cos(c + d*x))^2,x)
Output:
(tan(c/2 + (d*x)/2)*((3*(A - B))/(2*a^2) + (2*A - 4*B)/(2*a^2)))/d - (x*(4 *A - 7*B))/(2*a^2) + (tan(c/2 + (d*x)/2)^3*(2*A - 5*B) + tan(c/2 + (d*x)/2 )*(2*A - 3*B))/(d*(2*a^2*tan(c/2 + (d*x)/2)^2 + a^2*tan(c/2 + (d*x)/2)^4 + a^2)) - (tan(c/2 + (d*x)/2)^3*(A - B))/(6*a^2*d)
Time = 0.17 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.18 \[ \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^2} \, dx=\frac {6 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a -9 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b -12 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a d x +21 \cos \left (d x +c \right ) \sin \left (d x +c \right ) b d x +2 \cos \left (d x +c \right ) a -2 \cos \left (d x +c \right ) b -3 \sin \left (d x +c \right )^{4} b +22 \sin \left (d x +c \right )^{2} a -31 \sin \left (d x +c \right )^{2} b -12 \sin \left (d x +c \right ) a d x +21 \sin \left (d x +c \right ) b d x -2 a +2 b}{6 \sin \left (d x +c \right ) a^{2} d \left (\cos \left (d x +c \right )+1\right )} \] Input:
int(cos(d*x+c)^3*(A+B*cos(d*x+c))/(a+a*cos(d*x+c))^2,x)
Output:
(6*cos(c + d*x)*sin(c + d*x)**2*a - 9*cos(c + d*x)*sin(c + d*x)**2*b - 12* cos(c + d*x)*sin(c + d*x)*a*d*x + 21*cos(c + d*x)*sin(c + d*x)*b*d*x + 2*c os(c + d*x)*a - 2*cos(c + d*x)*b - 3*sin(c + d*x)**4*b + 22*sin(c + d*x)** 2*a - 31*sin(c + d*x)**2*b - 12*sin(c + d*x)*a*d*x + 21*sin(c + d*x)*b*d*x - 2*a + 2*b)/(6*sin(c + d*x)*a**2*d*(cos(c + d*x) + 1))