\(\int e^{a+b x} \cos ^2(c+d x) \sin (c+d x) \, dx\) [53]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [C] (verification not implemented)
Maxima [B] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 119 \[ \int e^{a+b x} \cos ^2(c+d x) \sin (c+d x) \, dx=-\frac {d e^{a+b x} \cos (c+d x)}{4 \left (b^2+d^2\right )}-\frac {3 d e^{a+b x} \cos (3 c+3 d x)}{4 \left (b^2+9 d^2\right )}+\frac {b e^{a+b x} \sin (c+d x)}{4 \left (b^2+d^2\right )}+\frac {b e^{a+b x} \sin (3 c+3 d x)}{4 \left (b^2+9 d^2\right )} \] Output:

-1/4*d*exp(b*x+a)*cos(d*x+c)/(b^2+d^2)-3*d*exp(b*x+a)*cos(3*d*x+3*c)/(4*b^ 
2+36*d^2)+b*exp(b*x+a)*sin(d*x+c)/(4*b^2+4*d^2)+b*exp(b*x+a)*sin(3*d*x+3*c 
)/(4*b^2+36*d^2)
 

Mathematica [A] (verified)

Time = 0.46 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.62 \[ \int e^{a+b x} \cos ^2(c+d x) \sin (c+d x) \, dx=\frac {1}{4} e^{a+b x} \left (\frac {-d \cos (c+d x)+b \sin (c+d x)}{b^2+d^2}+\frac {-3 d \cos (3 (c+d x))+b \sin (3 (c+d x))}{b^2+9 d^2}\right ) \] Input:

Integrate[E^(a + b*x)*Cos[c + d*x]^2*Sin[c + d*x],x]
 

Output:

(E^(a + b*x)*((-(d*Cos[c + d*x]) + b*Sin[c + d*x])/(b^2 + d^2) + (-3*d*Cos 
[3*(c + d*x)] + b*Sin[3*(c + d*x)])/(b^2 + 9*d^2)))/4
 

Rubi [A] (verified)

Time = 0.29 (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 (c+d x) \cos ^2(c+d x) \, dx\)

\(\Big \downarrow \) 4972

\(\displaystyle \int \left (\frac {1}{4} e^{a+b x} \sin (c+d x)+\frac {1}{4} e^{a+b x} \sin (3 c+3 d x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b e^{a+b x} \sin (c+d x)}{4 \left (b^2+d^2\right )}+\frac {b e^{a+b x} \sin (3 c+3 d x)}{4 \left (b^2+9 d^2\right )}-\frac {d e^{a+b x} \cos (c+d x)}{4 \left (b^2+d^2\right )}-\frac {3 d 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]^2*Sin[c + d*x],x]
 

Output:

-1/4*(d*E^(a + b*x)*Cos[c + d*x])/(b^2 + d^2) - (3*d*E^(a + b*x)*Cos[3*c + 
 3*d*x])/(4*(b^2 + 9*d^2)) + (b*E^(a + b*x)*Sin[c + d*x])/(4*(b^2 + d^2)) 
+ (b*E^(a + b*x)*Sin[3*c + 3*d*x])/(4*(b^2 + 9*d^2))
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 4972
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]
 
Maple [A] (verified)

Time = 1.34 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.83

