Integrand size = 33, antiderivative size = 144 \[ \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx=\frac {2 a (7 A+6 B) \sin (c+d x)}{15 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a B \cos ^3(c+d x) \sin (c+d x)}{7 d \sqrt {a+a \cos (c+d x)}}-\frac {4 (7 A+6 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A+6 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{35 a d} \] Output:
2/15*a*(7*A+6*B)*sin(d*x+c)/d/(a+a*cos(d*x+c))^(1/2)+2/7*a*B*cos(d*x+c)^3* sin(d*x+c)/d/(a+a*cos(d*x+c))^(1/2)-4/105*(7*A+6*B)*(a+a*cos(d*x+c))^(1/2) *sin(d*x+c)/d+2/35*(7*A+6*B)*(a+a*cos(d*x+c))^(3/2)*sin(d*x+c)/a/d
Time = 0.29 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.56 \[ \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx=\frac {\sqrt {a (1+\cos (c+d x))} (266 A+228 B+(112 A+141 B) \cos (c+d x)+6 (7 A+6 B) \cos (2 (c+d x))+15 B \cos (3 (c+d x))) \tan \left (\frac {1}{2} (c+d x)\right )}{210 d} \] Input:
Integrate[Cos[c + d*x]^2*Sqrt[a + a*Cos[c + d*x]]*(A + B*Cos[c + d*x]),x]
Output:
(Sqrt[a*(1 + Cos[c + d*x])]*(266*A + 228*B + (112*A + 141*B)*Cos[c + d*x] + 6*(7*A + 6*B)*Cos[2*(c + d*x)] + 15*B*Cos[3*(c + d*x)])*Tan[(c + d*x)/2] )/(210*d)
Time = 0.66 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.01, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3042, 3460, 3042, 3238, 27, 3042, 3230, 3042, 3125}
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 ^2(c+d x) \sqrt {a \cos (c+d x)+a} (A+B \cos (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin \left (c+d x+\frac {\pi }{2}\right )^2 \sqrt {a \sin \left (c+d x+\frac {\pi }{2}\right )+a} \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 3460 |
\(\displaystyle \frac {1}{7} (7 A+6 B) \int \cos ^2(c+d x) \sqrt {\cos (c+d x) a+a}dx+\frac {2 a B \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} (7 A+6 B) \int \sin \left (c+d x+\frac {\pi }{2}\right )^2 \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx+\frac {2 a B \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3238 |
\(\displaystyle \frac {1}{7} (7 A+6 B) \left (\frac {2 \int \frac {1}{2} (3 a-2 a \cos (c+d x)) \sqrt {\cos (c+d x) a+a}dx}{5 a}+\frac {2 \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{5 a d}\right )+\frac {2 a B \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{7} (7 A+6 B) \left (\frac {\int (3 a-2 a \cos (c+d x)) \sqrt {\cos (c+d x) a+a}dx}{5 a}+\frac {2 \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{5 a d}\right )+\frac {2 a B \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} (7 A+6 B) \left (\frac {\int \left (3 a-2 a \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{5 a}+\frac {2 \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{5 a d}\right )+\frac {2 a B \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3230 |
\(\displaystyle \frac {1}{7} (7 A+6 B) \left (\frac {\frac {7}{3} a \int \sqrt {\cos (c+d x) a+a}dx-\frac {4 a \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{3 d}}{5 a}+\frac {2 \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{5 a d}\right )+\frac {2 a B \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} (7 A+6 B) \left (\frac {\frac {7}{3} a \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx-\frac {4 a \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{3 d}}{5 a}+\frac {2 \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{5 a d}\right )+\frac {2 a B \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 3125 |
\(\displaystyle \frac {1}{7} (7 A+6 B) \left (\frac {\frac {14 a^2 \sin (c+d x)}{3 d \sqrt {a \cos (c+d x)+a}}-\frac {4 a \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{3 d}}{5 a}+\frac {2 \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{5 a d}\right )+\frac {2 a B \sin (c+d x) \cos ^3(c+d x)}{7 d \sqrt {a \cos (c+d x)+a}}\) |
Input:
Int[Cos[c + d*x]^2*Sqrt[a + a*Cos[c + d*x]]*(A + B*Cos[c + d*x]),x]
Output:
(2*a*B*Cos[c + d*x]^3*Sin[c + d*x])/(7*d*Sqrt[a + a*Cos[c + d*x]]) + ((7*A + 6*B)*((2*(a + a*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*a*d) + ((14*a^2*Si n[c + d*x])/(3*d*Sqrt[a + a*Cos[c + d*x]]) - (4*a*Sqrt[a + a*Cos[c + d*x]] *Sin[c + d*x])/(3*d))/(5*a)))/7
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2*b*(Cos [c + d*x]/(d*Sqrt[a + b*Sin[c + d*x]])), x] /; FreeQ[{a, b, c, d}, x] && Eq Q[a^2 - b^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[(a*d*m + b*c*(m + 1))/(b*(m + 1)) Int[(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1)]
Int[sin[(e_.) + (f_.)*(x_)]^2*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(-Cos[e + f*x])*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2 ))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*(b*(m + 1) - a*Si n[e + f*x]), x], x] /; FreeQ[{a, b, e, f, m}, x] && EqQ[a^2 - b^2, 0] && ! LtQ[m, -2^(-1)]
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((A_.) + (B_.)*sin[(e_.) + ( f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp [-2*b*B*Cos[e + f*x]*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(2*n + 3)*Sqrt[a + b*Sin[e + f*x]])), x] + Simp[(A*b*d*(2*n + 3) - B*(b*c - 2*a*d*(n + 1)))/(b *d*(2*n + 3)) Int[Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && !LtQ[n, -1]
Time = 3.11 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.71
method | result | size |
default | \(\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (-120 B \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (84 A +252 B \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-140 A -210 B \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+105 A +105 B \right ) \sqrt {2}}{105 \sqrt {a \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, d}\) | \(102\) |
parts | \(\frac {2 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (12 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-4 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+7\right ) \sqrt {2}}{15 \sqrt {a \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, d}+\frac {2 B \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (40 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-36 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+22 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+9\right ) \sqrt {2}}{35 \sqrt {a \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, d}\) | \(157\) |
Input:
int(cos(d*x+c)^2*(a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x,method=_RETURNV ERBOSE)
Output:
2/105*cos(1/2*d*x+1/2*c)*a*sin(1/2*d*x+1/2*c)*(-120*B*sin(1/2*d*x+1/2*c)^6 +(84*A+252*B)*sin(1/2*d*x+1/2*c)^4+(-140*A-210*B)*sin(1/2*d*x+1/2*c)^2+105 *A+105*B)*2^(1/2)/(a*cos(1/2*d*x+1/2*c)^2)^(1/2)/d
Time = 0.08 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.57 \[ \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx=\frac {2 \, {\left (15 \, B \cos \left (d x + c\right )^{3} + 3 \, {\left (7 \, A + 6 \, B\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left (7 \, A + 6 \, B\right )} \cos \left (d x + c\right ) + 56 \, A + 48 \, B\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{105 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \] Input:
integrate(cos(d*x+c)^2*(a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorith m="fricas")
Output:
2/105*(15*B*cos(d*x + c)^3 + 3*(7*A + 6*B)*cos(d*x + c)^2 + 4*(7*A + 6*B)* cos(d*x + c) + 56*A + 48*B)*sqrt(a*cos(d*x + c) + a)*sin(d*x + c)/(d*cos(d *x + c) + d)
\[ \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx=\int \sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )} \left (A + B \cos {\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)**2*(a+a*cos(d*x+c))**(1/2)*(A+B*cos(d*x+c)),x)
Output:
Integral(sqrt(a*(cos(c + d*x) + 1))*(A + B*cos(c + d*x))*cos(c + d*x)**2, x)
Time = 0.22 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.82 \[ \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx=\frac {14 \, {\left (3 \, \sqrt {2} \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 5 \, \sqrt {2} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 30 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} A \sqrt {a} + 3 \, {\left (5 \, \sqrt {2} \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 7 \, \sqrt {2} \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 35 \, \sqrt {2} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 105 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} B \sqrt {a}}{420 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorith m="maxima")
Output:
1/420*(14*(3*sqrt(2)*sin(5/2*d*x + 5/2*c) + 5*sqrt(2)*sin(3/2*d*x + 3/2*c) + 30*sqrt(2)*sin(1/2*d*x + 1/2*c))*A*sqrt(a) + 3*(5*sqrt(2)*sin(7/2*d*x + 7/2*c) + 7*sqrt(2)*sin(5/2*d*x + 5/2*c) + 35*sqrt(2)*sin(3/2*d*x + 3/2*c) + 105*sqrt(2)*sin(1/2*d*x + 1/2*c))*B*sqrt(a))/d
Time = 0.46 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.02 \[ \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx=\frac {\sqrt {2} {\left (15 \, B \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 21 \, {\left (2 \, A \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + B \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 35 \, {\left (2 \, A \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 3 \, B \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 105 \, {\left (4 \, A \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 3 \, B \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \sqrt {a}}{420 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorith m="giac")
Output:
1/420*sqrt(2)*(15*B*sgn(cos(1/2*d*x + 1/2*c))*sin(7/2*d*x + 7/2*c) + 21*(2 *A*sgn(cos(1/2*d*x + 1/2*c)) + B*sgn(cos(1/2*d*x + 1/2*c)))*sin(5/2*d*x + 5/2*c) + 35*(2*A*sgn(cos(1/2*d*x + 1/2*c)) + 3*B*sgn(cos(1/2*d*x + 1/2*c)) )*sin(3/2*d*x + 3/2*c) + 105*(4*A*sgn(cos(1/2*d*x + 1/2*c)) + 3*B*sgn(cos( 1/2*d*x + 1/2*c)))*sin(1/2*d*x + 1/2*c))*sqrt(a)/d
Timed out. \[ \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx=\int {\cos \left (c+d\,x\right )}^2\,\left (A+B\,\cos \left (c+d\,x\right )\right )\,\sqrt {a+a\,\cos \left (c+d\,x\right )} \,d x \] Input:
int(cos(c + d*x)^2*(A + B*cos(c + d*x))*(a + a*cos(c + d*x))^(1/2),x)
Output:
int(cos(c + d*x)^2*(A + B*cos(c + d*x))*(a + a*cos(c + d*x))^(1/2), x)
\[ \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx=\sqrt {a}\, \left (\left (\int \sqrt {\cos \left (d x +c \right )+1}\, \cos \left (d x +c \right )^{3}d x \right ) b +\left (\int \sqrt {\cos \left (d x +c \right )+1}\, \cos \left (d x +c \right )^{2}d x \right ) a \right ) \] Input:
int(cos(d*x+c)^2*(a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x)
Output:
sqrt(a)*(int(sqrt(cos(c + d*x) + 1)*cos(c + d*x)**3,x)*b + int(sqrt(cos(c + d*x) + 1)*cos(c + d*x)**2,x)*a)