Integrand size = 40, antiderivative size = 180 \[ \int (a+a \sin (e+f x))^m \sqrt {c-c \sin (e+f x)} \left (A+C \sin ^2(e+f x)\right ) \, dx=\frac {2 c (C-6 C m+A (5+2 m)) \cos (e+f x) (a+a \sin (e+f x))^m}{f (1+2 m) (5+2 m) \sqrt {c-c \sin (e+f x)}}+\frac {4 c C (1+2 m) \cos (e+f x) (a+a \sin (e+f x))^{1+m}}{a f (3+2 m) (5+2 m) \sqrt {c-c \sin (e+f x)}}+\frac {2 C \cos (e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{3/2}}{c f (5+2 m)} \] Output:
2*c*(C-6*C*m+A*(5+2*m))*cos(f*x+e)*(a+a*sin(f*x+e))^m/f/(1+2*m)/(5+2*m)/(c -c*sin(f*x+e))^(1/2)+4*c*C*(1+2*m)*cos(f*x+e)*(a+a*sin(f*x+e))^(1+m)/a/f/( 3+2*m)/(5+2*m)/(c-c*sin(f*x+e))^(1/2)+2*C*cos(f*x+e)*(a+a*sin(f*x+e))^m*(c -c*sin(f*x+e))^(3/2)/c/f/(5+2*m)
Time = 2.82 (sec) , antiderivative size = 160, normalized size of antiderivative = 0.89 \[ \int (a+a \sin (e+f x))^m \sqrt {c-c \sin (e+f x)} \left (A+C \sin ^2(e+f x)\right ) \, dx=-\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) (a (1+\sin (e+f x)))^m \sqrt {c-c \sin (e+f x)} \left (-30 A-19 C-32 A m-8 C m-8 A m^2-4 C m^2+C \left (3+8 m+4 m^2\right ) \cos (2 (e+f x))+8 C (1+2 m) \sin (e+f x)\right )}{f (1+2 m) (3+2 m) (5+2 m) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )} \] Input:
Integrate[(a + a*Sin[e + f*x])^m*Sqrt[c - c*Sin[e + f*x]]*(A + C*Sin[e + f *x]^2),x]
Output:
-(((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(a*(1 + Sin[e + f*x]))^m*Sqrt[c - c*Sin[e + f*x]]*(-30*A - 19*C - 32*A*m - 8*C*m - 8*A*m^2 - 4*C*m^2 + C*(3 + 8*m + 4*m^2)*Cos[2*(e + f*x)] + 8*C*(1 + 2*m)*Sin[e + f*x]))/(f*(1 + 2* m)*(3 + 2*m)*(5 + 2*m)*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])))
Time = 0.93 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.175, Rules used = {3042, 3519, 27, 3042, 3450, 3042, 3217}
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 \sqrt {c-c \sin (e+f x)} (a \sin (e+f x)+a)^m \left (A+C \sin ^2(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {c-c \sin (e+f x)} (a \sin (e+f x)+a)^m \left (A+C \sin (e+f x)^2\right )dx\) |
\(\Big \downarrow \) 3519 |
\(\displaystyle \frac {2 C \cos (e+f x) (c-c \sin (e+f x))^{3/2} (a \sin (e+f x)+a)^m}{c f (2 m+5)}-\frac {2 \int -\frac {1}{2} (\sin (e+f x) a+a)^m \sqrt {c-c \sin (e+f x)} (a c (C (3-2 m)+A (2 m+5))+2 a c C (2 m+1) \sin (e+f x))dx}{a c (2 m+5)}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a)^m \sqrt {c-c \sin (e+f x)} (a c (C (3-2 m)+A (2 m+5))+2 a c C (2 m+1) \sin (e+f x))dx}{a c (2 m+5)}+\frac {2 C \cos (e+f x) (c-c \sin (e+f x))^{3/2} (a \sin (e+f x)+a)^m}{c f (2 m+5)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a)^m \sqrt {c-c \sin (e+f x)} (a c (C (3-2 m)+A (2 m+5))+2 a c C (2 m+1) \sin (e+f x))dx}{a c (2 m+5)}+\frac {2 C \cos (e+f x) (c-c \sin (e+f x))^{3/2} (a \sin (e+f x)+a)^m}{c f (2 m+5)}\) |
\(\Big \downarrow \) 3450 |
\(\displaystyle \frac {a c (A (2 m+5)-6 C m+C) \int (\sin (e+f x) a+a)^m \sqrt {c-c \sin (e+f x)}dx+2 c C (2 m+1) \int (\sin (e+f x) a+a)^{m+1} \sqrt {c-c \sin (e+f x)}dx}{a c (2 m+5)}+\frac {2 C \cos (e+f x) (c-c \sin (e+f x))^{3/2} (a \sin (e+f x)+a)^m}{c f (2 m+5)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a c (A (2 m+5)-6 C m+C) \int (\sin (e+f x) a+a)^m \sqrt {c-c \sin (e+f x)}dx+2 c C (2 m+1) \int (\sin (e+f x) a+a)^{m+1} \sqrt {c-c \sin (e+f x)}dx}{a c (2 m+5)}+\frac {2 C \cos (e+f x) (c-c \sin (e+f x))^{3/2} (a \sin (e+f x)+a)^m}{c f (2 m+5)}\) |
\(\Big \downarrow \) 3217 |
\(\displaystyle \frac {\frac {2 a c^2 (A (2 m+5)-6 C m+C) \cos (e+f x) (a \sin (e+f x)+a)^m}{f (2 m+1) \sqrt {c-c \sin (e+f x)}}+\frac {4 c^2 C (2 m+1) \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{f (2 m+3) \sqrt {c-c \sin (e+f x)}}}{a c (2 m+5)}+\frac {2 C \cos (e+f x) (c-c \sin (e+f x))^{3/2} (a \sin (e+f x)+a)^m}{c f (2 m+5)}\) |
Input:
Int[(a + a*Sin[e + f*x])^m*Sqrt[c - c*Sin[e + f*x]]*(A + C*Sin[e + f*x]^2) ,x]
Output:
(2*C*Cos[e + f*x]*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^(3/2))/(c*f* (5 + 2*m)) + ((2*a*c^2*(C - 6*C*m + A*(5 + 2*m))*Cos[e + f*x]*(a + a*Sin[e + f*x])^m)/(f*(1 + 2*m)*Sqrt[c - c*Sin[e + f*x]]) + (4*c^2*C*(1 + 2*m)*Co s[e + f*x]*(a + a*Sin[e + f*x])^(1 + m))/(f*(3 + 2*m)*Sqrt[c - c*Sin[e + f *x]]))/(a*c*(5 + 2*m))
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[(e_.) + (f_.)*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f _.)*(x_)])^(n_), x_Symbol] :> Simp[-2*b*Cos[e + f*x]*((c + d*Sin[e + f*x])^ n/(f*(2*n + 1)*Sqrt[a + b*Sin[e + f*x]])), x] /; FreeQ[{a, b, c, d, e, f, n }, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[n, -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 [B/d Int[Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])^(n + 1), x], x] - Simp[(B*c - A*d)/d 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] && EqQ[b*c + a*d, 0] && EqQ[ a^2 - b^2, 0]
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/(b*d*(m + n + 2)) Int[(a + b*Sin[e + f* x])^m*(c + d*Sin[e + f*x])^n*Simp[A*b*d*(m + n + 2) + C*(a*c*m + b*d*(n + 1 )) - b*c*C*(2*m + 1)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A , C, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1 )] && NeQ[m + n + 2, 0]
\[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \sqrt {c -c \sin \left (f x +e \right )}\, \left (A +C \sin \left (f x +e \right )^{2}\right )d x\]
Input:
int((a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(1/2)*(A+C*sin(f*x+e)^2),x)
Output:
int((a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(1/2)*(A+C*sin(f*x+e)^2),x)
Time = 0.10 (sec) , antiderivative size = 261, normalized size of antiderivative = 1.45 \[ \int (a+a \sin (e+f x))^m \sqrt {c-c \sin (e+f x)} \left (A+C \sin ^2(e+f x)\right ) \, dx=-\frac {2 \, {\left ({\left (4 \, C m^{2} + 8 \, C m + 3 \, C\right )} \cos \left (f x + e\right )^{3} - 4 \, {\left (A + C\right )} m^{2} + {\left (4 \, C m^{2} - C\right )} \cos \left (f x + e\right )^{2} - 16 \, A m - {\left (4 \, {\left (A + C\right )} m^{2} + 8 \, {\left (2 \, A + C\right )} m + 15 \, A + 11 \, C\right )} \cos \left (f x + e\right ) - {\left (4 \, {\left (A + C\right )} m^{2} - {\left (4 \, C m^{2} + 8 \, C m + 3 \, C\right )} \cos \left (f x + e\right )^{2} + 16 \, A m - 4 \, {\left (2 \, C m + C\right )} \cos \left (f x + e\right ) + 15 \, A + 7 \, C\right )} \sin \left (f x + e\right ) - 15 \, A - 7 \, C\right )} \sqrt {-c \sin \left (f x + e\right ) + c} {\left (a \sin \left (f x + e\right ) + a\right )}^{m}}{8 \, f m^{3} + 36 \, f m^{2} + 46 \, f m + {\left (8 \, f m^{3} + 36 \, f m^{2} + 46 \, f m + 15 \, f\right )} \cos \left (f x + e\right ) - {\left (8 \, f m^{3} + 36 \, f m^{2} + 46 \, f m + 15 \, f\right )} \sin \left (f x + e\right ) + 15 \, f} \] Input:
integrate((a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(1/2)*(A+C*sin(f*x+e)^2),x, algorithm="fricas")
Output:
-2*((4*C*m^2 + 8*C*m + 3*C)*cos(f*x + e)^3 - 4*(A + C)*m^2 + (4*C*m^2 - C) *cos(f*x + e)^2 - 16*A*m - (4*(A + C)*m^2 + 8*(2*A + C)*m + 15*A + 11*C)*c os(f*x + e) - (4*(A + C)*m^2 - (4*C*m^2 + 8*C*m + 3*C)*cos(f*x + e)^2 + 16 *A*m - 4*(2*C*m + C)*cos(f*x + e) + 15*A + 7*C)*sin(f*x + e) - 15*A - 7*C) *sqrt(-c*sin(f*x + e) + c)*(a*sin(f*x + e) + a)^m/(8*f*m^3 + 36*f*m^2 + 46 *f*m + (8*f*m^3 + 36*f*m^2 + 46*f*m + 15*f)*cos(f*x + e) - (8*f*m^3 + 36*f *m^2 + 46*f*m + 15*f)*sin(f*x + e) + 15*f)
\[ \int (a+a \sin (e+f x))^m \sqrt {c-c \sin (e+f x)} \left (A+C \sin ^2(e+f x)\right ) \, dx=\int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )} \left (A + C \sin ^{2}{\left (e + f x \right )}\right )\, dx \] Input:
integrate((a+a*sin(f*x+e))**m*(c-c*sin(f*x+e))**(1/2)*(A+C*sin(f*x+e)**2), x)
Output:
Integral((a*(sin(e + f*x) + 1))**m*sqrt(-c*(sin(e + f*x) - 1))*(A + C*sin( e + f*x)**2), x)
Leaf count of result is larger than twice the leaf count of optimal. 441 vs. \(2 (174) = 348\).
Time = 0.16 (sec) , antiderivative size = 441, normalized size of antiderivative = 2.45 \[ \int (a+a \sin (e+f x))^m \sqrt {c-c \sin (e+f x)} \left (A+C \sin ^2(e+f x)\right ) \, dx=\frac {2 \, {\left (\frac {4 \, {\left (\frac {4 \, a^{m} \sqrt {c} m \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {{\left (4 \, m^{2} + 4 \, m + 5\right )} a^{m} \sqrt {c} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {{\left (4 \, m^{2} + 4 \, m + 5\right )} a^{m} \sqrt {c} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {4 \, a^{m} \sqrt {c} m \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - 2 \, a^{m} \sqrt {c} - \frac {2 \, a^{m} \sqrt {c} \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )} C e^{\left (2 \, m \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right ) - m \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )\right )}}{{\left (8 \, m^{3} + 36 \, m^{2} + 46 \, m + \frac {2 \, {\left (8 \, m^{3} + 36 \, m^{2} + 46 \, m + 15\right )} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {{\left (8 \, m^{3} + 36 \, m^{2} + 46 \, m + 15\right )} \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + 15\right )} \sqrt {\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1}} - \frac {{\left (a^{m} \sqrt {c} + \frac {a^{m} \sqrt {c} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )} A e^{\left (2 \, m \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right ) - m \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )\right )}}{{\left (2 \, m + 1\right )} \sqrt {\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1}}\right )}}{f} \] Input:
integrate((a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(1/2)*(A+C*sin(f*x+e)^2),x, algorithm="maxima")
Output:
2*(4*(4*a^m*sqrt(c)*m*sin(f*x + e)/(cos(f*x + e) + 1) - (4*m^2 + 4*m + 5)* a^m*sqrt(c)*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 - (4*m^2 + 4*m + 5)*a^m*sq rt(c)*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 4*a^m*sqrt(c)*m*sin(f*x + e)^4 /(cos(f*x + e) + 1)^4 - 2*a^m*sqrt(c) - 2*a^m*sqrt(c)*sin(f*x + e)^5/(cos( f*x + e) + 1)^5)*C*e^(2*m*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1) - m*log (sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1))/((8*m^3 + 36*m^2 + 46*m + 2*(8* m^3 + 36*m^2 + 46*m + 15)*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + (8*m^3 + 3 6*m^2 + 46*m + 15)*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 15)*sqrt(sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1)) - (a^m*sqrt(c) + a^m*sqrt(c)*sin(f*x + e )/(cos(f*x + e) + 1))*A*e^(2*m*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1) - m*log(sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1))/((2*m + 1)*sqrt(sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1)))/f
\[ \int (a+a \sin (e+f x))^m \sqrt {c-c \sin (e+f x)} \left (A+C \sin ^2(e+f x)\right ) \, dx=\int { {\left (C \sin \left (f x + e\right )^{2} + A\right )} \sqrt {-c \sin \left (f x + e\right ) + c} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \] Input:
integrate((a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(1/2)*(A+C*sin(f*x+e)^2),x, algorithm="giac")
Output:
integrate((C*sin(f*x + e)^2 + A)*sqrt(-c*sin(f*x + e) + c)*(a*sin(f*x + e) + a)^m, x)
Time = 42.35 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.03 \[ \int (a+a \sin (e+f x))^m \sqrt {c-c \sin (e+f x)} \left (A+C \sin ^2(e+f x)\right ) \, dx=-\frac {{\left (a\,\left (\sin \left (e+f\,x\right )+1\right )\right )}^m\,\sqrt {-c\,\left (\sin \left (e+f\,x\right )-1\right )}\,\left (60\,A\,\cos \left (e+f\,x\right )+35\,C\,\cos \left (e+f\,x\right )-3\,C\,\cos \left (3\,e+3\,f\,x\right )-8\,C\,\sin \left (2\,e+2\,f\,x\right )-4\,C\,m^2\,\cos \left (3\,e+3\,f\,x\right )+64\,A\,m\,\cos \left (e+f\,x\right )+8\,C\,m\,\cos \left (e+f\,x\right )+16\,A\,m^2\,\cos \left (e+f\,x\right )-8\,C\,m\,\cos \left (3\,e+3\,f\,x\right )+4\,C\,m^2\,\cos \left (e+f\,x\right )-16\,C\,m\,\sin \left (2\,e+2\,f\,x\right )\right )}{2\,f\,\left (\sin \left (e+f\,x\right )-1\right )\,\left (8\,m^3+36\,m^2+46\,m+15\right )} \] Input:
int((A + C*sin(e + f*x)^2)*(a + a*sin(e + f*x))^m*(c - c*sin(e + f*x))^(1/ 2),x)
Output:
-((a*(sin(e + f*x) + 1))^m*(-c*(sin(e + f*x) - 1))^(1/2)*(60*A*cos(e + f*x ) + 35*C*cos(e + f*x) - 3*C*cos(3*e + 3*f*x) - 8*C*sin(2*e + 2*f*x) - 4*C* m^2*cos(3*e + 3*f*x) + 64*A*m*cos(e + f*x) + 8*C*m*cos(e + f*x) + 16*A*m^2 *cos(e + f*x) - 8*C*m*cos(3*e + 3*f*x) + 4*C*m^2*cos(e + f*x) - 16*C*m*sin (2*e + 2*f*x)))/(2*f*(sin(e + f*x) - 1)*(46*m + 36*m^2 + 8*m^3 + 15))
\[ \int (a+a \sin (e+f x))^m \sqrt {c-c \sin (e+f x)} \left (A+C \sin ^2(e+f x)\right ) \, dx=\sqrt {c}\, \left (\left (\int \left (a +a \sin \left (f x +e \right )\right )^{m} \sqrt {-\sin \left (f x +e \right )+1}\, \sin \left (f x +e \right )^{2}d x \right ) c +\left (\int \left (a +a \sin \left (f x +e \right )\right )^{m} \sqrt {-\sin \left (f x +e \right )+1}d x \right ) a \right ) \] Input:
int((a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(1/2)*(A+C*sin(f*x+e)^2),x)
Output:
sqrt(c)*(int((sin(e + f*x)*a + a)**m*sqrt( - sin(e + f*x) + 1)*sin(e + f*x )**2,x)*c + int((sin(e + f*x)*a + a)**m*sqrt( - sin(e + f*x) + 1),x)*a)