method result size
parallelrisch \(\frac {{\mathrm e}^{b x +a} \left (\left (-3 b^{2} d -3 d^{3}\right ) \cos \left (3 d x +3 c \right )+\left (b^{3}+b \,d^{2}\right ) \sin \left (3 d x +3 c \right )+\left (b^{2}+9 d^{2}\right ) \left (b \sin \left (d x +c \right )-d \cos \left (d x +c \right )\right )\right )}{4 b^{4}+40 b^{2} d^{2}+36 d^{4}}\) \(99\)
default \(-\frac {3 d \,{\mathrm e}^{b x +a} \cos \left (3 d x +3 c \right )}{4 \left (b^{2}+9 d^{2}\right )}+\frac {b \,{\mathrm e}^{b x +a} \sin \left (3 d x +3 c \right )}{4 b^{2}+36 d^{2}}-\frac {d \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )}{4 \left (b^{2}+d^{2}\right )}+\frac {b \,{\mathrm e}^{b x +a} \sin \left (d x +c \right )}{4 b^{2}+4 d^{2}}\) \(108\)
risch \(-\frac {i {\mathrm e}^{b x +a} \left (-2 i d \left (b^{2}+9 d^{2}\right ) \cos \left (d x +c \right )+i \left (2 b^{3}+18 b \,d^{2}\right ) \sin \left (d x +c \right )-6 i d \left (b^{2}+d^{2}\right ) \cos \left (3 d x +3 c \right )-i \left (-2 b^{3}-2 b \,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 )}\) \(131\)
norman \(\frac {\frac {d \left (b^{2}+3 d^{2}\right ) {\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 {d \left (11 b^{2}+9 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 {d \left (b^{2}+3 d^{2}\right ) {\mathrm e}^{b x +a}}{b^{4}+10 b^{2} d^{2}+9 d^{4}}-\frac {4 b \left (b^{2}-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}}+\frac {2 b \left (b^{2}+3 d^{2}\right ) {\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 {2 b \left (b^{2}+3 d^{2}\right ) {\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 {d \left (11 b^{2}+9 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}}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}\) \(343\)
orering \(\frac {4 b \left (b^{2}+5 d^{2}\right ) {\mathrm e}^{b x +a} \cos \left (d x +c \right )^{2} \sin \left (d x +c \right )}{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 )^{2} \sin \left (d x +c \right )-2 \,{\mathrm e}^{b x +a} \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} d +{\mathrm e}^{b x +a} \cos \left (d x +c \right )^{3} 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 )^{2} \sin \left (d x +c \right )-4 b \,{\mathrm e}^{b x +a} \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} d +2 b \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )^{3} d +2 \,{\mathrm e}^{b x +a} d^{2} \sin \left (d x +c \right )^{3}-7 \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )^{2} \sin \left (d x +c \right ) 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 )^{2} \sin \left (d x +c \right )-6 b^{2} {\mathrm e}^{b x +a} \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} d +3 b^{2} {\mathrm e}^{b x +a} \cos \left (d x +c \right )^{3} d +6 b \,{\mathrm e}^{b x +a} d^{2} \sin \left (d x +c \right )^{3}-21 b \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )^{2} \sin \left (d x +c \right ) d^{2}+20 \,{\mathrm e}^{b x +a} d^{3} \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )-7 \,{\mathrm e}^{b x +a} \cos \left (d x +c \right )^{3} d^{3}}{b^{4}+10 b^{2} d^{2}+9 d^{4}}\) \(462\)

Input:

int(exp(b*x+a)*cos(d*x+c)^2*sin(d*x+c),x,method=_RETURNVERBOSE)
 

Output:

