Integrand size = 25, antiderivative size = 171 \[ \int (a+a \sin (e+f x))^m \left (A+C \sin ^2(e+f x)\right ) \, dx=\frac {C \cos (e+f x) (a+a \sin (e+f x))^m}{f \left (2+3 m+m^2\right )}-\frac {2^{\frac {1}{2}+m} \left (C \left (1+m+m^2\right )+A \left (2+3 m+m^2\right )\right ) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2}-m,\frac {3}{2},\frac {1}{2} (1-\sin (e+f x))\right ) (1+\sin (e+f x))^{-\frac {1}{2}-m} (a+a \sin (e+f x))^m}{f (1+m) (2+m)}-\frac {C \cos (e+f x) (a+a \sin (e+f x))^{1+m}}{a f (2+m)} \] Output:
C*cos(f*x+e)*(a+a*sin(f*x+e))^m/f/(m^2+3*m+2)-2^(1/2+m)*(C*(m^2+m+1)+A*(m^ 2+3*m+2))*cos(f*x+e)*hypergeom([1/2, 1/2-m],[3/2],1/2-1/2*sin(f*x+e))*(1+s in(f*x+e))^(-1/2-m)*(a+a*sin(f*x+e))^m/f/(1+m)/(2+m)-C*cos(f*x+e)*(a+a*sin (f*x+e))^(1+m)/a/f/(2+m)
Leaf count is larger than twice the leaf count of optimal. \(1794\) vs. \(2(171)=342\).
Time = 30.37 (sec) , antiderivative size = 1794, normalized size of antiderivative = 10.49 \[ \int (a+a \sin (e+f x))^m \left (A+C \sin ^2(e+f x)\right ) \, dx =\text {Too large to display} \] Input:
Integrate[(a + a*Sin[e + f*x])^m*(A + C*Sin[e + f*x]^2),x]
Output:
(-2*(A*(a + a*Sin[e + f*x])^m + (C*(a + a*Sin[e + f*x])^m)/2 - (C*Cos[2*(e + f*x)]*(a + a*Sin[e + f*x])^m)/2)*(a + (a*Tan[e + f*x])/Sqrt[Sec[e + f*x ]^2])^m*(Sec[e + f*x]^2 + Sqrt[Sec[e + f*x]^2]*Tan[e + f*x])*(1 + (Sqrt[Se c[e + f*x]^2] + Tan[e + f*x])^2)^m*(-((A + C)*(3 + 2*m)*Hypergeometric2F1[ 1/2 + m, 1 + m, 3/2 + m, -(Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])^2]) + 4*C* (1 + 2*m)*Hypergeometric2F1[3/2 + m, 3 + m, 5/2 + m, -(Sqrt[Sec[e + f*x]^2 ] + Tan[e + f*x])^2]*(1 + 2*Sqrt[Sec[e + f*x]^2]*Tan[e + f*x] + 2*Tan[e + f*x]^2)))/(f*(3 + 8*m + 4*m^2)*Sqrt[Sec[e + f*x]^2]*((-4*m*(Sqrt[Sec[e + f *x]^2] + Tan[e + f*x])*(a + (a*Tan[e + f*x])/Sqrt[Sec[e + f*x]^2])^m*(Sec[ e + f*x]^2 + Sqrt[Sec[e + f*x]^2]*Tan[e + f*x])^2*(1 + (Sqrt[Sec[e + f*x]^ 2] + Tan[e + f*x])^2)^(-1 + m)*(-((A + C)*(3 + 2*m)*Hypergeometric2F1[1/2 + m, 1 + m, 3/2 + m, -(Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])^2]) + 4*C*(1 + 2*m)*Hypergeometric2F1[3/2 + m, 3 + m, 5/2 + m, -(Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])^2]*(1 + 2*Sqrt[Sec[e + f*x]^2]*Tan[e + f*x] + 2*Tan[e + f*x] ^2)))/((3 + 8*m + 4*m^2)*Sqrt[Sec[e + f*x]^2]) + (2*Tan[e + f*x]*(a + (a*T an[e + f*x])/Sqrt[Sec[e + f*x]^2])^m*(Sec[e + f*x]^2 + Sqrt[Sec[e + f*x]^2 ]*Tan[e + f*x])*(1 + (Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])^2)^m*(-((A + C) *(3 + 2*m)*Hypergeometric2F1[1/2 + m, 1 + m, 3/2 + m, -(Sqrt[Sec[e + f*x]^ 2] + Tan[e + f*x])^2]) + 4*C*(1 + 2*m)*Hypergeometric2F1[3/2 + m, 3 + m, 5 /2 + m, -(Sqrt[Sec[e + f*x]^2] + Tan[e + f*x])^2]*(1 + 2*Sqrt[Sec[e + f...
Time = 0.64 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.01, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {3042, 3503, 3042, 3230, 3042, 3131, 3042, 3130}
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 \sin (e+f x)+a)^m \left (A+C \sin ^2(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^m \left (A+C \sin (e+f x)^2\right )dx\) |
\(\Big \downarrow \) 3503 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a)^m (a (C (m+1)+A (m+2))-a C \sin (e+f x))dx}{a (m+2)}-\frac {C \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f (m+2)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a)^m (a (C (m+1)+A (m+2))-a C \sin (e+f x))dx}{a (m+2)}-\frac {C \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f (m+2)}\) |
\(\Big \downarrow \) 3230 |
\(\displaystyle \frac {\frac {a \left (A \left (m^2+3 m+2\right )+C \left (m^2+m+1\right )\right ) \int (\sin (e+f x) a+a)^mdx}{m+1}+\frac {a C \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)}}{a (m+2)}-\frac {C \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f (m+2)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {a \left (A \left (m^2+3 m+2\right )+C \left (m^2+m+1\right )\right ) \int (\sin (e+f x) a+a)^mdx}{m+1}+\frac {a C \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)}}{a (m+2)}-\frac {C \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f (m+2)}\) |
\(\Big \downarrow \) 3131 |
\(\displaystyle \frac {\frac {a \left (A \left (m^2+3 m+2\right )+C \left (m^2+m+1\right )\right ) (\sin (e+f x)+1)^{-m} (a \sin (e+f x)+a)^m \int (\sin (e+f x)+1)^mdx}{m+1}+\frac {a C \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)}}{a (m+2)}-\frac {C \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f (m+2)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {a \left (A \left (m^2+3 m+2\right )+C \left (m^2+m+1\right )\right ) (\sin (e+f x)+1)^{-m} (a \sin (e+f x)+a)^m \int (\sin (e+f x)+1)^mdx}{m+1}+\frac {a C \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)}}{a (m+2)}-\frac {C \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f (m+2)}\) |
\(\Big \downarrow \) 3130 |
\(\displaystyle \frac {\frac {a C \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)}-\frac {a 2^{m+\frac {1}{2}} \left (A \left (m^2+3 m+2\right )+C \left (m^2+m+1\right )\right ) \cos (e+f x) (\sin (e+f x)+1)^{-m-\frac {1}{2}} (a \sin (e+f x)+a)^m \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2}-m,\frac {3}{2},\frac {1}{2} (1-\sin (e+f x))\right )}{f (m+1)}}{a (m+2)}-\frac {C \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f (m+2)}\) |
Input:
Int[(a + a*Sin[e + f*x])^m*(A + C*Sin[e + f*x]^2),x]
Output:
-((C*Cos[e + f*x]*(a + a*Sin[e + f*x])^(1 + m))/(a*f*(2 + m))) + ((a*C*Cos [e + f*x]*(a + a*Sin[e + f*x])^m)/(f*(1 + m)) - (2^(1/2 + m)*a*(C*(1 + m + m^2) + A*(2 + 3*m + m^2))*Cos[e + f*x]*Hypergeometric2F1[1/2, 1/2 - m, 3/ 2, (1 - Sin[e + f*x])/2]*(1 + Sin[e + f*x])^(-1/2 - m)*(a + a*Sin[e + f*x] )^m)/(f*(1 + m)))/(a*(2 + m))
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-2^(n + 1/2))*a^(n - 1/2)*b*(Cos[c + d*x]/(d*Sqrt[a + b*Sin[c + d*x]]))*Hypergeome tric2F1[1/2, 1/2 - n, 3/2, (1/2)*(1 - b*(Sin[c + d*x]/a))], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[2*n] && GtQ[a, 0]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[a^IntPar t[n]*((a + b*Sin[c + d*x])^FracPart[n]/(1 + (b/a)*Sin[c + d*x])^FracPart[n] ) Int[(1 + (b/a)*Sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[2*n] && !GtQ[a, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[(a*d*m + b*c*(m + 1))/(b*(m + 1)) Int[(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1)]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos[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) - a*C*Sin[e + f*x], x], x], x] /; FreeQ[{a , b, e, f, A, C, m}, x] && !LtQ[m, -1]
\[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (A +C \sin \left (f x +e \right )^{2}\right )d x\]
Input:
int((a+a*sin(f*x+e))^m*(A+C*sin(f*x+e)^2),x)
Output:
int((a+a*sin(f*x+e))^m*(A+C*sin(f*x+e)^2),x)
\[ \int (a+a \sin (e+f x))^m \left (A+C \sin ^2(e+f x)\right ) \, dx=\int { {\left (C \sin \left (f x + e\right )^{2} + A\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \] Input:
integrate((a+a*sin(f*x+e))^m*(A+C*sin(f*x+e)^2),x, algorithm="fricas")
Output:
integral(-(C*cos(f*x + e)^2 - A - C)*(a*sin(f*x + e) + a)^m, x)
\[ \int (a+a \sin (e+f x))^m \left (A+C \sin ^2(e+f x)\right ) \, dx=\int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \left (A + C \sin ^{2}{\left (e + f x \right )}\right )\, dx \] Input:
integrate((a+a*sin(f*x+e))**m*(A+C*sin(f*x+e)**2),x)
Output:
Integral((a*(sin(e + f*x) + 1))**m*(A + C*sin(e + f*x)**2), x)
\[ \int (a+a \sin (e+f x))^m \left (A+C \sin ^2(e+f x)\right ) \, dx=\int { {\left (C \sin \left (f x + e\right )^{2} + A\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \] Input:
integrate((a+a*sin(f*x+e))^m*(A+C*sin(f*x+e)^2),x, algorithm="maxima")
Output:
integrate((C*sin(f*x + e)^2 + A)*(a*sin(f*x + e) + a)^m, x)
\[ \int (a+a \sin (e+f x))^m \left (A+C \sin ^2(e+f x)\right ) \, dx=\int { {\left (C \sin \left (f x + e\right )^{2} + A\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \] Input:
integrate((a+a*sin(f*x+e))^m*(A+C*sin(f*x+e)^2),x, algorithm="giac")
Output:
integrate((C*sin(f*x + e)^2 + A)*(a*sin(f*x + e) + a)^m, x)
Timed out. \[ \int (a+a \sin (e+f x))^m \left (A+C \sin ^2(e+f x)\right ) \, dx=\int \left (C\,{\sin \left (e+f\,x\right )}^2+A\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m \,d x \] Input:
int((A + C*sin(e + f*x)^2)*(a + a*sin(e + f*x))^m,x)
Output:
int((A + C*sin(e + f*x)^2)*(a + a*sin(e + f*x))^m, x)
\[ \int (a+a \sin (e+f x))^m \left (A+C \sin ^2(e+f x)\right ) \, dx=\left (\int \left (a +a \sin \left (f x +e \right )\right )^{m}d x \right ) a +\left (\int \left (a +a \sin \left (f x +e \right )\right )^{m} \sin \left (f x +e \right )^{2}d x \right ) c \] Input:
int((a+a*sin(f*x+e))^m*(A+C*sin(f*x+e)^2),x)
Output:
int((sin(e + f*x)*a + a)**m,x)*a + int((sin(e + f*x)*a + a)**m*sin(e + f*x )**2,x)*c