Integrand size = 20, antiderivative size = 299 \[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\frac {3 a^2 (c+d x)^{1+m}}{2 d (1+m)}-\frac {a^2 e^{i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {i f (c+d x)}{d}\right )}{f}-\frac {a^2 e^{-i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac {i f (c+d x)}{d}\right )}{f}+\frac {i 2^{-3-m} a^2 e^{2 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {2 i f (c+d x)}{d}\right )}{f}-\frac {i 2^{-3-m} a^2 e^{-2 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac {2 i f (c+d x)}{d}\right )}{f} \] Output:
3/2*a^2*(d*x+c)^(1+m)/d/(1+m)-a^2*exp(I*(e-c*f/d))*(d*x+c)^m*GAMMA(1+m,-I* f*(d*x+c)/d)/f/((-I*f*(d*x+c)/d)^m)-a^2*(d*x+c)^m*GAMMA(1+m,I*f*(d*x+c)/d) /exp(I*(e-c*f/d))/f/((I*f*(d*x+c)/d)^m)+I*2^(-3-m)*a^2*exp(2*I*(e-c*f/d))* (d*x+c)^m*GAMMA(1+m,-2*I*f*(d*x+c)/d)/f/((-I*f*(d*x+c)/d)^m)-I*2^(-3-m)*a^ 2*(d*x+c)^m*GAMMA(1+m,2*I*f*(d*x+c)/d)/exp(2*I*(e-c*f/d))/f/((I*f*(d*x+c)/ d)^m)
Time = 0.33 (sec) , antiderivative size = 260, normalized size of antiderivative = 0.87 \[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\frac {1}{8} a^2 (c+d x)^m \left (\frac {12 (c+d x)}{d (1+m)}-\frac {8 e^{i \left (e-\frac {c f}{d}\right )} \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {i f (c+d x)}{d}\right )}{f}-\frac {8 e^{-i \left (e-\frac {c f}{d}\right )} \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac {i f (c+d x)}{d}\right )}{f}+\frac {i 2^{-m} e^{2 i \left (e-\frac {c f}{d}\right )} \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,-\frac {2 i f (c+d x)}{d}\right )}{f}-\frac {i 2^{-m} e^{-2 i \left (e-\frac {c f}{d}\right )} \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (1+m,\frac {2 i f (c+d x)}{d}\right )}{f}\right ) \] Input:
Integrate[(c + d*x)^m*(a + a*Sin[e + f*x])^2,x]
Output:
(a^2*(c + d*x)^m*((12*(c + d*x))/(d*(1 + m)) - (8*E^(I*(e - (c*f)/d))*Gamm a[1 + m, ((-I)*f*(c + d*x))/d])/(f*(((-I)*f*(c + d*x))/d)^m) - (8*Gamma[1 + m, (I*f*(c + d*x))/d])/(E^(I*(e - (c*f)/d))*f*((I*f*(c + d*x))/d)^m) + ( I*E^((2*I)*(e - (c*f)/d))*Gamma[1 + m, ((-2*I)*f*(c + d*x))/d])/(2^m*f*((( -I)*f*(c + d*x))/d)^m) - (I*Gamma[1 + m, ((2*I)*f*(c + d*x))/d])/(2^m*E^(( 2*I)*(e - (c*f)/d))*f*((I*f*(c + d*x))/d)^m)))/8
Time = 0.65 (sec) , antiderivative size = 293, normalized size of antiderivative = 0.98, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 3799, 3042, 3793, 2009}
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 (c+d x)^m (a \sin (e+f x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^m (a \sin (e+f x)+a)^2dx\) |
\(\Big \downarrow \) 3799 |
\(\displaystyle 4 a^2 \int (c+d x)^m \sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 4 a^2 \int (c+d x)^m \sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4dx\) |
\(\Big \downarrow \) 3793 |
\(\displaystyle 4 a^2 \int \left (-\frac {1}{8} \cos (2 e+2 f x) (c+d x)^m+\frac {1}{2} \sin (e+f x) (c+d x)^m+\frac {3}{8} (c+d x)^m\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle 4 a^2 \left (-\frac {e^{i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,-\frac {i f (c+d x)}{d}\right )}{4 f}+\frac {i 2^{-m-5} e^{2 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (-\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,-\frac {2 i f (c+d x)}{d}\right )}{f}-\frac {e^{-i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,\frac {i f (c+d x)}{d}\right )}{4 f}-\frac {i 2^{-m-5} e^{-2 i \left (e-\frac {c f}{d}\right )} (c+d x)^m \left (\frac {i f (c+d x)}{d}\right )^{-m} \Gamma \left (m+1,\frac {2 i f (c+d x)}{d}\right )}{f}+\frac {3 (c+d x)^{m+1}}{8 d (m+1)}\right )\) |
Input:
Int[(c + d*x)^m*(a + a*Sin[e + f*x])^2,x]
Output:
4*a^2*((3*(c + d*x)^(1 + m))/(8*d*(1 + m)) - (E^(I*(e - (c*f)/d))*(c + d*x )^m*Gamma[1 + m, ((-I)*f*(c + d*x))/d])/(4*f*(((-I)*f*(c + d*x))/d)^m) - ( (c + d*x)^m*Gamma[1 + m, (I*f*(c + d*x))/d])/(4*E^(I*(e - (c*f)/d))*f*((I* f*(c + d*x))/d)^m) + (I*2^(-5 - m)*E^((2*I)*(e - (c*f)/d))*(c + d*x)^m*Gam ma[1 + m, ((-2*I)*f*(c + d*x))/d])/(f*(((-I)*f*(c + d*x))/d)^m) - (I*2^(-5 - m)*(c + d*x)^m*Gamma[1 + m, ((2*I)*f*(c + d*x))/d])/(E^((2*I)*(e - (c*f )/d))*f*((I*f*(c + d*x))/d)^m))
Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> In t[ExpandTrigReduce[(c + d*x)^m, Sin[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f , m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1]))
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Simp[(2*a)^n Int[(c + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^ 2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])
\[\int \left (d x +c \right )^{m} \left (a +a \sin \left (f x +e \right )\right )^{2}d x\]
Input:
int((d*x+c)^m*(a+a*sin(f*x+e))^2,x)
Output:
int((d*x+c)^m*(a+a*sin(f*x+e))^2,x)
Time = 0.09 (sec) , antiderivative size = 270, normalized size of antiderivative = 0.90 \[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=-\frac {8 \, {\left (a^{2} d m + a^{2} d\right )} e^{\left (-\frac {d m \log \left (\frac {i \, f}{d}\right ) + i \, d e - i \, c f}{d}\right )} \Gamma \left (m + 1, \frac {i \, d f x + i \, c f}{d}\right ) - {\left (i \, a^{2} d m + i \, a^{2} d\right )} e^{\left (-\frac {d m \log \left (-\frac {2 i \, f}{d}\right ) - 2 i \, d e + 2 i \, c f}{d}\right )} \Gamma \left (m + 1, -\frac {2 \, {\left (i \, d f x + i \, c f\right )}}{d}\right ) + 8 \, {\left (a^{2} d m + a^{2} d\right )} e^{\left (-\frac {d m \log \left (-\frac {i \, f}{d}\right ) - i \, d e + i \, c f}{d}\right )} \Gamma \left (m + 1, \frac {-i \, d f x - i \, c f}{d}\right ) - {\left (-i \, a^{2} d m - i \, a^{2} d\right )} e^{\left (-\frac {d m \log \left (\frac {2 i \, f}{d}\right ) + 2 i \, d e - 2 i \, c f}{d}\right )} \Gamma \left (m + 1, -\frac {2 \, {\left (-i \, d f x - i \, c f\right )}}{d}\right ) - 12 \, {\left (a^{2} d f x + a^{2} c f\right )} {\left (d x + c\right )}^{m}}{8 \, {\left (d f m + d f\right )}} \] Input:
integrate((d*x+c)^m*(a+a*sin(f*x+e))^2,x, algorithm="fricas")
Output:
-1/8*(8*(a^2*d*m + a^2*d)*e^(-(d*m*log(I*f/d) + I*d*e - I*c*f)/d)*gamma(m + 1, (I*d*f*x + I*c*f)/d) - (I*a^2*d*m + I*a^2*d)*e^(-(d*m*log(-2*I*f/d) - 2*I*d*e + 2*I*c*f)/d)*gamma(m + 1, -2*(I*d*f*x + I*c*f)/d) + 8*(a^2*d*m + a^2*d)*e^(-(d*m*log(-I*f/d) - I*d*e + I*c*f)/d)*gamma(m + 1, (-I*d*f*x - I*c*f)/d) - (-I*a^2*d*m - I*a^2*d)*e^(-(d*m*log(2*I*f/d) + 2*I*d*e - 2*I*c *f)/d)*gamma(m + 1, -2*(-I*d*f*x - I*c*f)/d) - 12*(a^2*d*f*x + a^2*c*f)*(d *x + c)^m)/(d*f*m + d*f)
\[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=a^{2} \left (\int 2 \left (c + d x\right )^{m} \sin {\left (e + f x \right )}\, dx + \int \left (c + d x\right )^{m} \sin ^{2}{\left (e + f x \right )}\, dx + \int \left (c + d x\right )^{m}\, dx\right ) \] Input:
integrate((d*x+c)**m*(a+a*sin(f*x+e))**2,x)
Output:
a**2*(Integral(2*(c + d*x)**m*sin(e + f*x), x) + Integral((c + d*x)**m*sin (e + f*x)**2, x) + Integral((c + d*x)**m, x))
\[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{2} {\left (d x + c\right )}^{m} \,d x } \] Input:
integrate((d*x+c)^m*(a+a*sin(f*x+e))^2,x, algorithm="maxima")
Output:
(d*x + c)^(m + 1)*a^2/(d*(m + 1)) + 1/2*(a^2*e^(m*log(d*x + c) + log(d*x + c)) - (a^2*d*m + a^2*d)*integrate((d*x + c)^m*cos(2*f*x + 2*e), x) + 4*(a ^2*d*m + a^2*d)*integrate((d*x + c)^m*sin(f*x + e), x))/(d*m + d)
\[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{2} {\left (d x + c\right )}^{m} \,d x } \] Input:
integrate((d*x+c)^m*(a+a*sin(f*x+e))^2,x, algorithm="giac")
Output:
integrate((a*sin(f*x + e) + a)^2*(d*x + c)^m, x)
Timed out. \[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\int {\left (a+a\,\sin \left (e+f\,x\right )\right )}^2\,{\left (c+d\,x\right )}^m \,d x \] Input:
int((a + a*sin(e + f*x))^2*(c + d*x)^m,x)
Output:
int((a + a*sin(e + f*x))^2*(c + d*x)^m, x)
\[ \int (c+d x)^m (a+a \sin (e+f x))^2 \, dx=\frac {a^{2} \left (\left (d x +c \right )^{m} c +\left (d x +c \right )^{m} d x +\left (\int \left (d x +c \right )^{m} \sin \left (f x +e \right )^{2}d x \right ) d m +\left (\int \left (d x +c \right )^{m} \sin \left (f x +e \right )^{2}d x \right ) d +2 \left (\int \left (d x +c \right )^{m} \sin \left (f x +e \right )d x \right ) d m +2 \left (\int \left (d x +c \right )^{m} \sin \left (f x +e \right )d x \right ) d \right )}{d \left (m +1\right )} \] Input:
int((d*x+c)^m*(a+a*sin(f*x+e))^2,x)
Output:
(a**2*((c + d*x)**m*c + (c + d*x)**m*d*x + int((c + d*x)**m*sin(e + f*x)** 2,x)*d*m + int((c + d*x)**m*sin(e + f*x)**2,x)*d + 2*int((c + d*x)**m*sin( e + f*x),x)*d*m + 2*int((c + d*x)**m*sin(e + f*x),x)*d))/(d*(m + 1))