3.492 \(\int \frac {2 x+\sin (2 x)}{(\cos (x)+x \sin (x))^2} \, dx\)

Optimal. Leaf size=12 \[ \frac {2}{\frac {\cot (x)}{x}+1} \]

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {6711, 32} \[ \frac {2}{\frac {\cot (x)}{x}+1} \]

Antiderivative was successfully verified.

[In]

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

[Out]

2/(1 + Cot[x]/x)

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 6711

Int[(u_)*((a_.)*(v_)^(p_.) + (b_.)*(w_)^(q_.))^(m_.), x_Symbol] :> With[{c = Simplify[u/(p*w*D[v, x] - q*v*D[w
, x])]}, Dist[c*p, Subst[Int[(b + a*x^p)^m, x], x, v*w^(m*q + 1)], x] /; FreeQ[c, x]] /; FreeQ[{a, b, m, p, q}
, x] && EqQ[p + q*(m*p + 1), 0] && IntegerQ[p] && IntegerQ[m]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.23, size = 14, normalized size = 1.17 \[ \frac {2 x \sin (x)}{x \sin (x)+\cos (x)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*x*Sin[x])/(Cos[x] + x*Sin[x])

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {2 x+\sin (2 x)}{(\cos (x)+x \sin (x))^2} \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[(2*x + Sin[2*x])/(Cos[x] + x*Sin[x])^2,x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [A]  time = 1.25, size = 13, normalized size = 1.08 \[ -\frac {2 \, \cos \relax (x)}{x \sin \relax (x) + \cos \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*cos(x)/(x*sin(x) + cos(x))

________________________________________________________________________________________

giac [A]  time = 0.63, size = 10, normalized size = 0.83 \[ -\frac {2}{x \tan \relax (x) + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(x*tan(x) + 1)

________________________________________________________________________________________

maple [C]  time = 0.83, size = 44, normalized size = 3.67




method result size



risch \(-\frac {2 i}{x +i}-\frac {4 i x}{\left (x +i\right ) \left (x \,{\mathrm e}^{2 i x}-x +i {\mathrm e}^{2 i x}+i\right )}\) \(44\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x+sin(2*x))/(cos(x)+x*sin(x))^2,x,method=_RETURNVERBOSE)

[Out]

-2*I/(x+I)-4*I*x/(x+I)/(x*exp(2*I*x)-x+I*exp(2*I*x)+I)

________________________________________________________________________________________

maxima [B]  time = 1.18, size = 78, normalized size = 6.50 \[ -\frac {2 \, {\left (\cos \left (2 \, x\right )^{2} + 2 \, x \sin \left (2 \, x\right ) + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )}}{{\left (x^{2} + 1\right )} \cos \left (2 \, x\right )^{2} + {\left (x^{2} + 1\right )} \sin \left (2 \, x\right )^{2} + x^{2} - 2 \, {\left (x^{2} - 1\right )} \cos \left (2 \, x\right ) + 4 \, x \sin \left (2 \, x\right ) + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*(cos(2*x)^2 + 2*x*sin(2*x) + sin(2*x)^2 + 2*cos(2*x) + 1)/((x^2 + 1)*cos(2*x)^2 + (x^2 + 1)*sin(2*x)^2 + x^
2 - 2*(x^2 - 1)*cos(2*x) + 4*x*sin(2*x) + 1)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x + sin(2*x))/(cos(x) + x*sin(x))^2,x)

[Out]

int((2*x + sin(2*x))/(cos(x) + x*sin(x))^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {2 x + \sin {\left (2 x \right )}}{\left (x \sin {\relax (x )} + \cos {\relax (x )}\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x+sin(2*x))/(cos(x)+x*sin(x))**2,x)

[Out]

Integral((2*x + sin(2*x))/(x*sin(x) + cos(x))**2, x)

________________________________________________________________________________________