Optimal. Leaf size=44 \[ \frac {B \log (\sin (c+d x)+1)}{a^2 d}-\frac {A-B}{d \left (a^2 \sin (c+d x)+a^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 44, 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 {B \log (\sin (c+d x)+1)}{a^2 d}-\frac {A-B}{d \left (a^2 \sin (c+d x)+a^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 2833
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) (A+B \sin (c+d x))}{(a+a \sin (c+d x))^2} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {A+\frac {B x}{a}}{(a+x)^2} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {A-B}{(a+x)^2}+\frac {B}{a (a+x)}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {B \log (1+\sin (c+d x))}{a^2 d}-\frac {A-B}{d \left (a^2+a^2 \sin (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 41, normalized size = 0.93 \[ \frac {\frac {B \log (\sin (c+d x)+1)}{a}-\frac {A-B}{a \sin (c+d x)+a}}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.63, size = 45, normalized size = 1.02 \[ \frac {{\left (B \sin \left (d x + c\right ) + B\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - A + B}{a^{2} d \sin \left (d x + c\right ) + a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 76, normalized size = 1.73 \[ -\frac {\frac {B {\left (\frac {\log \left (\frac {{\left | a \sin \left (d x + c\right ) + a \right |}}{{\left (a \sin \left (d x + c\right ) + a\right )}^{2} {\left | a \right |}}\right )}{a} - \frac {1}{a \sin \left (d x + c\right ) + a}\right )}}{a} + \frac {A}{{\left (a \sin \left (d x + c\right ) + a\right )} a}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.45, size = 56, normalized size = 1.27 \[ \frac {B \ln \left (1+\sin \left (d x +c \right )\right )}{a^{2} d}-\frac {A}{d \,a^{2} \left (1+\sin \left (d x +c \right )\right )}+\frac {B}{d \,a^{2} \left (1+\sin \left (d x +c \right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 43, normalized size = 0.98 \[ -\frac {\frac {A - B}{a^{2} \sin \left (d x + c\right ) + a^{2}} - \frac {B \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 41, normalized size = 0.93 \[ \frac {B\,\ln \left (\sin \left (c+d\,x\right )+1\right )}{a^2\,d}-\frac {A-B}{a^2\,d\,\left (\sin \left (c+d\,x\right )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.84, size = 121, normalized size = 2.75 \[ \begin {cases} - \frac {A}{a^{2} d \sin {\left (c + d x \right )} + a^{2} d} + \frac {B \log {\left (\sin {\left (c + d x \right )} + 1 \right )} \sin {\left (c + d x \right )}}{a^{2} d \sin {\left (c + d x \right )} + a^{2} d} + \frac {B \log {\left (\sin {\left (c + d x \right )} + 1 \right )}}{a^{2} d \sin {\left (c + d x \right )} + a^{2} d} + \frac {B}{a^{2} d \sin {\left (c + d x \right )} + a^{2} d} & \text {for}\: d \neq 0 \\\frac {x \left (A + B \sin {\relax (c )}\right ) \cos {\relax (c )}}{\left (a \sin {\relax (c )} + a\right )^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________