Integrand size = 38, antiderivative size = 168 \[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=\frac {(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-3-p}}{f g (5+p)}+\frac {(2 A-B (3+p)) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-2-p}}{c f g (3+p) (5+p)}+\frac {(2 A-B (3+p)) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-1-p}}{c^2 f g (1+p) (3+p) (5+p)} \] Output:
(A+B)*(g*cos(f*x+e))^(p+1)*(c-c*sin(f*x+e))^(-3-p)/f/g/(5+p)+(2*A-B*(3+p)) *(g*cos(f*x+e))^(p+1)*(c-c*sin(f*x+e))^(-2-p)/c/f/g/(3+p)/(5+p)+(2*A-B*(3+ p))*(g*cos(f*x+e))^(p+1)*(c-c*sin(f*x+e))^(-1-p)/c^2/f/g/(p+1)/(3+p)/(5+p)
Time = 0.32 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.71 \[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=-\frac {\cos (e+f x) (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p} \left (-B (3+p)+A \left (7+6 p+p^2\right )+(3+p) (-2 A+B (3+p)) \sin (e+f x)+(2 A-B (3+p)) \sin ^2(e+f x)\right )}{c^3 f (1+p) (3+p) (5+p) (-1+\sin (e+f x))^3} \] Input:
Integrate[(g*Cos[e + f*x])^p*(A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^(-3 - p),x]
Output:
-((Cos[e + f*x]*(g*Cos[e + f*x])^p*(-(B*(3 + p)) + A*(7 + 6*p + p^2) + (3 + p)*(-2*A + B*(3 + p))*Sin[e + f*x] + (2*A - B*(3 + p))*Sin[e + f*x]^2))/ (c^3*f*(1 + p)*(3 + p)*(5 + p)*(-1 + Sin[e + f*x])^3*(c - c*Sin[e + f*x])^ p))
Time = 0.70 (sec) , antiderivative size = 155, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 3338, 3042, 3151, 3042, 3150}
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 \sin (e+f x)) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^p \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^pdx\) |
\(\Big \downarrow \) 3338 |
\(\displaystyle \frac {(2 A-B (p+3)) \int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p-2}dx}{c (p+5)}+\frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(2 A-B (p+3)) \int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p-2}dx}{c (p+5)}+\frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}\) |
\(\Big \downarrow \) 3151 |
\(\displaystyle \frac {(2 A-B (p+3)) \left (\frac {\int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p-1}dx}{c (p+3)}+\frac {(c-c \sin (e+f x))^{-p-2} (g \cos (e+f x))^{p+1}}{f g (p+3)}\right )}{c (p+5)}+\frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(2 A-B (p+3)) \left (\frac {\int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p-1}dx}{c (p+3)}+\frac {(c-c \sin (e+f x))^{-p-2} (g \cos (e+f x))^{p+1}}{f g (p+3)}\right )}{c (p+5)}+\frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}\) |
\(\Big \downarrow \) 3150 |
\(\displaystyle \frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}+\frac {(2 A-B (p+3)) \left (\frac {(c-c \sin (e+f x))^{-p-2} (g \cos (e+f x))^{p+1}}{f g (p+3)}+\frac {(c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1}}{c f g (p+1) (p+3)}\right )}{c (p+5)}\) |
Input:
Int[(g*Cos[e + f*x])^p*(A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^(-3 - p), x]
Output:
((A + B)*(g*Cos[e + f*x])^(1 + p)*(c - c*Sin[e + f*x])^(-3 - p))/(f*g*(5 + p)) + ((2*A - B*(3 + p))*(((g*Cos[e + f*x])^(1 + p)*(c - c*Sin[e + f*x])^ (-2 - p))/(f*g*(3 + p)) + ((g*Cos[e + f*x])^(1 + p)*(c - c*Sin[e + f*x])^( -1 - p))/(c*f*g*(1 + p)*(3 + p))))/(c*(5 + p))
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[b*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x ])^m/(a*f*g*m)), x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && EqQ[Simplify[m + p + 1], 0] && !ILtQ[p, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[b*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x ])^m/(a*f*g*Simplify[2*m + p + 1])), x] + Simp[Simplify[m + p + 1]/(a*Simpl ify[2*m + p + 1]) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1), x] , x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[Simpli fy[m + p + 1], 0] && NeQ[2*m + p + 1, 0] && !IGtQ[m, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*(2*m + p + 1) )), x] + Simp[(a*d*m + b*c*(m + p + 1))/(a*b*(2*m + p + 1)) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && (LtQ[m, -1] || ILtQ[Simplify[m + p], 0 ]) && NeQ[2*m + p + 1, 0]
\[\int \left (g \cos \left (f x +e \right )\right )^{p} \left (A +B \sin \left (f x +e \right )\right ) \left (c -c \sin \left (f x +e \right )\right )^{-3-p}d x\]
Input:
int((g*cos(f*x+e))^p*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(-3-p),x)
Output:
int((g*cos(f*x+e))^p*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(-3-p),x)
Time = 0.10 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.78 \[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=\frac {{\left ({\left (B p - 2 \, A + 3 \, B\right )} \cos \left (f x + e\right )^{3} + {\left (B p^{2} - 2 \, {\left (A - 3 \, B\right )} p - 6 \, A + 9 \, B\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + {\left (A p^{2} + 2 \, {\left (3 \, A - B\right )} p + 9 \, A - 6 \, B\right )} \cos \left (f x + e\right )\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 3}}{f p^{3} + 9 \, f p^{2} + 23 \, f p + 15 \, f} \] Input:
integrate((g*cos(f*x+e))^p*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(-3-p),x, alg orithm="fricas")
Output:
((B*p - 2*A + 3*B)*cos(f*x + e)^3 + (B*p^2 - 2*(A - 3*B)*p - 6*A + 9*B)*co s(f*x + e)*sin(f*x + e) + (A*p^2 + 2*(3*A - B)*p + 9*A - 6*B)*cos(f*x + e) )*(g*cos(f*x + e))^p*(-c*sin(f*x + e) + c)^(-p - 3)/(f*p^3 + 9*f*p^2 + 23* f*p + 15*f)
\[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=\int \left (g \cos {\left (e + f x \right )}\right )^{p} \left (- c \left (\sin {\left (e + f x \right )} - 1\right )\right )^{- p - 3} \left (A + B \sin {\left (e + f x \right )}\right )\, dx \] Input:
integrate((g*cos(f*x+e))**p*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))**(-3-p),x)
Output:
Integral((g*cos(e + f*x))**p*(-c*(sin(e + f*x) - 1))**(-p - 3)*(A + B*sin( e + f*x)), x)
\[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=\int { {\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 3} \,d x } \] Input:
integrate((g*cos(f*x+e))^p*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(-3-p),x, alg orithm="maxima")
Output:
integrate((B*sin(f*x + e) + A)*(g*cos(f*x + e))^p*(-c*sin(f*x + e) + c)^(- p - 3), x)
\[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=\int { {\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 3} \,d x } \] Input:
integrate((g*cos(f*x+e))^p*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(-3-p),x, alg orithm="giac")
Output:
integrate((B*sin(f*x + e) + A)*(g*cos(f*x + e))^p*(-c*sin(f*x + e) + c)^(- p - 3), x)
Time = 36.01 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.39 \[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=-\frac {{\left (g\,\cos \left (e+f\,x\right )\right )}^p\,\left (30\,A\,\cos \left (e+f\,x\right )-15\,B\,\cos \left (e+f\,x\right )-2\,A\,\cos \left (3\,e+3\,f\,x\right )+3\,B\,\cos \left (3\,e+3\,f\,x\right )-12\,A\,\sin \left (2\,e+2\,f\,x\right )+18\,B\,\sin \left (2\,e+2\,f\,x\right )+2\,B\,p^2\,\sin \left (2\,e+2\,f\,x\right )+24\,A\,p\,\cos \left (e+f\,x\right )-5\,B\,p\,\cos \left (e+f\,x\right )+4\,A\,p^2\,\cos \left (e+f\,x\right )+B\,p\,\cos \left (3\,e+3\,f\,x\right )-4\,A\,p\,\sin \left (2\,e+2\,f\,x\right )+12\,B\,p\,\sin \left (2\,e+2\,f\,x\right )\right )}{c^3\,f\,{\left (-c\,\left (\sin \left (e+f\,x\right )-1\right )\right )}^p\,\left (p^3+9\,p^2+23\,p+15\right )\,\left (15\,\sin \left (e+f\,x\right )+6\,\cos \left (2\,e+2\,f\,x\right )-\sin \left (3\,e+3\,f\,x\right )-10\right )} \] Input:
int(((g*cos(e + f*x))^p*(A + B*sin(e + f*x)))/(c - c*sin(e + f*x))^(p + 3) ,x)
Output:
-((g*cos(e + f*x))^p*(30*A*cos(e + f*x) - 15*B*cos(e + f*x) - 2*A*cos(3*e + 3*f*x) + 3*B*cos(3*e + 3*f*x) - 12*A*sin(2*e + 2*f*x) + 18*B*sin(2*e + 2 *f*x) + 2*B*p^2*sin(2*e + 2*f*x) + 24*A*p*cos(e + f*x) - 5*B*p*cos(e + f*x ) + 4*A*p^2*cos(e + f*x) + B*p*cos(3*e + 3*f*x) - 4*A*p*sin(2*e + 2*f*x) + 12*B*p*sin(2*e + 2*f*x)))/(c^3*f*(-c*(sin(e + f*x) - 1))^p*(23*p + 9*p^2 + p^3 + 15)*(15*sin(e + f*x) + 6*cos(2*e + 2*f*x) - sin(3*e + 3*f*x) - 10) )
\[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=-\frac {g^{p} \left (\left (\int \frac {\cos \left (f x +e \right )^{p}}{\left (-\sin \left (f x +e \right ) c +c \right )^{p} \sin \left (f x +e \right )^{3}-3 \left (-\sin \left (f x +e \right ) c +c \right )^{p} \sin \left (f x +e \right )^{2}+3 \left (-\sin \left (f x +e \right ) c +c \right )^{p} \sin \left (f x +e \right )-\left (-\sin \left (f x +e \right ) c +c \right )^{p}}d x \right ) a +\left (\int \frac {\cos \left (f x +e \right )^{p} \sin \left (f x +e \right )}{\left (-\sin \left (f x +e \right ) c +c \right )^{p} \sin \left (f x +e \right )^{3}-3 \left (-\sin \left (f x +e \right ) c +c \right )^{p} \sin \left (f x +e \right )^{2}+3 \left (-\sin \left (f x +e \right ) c +c \right )^{p} \sin \left (f x +e \right )-\left (-\sin \left (f x +e \right ) c +c \right )^{p}}d x \right ) b \right )}{c^{3}} \] Input:
int((g*cos(f*x+e))^p*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(-3-p),x)
Output:
( - g**p*(int(cos(e + f*x)**p/(( - sin(e + f*x)*c + c)**p*sin(e + f*x)**3 - 3*( - sin(e + f*x)*c + c)**p*sin(e + f*x)**2 + 3*( - sin(e + f*x)*c + c) **p*sin(e + f*x) - ( - sin(e + f*x)*c + c)**p),x)*a + int((cos(e + f*x)**p *sin(e + f*x))/(( - sin(e + f*x)*c + c)**p*sin(e + f*x)**3 - 3*( - sin(e + f*x)*c + c)**p*sin(e + f*x)**2 + 3*( - sin(e + f*x)*c + c)**p*sin(e + f*x ) - ( - sin(e + f*x)*c + c)**p),x)*b))/c**3