3.199 \(\int \frac {x (b+a \sin (x))}{(a+b \sin (x))^2} \, dx\)

Optimal. Leaf size=25 \[ \frac {\log (a+b \sin (x))}{b}-\frac {x \cos (x)}{a+b \sin (x)} \]

[Out]

ln(a+b*sin(x))/b-x*cos(x)/(a+b*sin(x))

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {4592, 2668, 31} \[ \frac {\log (a+b \sin (x))}{b}-\frac {x \cos (x)}{a+b \sin (x)} \]

Antiderivative was successfully verified.

[In]

Int[(x*(b + a*Sin[x]))/(a + b*Sin[x])^2,x]

[Out]

Log[a + b*Sin[x]]/b - (x*Cos[x])/(a + b*Sin[x])

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

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]

Rule 4592

Int[(((e_.) + (f_.)*(x_))*((A_) + (B_.)*Sin[(c_.) + (d_.)*(x_)]))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)])^2, x_
Symbol] :> -Simp[(B*(e + f*x)*Cos[c + d*x])/(a*d*(a + b*Sin[c + d*x])), x] + Dist[(B*f)/(a*d), Int[Cos[c + d*x
]/(a + b*Sin[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && EqQ[a*A - b*B, 0]

Rubi steps

\begin {align*} \int \frac {x (b+a \sin (x))}{(a+b \sin (x))^2} \, dx &=-\frac {x \cos (x)}{a+b \sin (x)}+\int \frac {\cos (x)}{a+b \sin (x)} \, dx\\ &=-\frac {x \cos (x)}{a+b \sin (x)}+\frac {\operatorname {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \sin (x)\right )}{b}\\ &=\frac {\log (a+b \sin (x))}{b}-\frac {x \cos (x)}{a+b \sin (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.20, size = 25, normalized size = 1.00 \[ \frac {\log (a+b \sin (x))}{b}-\frac {x \cos (x)}{a+b \sin (x)} \]

Antiderivative was successfully verified.

[In]

Integrate[(x*(b + a*Sin[x]))/(a + b*Sin[x])^2,x]

[Out]

Log[a + b*Sin[x]]/b - (x*Cos[x])/(a + b*Sin[x])

________________________________________________________________________________________

fricas [A]  time = 0.71, size = 35, normalized size = 1.40 \[ -\frac {b x \cos \relax (x) - {\left (b \sin \relax (x) + a\right )} \log \left (b \sin \relax (x) + a\right )}{b^{2} \sin \relax (x) + a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b+a*sin(x))/(a+b*sin(x))^2,x, algorithm="fricas")

[Out]

-(b*x*cos(x) - (b*sin(x) + a)*log(b*sin(x) + a))/(b^2*sin(x) + a*b)

________________________________________________________________________________________

giac [B]  time = 0.32, size = 283, normalized size = 11.32 \[ \frac {4 \, b x \tan \left (\frac {1}{2} \, x\right )^{2} + a \log \left (\frac {4 \, {\left (a^{2} \tan \left (\frac {1}{2} \, x\right )^{4} + 4 \, a b \tan \left (\frac {1}{2} \, x\right )^{3} + 2 \, a^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + 4 \, b^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + 4 \, a b \tan \left (\frac {1}{2} \, x\right ) + a^{2}\right )}}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, b \log \left (\frac {4 \, {\left (a^{2} \tan \left (\frac {1}{2} \, x\right )^{4} + 4 \, a b \tan \left (\frac {1}{2} \, x\right )^{3} + 2 \, a^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + 4 \, b^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + 4 \, a b \tan \left (\frac {1}{2} \, x\right ) + a^{2}\right )}}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right ) - 4 \, b x + a \log \left (\frac {4 \, {\left (a^{2} \tan \left (\frac {1}{2} \, x\right )^{4} + 4 \, a b \tan \left (\frac {1}{2} \, x\right )^{3} + 2 \, a^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + 4 \, b^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + 4 \, a b \tan \left (\frac {1}{2} \, x\right ) + a^{2}\right )}}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right )}{2 \, {\left (a b \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, b^{2} \tan \left (\frac {1}{2} \, x\right ) + a b\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b+a*sin(x))/(a+b*sin(x))^2,x, algorithm="giac")

[Out]

1/2*(4*b*x*tan(1/2*x)^2 + a*log(4*(a^2*tan(1/2*x)^4 + 4*a*b*tan(1/2*x)^3 + 2*a^2*tan(1/2*x)^2 + 4*b^2*tan(1/2*
x)^2 + 4*a*b*tan(1/2*x) + a^2)/(tan(1/2*x)^4 + 2*tan(1/2*x)^2 + 1))*tan(1/2*x)^2 + 2*b*log(4*(a^2*tan(1/2*x)^4
 + 4*a*b*tan(1/2*x)^3 + 2*a^2*tan(1/2*x)^2 + 4*b^2*tan(1/2*x)^2 + 4*a*b*tan(1/2*x) + a^2)/(tan(1/2*x)^4 + 2*ta
n(1/2*x)^2 + 1))*tan(1/2*x) - 4*b*x + a*log(4*(a^2*tan(1/2*x)^4 + 4*a*b*tan(1/2*x)^3 + 2*a^2*tan(1/2*x)^2 + 4*
b^2*tan(1/2*x)^2 + 4*a*b*tan(1/2*x) + a^2)/(tan(1/2*x)^4 + 2*tan(1/2*x)^2 + 1)))/(a*b*tan(1/2*x)^2 + 2*b^2*tan
(1/2*x) + a*b)

________________________________________________________________________________________

maple [B]  time = 0.70, size = 80, normalized size = 3.20 \[ \frac {x \left (\tan ^{4}\left (\frac {x}{2}\right )\right )-x}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right ) \left (a \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+2 b \tan \left (\frac {x}{2}\right )+a \right )}+\frac {\ln \left (a \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+2 b \tan \left (\frac {x}{2}\right )+a \right )}{b}-\frac {\ln \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(b+a*sin(x))/(a+b*sin(x))^2,x)

[Out]

(x*tan(1/2*x)^4-x)/(1+tan(1/2*x)^2)/(a*tan(1/2*x)^2+2*b*tan(1/2*x)+a)+1/b*ln(a*tan(1/2*x)^2+2*b*tan(1/2*x)+a)-
1/b*ln(1+tan(1/2*x)^2)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b+a*sin(x))/(a+b*sin(x))^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more details)Is 4*b^2-4*a^2 positive or negative?

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.04 \[ \int \frac {x\,\left (b+a\,\sin \relax (x)\right )}{{\left (a+b\,\sin \relax (x)\right )}^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(b + a*sin(x)))/(a + b*sin(x))^2,x)

[Out]

int((x*(b + a*sin(x)))/(a + b*sin(x))^2, x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b+a*sin(x))/(a+b*sin(x))**2,x)

[Out]

Timed out

________________________________________________________________________________________