exp(b*x+a)*((-3*b^2*d-3*d^3)*cos(3*d*x+3*c)+(b^3+b*d^2)*sin(3*d*x+3*c)+(b^ 
2+9*d^2)*(b*sin(d*x+c)-d*cos(d*x+c)))/(4*b^4+40*b^2*d^2+36*d^4)
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.82 \[ \int e^{a+b x} \cos ^2(c+d x) \sin (c+d x) \, dx=\frac {{\left (2 \, b d^{2} + {\left (b^{3} + b d^{2}\right )} \cos \left (d x + c\right )^{2}\right )} e^{\left (b x + a\right )} \sin \left (d x + c\right ) + {\left (2 \, b^{2} d \cos \left (d x + c\right ) - 3 \, {\left (b^{2} d + d^{3}\right )} \cos \left (d x + c\right )^{3}\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)^2*sin(d*x+c),x, algorithm="fricas")
 

Output:

((2*b*d^2 + (b^3 + b*d^2)*cos(d*x + c)^2)*e^(b*x + a)*sin(d*x + c) + (2*b^ 
2*d*cos(d*x + c) - 3*(b^2*d + d^3)*cos(d*x + c)^3)*e^(b*x + a))/(b^4 + 10* 
b^2*d^2 + 9*d^4)
 

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 2.83 (sec) , antiderivative size = 1030, normalized size of antiderivative = 8.66 \[ \int e^{a+b x} \cos ^2(c+d x) \sin (c+d x) \, dx=\text {Too large to display} \] Input:

integrate(exp(b*x+a)*cos(d*x+c)**2*sin(d*x+c),x)
 

Output:

Piecewise((x*exp(a)*sin(c)*cos(c)**2, Eq(b, 0) & Eq(d, 0)), (-x*exp(a)*exp 
(-3*I*d*x)*sin(c + d*x)**3/8 + 3*I*x*exp(a)*exp(-3*I*d*x)*sin(c + d*x)**2* 
cos(c + d*x)/8 + 3*x*exp(a)*exp(-3*I*d*x)*sin(c + d*x)*cos(c + d*x)**2/8 - 
 I*x*exp(a)*exp(-3*I*d*x)*cos(c + d*x)**3/8 + I*exp(a)*exp(-3*I*d*x)*sin(c 
 + d*x)**3/(8*d) + exp(a)*exp(-3*I*d*x)*sin(c + d*x)**2*cos(c + d*x)/(4*d) 
 - exp(a)*exp(-3*I*d*x)*cos(c + d*x)**3/(24*d), Eq(b, -3*I*d)), (x*exp(a)* 
exp(-I*d*x)*sin(c + d*x)**3/8 - I*x*exp(a)*exp(-I*d*x)*sin(c + d*x)**2*cos 
(c + d*x)/8 + x*exp(a)*exp(-I*d*x)*sin(c + d*x)*cos(c + d*x)**2/8 - I*x*ex 
p(a)*exp(-I*d*x)*cos(c + d*x)**3/8 + I*exp(a)*exp(-I*d*x)*sin(c + d*x)**3/ 
(8*d) + exp(a)*exp(-I*d*x)*sin(c + d*x)**2*cos(c + d*x)/(4*d) - exp(a)*exp 
(-I*d*x)*cos(c + d*x)**3/(8*d), Eq(b, -I*d)), (x*exp(a)*exp(I*d*x)*sin(c + 
 d*x)**3/8 + I*x*exp(a)*exp(I*d*x)*sin(c + d*x)**2*cos(c + d*x)/8 + x*exp( 
a)*exp(I*d*x)*sin(c + d*x)*cos(c + d*x)**2/8 + I*x*exp(a)*exp(I*d*x)*cos(c 
 + d*x)**3/8 - I*exp(a)*exp(I*d*x)*sin(c + d*x)**3/(8*d) + exp(a)*exp(I*d* 
x)*sin(c + d*x)**2*cos(c + d*x)/(4*d) - exp(a)*exp(I*d*x)*cos(c + d*x)**3/ 
(8*d), Eq(b, I*d)), (-x*exp(a)*exp(3*I*d*x)*sin(c + d*x)**3/8 - 3*I*x*exp( 
a)*exp(3*I*d*x)*sin(c + d*x)**2*cos(c + d*x)/8 + 3*x*exp(a)*exp(3*I*d*x)*s 
in(c + d*x)*cos(c + d*x)**2/8 + I*x*exp(a)*exp(3*I*d*x)*cos(c + d*x)**3/8 
- I*exp(a)*exp(3*I*d*x)*sin(c + d*x)**3/(8*d) + exp(a)*exp(3*I*d*x)*sin(c 
+ d*x)**2*cos(c + d*x)/(4*d) - exp(a)*exp(3*I*d*x)*cos(c + d*x)**3/(24*...
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 538 vs. \(2 (107) = 214\).

Time = 0.08 (sec) , antiderivative size = 538, normalized size of antiderivative = 4.52 \[ \int e^{a+b x} \cos ^2(c+d x) \sin (c+d x) \, dx =\text {Too large to display} \] Input:

integrate(exp(b*x+a)*cos(d*x+c)^2*sin(d*x+c),x, algorithm="maxima")
 

Output:

-1/8*((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))*cos(3*d*x)*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))*cos(3*d*x + 6*c)*e^(b*x) + 
(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))*cos(d*x + 4*c)*e^(b*x) + (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))*cos(d*x - 2*c)*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))*e^(b*x)*sin(3*d*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))*e^(b*x)*sin(3*d*x + 6*c) - (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))* 
e^(b*x)*sin(d*x + 4*c) - (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))*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)
 

