3.4 \(\int (c+d x) \cos (a+b x) \, dx\)

Optimal. Leaf size=27 \[ \frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b} \]

[Out]

d*cos(b*x+a)/b^2+(d*x+c)*sin(b*x+a)/b

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3296, 2638} \[ \frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Cos[a + b*x],x]

[Out]

(d*Cos[a + b*x])/b^2 + ((c + d*x)*Sin[a + b*x])/b

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rubi steps

\begin {align*} \int (c+d x) \cos (a+b x) \, dx &=\frac {(c+d x) \sin (a+b x)}{b}-\frac {d \int \sin (a+b x) \, dx}{b}\\ &=\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 26, normalized size = 0.96 \[ \frac {b (c+d x) \sin (a+b x)+d \cos (a+b x)}{b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Cos[a + b*x],x]

[Out]

(d*Cos[a + b*x] + b*(c + d*x)*Sin[a + b*x])/b^2

________________________________________________________________________________________

fricas [A]  time = 0.86, size = 28, normalized size = 1.04 \[ \frac {d \cos \left (b x + a\right ) + {\left (b d x + b c\right )} \sin \left (b x + a\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a),x, algorithm="fricas")

[Out]

(d*cos(b*x + a) + (b*d*x + b*c)*sin(b*x + a))/b^2

________________________________________________________________________________________

giac [A]  time = 0.43, size = 30, normalized size = 1.11 \[ \frac {d \cos \left (b x + a\right )}{b^{2}} + \frac {{\left (b d x + b c\right )} \sin \left (b x + a\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*cos(b*x+a),x, algorithm="giac")

[Out]

d*cos(b*x + a)/b^2 + (b*d*x + b*c)*sin(b*x + a)/b^2

________________________________________________________________________________________

maple [A]  time = 0.02, size = 51, normalized size = 1.89 \[ \frac {\frac {d \left (\cos \left (b x +a \right )+\left (b x +a \right ) \sin \left (b x +a \right )\right )}{b}-\frac {d a \sin \left (b x +a \right )}{b}+c \sin \left (b x +a \right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*cos(b*x+a),x)

[Out]

1/b*(1/b*d*(cos(b*x+a)+(b*x+a)*sin(b*x+a))-1/b*d*a*sin(b*x+a)+c*sin(b*x+a))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 50, normalized size = 1.85 \[ \frac {c \sin \left (b x + a\right ) - \frac {a d \sin \left (b x + a\right )}{b} + \frac {{\left ({\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (b x + a\right )\right )} d}{b}}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(c*sin(b*x + a) - a*d*sin(b*x + a)/b + ((b*x + a)*sin(b*x + a) + cos(b*x + a))*d/b)/b

________________________________________________________________________________________

mupad [B]  time = 0.18, size = 34, normalized size = 1.26 \[ \frac {c\,\sin \left (a+b\,x\right )+d\,x\,\sin \left (a+b\,x\right )}{b}+\frac {d\,\cos \left (a+b\,x\right )}{b^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)*(c + d*x),x)

[Out]

(c*sin(a + b*x) + d*x*sin(a + b*x))/b + (d*cos(a + b*x))/b^2

________________________________________________________________________________________

sympy [A]  time = 0.20, size = 46, normalized size = 1.70 \[ \begin {cases} \frac {c \sin {\left (a + b x \right )}}{b} + \frac {d x \sin {\left (a + b x \right )}}{b} + \frac {d \cos {\left (a + b x \right )}}{b^{2}} & \text {for}\: b \neq 0 \\\left (c x + \frac {d x^{2}}{2}\right ) \cos {\relax (a )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((c*sin(a + b*x)/b + d*x*sin(a + b*x)/b + d*cos(a + b*x)/b**2, Ne(b, 0)), ((c*x + d*x**2/2)*cos(a), T
rue))

________________________________________________________________________________________