Integrand size = 22, antiderivative size = 119 \[ \int e^{a+b x} \cos (c+d x) \sin ^2(c+d x) \, dx=\frac {b e^{a+b x} \cos (c+d x)}{4 \left (b^2+d^2\right )}-\frac {b e^{a+b x} \cos (3 c+3 d x)}{4 \left (b^2+9 d^2\right )}+\frac {d e^{a+b x} \sin (c+d x)}{4 \left (b^2+d^2\right )}-\frac {3 d e^{a+b x} \sin (3 c+3 d x)}{4 \left (b^2+9 d^2\right )} \] Output:
b*exp(b*x+a)*cos(d*x+c)/(4*b^2+4*d^2)-b*exp(b*x+a)*cos(3*d*x+3*c)/(4*b^2+3 6*d^2)+d*exp(b*x+a)*sin(d*x+c)/(4*b^2+4*d^2)-3*d*exp(b*x+a)*sin(3*d*x+3*c) /(4*b^2+36*d^2)
Time = 0.46 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.62 \[ \int e^{a+b x} \cos (c+d x) \sin ^2(c+d x) \, dx=\frac {1}{4} e^{a+b x} \left (\frac {b \cos (c+d x)+d \sin (c+d x)}{b^2+d^2}-\frac {b \cos (3 (c+d x))+3 d \sin (3 (c+d x))}{b^2+9 d^2}\right ) \] Input:
Integrate[E^(a + b*x)*Cos[c + d*x]*Sin[c + d*x]^2,x]
Output:
(E^(a + b*x)*((b*Cos[c + d*x] + d*Sin[c + d*x])/(b^2 + d^2) - (b*Cos[3*(c + d*x)] + 3*d*Sin[3*(c + d*x)])/(b^2 + 9*d^2)))/4
Time = 0.30 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, 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^{a+b x} \sin ^2(c+d x) \cos (c+d x) \, dx\) |
\(\Big \downarrow \) 4972 |
\(\displaystyle \int \left (\frac {1}{4} e^{a+b x} \cos (c+d x)-\frac {1}{4} e^{a+b x} \cos (3 c+3 d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {d e^{a+b x} \sin (c+d x)}{4 \left (b^2+d^2\right )}-\frac {3 d e^{a+b x} \sin (3 c+3 d x)}{4 \left (b^2+9 d^2\right )}+\frac {b e^{a+b x} \cos (c+d x)}{4 \left (b^2+d^2\right )}-\frac {b e^{a+b x} \cos (3 c+3 d x)}{4 \left (b^2+9 d^2\right )}\) |
Input:
Int[E^(a + b*x)*Cos[c + d*x]*Sin[c + d*x]^2,x]
Output:
(b*E^(a + b*x)*Cos[c + d*x])/(4*(b^2 + d^2)) - (b*E^(a + b*x)*Cos[3*c + 3* d*x])/(4*(b^2 + 9*d^2)) + (d*E^(a + b*x)*Sin[c + d*x])/(4*(b^2 + d^2)) - ( 3*d*E^(a + b*x)*Sin[3*c + 3*d*x])/(4*(b^2 + 9*d^2))
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 = 1.42 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.91
method | result | size |
default | \(-\frac {b \,{\mathrm e}^{b x +a} \cos \left (3 d x +3 c \right )}{4 \left (b^{2}+9 d^{2}\right )}-\frac {3 d \,{\mathrm e}^{b x +a} \sin \left (3 d x +3 c \right )}{4 \left (b^{2}+9 d^{2}\right )}+\frac {b \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )}{4 b^{2}+4 d^{2}}+\frac {d \,{\mathrm e}^{b x +a} \sin \left (d x +c \right )}{4 b^{2}+4 d^{2}}\) | \(108\) |
risch | \(-\frac {{\mathrm e}^{b x +a} \left (\left (-2 b^{3}-18 b \,d^{2}\right ) \cos \left (d x +c \right )-2 d \left (b^{2}+9 d^{2}\right ) \sin \left (d x +c \right )+\left (2 b^{3}+2 b \,d^{2}\right ) \cos \left (3 d x +3 c \right )+6 d \left (b^{2}+d^{2}\right ) \sin \left (3 d x +3 c \right )\right )}{8 \left (3 i d +b \right ) \left (i d +b \right ) \left (i d -b \right ) \left (3 i d -b \right )}\) | \(124\) |
parallelrisch | \(-\frac {4 \left (\frac {b \,d^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{2}+b^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+\left (b^{3}+\frac {3}{2} b \,d^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-4 b^{2} d -6 d^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (-b^{3}-\frac {3}{2} b \,d^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+b^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {b \,d^{2}}{2}\right ) {\mathrm e}^{b x +a}}{\left (b^{2}+9 d^{2}\right ) \left (b^{2}+d^{2}\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}\) | \(168\) |
norman | \(\frac {\frac {2 b \,d^{2} {\mathrm e}^{b x +a}}{b^{4}+10 b^{2} d^{2}+9 d^{4}}-\frac {2 b \,d^{2} {\mathrm e}^{b x +a} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{b^{4}+10 b^{2} d^{2}+9 d^{4}}+\frac {2 b \left (2 b^{2}+3 d^{2}\right ) {\mathrm e}^{b x +a} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{b^{4}+10 b^{2} d^{2}+9 d^{4}}-\frac {2 b \left (2 b^{2}+3 d^{2}\right ) {\mathrm e}^{b x +a} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{b^{4}+10 b^{2} d^{2}+9 d^{4}}-\frac {4 b^{2} d \,{\mathrm e}^{b x +a} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{4}+10 b^{2} d^{2}+9 d^{4}}-\frac {4 b^{2} d \,{\mathrm e}^{b x +a} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{b^{4}+10 b^{2} d^{2}+9 d^{4}}+\frac {8 d \left (2 b^{2}+3 d^{2}\right ) {\mathrm e}^{b x +a} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{b^{4}+10 b^{2} d^{2}+9 d^{4}}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}\) | \(323\) |
orering | \(\frac {4 b \left (b^{2}+5 d^{2}\right ) {\mathrm e}^{b x +a} \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}}{b^{4}+10 b^{2} d^{2}+9 d^{4}}-\frac {2 \left (3 b^{2}+5 d^{2}\right ) \left (b \,{\mathrm e}^{b x +a} \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-{\mathrm e}^{b x +a} d \sin \left (d x +c \right )^{3}+2 \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )^{2} \sin \left (d x +c \right ) d \right )}{b^{4}+10 b^{2} d^{2}+9 d^{4}}+\frac {4 b \left (b^{2} {\mathrm e}^{b x +a} \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-2 b \,{\mathrm e}^{b x +a} d \sin \left (d x +c \right )^{3}+4 b \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )^{2} \sin \left (d x +c \right ) d -7 \,{\mathrm e}^{b x +a} d^{2} \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )^{3} d^{2}\right )}{b^{4}+10 b^{2} d^{2}+9 d^{4}}-\frac {b^{3} {\mathrm e}^{b x +a} \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-3 b^{2} {\mathrm e}^{b x +a} d \sin \left (d x +c \right )^{3}+6 b^{2} {\mathrm e}^{b x +a} \cos \left (d x +c \right )^{2} \sin \left (d x +c \right ) d -21 b \,{\mathrm e}^{b x +a} d^{2} \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )+6 b \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )^{3} d^{2}-20 \,{\mathrm e}^{b x +a} d^{3} \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}+7 \,{\mathrm e}^{b x +a} d^{3} \sin \left (d x +c \right )^{3}}{b^{4}+10 b^{2} d^{2}+9 d^{4}}\) | \(463\) |
Input:
int(exp(b*x+a)*cos(d*x+c)*sin(d*x+c)^2,x,method=_RETURNVERBOSE)
Output:
-1/4*b/(b^2+9*d^2)*exp(b*x+a)*cos(3*d*x+3*c)-3/4*d/(b^2+9*d^2)*exp(b*x+a)* sin(3*d*x+3*c)+1/4*b/(b^2+d^2)*exp(b*x+a)*cos(d*x+c)+1/4*d/(b^2+d^2)*exp(b *x+a)*sin(d*x+c)
Time = 0.08 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.92 \[ \int e^{a+b x} \cos (c+d x) \sin ^2(c+d x) \, dx=\frac {{\left (b^{2} d + 3 \, d^{3} - 3 \, {\left (b^{2} d + d^{3}\right )} \cos \left (d x + c\right )^{2}\right )} e^{\left (b x + a\right )} \sin \left (d x + c\right ) - {\left ({\left (b^{3} + b d^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (b^{3} + 3 \, b d^{2}\right )} \cos \left (d x + c\right )\right )} e^{\left (b x + a\right )}}{b^{4} + 10 \, b^{2} d^{2} + 9 \, d^{4}} \] Input:
integrate(exp(b*x+a)*cos(d*x+c)*sin(d*x+c)^2,x, algorithm="fricas")
Output:
((b^2*d + 3*d^3 - 3*(b^2*d + d^3)*cos(d*x + c)^2)*e^(b*x + a)*sin(d*x + c) - ((b^3 + b*d^2)*cos(d*x + c)^3 - (b^3 + 3*b*d^2)*cos(d*x + c))*e^(b*x + a))/(b^4 + 10*b^2*d^2 + 9*d^4)
Result contains complex when optimal does not.
Time = 2.94 (sec) , antiderivative size = 1040, normalized size of antiderivative = 8.74 \[ \int e^{a+b x} \cos (c+d x) \sin ^2(c+d x) \, dx=\text {Too large to display} \] Input:
integrate(exp(b*x+a)*cos(d*x+c)*sin(d*x+c)**2,x)
Output:
Piecewise((x*exp(a)*sin(c)**2*cos(c), Eq(b, 0) & Eq(d, 0)), (I*x*exp(a)*ex p(-3*I*d*x)*sin(c + d*x)**3/8 + 3*x*exp(a)*exp(-3*I*d*x)*sin(c + d*x)**2*c os(c + d*x)/8 - 3*I*x*exp(a)*exp(-3*I*d*x)*sin(c + d*x)*cos(c + d*x)**2/8 - x*exp(a)*exp(-3*I*d*x)*cos(c + d*x)**3/8 - exp(a)*exp(-3*I*d*x)*sin(c + d*x)**3/(24*d) + I*exp(a)*exp(-3*I*d*x)*sin(c + d*x)**2*cos(c + d*x)/(4*d) + I*exp(a)*exp(-3*I*d*x)*cos(c + d*x)**3/(24*d), Eq(b, -3*I*d)), (I*x*exp (a)*exp(-I*d*x)*sin(c + d*x)**3/8 + x*exp(a)*exp(-I*d*x)*sin(c + d*x)**2*c os(c + d*x)/8 + I*x*exp(a)*exp(-I*d*x)*sin(c + d*x)*cos(c + d*x)**2/8 + x* exp(a)*exp(-I*d*x)*cos(c + d*x)**3/8 + 3*exp(a)*exp(-I*d*x)*sin(c + d*x)** 3/(8*d) - I*exp(a)*exp(-I*d*x)*sin(c + d*x)**2*cos(c + d*x)/(4*d) - I*exp( a)*exp(-I*d*x)*cos(c + d*x)**3/(8*d), Eq(b, -I*d)), (-I*x*exp(a)*exp(I*d*x )*sin(c + d*x)**3/8 + x*exp(a)*exp(I*d*x)*sin(c + d*x)**2*cos(c + d*x)/8 - I*x*exp(a)*exp(I*d*x)*sin(c + d*x)*cos(c + d*x)**2/8 + x*exp(a)*exp(I*d*x )*cos(c + d*x)**3/8 + 3*exp(a)*exp(I*d*x)*sin(c + d*x)**3/(8*d) + I*exp(a) *exp(I*d*x)*sin(c + d*x)**2*cos(c + d*x)/(4*d) + I*exp(a)*exp(I*d*x)*cos(c + d*x)**3/(8*d), Eq(b, I*d)), (-I*x*exp(a)*exp(3*I*d*x)*sin(c + d*x)**3/8 + 3*x*exp(a)*exp(3*I*d*x)*sin(c + d*x)**2*cos(c + d*x)/8 + 3*I*x*exp(a)*e xp(3*I*d*x)*sin(c + d*x)*cos(c + d*x)**2/8 - x*exp(a)*exp(3*I*d*x)*cos(c + d*x)**3/8 - exp(a)*exp(3*I*d*x)*sin(c + d*x)**3/(24*d) - I*exp(a)*exp(3*I *d*x)*sin(c + d*x)**2*cos(c + d*x)/(4*d) - I*exp(a)*exp(3*I*d*x)*cos(c ...
Leaf count of result is larger than twice the leaf count of optimal. 538 vs. \(2 (107) = 214\).
Time = 0.12 (sec) , antiderivative size = 538, normalized size of antiderivative = 4.52 \[ \int e^{a+b x} \cos (c+d x) \sin ^2(c+d x) \, dx =\text {Too large to display} \] Input:
integrate(exp(b*x+a)*cos(d*x+c)*sin(d*x+c)^2,x, algorithm="maxima")
Output:
-1/8*((b^3*cos(3*c)*e^a + b*d^2*cos(3*c)*e^a + 3*b^2*d*e^a*sin(3*c) + 3*d^ 3*e^a*sin(3*c))*cos(3*d*x)*e^(b*x) + (b^3*cos(3*c)*e^a + b*d^2*cos(3*c)*e^ a - 3*b^2*d*e^a*sin(3*c) - 3*d^3*e^a*sin(3*c))*cos(3*d*x + 6*c)*e^(b*x) - (b^3*cos(3*c)*e^a + 9*b*d^2*cos(3*c)*e^a - b^2*d*e^a*sin(3*c) - 9*d^3*e^a* sin(3*c))*cos(d*x + 4*c)*e^(b*x) - (b^3*cos(3*c)*e^a + 9*b*d^2*cos(3*c)*e^ a + b^2*d*e^a*sin(3*c) + 9*d^3*e^a*sin(3*c))*cos(d*x - 2*c)*e^(b*x) + (3*b ^2*d*cos(3*c)*e^a + 3*d^3*cos(3*c)*e^a - b^3*e^a*sin(3*c) - b*d^2*e^a*sin( 3*c))*e^(b*x)*sin(3*d*x) + (3*b^2*d*cos(3*c)*e^a + 3*d^3*cos(3*c)*e^a + b^ 3*e^a*sin(3*c) + b*d^2*e^a*sin(3*c))*e^(b*x)*sin(3*d*x + 6*c) - (b^2*d*cos (3*c)*e^a + 9*d^3*cos(3*c)*e^a + b^3*e^a*sin(3*c) + 9*b*d^2*e^a*sin(3*c))* e^(b*x)*sin(d*x + 4*c) - (b^2*d*cos(3*c)*e^a + 9*d^3*cos(3*c)*e^a - b^3*e^ a*sin(3*c) - 9*b*d^2*e^a*sin(3*c))*e^(b*x)*sin(d*x - 2*c))/(b^4*cos(3*c)^2 + b^4*sin(3*c)^2 + 9*(cos(3*c)^2 + sin(3*c)^2)*d^4 + 10*(b^2*cos(3*c)^2 + b^2*sin(3*c)^2)*d^2)
Time = 0.12 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.82 \[ \int e^{a+b x} \cos (c+d x) \sin ^2(c+d x) \, dx=-\frac {1}{4} \, {\left (\frac {b \cos \left (3 \, d x + 3 \, c\right )}{b^{2} + 9 \, d^{2}} + \frac {3 \, d \sin \left (3 \, d x + 3 \, c\right )}{b^{2} + 9 \, d^{2}}\right )} e^{\left (b x + a\right )} + \frac {1}{4} \, {\left (\frac {b \cos \left (d x + c\right )}{b^{2} + d^{2}} + \frac {d \sin \left (d x + c\right )}{b^{2} + d^{2}}\right )} e^{\left (b x + a\right )} \] Input:
integrate(exp(b*x+a)*cos(d*x+c)*sin(d*x+c)^2,x, algorithm="giac")
Output:
-1/4*(b*cos(3*d*x + 3*c)/(b^2 + 9*d^2) + 3*d*sin(3*d*x + 3*c)/(b^2 + 9*d^2 ))*e^(b*x + a) + 1/4*(b*cos(d*x + c)/(b^2 + d^2) + d*sin(d*x + c)/(b^2 + d ^2))*e^(b*x + a)
Time = 20.70 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.39 \[ \int e^{a+b x} \cos (c+d x) \sin ^2(c+d x) \, dx=\frac {{\mathrm {e}}^{a+b\,x}\,\left (\cos \left (d\,x\right )-\sin \left (d\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (c\right )-\sin \left (c\right )\,1{}\mathrm {i}\right )}{8\,\left (b-d\,1{}\mathrm {i}\right )}-\frac {{\mathrm {e}}^{a+b\,x}\,\left (\cos \left (3\,d\,x\right )+\sin \left (3\,d\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (3\,c\right )+\sin \left (3\,c\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,\left (-3\,d+b\,1{}\mathrm {i}\right )}+\frac {{\mathrm {e}}^{a+b\,x}\,\left (\cos \left (d\,x\right )+\sin \left (d\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (c\right )+\sin \left (c\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,\left (-d+b\,1{}\mathrm {i}\right )}-\frac {{\mathrm {e}}^{a+b\,x}\,\left (\cos \left (3\,d\,x\right )-\sin \left (3\,d\,x\right )\,1{}\mathrm {i}\right )\,\left (\cos \left (3\,c\right )-\sin \left (3\,c\right )\,1{}\mathrm {i}\right )}{8\,\left (b-d\,3{}\mathrm {i}\right )} \] Input:
int(cos(c + d*x)*exp(a + b*x)*sin(c + d*x)^2,x)
Output:
(exp(a + b*x)*(cos(d*x) - sin(d*x)*1i)*(cos(c) - sin(c)*1i))/(8*(b - d*1i) ) - (exp(a + b*x)*(cos(3*d*x) + sin(3*d*x)*1i)*(cos(3*c) + sin(3*c)*1i)*1i )/(8*(b*1i - 3*d)) + (exp(a + b*x)*(cos(d*x) + sin(d*x)*1i)*(cos(c) + sin( c)*1i)*1i)/(8*(b*1i - d)) - (exp(a + b*x)*(cos(3*d*x) - sin(3*d*x)*1i)*(co s(3*c) - sin(3*c)*1i))/(8*(b - d*3i))
Time = 0.17 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.97 \[ \int e^{a+b x} \cos (c+d x) \sin ^2(c+d x) \, dx=\frac {e^{b x +a} \left (\cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b^{3}+\cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b \,d^{2}+2 \cos \left (d x +c \right ) b \,d^{2}+3 \sin \left (d x +c \right )^{3} b^{2} d +3 \sin \left (d x +c \right )^{3} d^{3}-2 \sin \left (d x +c \right ) b^{2} d \right )}{b^{4}+10 b^{2} d^{2}+9 d^{4}} \] Input:
int(exp(b*x+a)*cos(d*x+c)*sin(d*x+c)^2,x)
Output:
(e**(a + b*x)*(cos(c + d*x)*sin(c + d*x)**2*b**3 + cos(c + d*x)*sin(c + d* x)**2*b*d**2 + 2*cos(c + d*x)*b*d**2 + 3*sin(c + d*x)**3*b**2*d + 3*sin(c + d*x)**3*d**3 - 2*sin(c + d*x)*b**2*d))/(b**4 + 10*b**2*d**2 + 9*d**4)