Integrand size = 27, antiderivative size = 113 \[ \int e^{2 (a+i b x)} \cos ^2(d+b x) \sin (d+b x) \, dx=-\frac {e^{2 (a-i d)-i (d+b x)}}{8 b}+\frac {e^{2 (a-i d)+i (d+b x)}}{8 b}-\frac {e^{2 (a-i d)+3 i (d+b x)}}{24 b}-\frac {e^{2 (a-i d)+5 i (d+b x)}}{40 b} \] Output:
-1/8*exp(2*a-2*I*d-I*(b*x+d))/b+1/8*exp(2*a-2*I*d+I*(b*x+d))/b-1/24*exp(2* a-2*I*d+3*I*(b*x+d))/b-1/40*exp(2*a-2*I*d+5*I*(b*x+d))/b
Time = 0.15 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.88 \[ \int e^{2 (a+i b x)} \cos ^2(d+b x) \sin (d+b x) \, dx=-\frac {e^{2 a-i b x} \left (5 e^{2 i b x} \left (-3+e^{2 i b x}\right ) \cos (d)+3 \left (5+e^{6 i b x}\right ) \cos (3 d)+5 i e^{2 i b x} \left (3+e^{2 i b x}\right ) \sin (d)+3 i \left (-5+e^{6 i b x}\right ) \sin (3 d)\right )}{120 b} \] Input:
Integrate[E^(2*(a + I*b*x))*Cos[d + b*x]^2*Sin[d + b*x],x]
Output:
-1/120*(E^(2*a - I*b*x)*(5*E^((2*I)*b*x)*(-3 + E^((2*I)*b*x))*Cos[d] + 3*( 5 + E^((6*I)*b*x))*Cos[3*d] + (5*I)*E^((2*I)*b*x)*(3 + E^((2*I)*b*x))*Sin[ d] + (3*I)*(-5 + E^((6*I)*b*x))*Sin[3*d]))/b
Time = 0.29 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.98, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {4972, 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 e^{2 (a+i b x)} \sin (b x+d) \cos ^2(b x+d) \, dx\) |
\(\Big \downarrow \) 4972 |
\(\displaystyle \int \left (\frac {1}{4} e^{2 (a+i b x)} \sin (b x+d)+\frac {1}{4} e^{2 (a+i b x)} \sin (3 b x+3 d)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i e^{2 (a+i b x)} \sin (b x+d)}{6 b}+\frac {i e^{2 (a+i b x)} \sin (3 b x+3 d)}{10 b}+\frac {e^{2 (a+i b x)} \cos (b x+d)}{12 b}-\frac {3 e^{2 (a+i b x)} \cos (3 b x+3 d)}{20 b}\) |
Input:
Int[E^(2*(a + I*b*x))*Cos[d + b*x]^2*Sin[d + b*x],x]
Output:
(E^(2*(a + I*b*x))*Cos[d + b*x])/(12*b) - (3*E^(2*(a + I*b*x))*Cos[3*d + 3 *b*x])/(20*b) - ((I/6)*E^(2*(a + I*b*x))*Sin[d + b*x])/b + ((I/10)*E^(2*(a + I*b*x))*Sin[3*d + 3*b*x])/b
Int[Cos[(f_.) + (g_.)*(x_)]^(n_.)*(F_)^((c_.)*((a_.) + (b_.)*(x_)))*Sin[(d_ .) + (e_.)*(x_)]^(m_.), x_Symbol] :> Int[ExpandTrigReduce[F^(c*(a + b*x)), Sin[d + e*x]^m*Cos[f + g*x]^n, x], x] /; FreeQ[{F, a, b, c, d, e, f, g}, x] && IGtQ[m, 0] && IGtQ[n, 0]
Time = 0.69 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.75
method | result | size |
parallelrisch | \(-\frac {2 \,{\mathrm e}^{2 i b x +2 a} \left (20 i \tan \left (\frac {b x}{2}+\frac {d}{2}\right )^{3}+15 \tan \left (\frac {b x}{2}+\frac {d}{2}\right )^{4}-4 i \tan \left (\frac {b x}{2}+\frac {d}{2}\right )-20 \tan \left (\frac {b x}{2}+\frac {d}{2}\right )^{2}+1\right )}{15 b \left (1+\tan \left (\frac {b x}{2}+\frac {d}{2}\right )^{2}\right )^{3}}\) | \(85\) |
default | \(-\frac {3 \,{\mathrm e}^{2 i b x +2 a} \cos \left (3 b x +3 d \right )}{20 b}+\frac {i {\mathrm e}^{2 i b x +2 a} \sin \left (3 b x +3 d \right )}{10 b}+\frac {{\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right )}{12 b}-\frac {i {\mathrm e}^{2 i b x +2 a} \sin \left (b x +d \right )}{6 b}\) | \(94\) |
norman | \(\frac {-\frac {2 \,{\mathrm e}^{2 i b x +2 a}}{15 b}-\frac {2 \,{\mathrm e}^{2 i b x +2 a} \tan \left (\frac {b x}{2}+\frac {d}{2}\right )^{4}}{b}+\frac {8 \,{\mathrm e}^{2 i b x +2 a} \tan \left (\frac {b x}{2}+\frac {d}{2}\right )^{2}}{3 b}-\frac {8 i {\mathrm e}^{2 i b x +2 a} \tan \left (\frac {b x}{2}+\frac {d}{2}\right )^{3}}{3 b}+\frac {8 i {\mathrm e}^{2 i b x +2 a} \tan \left (\frac {b x}{2}+\frac {d}{2}\right )}{15 b}}{\left (1+\tan \left (\frac {b x}{2}+\frac {d}{2}\right )^{2}\right )^{3}}\) | \(137\) |
orering | \(-\frac {8 i {\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right )^{2} \sin \left (b x +d \right )}{15 b}-\frac {14 \left (2 i b \,{\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right )^{2} \sin \left (b x +d \right )-2 \,{\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right ) \sin \left (b x +d \right )^{2} b +{\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right )^{3} b \right )}{15 b^{2}}-\frac {8 i \left (-11 b^{2} {\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right )^{2} \sin \left (b x +d \right )-8 i b^{2} {\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right ) \sin \left (b x +d \right )^{2}+4 i b^{2} {\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right )^{3}+2 \,{\mathrm e}^{2 i b x +2 a} b^{2} \sin \left (b x +d \right )^{3}\right )}{15 b^{3}}+\frac {-50 i b^{3} {\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right )^{2} \sin \left (b x +d \right )+44 b^{3} {\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right ) \sin \left (b x +d \right )^{2}-19 b^{3} {\mathrm e}^{2 i b x +2 a} \cos \left (b x +d \right )^{3}+12 i b^{3} {\mathrm e}^{2 i b x +2 a} \sin \left (b x +d \right )^{3}}{15 b^{4}}\) | \(338\) |
Input:
int(exp(2*a+2*I*b*x)*cos(b*x+d)^2*sin(b*x+d),x,method=_RETURNVERBOSE)
Output:
-2/15*exp(2*a+2*I*b*x)*(20*I*tan(1/2*b*x+1/2*d)^3+15*tan(1/2*b*x+1/2*d)^4- 4*I*tan(1/2*b*x+1/2*d)-20*tan(1/2*b*x+1/2*d)^2+1)/b/(1+tan(1/2*b*x+1/2*d)^ 2)^3
Time = 0.07 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.57 \[ \int e^{2 (a+i b x)} \cos ^2(d+b x) \sin (d+b x) \, dx=-\frac {{\left (3 \, e^{\left (6 i \, b x + 2 \, a + 4 i \, d\right )} + 5 \, e^{\left (4 i \, b x + 2 \, a + 2 i \, d\right )} - 15 \, e^{\left (2 i \, b x + 2 \, a\right )} + 15 \, e^{\left (2 \, a - 2 i \, d\right )}\right )} e^{\left (-i \, b x - i \, d\right )}}{120 \, b} \] Input:
integrate(exp(2*a+2*I*b*x)*cos(b*x+d)^2*sin(b*x+d),x, algorithm="fricas")
Output:
-1/120*(3*e^(6*I*b*x + 2*a + 4*I*d) + 5*e^(4*I*b*x + 2*a + 2*I*d) - 15*e^( 2*I*b*x + 2*a) + 15*e^(2*a - 2*I*d))*e^(-I*b*x - I*d)/b
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (83) = 166\).
Time = 0.23 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.53 \[ \int e^{2 (a+i b x)} \cos ^2(d+b x) \sin (d+b x) \, dx=\begin {cases} \frac {\left (- 1536 b^{3} e^{2 a} e^{7 i d} e^{5 i b x} - 2560 b^{3} e^{2 a} e^{5 i d} e^{3 i b x} + 7680 b^{3} e^{2 a} e^{3 i d} e^{i b x} - 7680 b^{3} e^{2 a} e^{i d} e^{- i b x}\right ) e^{- 4 i d}}{61440 b^{4}} & \text {for}\: b^{4} e^{4 i d} \neq 0 \\\frac {x \left (- i e^{2 a} e^{6 i d} - i e^{2 a} e^{4 i d} + i e^{2 a} e^{2 i d} + i e^{2 a}\right ) e^{- 3 i d}}{8} & \text {otherwise} \end {cases} \] Input:
integrate(exp(2*a+2*I*b*x)*cos(b*x+d)**2*sin(b*x+d),x)
Output:
Piecewise(((-1536*b**3*exp(2*a)*exp(7*I*d)*exp(5*I*b*x) - 2560*b**3*exp(2* a)*exp(5*I*d)*exp(3*I*b*x) + 7680*b**3*exp(2*a)*exp(3*I*d)*exp(I*b*x) - 76 80*b**3*exp(2*a)*exp(I*d)*exp(-I*b*x))*exp(-4*I*d)/(61440*b**4), Ne(b**4*e xp(4*I*d), 0)), (x*(-I*exp(2*a)*exp(6*I*d) - I*exp(2*a)*exp(4*I*d) + I*exp (2*a)*exp(2*I*d) + I*exp(2*a))*exp(-3*I*d)/8, True))
Time = 0.04 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.04 \[ \int e^{2 (a+i b x)} \cos ^2(d+b x) \sin (d+b x) \, dx=-\frac {3 \, \cos \left (5 \, b x + 3 \, d\right ) e^{\left (2 \, a\right )} + 5 \, \cos \left (3 \, b x + d\right ) e^{\left (2 \, a\right )} + 15 \, \cos \left (b x + 3 \, d\right ) e^{\left (2 \, a\right )} - 15 \, \cos \left (b x - d\right ) e^{\left (2 \, a\right )} + 3 i \, e^{\left (2 \, a\right )} \sin \left (5 \, b x + 3 \, d\right ) + 5 i \, e^{\left (2 \, a\right )} \sin \left (3 \, b x + d\right ) - 15 i \, e^{\left (2 \, a\right )} \sin \left (b x + 3 \, d\right ) - 15 i \, e^{\left (2 \, a\right )} \sin \left (b x - d\right )}{120 \, b} \] Input:
integrate(exp(2*a+2*I*b*x)*cos(b*x+d)^2*sin(b*x+d),x, algorithm="maxima")
Output:
-1/120*(3*cos(5*b*x + 3*d)*e^(2*a) + 5*cos(3*b*x + d)*e^(2*a) + 15*cos(b*x + 3*d)*e^(2*a) - 15*cos(b*x - d)*e^(2*a) + 3*I*e^(2*a)*sin(5*b*x + 3*d) + 5*I*e^(2*a)*sin(3*b*x + d) - 15*I*e^(2*a)*sin(b*x + 3*d) - 15*I*e^(2*a)*s in(b*x - d))/b
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 171 vs. \(2 (69) = 138\).
Time = 0.16 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.51 \[ \int e^{2 (a+i b x)} \cos ^2(d+b x) \sin (d+b x) \, dx=-\frac {3 \, {\left (e^{\left (5 i \, b x + 3 i \, d\right )} - e^{\left (-5 i \, b x - 3 i \, d\right )}\right )} e^{\left (2 \, a\right )} + 5 \, {\left (e^{\left (3 i \, b x + i \, d\right )} - e^{\left (-3 i \, b x - i \, d\right )}\right )} e^{\left (2 \, a\right )} - 15 \, {\left (e^{\left (i \, b x + 3 i \, d\right )} - e^{\left (-i \, b x - 3 i \, d\right )}\right )} e^{\left (2 \, a\right )} - 15 \, {\left (e^{\left (i \, b x - i \, d\right )} - e^{\left (-i \, b x + i \, d\right )}\right )} e^{\left (2 \, a\right )} + 30 \, \cos \left (b x + 3 \, d\right ) e^{\left (2 \, a\right )} - 30 \, \cos \left (-b x + d\right ) e^{\left (2 \, a\right )} + 10 \, \cos \left (-3 \, b x - d\right ) e^{\left (2 \, a\right )} + 6 \, \cos \left (-5 \, b x - 3 \, d\right ) e^{\left (2 \, a\right )}}{240 \, b} \] Input:
integrate(exp(2*a+2*I*b*x)*cos(b*x+d)^2*sin(b*x+d),x, algorithm="giac")
Output:
-1/240*(3*(e^(5*I*b*x + 3*I*d) - e^(-5*I*b*x - 3*I*d))*e^(2*a) + 5*(e^(3*I *b*x + I*d) - e^(-3*I*b*x - I*d))*e^(2*a) - 15*(e^(I*b*x + 3*I*d) - e^(-I* b*x - 3*I*d))*e^(2*a) - 15*(e^(I*b*x - I*d) - e^(-I*b*x + I*d))*e^(2*a) + 30*cos(b*x + 3*d)*e^(2*a) - 30*cos(-b*x + d)*e^(2*a) + 10*cos(-3*b*x - d)* e^(2*a) + 6*cos(-5*b*x - 3*d)*e^(2*a))/b
Time = 16.90 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.14 \[ \int e^{2 (a+i b x)} \cos ^2(d+b x) \sin (d+b x) \, dx=-\frac {{\mathrm {e}}^{2\,a}\,\left (\cos \left (b\,x\right )-\sin \left (b\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (3\,d\right )-\sin \left (3\,d\right )\,1{}\mathrm {i}\right )}{8\,b}-\frac {{\mathrm {e}}^{2\,a}\,\left (\cos \left (5\,b\,x\right )+\sin \left (5\,b\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (3\,d\right )+\sin \left (3\,d\right )\,1{}\mathrm {i}\right )}{40\,b}+\frac {{\mathrm {e}}^{2\,a}\,\left (\cos \left (b\,x\right )+\sin \left (b\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (d\right )-\sin \left (d\right )\,1{}\mathrm {i}\right )}{8\,b}-\frac {{\mathrm {e}}^{2\,a}\,\left (\cos \left (3\,b\,x\right )+\sin \left (3\,b\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (d\right )+\sin \left (d\right )\,1{}\mathrm {i}\right )}{24\,b} \] Input:
int(cos(d + b*x)^2*exp(2*a + b*x*2i)*sin(d + b*x),x)
Output:
(exp(2*a)*(cos(b*x) + sin(b*x)*1i)*(cos(d) - sin(d)*1i))/(8*b) - (exp(2*a) *(cos(5*b*x) + sin(5*b*x)*1i)*(cos(3*d) + sin(3*d)*1i))/(40*b) - (exp(2*a) *(cos(b*x) - sin(b*x)*1i)*(cos(3*d) - sin(3*d)*1i))/(8*b) - (exp(2*a)*(cos (3*b*x) + sin(3*b*x)*1i)*(cos(d) + sin(d)*1i))/(24*b)
Time = 0.19 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.77 \[ \int e^{2 (a+i b x)} \cos ^2(d+b x) \sin (d+b x) \, dx=\frac {e^{2 b i x +2 a} \left (9 \cos \left (b x +d \right ) \sin \left (b x +d \right )^{2}+14 \cos \left (b x +d \right ) \sin \left (b x +d \right ) i -\cos \left (b x +d \right )-6 \sin \left (b x +d \right )^{3} i +14 \sin \left (b x +d \right )^{2}+2 \sin \left (b x +d \right ) i -7\right )}{15 b} \] Input:
int(exp(2*a+2*I*b*x)*cos(b*x+d)^2*sin(b*x+d),x)
Output:
(e**(2*a + 2*b*i*x)*(9*cos(b*x + d)*sin(b*x + d)**2 + 14*cos(b*x + d)*sin( b*x + d)*i - cos(b*x + d) - 6*sin(b*x + d)**3*i + 14*sin(b*x + d)**2 + 2*s in(b*x + d)*i - 7))/(15*b)