3.1006 \(\int \frac {\cos (c+d x) (A+B \sin (c+d x))}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=36 \[ \frac {(A-B) \log (\sin (c+d x)+1)}{a d}+\frac {B \sin (c+d x)}{a d} \]

[Out]

(A-B)*ln(1+sin(d*x+c))/a/d+B*sin(d*x+c)/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {2833, 43} \[ \frac {(A-B) \log (\sin (c+d x)+1)}{a d}+\frac {B \sin (c+d x)}{a d} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]*(A + B*Sin[c + d*x]))/(a + a*Sin[c + d*x]),x]

[Out]

((A - B)*Log[1 + Sin[c + d*x]])/(a*d) + (B*Sin[c + d*x])/(a*d)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2833

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rubi steps

\begin {align*} \int \frac {\cos (c+d x) (A+B \sin (c+d x))}{a+a \sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {A+\frac {B x}{a}}{a+x} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {B}{a}+\frac {A-B}{a+x}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {(A-B) \log (1+\sin (c+d x))}{a d}+\frac {B \sin (c+d x)}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 31, normalized size = 0.86 \[ \frac {(A-B) \log (\sin (c+d x)+1)+B \sin (c+d x)}{a d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]*(A + B*Sin[c + d*x]))/(a + a*Sin[c + d*x]),x]

[Out]

((A - B)*Log[1 + Sin[c + d*x]] + B*Sin[c + d*x])/(a*d)

________________________________________________________________________________________

fricas [A]  time = 0.56, size = 31, normalized size = 0.86 \[ \frac {{\left (A - B\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + B \sin \left (d x + c\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((A - B)*log(sin(d*x + c) + 1) + B*sin(d*x + c))/(a*d)

________________________________________________________________________________________

giac [A]  time = 0.17, size = 35, normalized size = 0.97 \[ \frac {\frac {{\left (A - B\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a} + \frac {B \sin \left (d x + c\right )}{a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((A - B)*log(abs(sin(d*x + c) + 1))/a + B*sin(d*x + c)/a)/d

________________________________________________________________________________________

maple [A]  time = 0.26, size = 51, normalized size = 1.42 \[ \frac {\ln \left (1+\sin \left (d x +c \right )\right ) A}{d a}-\frac {\ln \left (1+\sin \left (d x +c \right )\right ) B}{d a}+\frac {B \sin \left (d x +c \right )}{d a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*(A+B*sin(d*x+c))/(a+a*sin(d*x+c)),x)

[Out]

1/d/a*ln(1+sin(d*x+c))*A-1/d/a*ln(1+sin(d*x+c))*B+B*sin(d*x+c)/d/a

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 34, normalized size = 0.94 \[ \frac {\frac {{\left (A - B\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a} + \frac {B \sin \left (d x + c\right )}{a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((A - B)*log(sin(d*x + c) + 1)/a + B*sin(d*x + c)/a)/d

________________________________________________________________________________________

mupad [B]  time = 9.23, size = 36, normalized size = 1.00 \[ \frac {\ln \left (\sin \left (c+d\,x\right )+1\right )\,\left (A-B\right )}{a\,d}+\frac {B\,\sin \left (c+d\,x\right )}{a\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(c + d*x)*(A + B*sin(c + d*x)))/(a + a*sin(c + d*x)),x)

[Out]

(log(sin(c + d*x) + 1)*(A - B))/(a*d) + (B*sin(c + d*x))/(a*d)

________________________________________________________________________________________

sympy [A]  time = 0.58, size = 60, normalized size = 1.67 \[ \begin {cases} \frac {A \log {\left (\sin {\left (c + d x \right )} + 1 \right )}}{a d} - \frac {B \log {\left (\sin {\left (c + d x \right )} + 1 \right )}}{a d} + \frac {B \sin {\left (c + d x \right )}}{a d} & \text {for}\: d \neq 0 \\\frac {x \left (A + B \sin {\relax (c )}\right ) \cos {\relax (c )}}{a \sin {\relax (c )} + a} & \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))/(a+a*sin(d*x+c)),x)

[Out]

Piecewise((A*log(sin(c + d*x) + 1)/(a*d) - B*log(sin(c + d*x) + 1)/(a*d) + B*sin(c + d*x)/(a*d), Ne(d, 0)), (x
*(A + B*sin(c))*cos(c)/(a*sin(c) + a), True))

________________________________________________________________________________________