Giac [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.84 \[ \int e^{a+b x} \cos ^2(c+d x) \sin (c+d x) \, dx=-\frac {1}{4} \, {\left (\frac {3 \, d \cos \left (3 \, d x + 3 \, c\right )}{b^{2} + 9 \, d^{2}} - \frac {b \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 {d \cos \left (d x + c\right )}{b^{2} + d^{2}} - \frac {b \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)^2*sin(d*x+c),x, algorithm="giac")
                                                                                    
                                                                                    
 

Output:

-1/4*(3*d*cos(3*d*x + 3*c)/(b^2 + 9*d^2) - b*sin(3*d*x + 3*c)/(b^2 + 9*d^2 
))*e^(b*x + a) - 1/4*(d*cos(d*x + c)/(b^2 + d^2) - b*sin(d*x + c)/(b^2 + d 
^2))*e^(b*x + a)
 

Mupad [B] (verification not implemented)

Time = 20.98 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.40 \[ \int e^{a+b x} \cos ^2(c+d x) \sin (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 (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 (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 )}{8\,\left (3\,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 )\,1{}\mathrm {i}}{8\,\left (b+d\,3{}\mathrm {i}\right )} \] Input:

int(cos(c + d*x)^2*exp(a + b*x)*sin(c + d*x),x)
 

Output:

- (exp(a + b*x)*(cos(d*x) - sin(d*x)*1i)*(cos(c) - sin(c)*1i))/(8*(b*1i + 
d)) - (exp(a + b*x)*(cos(d*x) + sin(d*x)*1i)*(cos(c) + sin(c)*1i)*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))/(8*(b*1i + 3*d)) - (exp(a + b*x)*(cos(3*d*x) + sin(3*d*x)*1i)*(cos 
(3*c) + sin(3*c)*1i)*1i)/(8*(b + d*3i))
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.17 \[ \int e^{a+b x} \cos ^2(c+d x) \sin (c+d x) \, dx=\frac {e^{b x +a} \left (3 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b^{2} d +3 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} d^{3}-\cos \left (d x +c \right ) b^{2} d -3 \cos \left (d x +c \right ) d^{3}-\sin \left (d x +c \right )^{3} b^{3}-\sin \left (d x +c \right )^{3} b \,d^{2}+\sin \left (d x +c \right ) b^{3}+3 \sin \left (d x +c \right ) b \,d^{2}\right )}{b^{4}+10 b^{2} d^{2}+9 d^{4}} \] Input:

int(exp(b*x+a)*cos(d*x+c)^2*sin(d*x+c),x)
 

Output:

(e**(a + b*x)*(3*cos(c + d*x)*sin(c + d*x)**2*b**2*d + 3*cos(c + d*x)*sin( 
c + d*x)**2*d**3 - cos(c + d*x)*b**2*d - 3*cos(c + d*x)*d**3 - sin(c + d*x 
)**3*b**3 - sin(c + d*x)**3*b*d**2 + sin(c + d*x)*b**3 + 3*sin(c + d*x)*b* 
d**2))/(b**4 + 10*b**2*d**2 + 9*d**4)