Integrand size = 23, antiderivative size = 95 \[ \int (e \cos (c+d x))^p (a+a \sin (c+d x))^2 \, dx=-\frac {2^{\frac {5}{2}+\frac {p}{2}} a^2 (e \cos (c+d x))^{1+p} \operatorname {Hypergeometric2F1}\left (\frac {1}{2} (-3-p),\frac {1+p}{2},\frac {3+p}{2},\frac {1}{2} (1-\sin (c+d x))\right ) (1+\sin (c+d x))^{\frac {1}{2} (-1-p)}}{d e (1+p)} \] Output:
-2^(5/2+1/2*p)*a^2*(e*cos(d*x+c))^(p+1)*hypergeom([1/2*p+1/2, -3/2-1/2*p], [3/2+1/2*p],1/2-1/2*sin(d*x+c))*(1+sin(d*x+c))^(-1/2-1/2*p)/d/e/(p+1)
Time = 0.11 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.99 \[ \int (e \cos (c+d x))^p (a+a \sin (c+d x))^2 \, dx=-\frac {2^{\frac {5+p}{2}} a^2 \cos (c+d x) (e \cos (c+d x))^p \operatorname {Hypergeometric2F1}\left (\frac {1}{2} (-3-p),\frac {1+p}{2},\frac {3+p}{2},\frac {1}{2} (1-\sin (c+d x))\right ) (1+\sin (c+d x))^{\frac {1}{2} (-1-p)}}{d (1+p)} \] Input:
Integrate[(e*Cos[c + d*x])^p*(a + a*Sin[c + d*x])^2,x]
Output:
-((2^((5 + p)/2)*a^2*Cos[c + d*x]*(e*Cos[c + d*x])^p*Hypergeometric2F1[(-3 - p)/2, (1 + p)/2, (3 + p)/2, (1 - Sin[c + d*x])/2]*(1 + Sin[c + d*x])^(( -1 - p)/2))/(d*(1 + p)))
Time = 0.29 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.27, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 3167, 79}
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 (c+d x)+a)^2 (e \cos (c+d x))^p \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (c+d x)+a)^2 (e \cos (c+d x))^pdx\) |
\(\Big \downarrow \) 3167 |
\(\displaystyle \frac {a^2 (1-\sin (c+d x))^{\frac {1}{2} (-p-1)} (\sin (c+d x)+1)^{\frac {1}{2} (-p-1)} (e \cos (c+d x))^{p+1} \int (1-\sin (c+d x))^{\frac {p-1}{2}} (\sin (c+d x)+1)^{\frac {p+3}{2}}d\sin (c+d x)}{d e}\) |
\(\Big \downarrow \) 79 |
\(\displaystyle -\frac {a^2 2^{\frac {p+5}{2}} (1-\sin (c+d x))^{\frac {1}{2} (-p-1)+\frac {p+1}{2}} (\sin (c+d x)+1)^{\frac {1}{2} (-p-1)} (e \cos (c+d x))^{p+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2} (-p-3),\frac {p+1}{2},\frac {p+3}{2},\frac {1}{2} (1-\sin (c+d x))\right )}{d e (p+1)}\) |
Input:
Int[(e*Cos[c + d*x])^p*(a + a*Sin[c + d*x])^2,x]
Output:
-((2^((5 + p)/2)*a^2*(e*Cos[c + d*x])^(1 + p)*Hypergeometric2F1[(-3 - p)/2 , (1 + p)/2, (3 + p)/2, (1 - Sin[c + d*x])/2]*(1 - Sin[c + d*x])^((-1 - p) /2 + (1 + p)/2)*(1 + Sin[c + d*x])^((-1 - p)/2))/(d*e*(1 + p)))
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 , m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] || !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.), x_Symbol] :> Simp[a^m*((g*Cos[e + f*x])^(p + 1)/(f*g*(1 + Sin[e + f*x])^((p + 1)/2)*(1 - Sin[e + f*x])^((p + 1)/2))) Subst[Int[(1 + (b/a )*x)^(m + (p - 1)/2)*(1 - (b/a)*x)^((p - 1)/2), x], x, Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m]
\[\int \left (e \cos \left (d x +c \right )\right )^{p} \left (a +a \sin \left (d x +c \right )\right )^{2}d x\]
Input:
int((e*cos(d*x+c))^p*(a+a*sin(d*x+c))^2,x)
Output:
int((e*cos(d*x+c))^p*(a+a*sin(d*x+c))^2,x)
\[ \int (e \cos (c+d x))^p (a+a \sin (c+d x))^2 \, dx=\int { {\left (a \sin \left (d x + c\right ) + a\right )}^{2} \left (e \cos \left (d x + c\right )\right )^{p} \,d x } \] Input:
integrate((e*cos(d*x+c))^p*(a+a*sin(d*x+c))^2,x, algorithm="fricas")
Output:
integral(-(a^2*cos(d*x + c)^2 - 2*a^2*sin(d*x + c) - 2*a^2)*(e*cos(d*x + c ))^p, x)
\[ \int (e \cos (c+d x))^p (a+a \sin (c+d x))^2 \, dx=a^{2} \left (\int \left (e \cos {\left (c + d x \right )}\right )^{p}\, dx + \int 2 \left (e \cos {\left (c + d x \right )}\right )^{p} \sin {\left (c + d x \right )}\, dx + \int \left (e \cos {\left (c + d x \right )}\right )^{p} \sin ^{2}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate((e*cos(d*x+c))**p*(a+a*sin(d*x+c))**2,x)
Output:
a**2*(Integral((e*cos(c + d*x))**p, x) + Integral(2*(e*cos(c + d*x))**p*si n(c + d*x), x) + Integral((e*cos(c + d*x))**p*sin(c + d*x)**2, x))
\[ \int (e \cos (c+d x))^p (a+a \sin (c+d x))^2 \, dx=\int { {\left (a \sin \left (d x + c\right ) + a\right )}^{2} \left (e \cos \left (d x + c\right )\right )^{p} \,d x } \] Input:
integrate((e*cos(d*x+c))^p*(a+a*sin(d*x+c))^2,x, algorithm="maxima")
Output:
integrate((a*sin(d*x + c) + a)^2*(e*cos(d*x + c))^p, x)
\[ \int (e \cos (c+d x))^p (a+a \sin (c+d x))^2 \, dx=\int { {\left (a \sin \left (d x + c\right ) + a\right )}^{2} \left (e \cos \left (d x + c\right )\right )^{p} \,d x } \] Input:
integrate((e*cos(d*x+c))^p*(a+a*sin(d*x+c))^2,x, algorithm="giac")
Output:
integrate((a*sin(d*x + c) + a)^2*(e*cos(d*x + c))^p, x)
Timed out. \[ \int (e \cos (c+d x))^p (a+a \sin (c+d x))^2 \, dx=\int {\left (e\,\cos \left (c+d\,x\right )\right )}^p\,{\left (a+a\,\sin \left (c+d\,x\right )\right )}^2 \,d x \] Input:
int((e*cos(c + d*x))^p*(a + a*sin(c + d*x))^2,x)
Output:
int((e*cos(c + d*x))^p*(a + a*sin(c + d*x))^2, x)
\[ \int (e \cos (c+d x))^p (a+a \sin (c+d x))^2 \, dx=\frac {e^{p} a^{2} \left (-2 \cos \left (d x +c \right )^{p} \cos \left (d x +c \right )+\left (\int \cos \left (d x +c \right )^{p}d x \right ) d p +\left (\int \cos \left (d x +c \right )^{p}d x \right ) d +\left (\int \cos \left (d x +c \right )^{p} \sin \left (d x +c \right )^{2}d x \right ) d p +\left (\int \cos \left (d x +c \right )^{p} \sin \left (d x +c \right )^{2}d x \right ) d \right )}{d \left (p +1\right )} \] Input:
int((e*cos(d*x+c))^p*(a+a*sin(d*x+c))^2,x)
Output:
(e**p*a**2*( - 2*cos(c + d*x)**p*cos(c + d*x) + int(cos(c + d*x)**p,x)*d*p + int(cos(c + d*x)**p,x)*d + int(cos(c + d*x)**p*sin(c + d*x)**2,x)*d*p + int(cos(c + d*x)**p*sin(c + d*x)**2,x)*d))/(d*(p + 1))