Integrand size = 33, antiderivative size = 553 \[ \int \cos ^2(e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^n \, dx=\frac {\left (2 a^2 d^2 (3+n)-4 a b c d (4+n)+b^2 \left (6 c^2-d^2 (3+n)\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^{1+n}}{d^3 f (2+n) (3+n) (4+n)}-\frac {b (3 b c-2 a d) \cos (e+f x) \sin (e+f x) (c+d \sin (e+f x))^{1+n}}{d^2 f (3+n) (4+n)}+\frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{1+n}}{d f (4+n)}-\frac {\sqrt {2} \left (a^2 c d^2 \left (12+7 n+n^2\right )-2 a b d (4+n) \left (2 c^2-d^2 (2+n)\right )+b^2 c \left (6 c^2-d^2 \left (3-n-n^2\right )\right )\right ) \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-1-n,\frac {3}{2},\frac {1}{2} (1-\sin (e+f x)),\frac {d (1-\sin (e+f x))}{c+d}\right ) \cos (e+f x) (c+d \sin (e+f x))^{1+n} \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-1-n}}{d^4 f (2+n) (3+n) (4+n) \sqrt {1+\sin (e+f x)}}-\frac {\sqrt {2} \left (c^2-d^2\right ) \left (4 a b c d (4+n)-a^2 d^2 \left (12+7 n+n^2\right )-b^2 \left (6 c^2+d^2 \left (3+4 n+n^2\right )\right )\right ) \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n,\frac {3}{2},\frac {1}{2} (1-\sin (e+f x)),\frac {d (1-\sin (e+f x))}{c+d}\right ) \cos (e+f x) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n}}{d^4 f (2+n) (3+n) (4+n) \sqrt {1+\sin (e+f x)}} \] Output:
(2*a^2*d^2*(3+n)-4*a*b*c*d*(4+n)+b^2*(6*c^2-d^2*(3+n)))*cos(f*x+e)*(c+d*si n(f*x+e))^(1+n)/d^3/f/(2+n)/(3+n)/(4+n)-b*(-2*a*d+3*b*c)*cos(f*x+e)*sin(f* x+e)*(c+d*sin(f*x+e))^(1+n)/d^2/f/(3+n)/(4+n)+cos(f*x+e)*(a+b*sin(f*x+e))^ 2*(c+d*sin(f*x+e))^(1+n)/d/f/(4+n)-2^(1/2)*(a^2*c*d^2*(n^2+7*n+12)-2*a*b*d *(4+n)*(2*c^2-d^2*(2+n))+b^2*c*(6*c^2-d^2*(-n^2-n+3)))*AppellF1(1/2,-1-n,1 /2,3/2,d*(1-sin(f*x+e))/(c+d),1/2-1/2*sin(f*x+e))*cos(f*x+e)*(c+d*sin(f*x+ e))^(1+n)*((c+d*sin(f*x+e))/(c+d))^(-1-n)/d^4/f/(2+n)/(3+n)/(4+n)/(1+sin(f *x+e))^(1/2)-2^(1/2)*(c^2-d^2)*(4*a*b*c*d*(4+n)-a^2*d^2*(n^2+7*n+12)-b^2*( 6*c^2+d^2*(n^2+4*n+3)))*AppellF1(1/2,-n,1/2,3/2,d*(1-sin(f*x+e))/(c+d),1/2 -1/2*sin(f*x+e))*cos(f*x+e)*(c+d*sin(f*x+e))^n/d^4/f/(2+n)/(3+n)/(4+n)/(1+ sin(f*x+e))^(1/2)/(((c+d*sin(f*x+e))/(c+d))^n)
\[ \int \cos ^2(e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^n \, dx=\int \cos ^2(e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^n \, dx \] Input:
Integrate[Cos[e + f*x]^2*(a + b*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^n,x]
Output:
Integrate[Cos[e + f*x]^2*(a + b*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^n, x]
Time = 2.13 (sec) , antiderivative size = 536, normalized size of antiderivative = 0.97, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.485, Rules used = {3042, 3401, 3042, 3529, 25, 3042, 3512, 25, 3042, 3502, 3042, 3235, 3042, 3144, 156, 155}
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(e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (e+f x)^2 (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^ndx\) |
\(\Big \downarrow \) 3401 |
\(\displaystyle \int \left (1-\sin ^2(e+f x)\right ) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^ndx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (1-\sin (e+f x)^2\right ) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^ndx\) |
\(\Big \downarrow \) 3529 |
\(\displaystyle \frac {\int -\left ((a+b \sin (e+f x)) (c+d \sin (e+f x))^n \left (-\left ((3 b c-2 a d) \sin ^2(e+f x)\right )-(a c+b d) \sin (e+f x)+2 b c-3 a d\right )\right )dx}{d (n+4)}+\frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\int (a+b \sin (e+f x)) (c+d \sin (e+f x))^n \left (-\left ((3 b c-2 a d) \sin ^2(e+f x)\right )-(a c+b d) \sin (e+f x)+2 b c-3 a d\right )dx}{d (n+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\int (a+b \sin (e+f x)) (c+d \sin (e+f x))^n \left (-\left ((3 b c-2 a d) \sin (e+f x)^2\right )-(a c+b d) \sin (e+f x)+2 b c-3 a d\right )dx}{d (n+4)}\) |
\(\Big \downarrow \) 3512 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\frac {\int -(c+d \sin (e+f x))^n \left (3 b^2 c^2-2 a b d (n+4) c-\left (2 b c (3 b c-2 a d)-d \left (-2 d a^2+4 b c a+b^2 d\right ) (n+3)\right ) \sin ^2(e+f x)+3 a^2 d^2 (n+3)+d \left (c (n+3) a^2+2 b d (n+4) a+b^2 c n\right ) \sin (e+f x)\right )dx}{d (n+3)}+\frac {b (3 b c-2 a d) \sin (e+f x) \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (n+3)}}{d (n+4)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\frac {b (3 b c-2 a d) \sin (e+f x) \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (n+3)}-\frac {\int (c+d \sin (e+f x))^n \left (3 b^2 c^2-2 a b d (n+4) c-\left (2 b c (3 b c-2 a d)-d \left (-2 d a^2+4 b c a+b^2 d\right ) (n+3)\right ) \sin ^2(e+f x)+3 a^2 d^2 (n+3)+d \left (c (n+3) a^2+2 b d (n+4) a+b^2 c n\right ) \sin (e+f x)\right )dx}{d (n+3)}}{d (n+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\frac {b (3 b c-2 a d) \sin (e+f x) \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (n+3)}-\frac {\int (c+d \sin (e+f x))^n \left (3 b^2 c^2-2 a b d (n+4) c-\left (2 b c (3 b c-2 a d)-d \left (-2 d a^2+4 b c a+b^2 d\right ) (n+3)\right ) \sin (e+f x)^2+3 a^2 d^2 (n+3)+d \left (c (n+3) a^2+2 b d (n+4) a+b^2 c n\right ) \sin (e+f x)\right )dx}{d (n+3)}}{d (n+4)}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\frac {b (3 b c-2 a d) \sin (e+f x) \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (n+3)}-\frac {\frac {\int (c+d \sin (e+f x))^n \left (d \left (-\left (\left (3 c^2 n-d^2 \left (n^2+4 n+3\right )\right ) b^2\right )+2 a c d n (n+4) b+a^2 d^2 \left (n^2+7 n+12\right )\right )+\left (\left (6 c^3-c d^2 \left (-n^2-n+3\right )\right ) b^2-2 a d (n+4) \left (2 c^2-d^2 (n+2)\right ) b+a^2 c d^2 \left (n^2+7 n+12\right )\right ) \sin (e+f x)\right )dx}{d (n+2)}+\frac {\cos (e+f x) \left (2 b c (3 b c-2 a d)-d (n+3) \left (-2 a^2 d+4 a b c+b^2 d\right )\right ) (c+d \sin (e+f x))^{n+1}}{d f (n+2)}}{d (n+3)}}{d (n+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\frac {b (3 b c-2 a d) \sin (e+f x) \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (n+3)}-\frac {\frac {\int (c+d \sin (e+f x))^n \left (d \left (-\left (\left (3 c^2 n-d^2 \left (n^2+4 n+3\right )\right ) b^2\right )+2 a c d n (n+4) b+a^2 d^2 \left (n^2+7 n+12\right )\right )+\left (\left (6 c^3-c d^2 \left (-n^2-n+3\right )\right ) b^2-2 a d (n+4) \left (2 c^2-d^2 (n+2)\right ) b+a^2 c d^2 \left (n^2+7 n+12\right )\right ) \sin (e+f x)\right )dx}{d (n+2)}+\frac {\cos (e+f x) \left (2 b c (3 b c-2 a d)-d (n+3) \left (-2 a^2 d+4 a b c+b^2 d\right )\right ) (c+d \sin (e+f x))^{n+1}}{d f (n+2)}}{d (n+3)}}{d (n+4)}\) |
\(\Big \downarrow \) 3235 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\frac {b (3 b c-2 a d) \sin (e+f x) \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (n+3)}-\frac {\frac {\frac {\left (c^2-d^2\right ) \left (-a^2 d^2 \left (n^2+7 n+12\right )+4 a b c d (n+4)-\left (b^2 \left (6 c^2+d^2 \left (n^2+4 n+3\right )\right )\right )\right ) \int (c+d \sin (e+f x))^ndx}{d}+\frac {\left (a^2 c d^2 \left (n^2+7 n+12\right )-2 a b d (n+4) \left (2 c^2-d^2 (n+2)\right )+b^2 \left (6 c^3-c d^2 \left (-n^2-n+3\right )\right )\right ) \int (c+d \sin (e+f x))^{n+1}dx}{d}}{d (n+2)}+\frac {\cos (e+f x) \left (2 b c (3 b c-2 a d)-d (n+3) \left (-2 a^2 d+4 a b c+b^2 d\right )\right ) (c+d \sin (e+f x))^{n+1}}{d f (n+2)}}{d (n+3)}}{d (n+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\frac {b (3 b c-2 a d) \sin (e+f x) \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (n+3)}-\frac {\frac {\frac {\left (c^2-d^2\right ) \left (-a^2 d^2 \left (n^2+7 n+12\right )+4 a b c d (n+4)-\left (b^2 \left (6 c^2+d^2 \left (n^2+4 n+3\right )\right )\right )\right ) \int (c+d \sin (e+f x))^ndx}{d}+\frac {\left (a^2 c d^2 \left (n^2+7 n+12\right )-2 a b d (n+4) \left (2 c^2-d^2 (n+2)\right )+b^2 \left (6 c^3-c d^2 \left (-n^2-n+3\right )\right )\right ) \int (c+d \sin (e+f x))^{n+1}dx}{d}}{d (n+2)}+\frac {\cos (e+f x) \left (2 b c (3 b c-2 a d)-d (n+3) \left (-2 a^2 d+4 a b c+b^2 d\right )\right ) (c+d \sin (e+f x))^{n+1}}{d f (n+2)}}{d (n+3)}}{d (n+4)}\) |
\(\Big \downarrow \) 3144 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\frac {b (3 b c-2 a d) \sin (e+f x) \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (n+3)}-\frac {\frac {\frac {\left (c^2-d^2\right ) \cos (e+f x) \left (-a^2 d^2 \left (n^2+7 n+12\right )+4 a b c d (n+4)-\left (b^2 \left (6 c^2+d^2 \left (n^2+4 n+3\right )\right )\right )\right ) \int \frac {(c+d \sin (e+f x))^n}{\sqrt {1-\sin (e+f x)} \sqrt {\sin (e+f x)+1}}d\sin (e+f x)}{d f \sqrt {1-\sin (e+f x)} \sqrt {\sin (e+f x)+1}}+\frac {\cos (e+f x) \left (a^2 c d^2 \left (n^2+7 n+12\right )-2 a b d (n+4) \left (2 c^2-d^2 (n+2)\right )+b^2 \left (6 c^3-c d^2 \left (-n^2-n+3\right )\right )\right ) \int \frac {(c+d \sin (e+f x))^{n+1}}{\sqrt {1-\sin (e+f x)} \sqrt {\sin (e+f x)+1}}d\sin (e+f x)}{d f \sqrt {1-\sin (e+f x)} \sqrt {\sin (e+f x)+1}}}{d (n+2)}+\frac {\cos (e+f x) \left (2 b c (3 b c-2 a d)-d (n+3) \left (-2 a^2 d+4 a b c+b^2 d\right )\right ) (c+d \sin (e+f x))^{n+1}}{d f (n+2)}}{d (n+3)}}{d (n+4)}\) |
\(\Big \downarrow \) 156 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\frac {b (3 b c-2 a d) \sin (e+f x) \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (n+3)}-\frac {\frac {\frac {\left (c^2-d^2\right ) \cos (e+f x) \left (-a^2 d^2 \left (n^2+7 n+12\right )+4 a b c d (n+4)-\left (b^2 \left (6 c^2+d^2 \left (n^2+4 n+3\right )\right )\right )\right ) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n} \int \frac {\left (\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}\right )^n}{\sqrt {1-\sin (e+f x)} \sqrt {\sin (e+f x)+1}}d\sin (e+f x)}{d f \sqrt {1-\sin (e+f x)} \sqrt {\sin (e+f x)+1}}+\frac {(c+d) \cos (e+f x) \left (a^2 c d^2 \left (n^2+7 n+12\right )-2 a b d (n+4) \left (2 c^2-d^2 (n+2)\right )+b^2 \left (6 c^3-c d^2 \left (-n^2-n+3\right )\right )\right ) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n} \int \frac {\left (\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}\right )^{n+1}}{\sqrt {1-\sin (e+f x)} \sqrt {\sin (e+f x)+1}}d\sin (e+f x)}{d f \sqrt {1-\sin (e+f x)} \sqrt {\sin (e+f x)+1}}}{d (n+2)}+\frac {\cos (e+f x) \left (2 b c (3 b c-2 a d)-d (n+3) \left (-2 a^2 d+4 a b c+b^2 d\right )\right ) (c+d \sin (e+f x))^{n+1}}{d f (n+2)}}{d (n+3)}}{d (n+4)}\) |
\(\Big \downarrow \) 155 |
\(\displaystyle \frac {\cos (e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^{n+1}}{d f (n+4)}-\frac {\frac {b (3 b c-2 a d) \sin (e+f x) \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (n+3)}-\frac {\frac {-\frac {\sqrt {2} \left (c^2-d^2\right ) \cos (e+f x) \left (-a^2 d^2 \left (n^2+7 n+12\right )+4 a b c d (n+4)-\left (b^2 \left (6 c^2+d^2 \left (n^2+4 n+3\right )\right )\right )\right ) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n,\frac {3}{2},\frac {1}{2} (1-\sin (e+f x)),\frac {d (1-\sin (e+f x))}{c+d}\right )}{d f \sqrt {\sin (e+f x)+1}}-\frac {\sqrt {2} (c+d) \cos (e+f x) \left (a^2 c d^2 \left (n^2+7 n+12\right )-2 a b d (n+4) \left (2 c^2-d^2 (n+2)\right )+b^2 \left (6 c^3-c d^2 \left (-n^2-n+3\right )\right )\right ) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-n-1,\frac {3}{2},\frac {1}{2} (1-\sin (e+f x)),\frac {d (1-\sin (e+f x))}{c+d}\right )}{d f \sqrt {\sin (e+f x)+1}}}{d (n+2)}+\frac {\cos (e+f x) \left (2 b c (3 b c-2 a d)-d (n+3) \left (-2 a^2 d+4 a b c+b^2 d\right )\right ) (c+d \sin (e+f x))^{n+1}}{d f (n+2)}}{d (n+3)}}{d (n+4)}\) |
Input:
Int[Cos[e + f*x]^2*(a + b*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^n,x]
Output:
(Cos[e + f*x]*(a + b*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^(1 + n))/(d*f*(4 + n)) - ((b*(3*b*c - 2*a*d)*Cos[e + f*x]*Sin[e + f*x]*(c + d*Sin[e + f*x] )^(1 + n))/(d*f*(3 + n)) - (((2*b*c*(3*b*c - 2*a*d) - d*(4*a*b*c - 2*a^2*d + b^2*d)*(3 + n))*Cos[e + f*x]*(c + d*Sin[e + f*x])^(1 + n))/(d*f*(2 + n) ) + (-((Sqrt[2]*(c + d)*(a^2*c*d^2*(12 + 7*n + n^2) - 2*a*b*d*(4 + n)*(2*c ^2 - d^2*(2 + n)) + b^2*(6*c^3 - c*d^2*(3 - n - n^2)))*AppellF1[1/2, 1/2, -1 - n, 3/2, (1 - Sin[e + f*x])/2, (d*(1 - Sin[e + f*x]))/(c + d)]*Cos[e + f*x]*(c + d*Sin[e + f*x])^n)/(d*f*Sqrt[1 + Sin[e + f*x]]*((c + d*Sin[e + f*x])/(c + d))^n)) - (Sqrt[2]*(c^2 - d^2)*(4*a*b*c*d*(4 + n) - a^2*d^2*(12 + 7*n + n^2) - b^2*(6*c^2 + d^2*(3 + 4*n + n^2)))*AppellF1[1/2, 1/2, -n, 3/2, (1 - Sin[e + f*x])/2, (d*(1 - Sin[e + f*x]))/(c + d)]*Cos[e + f*x]*(c + d*Sin[e + f*x])^n)/(d*f*Sqrt[1 + Sin[e + f*x]]*((c + d*Sin[e + f*x])/(c + d))^n))/(d*(2 + n)))/(d*(3 + n)))/(d*(4 + n))
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) ^(p_), x_] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*Simplify[b/(b*c - a*d)]^n* Simplify[b/(b*e - a*f)]^p))*AppellF1[m + 1, -n, -p, m + 2, (-d)*((a + b*x)/ (b*c - a*d)), (-f)*((a + b*x)/(b*e - a*f))], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && !IntegerQ[m] && !IntegerQ[n] && !IntegerQ[p] && GtQ[Sim plify[b/(b*c - a*d)], 0] && GtQ[Simplify[b/(b*e - a*f)], 0] && !(GtQ[Simpl ify[d/(d*a - c*b)], 0] && GtQ[Simplify[d/(d*e - c*f)], 0] && SimplerQ[c + d *x, a + b*x]) && !(GtQ[Simplify[f/(f*a - e*b)], 0] && GtQ[Simplify[f/(f*c - e*d)], 0] && SimplerQ[e + f*x, a + b*x])
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) ^(p_), x_] :> Simp[(e + f*x)^FracPart[p]/(Simplify[b/(b*e - a*f)]^IntPart[p ]*(b*((e + f*x)/(b*e - a*f)))^FracPart[p]) Int[(a + b*x)^m*(c + d*x)^n*Si mp[b*(e/(b*e - a*f)) + b*f*(x/(b*e - a*f)), x]^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && !IntegerQ[m] && !IntegerQ[n] && !IntegerQ[p] & & GtQ[Simplify[b/(b*c - a*d)], 0] && !GtQ[Simplify[b/(b*e - a*f)], 0]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]/(d*Sqrt[1 + Sin[c + d*x]]*Sqrt[1 - Sin[c + d*x]]) Subst[Int[(a + b*x )^n/(Sqrt[1 + x]*Sqrt[1 - x]), x], x, Sin[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[a^2 - b^2, 0] && !IntegerQ[2*n]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)/b Int[(a + b*Sin[e + f*x])^m, x], x] + Simp[d/b Int[(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0]
Int[cos[(e_.) + (f_.)*(x_)]^2*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)* ((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(c + d*Sin[e + f*x])^n*(1 - Sin[e + f*x]^2), x] /; FreeQ[{a, b, c , d, e, f, m, n}, x] && NeQ[a^2 - b^2, 0] && (IGtQ[m, 0] || IntegersQ[2*m, 2*n])
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_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-C)*d*Cos[e + f*x]*Sin[e + f*x]*((a + b*Si n[e + f*x])^(m + 1)/(b*f*(m + 3))), x] + Simp[1/(b*(m + 3)) Int[(a + b*Si n[e + f*x])^m*Simp[a*C*d + A*b*c*(m + 3) + b*(B*c*(m + 3) + d*(C*(m + 2) + A*(m + 3)))*Sin[e + f*x] - (2*a*C*d - b*(c*C + B*d)*(m + 3))*Sin[e + f*x]^2 , x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] : > Simp[(-C)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n + 2))), x] + Simp[1/(d*(m + n + 2)) Int[(a + b*Sin[e + f*x ])^(m - 1)*(c + d*Sin[e + f*x])^n*Simp[a*A*d*(m + n + 2) + C*(b*c*m + a*d*( n + 1)) + (A*b*d*(m + n + 2) - C*(a*c - b*d*(m + n + 1)))*Sin[e + f*x] + C* (a*d*m - b*c*(m + 1))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f , A, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
\[\int \cos \left (f x +e \right )^{2} \left (a +b \sin \left (f x +e \right )\right )^{2} \left (c +d \sin \left (f x +e \right )\right )^{n}d x\]
Input:
int(cos(f*x+e)^2*(a+b*sin(f*x+e))^2*(c+d*sin(f*x+e))^n,x)
Output:
int(cos(f*x+e)^2*(a+b*sin(f*x+e))^2*(c+d*sin(f*x+e))^n,x)
\[ \int \cos ^2(e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^n \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )}^{2} {\left (d \sin \left (f x + e\right ) + c\right )}^{n} \cos \left (f x + e\right )^{2} \,d x } \] Input:
integrate(cos(f*x+e)^2*(a+b*sin(f*x+e))^2*(c+d*sin(f*x+e))^n,x, algorithm= "fricas")
Output:
integral(-(b^2*cos(f*x + e)^4 - 2*a*b*cos(f*x + e)^2*sin(f*x + e) - (a^2 + b^2)*cos(f*x + e)^2)*(d*sin(f*x + e) + c)^n, x)
Timed out. \[ \int \cos ^2(e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^n \, dx=\text {Timed out} \] Input:
integrate(cos(f*x+e)**2*(a+b*sin(f*x+e))**2*(c+d*sin(f*x+e))**n,x)
Output:
Timed out
\[ \int \cos ^2(e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^n \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )}^{2} {\left (d \sin \left (f x + e\right ) + c\right )}^{n} \cos \left (f x + e\right )^{2} \,d x } \] Input:
integrate(cos(f*x+e)^2*(a+b*sin(f*x+e))^2*(c+d*sin(f*x+e))^n,x, algorithm= "maxima")
Output:
integrate((b*sin(f*x + e) + a)^2*(d*sin(f*x + e) + c)^n*cos(f*x + e)^2, x)
\[ \int \cos ^2(e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^n \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )}^{2} {\left (d \sin \left (f x + e\right ) + c\right )}^{n} \cos \left (f x + e\right )^{2} \,d x } \] Input:
integrate(cos(f*x+e)^2*(a+b*sin(f*x+e))^2*(c+d*sin(f*x+e))^n,x, algorithm= "giac")
Output:
integrate((b*sin(f*x + e) + a)^2*(d*sin(f*x + e) + c)^n*cos(f*x + e)^2, x)
Timed out. \[ \int \cos ^2(e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^n \, dx=\int {\cos \left (e+f\,x\right )}^2\,{\left (a+b\,\sin \left (e+f\,x\right )\right )}^2\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^n \,d x \] Input:
int(cos(e + f*x)^2*(a + b*sin(e + f*x))^2*(c + d*sin(e + f*x))^n,x)
Output:
int(cos(e + f*x)^2*(a + b*sin(e + f*x))^2*(c + d*sin(e + f*x))^n, x)
\[ \int \cos ^2(e+f x) (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^n \, dx=\left (\int \left (\sin \left (f x +e \right ) d +c \right )^{n} \cos \left (f x +e \right )^{2} \sin \left (f x +e \right )^{2}d x \right ) b^{2}+2 \left (\int \left (\sin \left (f x +e \right ) d +c \right )^{n} \cos \left (f x +e \right )^{2} \sin \left (f x +e \right )d x \right ) a b +\left (\int \left (\sin \left (f x +e \right ) d +c \right )^{n} \cos \left (f x +e \right )^{2}d x \right ) a^{2} \] Input:
int(cos(f*x+e)^2*(a+b*sin(f*x+e))^2*(c+d*sin(f*x+e))^n,x)
Output:
int((sin(e + f*x)*d + c)**n*cos(e + f*x)**2*sin(e + f*x)**2,x)*b**2 + 2*in t((sin(e + f*x)*d + c)**n*cos(e + f*x)**2*sin(e + f*x),x)*a*b + int((sin(e + f*x)*d + c)**n*cos(e + f*x)**2,x)*a**2