Integrand size = 42, antiderivative size = 140 \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2 \left (3 b^2 C+5 a (2 b B+a C)\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 \left (3 a^2 B+b^2 B+2 a b C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 b (5 b B+7 a C) \sqrt {\cos (c+d x)} \sin (c+d x)}{15 d}+\frac {2 b C \sqrt {\cos (c+d x)} (a+b \cos (c+d x)) \sin (c+d x)}{5 d} \] Output:
2/5*(3*C*b^2+5*a*(2*B*b+C*a))*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/d+2/3* (3*B*a^2+B*b^2+2*C*a*b)*InverseJacobiAM(1/2*d*x+1/2*c,2^(1/2))/d+2/15*b*(5 *B*b+7*C*a)*cos(d*x+c)^(1/2)*sin(d*x+c)/d+2/5*b*C*cos(d*x+c)^(1/2)*(a+b*co s(d*x+c))*sin(d*x+c)/d
Time = 1.78 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.76 \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2 \left (3 \left (10 a b B+5 a^2 C+3 b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+5 \left (3 a^2 B+b^2 B+2 a b C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+b \sqrt {\cos (c+d x)} (5 b B+10 a C+3 b C \cos (c+d x)) \sin (c+d x)\right )}{15 d} \] Input:
Integrate[((a + b*Cos[c + d*x])^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos [c + d*x]^(3/2),x]
Output:
(2*(3*(10*a*b*B + 5*a^2*C + 3*b^2*C)*EllipticE[(c + d*x)/2, 2] + 5*(3*a^2* B + b^2*B + 2*a*b*C)*EllipticF[(c + d*x)/2, 2] + b*Sqrt[Cos[c + d*x]]*(5*b *B + 10*a*C + 3*b*C*Cos[c + d*x])*Sin[c + d*x]))/(15*d)
Time = 0.92 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.04, number of steps used = 13, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.310, Rules used = {3042, 3508, 3042, 3469, 27, 3042, 3502, 27, 3042, 3227, 3042, 3119, 3120}
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 {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^{3/2}}dx\) |
\(\Big \downarrow \) 3508 |
\(\displaystyle \int \frac {(a+b \cos (c+d x))^2 (B+C \cos (c+d x))}{\sqrt {\cos (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (B+C \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 3469 |
\(\displaystyle \frac {2}{5} \int \frac {b (5 b B+7 a C) \cos ^2(c+d x)+\left (3 C b^2+5 a (2 b B+a C)\right ) \cos (c+d x)+a (5 a B+b C)}{2 \sqrt {\cos (c+d x)}}dx+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))}{5 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{5} \int \frac {b (5 b B+7 a C) \cos ^2(c+d x)+\left (3 C b^2+5 a (2 b B+a C)\right ) \cos (c+d x)+a (5 a B+b C)}{\sqrt {\cos (c+d x)}}dx+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \int \frac {b (5 b B+7 a C) \sin \left (c+d x+\frac {\pi }{2}\right )^2+\left (3 C b^2+5 a (2 b B+a C)\right ) \sin \left (c+d x+\frac {\pi }{2}\right )+a (5 a B+b C)}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {1}{5} \left (\frac {2}{3} \int \frac {5 \left (3 B a^2+2 b C a+b^2 B\right )+3 \left (3 C b^2+5 a (2 b B+a C)\right ) \cos (c+d x)}{2 \sqrt {\cos (c+d x)}}dx+\frac {2 b (7 a C+5 b B) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))}{5 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \int \frac {5 \left (3 B a^2+2 b C a+b^2 B\right )+3 \left (3 C b^2+5 a (2 b B+a C)\right ) \cos (c+d x)}{\sqrt {\cos (c+d x)}}dx+\frac {2 b (7 a C+5 b B) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \int \frac {5 \left (3 B a^2+2 b C a+b^2 B\right )+3 \left (3 C b^2+5 a (2 b B+a C)\right ) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 b (7 a C+5 b B) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (5 \left (3 a^2 B+2 a b C+b^2 B\right ) \int \frac {1}{\sqrt {\cos (c+d x)}}dx+3 \left (5 a (a C+2 b B)+3 b^2 C\right ) \int \sqrt {\cos (c+d x)}dx\right )+\frac {2 b (7 a C+5 b B) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (5 \left (3 a^2 B+2 a b C+b^2 B\right ) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+3 \left (5 a (a C+2 b B)+3 b^2 C\right ) \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx\right )+\frac {2 b (7 a C+5 b B) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (5 \left (3 a^2 B+2 a b C+b^2 B\right ) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {6 \left (5 a (a C+2 b B)+3 b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}\right )+\frac {2 b (7 a C+5 b B) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))}{5 d}\) |
\(\Big \downarrow \) 3120 |
\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (\frac {10 \left (3 a^2 B+2 a b C+b^2 B\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d}+\frac {6 \left (5 a (a C+2 b B)+3 b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}\right )+\frac {2 b (7 a C+5 b B) \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+\frac {2 b C \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))}{5 d}\) |
Input:
Int[((a + b*Cos[c + d*x])^2*(B*Cos[c + d*x] + C*Cos[c + d*x]^2))/Cos[c + d *x]^(3/2),x]
Output:
(2*b*C*Sqrt[Cos[c + d*x]]*(a + b*Cos[c + d*x])*Sin[c + d*x])/(5*d) + (((6* (3*b^2*C + 5*a*(2*b*B + a*C))*EllipticE[(c + d*x)/2, 2])/d + (10*(3*a^2*B + b^2*B + 2*a*b*C)*EllipticF[(c + d*x)/2, 2])/d)/3 + (2*b*(5*b*B + 7*a*C)* Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d))/5
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 )*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si mp[(-b)*B*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*((c + d*Sin[e + f*x])^( n + 1)/(d*f*(m + n + 1))), x] + Simp[1/(d*(m + n + 1)) Int[(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^n*Simp[a^2*A*d*(m + n + 1) + b*B*(b*c*( m - 1) + a*d*(n + 1)) + (a*d*(2*A*b + a*B)*(m + n + 1) - b*B*(a*c - b*d*(m + n)))*Sin[e + f*x] + b*(A*b*d*(m + n + 1) - B*(b*c*m - a*d*(2*m + n)))*Sin [e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1] && !(IGt Q[n, 1] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[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*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_ .) + (f_.)*(x_)]^2), x_Symbol] :> Simp[1/b^2 Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*(b*B - a*C + b*C*Sin[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(486\) vs. \(2(131)=262\).
Time = 10.59 (sec) , antiderivative size = 487, normalized size of antiderivative = 3.48
method | result | size |
default | \(-\frac {2 \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (-24 C \,b^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (20 B \,b^{2}+40 a b C +24 C \,b^{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-10 B \,b^{2}-20 a b C -6 C \,b^{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+15 B \,a^{2} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+5 B \,b^{2} \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-30 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a b +10 a b C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-15 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a^{2}-9 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b^{2}\right )}{15 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(487\) |
parts | \(-\frac {2 \left (B \,b^{2}+2 a b C \right ) \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (4 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{3 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}+\frac {2 \left (2 B a b +a^{2} C \right ) \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {1-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}+\frac {2 B \,a^{2} \operatorname {InverseJacobiAM}\left (\frac {d x}{2}+\frac {c}{2}, \sqrt {2}\right )}{d}-\frac {2 C \,b^{2} \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (-8 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+8 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-3 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{5 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(560\) |
Input:
int((a+b*cos(d*x+c))^2*(B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2),x,me thod=_RETURNVERBOSE)
Output:
-2/15*((2*cos(1/2*d*x+1/2*c)^2-1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(-24*C*b^2*c os(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^6+(20*B*b^2+40*C*a*b+24*C*b^2)*sin(1/ 2*d*x+1/2*c)^4*cos(1/2*d*x+1/2*c)+(-10*B*b^2-20*C*a*b-6*C*b^2)*sin(1/2*d*x +1/2*c)^2*cos(1/2*d*x+1/2*c)+15*B*a^2*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin( 1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))+5*B*b^2*(s in(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos( 1/2*d*x+1/2*c),2^(1/2))-30*B*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1 /2*c)^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))*a*b+10*a*b*C*(sin(1 /2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2* d*x+1/2*c),2^(1/2))-15*C*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c )^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))*a^2-9*C*(sin(1/2*d*x+1/ 2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c ),2^(1/2))*b^2)/(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/sin(1 /2*d*x+1/2*c)/(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)/d
Result contains complex when optimal does not.
Time = 0.16 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.54 \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2 \, {\left (3 \, C b^{2} \cos \left (d x + c\right ) + 10 \, C a b + 5 \, B b^{2}\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 5 \, \sqrt {2} {\left (3 i \, B a^{2} + 2 i \, C a b + i \, B b^{2}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 5 \, \sqrt {2} {\left (-3 i \, B a^{2} - 2 i \, C a b - i \, B b^{2}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 \, \sqrt {2} {\left (-5 i \, C a^{2} - 10 i \, B a b - 3 i \, C b^{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 3 \, \sqrt {2} {\left (5 i \, C a^{2} + 10 i \, B a b + 3 i \, C b^{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{15 \, d} \] Input:
integrate((a+b*cos(d*x+c))^2*(B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2 ),x, algorithm="fricas")
Output:
1/15*(2*(3*C*b^2*cos(d*x + c) + 10*C*a*b + 5*B*b^2)*sqrt(cos(d*x + c))*sin (d*x + c) - 5*sqrt(2)*(3*I*B*a^2 + 2*I*C*a*b + I*B*b^2)*weierstrassPInvers e(-4, 0, cos(d*x + c) + I*sin(d*x + c)) - 5*sqrt(2)*(-3*I*B*a^2 - 2*I*C*a* b - I*B*b^2)*weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) - 3 *sqrt(2)*(-5*I*C*a^2 - 10*I*B*a*b - 3*I*C*b^2)*weierstrassZeta(-4, 0, weie rstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) - 3*sqrt(2)*(5*I*C* a^2 + 10*I*B*a*b + 3*I*C*b^2)*weierstrassZeta(-4, 0, weierstrassPInverse(- 4, 0, cos(d*x + c) - I*sin(d*x + c))))/d
Timed out. \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\text {Timed out} \] Input:
integrate((a+b*cos(d*x+c))**2*(B*cos(d*x+c)+C*cos(d*x+c)**2)/cos(d*x+c)**( 3/2),x)
Output:
Timed out
\[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{2}}{\cos \left (d x + c\right )^{\frac {3}{2}}} \,d x } \] Input:
integrate((a+b*cos(d*x+c))^2*(B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2 ),x, algorithm="maxima")
Output:
integrate((C*cos(d*x + c)^2 + B*cos(d*x + c))*(b*cos(d*x + c) + a)^2/cos(d *x + c)^(3/2), x)
\[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{2}}{\cos \left (d x + c\right )^{\frac {3}{2}}} \,d x } \] Input:
integrate((a+b*cos(d*x+c))^2*(B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2 ),x, algorithm="giac")
Output:
integrate((C*cos(d*x + c)^2 + B*cos(d*x + c))*(b*cos(d*x + c) + a)^2/cos(d *x + c)^(3/2), x)
Time = 1.14 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.26 \[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\frac {B\,b^2\,\left (\frac {2\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )}{3}+\frac {2\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{3}\right )}{d}+\frac {2\,B\,a^2\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,C\,a^2\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,C\,a\,b\,\left (\frac {2\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )}{3}+\frac {2\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{3}\right )}{d}+\frac {4\,B\,a\,b\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}-\frac {2\,C\,b^2\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \] Input:
int(((B*cos(c + d*x) + C*cos(c + d*x)^2)*(a + b*cos(c + d*x))^2)/cos(c + d *x)^(3/2),x)
Output:
(B*b^2*((2*cos(c + d*x)^(1/2)*sin(c + d*x))/3 + (2*ellipticF(c/2 + (d*x)/2 , 2))/3))/d + (2*B*a^2*ellipticF(c/2 + (d*x)/2, 2))/d + (2*C*a^2*ellipticE (c/2 + (d*x)/2, 2))/d + (2*C*a*b*((2*cos(c + d*x)^(1/2)*sin(c + d*x))/3 + (2*ellipticF(c/2 + (d*x)/2, 2))/3))/d + (4*B*a*b*ellipticE(c/2 + (d*x)/2, 2))/d - (2*C*b^2*cos(c + d*x)^(7/2)*sin(c + d*x)*hypergeom([1/2, 7/4], 11/ 4, cos(c + d*x)^2))/(7*d*(sin(c + d*x)^2)^(1/2))
\[ \int \frac {(a+b \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\cos ^{\frac {3}{2}}(c+d x)} \, dx=\left (\int \frac {\sqrt {\cos \left (d x +c \right )}}{\cos \left (d x +c \right )}d x \right ) a^{2} b +\left (\int \sqrt {\cos \left (d x +c \right )}d x \right ) a^{2} c +2 \left (\int \sqrt {\cos \left (d x +c \right )}d x \right ) a \,b^{2}+2 \left (\int \sqrt {\cos \left (d x +c \right )}\, \cos \left (d x +c \right )d x \right ) a b c +\left (\int \sqrt {\cos \left (d x +c \right )}\, \cos \left (d x +c \right )d x \right ) b^{3}+\left (\int \sqrt {\cos \left (d x +c \right )}\, \cos \left (d x +c \right )^{2}d x \right ) b^{2} c \] Input:
int((a+b*cos(d*x+c))^2*(B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2),x)
Output:
int(sqrt(cos(c + d*x))/cos(c + d*x),x)*a**2*b + int(sqrt(cos(c + d*x)),x)* a**2*c + 2*int(sqrt(cos(c + d*x)),x)*a*b**2 + 2*int(sqrt(cos(c + d*x))*cos (c + d*x),x)*a*b*c + int(sqrt(cos(c + d*x))*cos(c + d*x),x)*b**3 + int(sqr t(cos(c + d*x))*cos(c + d*x)**2,x)*b**2*c