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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 28, normalized size of antiderivative = 1.27, number of steps used = 2, number of rules used = 1, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {2668} \[ \frac {a \sin (c+d x)}{d}+\frac {b \sin ^2(c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 39, normalized size = 1.77 \[ \frac {a \sin (c) \cos (d x)}{d}+\frac {a \cos (c) \sin (d x)}{d}-\frac {b \cos ^2(c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 25, normalized size = 1.14 \[ -\frac {b \cos \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.40, size = 25, normalized size = 1.14 \[ \frac {b \sin \left (d x + c\right )^{2} + 2 \, a \sin \left (d x + c\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 25, normalized size = 1.14 \[ \frac {\frac {\left (\sin ^{2}\left (d x +c \right )\right ) b}{2}+a \sin \left (d x +c \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 20, normalized size = 0.91 \[ \frac {{\left (b \sin \left (d x + c\right ) + a\right )}^{2}}{2 \, b d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 23, normalized size = 1.05 \[ \frac {\sin \left (c+d\,x\right )\,\left (2\,a+b\,\sin \left (c+d\,x\right )\right )}{2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________