Integrand size = 33, antiderivative size = 327 \[ \int (a+b \cos (e+f x))^2 (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=-\frac {c^4 \left (b^2 B (2-m)+2 a A b (3-m)+a^2 B (3-m)\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4-m}{2},\frac {6-m}{2},\cos ^2(e+f x)\right ) (c \sec (e+f x))^{-4+m} \sin (e+f x)}{f (2-m) (4-m) \sqrt {\sin ^2(e+f x)}}-\frac {c^3 \left (A b^2 (1-m)+2 a b B (1-m)+a^2 A (2-m)\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-m}{2},\frac {5-m}{2},\cos ^2(e+f x)\right ) (c \sec (e+f x))^{-3+m} \sin (e+f x)}{f (1-m) (3-m) \sqrt {\sin ^2(e+f x)}}-\frac {a c^3 (a B (1-m)-A b m) (c \sec (e+f x))^{-3+m} \tan (e+f x)}{f (1-m) (2-m)}-\frac {a A c^3 (c \sec (e+f x))^{-3+m} (b+a \sec (e+f x)) \tan (e+f x)}{f (1-m)} \] Output:
-c^4*(b^2*B*(2-m)+2*a*A*b*(3-m)+a^2*B*(3-m))*hypergeom([1/2, 2-1/2*m],[3-1 /2*m],cos(f*x+e)^2)*(c*sec(f*x+e))^(-4+m)*sin(f*x+e)/f/(2-m)/(4-m)/(sin(f* x+e)^2)^(1/2)-c^3*(A*b^2*(1-m)+2*a*b*B*(1-m)+a^2*A*(2-m))*hypergeom([1/2, 3/2-1/2*m],[5/2-1/2*m],cos(f*x+e)^2)*(c*sec(f*x+e))^(-3+m)*sin(f*x+e)/f/(1 -m)/(3-m)/(sin(f*x+e)^2)^(1/2)-a*c^3*(a*B*(1-m)-A*b*m)*(c*sec(f*x+e))^(-3+ m)*tan(f*x+e)/f/(1-m)/(2-m)-a*A*c^3*(c*sec(f*x+e))^(-3+m)*(b+a*sec(f*x+e)) *tan(f*x+e)/f/(1-m)
Time = 1.00 (sec) , antiderivative size = 205, normalized size of antiderivative = 0.63 \[ \int (a+b \cos (e+f x))^2 (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\frac {\cot (e+f x) \left (\frac {b^2 B \cos ^3(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-3+m),\frac {1}{2} (-1+m),\sec ^2(e+f x)\right )}{-3+m}+\frac {b (A b+2 a B) \cos ^2(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-2+m),\frac {m}{2},\sec ^2(e+f x)\right )}{-2+m}+a \left (\frac {(2 A b+a B) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-1+m),\frac {1+m}{2},\sec ^2(e+f x)\right )}{-1+m}+\frac {a A \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m}{2},\frac {2+m}{2},\sec ^2(e+f x)\right )}{m}\right )\right ) (c \sec (e+f x))^m \sqrt {-\tan ^2(e+f x)}}{f} \] Input:
Integrate[(a + b*Cos[e + f*x])^2*(A + B*Cos[e + f*x])*(c*Sec[e + f*x])^m,x ]
Output:
(Cot[e + f*x]*((b^2*B*Cos[e + f*x]^3*Hypergeometric2F1[1/2, (-3 + m)/2, (- 1 + m)/2, Sec[e + f*x]^2])/(-3 + m) + (b*(A*b + 2*a*B)*Cos[e + f*x]^2*Hype rgeometric2F1[1/2, (-2 + m)/2, m/2, Sec[e + f*x]^2])/(-2 + m) + a*(((2*A*b + a*B)*Cos[e + f*x]*Hypergeometric2F1[1/2, (-1 + m)/2, (1 + m)/2, Sec[e + f*x]^2])/(-1 + m) + (a*A*Hypergeometric2F1[1/2, m/2, (2 + m)/2, Sec[e + f *x]^2])/m))*(c*Sec[e + f*x])^m*Sqrt[-Tan[e + f*x]^2])/f
Time = 1.82 (sec) , antiderivative size = 315, normalized size of antiderivative = 0.96, number of steps used = 16, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.485, Rules used = {3042, 3439, 3042, 4514, 25, 3042, 4535, 3042, 4259, 3042, 3122, 4534, 3042, 4259, 3042, 3122}
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 (a+b \cos (e+f x))^2 (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \sin \left (e+f x+\frac {\pi }{2}\right )\right )^2 \left (A+B \sin \left (e+f x+\frac {\pi }{2}\right )\right ) \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^mdx\) |
\(\Big \downarrow \) 3439 |
\(\displaystyle c^3 \int (c \sec (e+f x))^{m-3} (b+a \sec (e+f x))^2 (B+A \sec (e+f x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle c^3 \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{m-3} \left (b+a \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2 \left (B+A \csc \left (e+f x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 4514 |
\(\displaystyle c^3 \left (-\frac {\int -(c \sec (e+f x))^{m-3} \left (a (a B (1-m)-A b m) \sec ^2(e+f x)+\left (A (2-m) a^2+b (A b+2 a B) (1-m)\right ) \sec (e+f x)+b (b B (1-m)+a A (3-m))\right )dx}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle c^3 \left (\frac {\int (c \sec (e+f x))^{m-3} \left (a (a B (1-m)-A b m) \sec ^2(e+f x)+\left (A (2-m) a^2+b (A b+2 a B) (1-m)\right ) \sec (e+f x)+b (b B (1-m)+a A (3-m))\right )dx}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle c^3 \left (\frac {\int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{m-3} \left (a (a B (1-m)-A b m) \csc \left (e+f x+\frac {\pi }{2}\right )^2+\left (A (2-m) a^2+b (A b+2 a B) (1-m)\right ) \csc \left (e+f x+\frac {\pi }{2}\right )+b (b B (1-m)+a A (3-m))\right )dx}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle c^3 \left (\frac {\frac {\left (a^2 A (2-m)+b (1-m) (2 a B+A b)\right ) \int (c \sec (e+f x))^{m-2}dx}{c}+\int (c \sec (e+f x))^{m-3} \left (a (a B (1-m)-A b m) \sec ^2(e+f x)+b (b B (1-m)+a A (3-m))\right )dx}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle c^3 \left (\frac {\frac {\left (a^2 A (2-m)+b (1-m) (2 a B+A b)\right ) \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{m-2}dx}{c}+\int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{m-3} \left (a (a B (1-m)-A b m) \csc \left (e+f x+\frac {\pi }{2}\right )^2+b (b B (1-m)+a A (3-m))\right )dx}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 4259 |
\(\displaystyle c^3 \left (\frac {\frac {\left (a^2 A (2-m)+b (1-m) (2 a B+A b)\right ) \left (\frac {\cos (e+f x)}{c}\right )^m (c \sec (e+f x))^m \int \left (\frac {\cos (e+f x)}{c}\right )^{2-m}dx}{c}+\int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{m-3} \left (a (a B (1-m)-A b m) \csc \left (e+f x+\frac {\pi }{2}\right )^2+b (b B (1-m)+a A (3-m))\right )dx}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle c^3 \left (\frac {\frac {\left (a^2 A (2-m)+b (1-m) (2 a B+A b)\right ) \left (\frac {\cos (e+f x)}{c}\right )^m (c \sec (e+f x))^m \int \left (\frac {\sin \left (e+f x+\frac {\pi }{2}\right )}{c}\right )^{2-m}dx}{c}+\int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{m-3} \left (a (a B (1-m)-A b m) \csc \left (e+f x+\frac {\pi }{2}\right )^2+b (b B (1-m)+a A (3-m))\right )dx}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle c^3 \left (\frac {\int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{m-3} \left (a (a B (1-m)-A b m) \csc \left (e+f x+\frac {\pi }{2}\right )^2+b (b B (1-m)+a A (3-m))\right )dx-\frac {\sin (e+f x) \left (a^2 A (2-m)+b (1-m) (2 a B+A b)\right ) (c \sec (e+f x))^{m-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-m}{2},\frac {5-m}{2},\cos ^2(e+f x)\right )}{f (3-m) \sqrt {\sin ^2(e+f x)}}}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 4534 |
\(\displaystyle c^3 \left (\frac {\frac {(1-m) \left (a^2 B (3-m)+2 a A b (3-m)+b^2 B (2-m)\right ) \int (c \sec (e+f x))^{m-3}dx}{2-m}-\frac {\sin (e+f x) \left (a^2 A (2-m)+b (1-m) (2 a B+A b)\right ) (c \sec (e+f x))^{m-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-m}{2},\frac {5-m}{2},\cos ^2(e+f x)\right )}{f (3-m) \sqrt {\sin ^2(e+f x)}}-\frac {a \tan (e+f x) (a B (1-m)-A b m) (c \sec (e+f x))^{m-3}}{f (2-m)}}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle c^3 \left (\frac {\frac {(1-m) \left (a^2 B (3-m)+2 a A b (3-m)+b^2 B (2-m)\right ) \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{m-3}dx}{2-m}-\frac {\sin (e+f x) \left (a^2 A (2-m)+b (1-m) (2 a B+A b)\right ) (c \sec (e+f x))^{m-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-m}{2},\frac {5-m}{2},\cos ^2(e+f x)\right )}{f (3-m) \sqrt {\sin ^2(e+f x)}}-\frac {a \tan (e+f x) (a B (1-m)-A b m) (c \sec (e+f x))^{m-3}}{f (2-m)}}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 4259 |
\(\displaystyle c^3 \left (\frac {\frac {(1-m) \left (a^2 B (3-m)+2 a A b (3-m)+b^2 B (2-m)\right ) \left (\frac {\cos (e+f x)}{c}\right )^m (c \sec (e+f x))^m \int \left (\frac {\cos (e+f x)}{c}\right )^{3-m}dx}{2-m}-\frac {\sin (e+f x) \left (a^2 A (2-m)+b (1-m) (2 a B+A b)\right ) (c \sec (e+f x))^{m-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-m}{2},\frac {5-m}{2},\cos ^2(e+f x)\right )}{f (3-m) \sqrt {\sin ^2(e+f x)}}-\frac {a \tan (e+f x) (a B (1-m)-A b m) (c \sec (e+f x))^{m-3}}{f (2-m)}}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle c^3 \left (\frac {\frac {(1-m) \left (a^2 B (3-m)+2 a A b (3-m)+b^2 B (2-m)\right ) \left (\frac {\cos (e+f x)}{c}\right )^m (c \sec (e+f x))^m \int \left (\frac {\sin \left (e+f x+\frac {\pi }{2}\right )}{c}\right )^{3-m}dx}{2-m}-\frac {\sin (e+f x) \left (a^2 A (2-m)+b (1-m) (2 a B+A b)\right ) (c \sec (e+f x))^{m-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-m}{2},\frac {5-m}{2},\cos ^2(e+f x)\right )}{f (3-m) \sqrt {\sin ^2(e+f x)}}-\frac {a \tan (e+f x) (a B (1-m)-A b m) (c \sec (e+f x))^{m-3}}{f (2-m)}}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle c^3 \left (\frac {-\frac {c (1-m) \sin (e+f x) \left (a^2 B (3-m)+2 a A b (3-m)+b^2 B (2-m)\right ) (c \sec (e+f x))^{m-4} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4-m}{2},\frac {6-m}{2},\cos ^2(e+f x)\right )}{f (2-m) (4-m) \sqrt {\sin ^2(e+f x)}}-\frac {\sin (e+f x) \left (a^2 A (2-m)+b (1-m) (2 a B+A b)\right ) (c \sec (e+f x))^{m-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-m}{2},\frac {5-m}{2},\cos ^2(e+f x)\right )}{f (3-m) \sqrt {\sin ^2(e+f x)}}-\frac {a \tan (e+f x) (a B (1-m)-A b m) (c \sec (e+f x))^{m-3}}{f (2-m)}}{1-m}-\frac {a A \tan (e+f x) (a \sec (e+f x)+b) (c \sec (e+f x))^{m-3}}{f (1-m)}\right )\) |
Input:
Int[(a + b*Cos[e + f*x])^2*(A + B*Cos[e + f*x])*(c*Sec[e + f*x])^m,x]
Output:
c^3*(-((a*A*(c*Sec[e + f*x])^(-3 + m)*(b + a*Sec[e + f*x])*Tan[e + f*x])/( f*(1 - m))) + (-((c*(b^2*B*(2 - m) + 2*a*A*b*(3 - m) + a^2*B*(3 - m))*(1 - m)*Hypergeometric2F1[1/2, (4 - m)/2, (6 - m)/2, Cos[e + f*x]^2]*(c*Sec[e + f*x])^(-4 + m)*Sin[e + f*x])/(f*(2 - m)*(4 - m)*Sqrt[Sin[e + f*x]^2])) - ((b*(A*b + 2*a*B)*(1 - m) + a^2*A*(2 - m))*Hypergeometric2F1[1/2, (3 - m) /2, (5 - m)/2, Cos[e + f*x]^2]*(c*Sec[e + f*x])^(-3 + m)*Sin[e + f*x])/(f* (3 - m)*Sqrt[Sin[e + f*x]^2]) - (a*(a*B*(1 - m) - A*b*m)*(c*Sec[e + f*x])^ (-3 + m)*Tan[e + f*x])/(f*(2 - m)))/(1 - m))
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*((a_.) + (b_.)*sin[(e_.) + (f_.)* (x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Sim p[g^(m + n) Int[(g*Csc[e + f*x])^(p - m - n)*(b + a*Csc[e + f*x])^m*(d + c*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ[b*c - a*d, 0] && !IntegerQ[p] && IntegerQ[m] && IntegerQ[n]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] )^(n - 1)*((Sin[c + d*x]/b)^(n - 1) Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[n]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-b)*B* Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*(m + n))), x] + Simp[1/(m + n) Int[(a + b*Csc[e + f*x])^(m - 2)*(d*Csc[e + f*x])^n* Simp[a^2*A*(m + n) + a*b*B*n + (a*(2*A*b + a*B)*(m + n) + b^2*B*(m + n - 1) )*Csc[e + f*x] + b*(A*b*(m + n) + a*B*(2*m + n - 1))*Csc[e + f*x]^2, x], x] , x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] && !(IGtQ[n, 1] && !IntegerQ[m])
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) )), x] + Simp[(C*m + A*(m + 1))/(m + 1) Int[(b*Csc[e + f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] && !LeQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
\[\int \left (a +b \cos \left (f x +e \right )\right )^{2} \left (A +B \cos \left (f x +e \right )\right ) \left (c \sec \left (f x +e \right )\right )^{m}d x\]
Input:
int((a+b*cos(f*x+e))^2*(A+B*cos(f*x+e))*(c*sec(f*x+e))^m,x)
Output:
int((a+b*cos(f*x+e))^2*(A+B*cos(f*x+e))*(c*sec(f*x+e))^m,x)
\[ \int (a+b \cos (e+f x))^2 (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )}^{2} \left (c \sec \left (f x + e\right )\right )^{m} \,d x } \] Input:
integrate((a+b*cos(f*x+e))^2*(A+B*cos(f*x+e))*(c*sec(f*x+e))^m,x, algorith m="fricas")
Output:
integral((B*b^2*cos(f*x + e)^3 + A*a^2 + (2*B*a*b + A*b^2)*cos(f*x + e)^2 + (B*a^2 + 2*A*a*b)*cos(f*x + e))*(c*sec(f*x + e))^m, x)
\[ \int (a+b \cos (e+f x))^2 (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\int \left (c \sec {\left (e + f x \right )}\right )^{m} \left (A + B \cos {\left (e + f x \right )}\right ) \left (a + b \cos {\left (e + f x \right )}\right )^{2}\, dx \] Input:
integrate((a+b*cos(f*x+e))**2*(A+B*cos(f*x+e))*(c*sec(f*x+e))**m,x)
Output:
Integral((c*sec(e + f*x))**m*(A + B*cos(e + f*x))*(a + b*cos(e + f*x))**2, x)
\[ \int (a+b \cos (e+f x))^2 (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )}^{2} \left (c \sec \left (f x + e\right )\right )^{m} \,d x } \] Input:
integrate((a+b*cos(f*x+e))^2*(A+B*cos(f*x+e))*(c*sec(f*x+e))^m,x, algorith m="maxima")
Output:
integrate((B*cos(f*x + e) + A)*(b*cos(f*x + e) + a)^2*(c*sec(f*x + e))^m, x)
\[ \int (a+b \cos (e+f x))^2 (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )}^{2} \left (c \sec \left (f x + e\right )\right )^{m} \,d x } \] Input:
integrate((a+b*cos(f*x+e))^2*(A+B*cos(f*x+e))*(c*sec(f*x+e))^m,x, algorith m="giac")
Output:
integrate((B*cos(f*x + e) + A)*(b*cos(f*x + e) + a)^2*(c*sec(f*x + e))^m, x)
Timed out. \[ \int (a+b \cos (e+f x))^2 (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\int {\left (\frac {c}{\cos \left (e+f\,x\right )}\right )}^m\,\left (A+B\,\cos \left (e+f\,x\right )\right )\,{\left (a+b\,\cos \left (e+f\,x\right )\right )}^2 \,d x \] Input:
int((c/cos(e + f*x))^m*(A + B*cos(e + f*x))*(a + b*cos(e + f*x))^2,x)
Output:
int((c/cos(e + f*x))^m*(A + B*cos(e + f*x))*(a + b*cos(e + f*x))^2, x)
\[ \int (a+b \cos (e+f x))^2 (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=c^{m} \left (\left (\int \sec \left (f x +e \right )^{m}d x \right ) a^{3}+3 \left (\int \sec \left (f x +e \right )^{m} \cos \left (f x +e \right )d x \right ) a^{2} b +\left (\int \sec \left (f x +e \right )^{m} \cos \left (f x +e \right )^{3}d x \right ) b^{3}+3 \left (\int \sec \left (f x +e \right )^{m} \cos \left (f x +e \right )^{2}d x \right ) a \,b^{2}\right ) \] Input:
int((a+b*cos(f*x+e))^2*(A+B*cos(f*x+e))*(c*sec(f*x+e))^m,x)
Output:
c**m*(int(sec(e + f*x)**m,x)*a**3 + 3*int(sec(e + f*x)**m*cos(e + f*x),x)* a**2*b + int(sec(e + f*x)**m*cos(e + f*x)**3,x)*b**3 + 3*int(sec(e + f*x)* *m*cos(e + f*x)**2,x)*a*b**2)