Integrand size = 23, antiderivative size = 157 \[ \int (e \cos (c+d x))^p (a+b \sin (c+d x))^2 \, dx=-\frac {a b (3+p) (e \cos (c+d x))^{1+p}}{d e (1+p) (2+p)}-\frac {\left (b^2+a^2 (2+p)\right ) (e \cos (c+d x))^{1+p} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+p}{2},\frac {3+p}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{d e (1+p) (2+p) \sqrt {\sin ^2(c+d x)}}-\frac {b (e \cos (c+d x))^{1+p} (a+b \sin (c+d x))}{d e (2+p)} \] Output:
-a*b*(3+p)*(e*cos(d*x+c))^(p+1)/d/e/(p+1)/(2+p)-(b^2+a^2*(2+p))*(e*cos(d*x +c))^(p+1)*hypergeom([1/2, 1/2*p+1/2],[3/2+1/2*p],cos(d*x+c)^2)*sin(d*x+c) /d/e/(p+1)/(2+p)/(sin(d*x+c)^2)^(1/2)-b*(e*cos(d*x+c))^(p+1)*(a+b*sin(d*x+ c))/d/e/(2+p)
Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
Time = 27.07 (sec) , antiderivative size = 7484, normalized size of antiderivative = 47.67 \[ \int (e \cos (c+d x))^p (a+b \sin (c+d x))^2 \, dx=\text {Result too large to show} \] Input:
Integrate[(e*Cos[c + d*x])^p*(a + b*Sin[c + d*x])^2,x]
Output:
Result too large to show
Time = 0.50 (sec) , antiderivative size = 154, normalized size of antiderivative = 0.98, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 3171, 3042, 3148, 3042, 3122}
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 (c+d x))^2 (e \cos (c+d x))^p \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \sin (c+d x))^2 (e \cos (c+d x))^pdx\) |
\(\Big \downarrow \) 3171 |
\(\displaystyle \frac {\int (e \cos (c+d x))^p \left ((p+2) a^2+b (p+3) \sin (c+d x) a+b^2\right )dx}{p+2}-\frac {b (a+b \sin (c+d x)) (e \cos (c+d x))^{p+1}}{d e (p+2)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (e \cos (c+d x))^p \left ((p+2) a^2+b (p+3) \sin (c+d x) a+b^2\right )dx}{p+2}-\frac {b (a+b \sin (c+d x)) (e \cos (c+d x))^{p+1}}{d e (p+2)}\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle \frac {\left (a^2 (p+2)+b^2\right ) \int (e \cos (c+d x))^pdx-\frac {a b (p+3) (e \cos (c+d x))^{p+1}}{d e (p+1)}}{p+2}-\frac {b (a+b \sin (c+d x)) (e \cos (c+d x))^{p+1}}{d e (p+2)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 (p+2)+b^2\right ) \int \left (e \sin \left (c+d x+\frac {\pi }{2}\right )\right )^pdx-\frac {a b (p+3) (e \cos (c+d x))^{p+1}}{d e (p+1)}}{p+2}-\frac {b (a+b \sin (c+d x)) (e \cos (c+d x))^{p+1}}{d e (p+2)}\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle \frac {-\frac {\left (a^2 (p+2)+b^2\right ) \sin (c+d x) (e \cos (c+d x))^{p+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {p+1}{2},\frac {p+3}{2},\cos ^2(c+d x)\right )}{d e (p+1) \sqrt {\sin ^2(c+d x)}}-\frac {a b (p+3) (e \cos (c+d x))^{p+1}}{d e (p+1)}}{p+2}-\frac {b (a+b \sin (c+d x)) (e \cos (c+d x))^{p+1}}{d e (p+2)}\) |
Input:
Int[(e*Cos[c + d*x])^p*(a + b*Sin[c + d*x])^2,x]
Output:
-((b*(e*Cos[c + d*x])^(1 + p)*(a + b*Sin[c + d*x]))/(d*e*(2 + p))) + (-((a *b*(3 + p)*(e*Cos[c + d*x])^(1 + p))/(d*e*(1 + p))) - ((b^2 + a^2*(2 + p)) *(e*Cos[c + d*x])^(1 + p)*Hypergeometric2F1[1/2, (1 + p)/2, (3 + p)/2, Cos [c + d*x]^2]*Sin[c + d*x])/(d*e*(1 + p)*Sqrt[Sin[c + d*x]^2]))/(2 + p)
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 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 - 1)/(f*g*(m + p))), x] + Simp[1/(m + p) Int[(g*Cos[e + f*x])^p* (a + b*Sin[e + f*x])^(m - 2)*(b^2*(m - 1) + a^2*(m + p) + a*b*(2*m + p - 1) *Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] && NeQ[m + p, 0] && (IntegersQ[2*m, 2*p] || IntegerQ[m])
\[\int \left (e \cos \left (d x +c \right )\right )^{p} \left (a +b \sin \left (d x +c \right )\right )^{2}d x\]
Input:
int((e*cos(d*x+c))^p*(a+b*sin(d*x+c))^2,x)
Output:
int((e*cos(d*x+c))^p*(a+b*sin(d*x+c))^2,x)
\[ \int (e \cos (c+d x))^p (a+b \sin (c+d x))^2 \, dx=\int { {\left (b \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+b*sin(d*x+c))^2,x, algorithm="fricas")
Output:
integral(-(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2)*(e*cos(d*x + c))^p, x)
\[ \int (e \cos (c+d x))^p (a+b \sin (c+d x))^2 \, dx=\int \left (e \cos {\left (c + d x \right )}\right )^{p} \left (a + b \sin {\left (c + d x \right )}\right )^{2}\, dx \] Input:
integrate((e*cos(d*x+c))**p*(a+b*sin(d*x+c))**2,x)
Output:
Integral((e*cos(c + d*x))**p*(a + b*sin(c + d*x))**2, x)
\[ \int (e \cos (c+d x))^p (a+b \sin (c+d x))^2 \, dx=\int { {\left (b \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+b*sin(d*x+c))^2,x, algorithm="maxima")
Output:
integrate((b*sin(d*x + c) + a)^2*(e*cos(d*x + c))^p, x)
\[ \int (e \cos (c+d x))^p (a+b \sin (c+d x))^2 \, dx=\int { {\left (b \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+b*sin(d*x+c))^2,x, algorithm="giac")
Output:
integrate((b*sin(d*x + c) + a)^2*(e*cos(d*x + c))^p, x)
Timed out. \[ \int (e \cos (c+d x))^p (a+b \sin (c+d x))^2 \, dx=\int {\left (e\,\cos \left (c+d\,x\right )\right )}^p\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^2 \,d x \] Input:
int((e*cos(c + d*x))^p*(a + b*sin(c + d*x))^2,x)
Output:
int((e*cos(c + d*x))^p*(a + b*sin(c + d*x))^2, x)
\[ \int (e \cos (c+d x))^p (a+b \sin (c+d x))^2 \, dx=\frac {e^{p} \left (-2 \cos \left (d x +c \right )^{p} \cos \left (d x +c \right ) a b +\left (\int \cos \left (d x +c \right )^{p}d x \right ) a^{2} d p +\left (\int \cos \left (d x +c \right )^{p}d x \right ) a^{2} d +\left (\int \cos \left (d x +c \right )^{p} \sin \left (d x +c \right )^{2}d x \right ) b^{2} d p +\left (\int \cos \left (d x +c \right )^{p} \sin \left (d x +c \right )^{2}d x \right ) b^{2} d \right )}{d \left (p +1\right )} \] Input:
int((e*cos(d*x+c))^p*(a+b*sin(d*x+c))^2,x)
Output:
(e**p*( - 2*cos(c + d*x)**p*cos(c + d*x)*a*b + int(cos(c + d*x)**p,x)*a**2 *d*p + int(cos(c + d*x)**p,x)*a**2*d + int(cos(c + d*x)**p*sin(c + d*x)**2 ,x)*b**2*d*p + int(cos(c + d*x)**p*sin(c + d*x)**2,x)*b**2*d))/(d*(p + 1))