3.74 \(\int \sin (x) \tan (2 x) \, dx\)

Optimal. Leaf size=20 \[ \frac{\tanh ^{-1}\left (\sqrt{2} \sin (x)\right )}{\sqrt{2}}-\sin (x) \]

[Out]

ArcTanh[Sqrt[2]*Sin[x]]/Sqrt[2] - Sin[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0230994, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.429, Rules used = {12, 321, 206} \[ \frac{\tanh ^{-1}\left (\sqrt{2} \sin (x)\right )}{\sqrt{2}}-\sin (x) \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]*Tan[2*x],x]

[Out]

ArcTanh[Sqrt[2]*Sin[x]]/Sqrt[2] - Sin[x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

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

Mathematica [A]  time = 0.0134385, size = 20, normalized size = 1. \[ \frac{\tanh ^{-1}\left (\sqrt{2} \sin (x)\right )}{\sqrt{2}}-\sin (x) \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]*Tan[2*x],x]

[Out]

ArcTanh[Sqrt[2]*Sin[x]]/Sqrt[2] - Sin[x]

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 18, normalized size = 0.9 \begin{align*} -\sin \left ( x \right ) +{\frac{{\it Artanh} \left ( \sin \left ( x \right ) \sqrt{2} \right ) \sqrt{2}}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)*tan(2*x),x)

[Out]

-sin(x)+1/2*arctanh(sin(x)*2^(1/2))*2^(1/2)

________________________________________________________________________________________

Maxima [B]  time = 1.53618, size = 190, normalized size = 9.5 \begin{align*} \frac{1}{8} \, \sqrt{2} \log \left (2 \, \cos \left (x\right )^{2} + 2 \, \sin \left (x\right )^{2} + 2 \, \sqrt{2} \cos \left (x\right ) + 2 \, \sqrt{2} \sin \left (x\right ) + 2\right ) - \frac{1}{8} \, \sqrt{2} \log \left (2 \, \cos \left (x\right )^{2} + 2 \, \sin \left (x\right )^{2} + 2 \, \sqrt{2} \cos \left (x\right ) - 2 \, \sqrt{2} \sin \left (x\right ) + 2\right ) + \frac{1}{8} \, \sqrt{2} \log \left (2 \, \cos \left (x\right )^{2} + 2 \, \sin \left (x\right )^{2} - 2 \, \sqrt{2} \cos \left (x\right ) + 2 \, \sqrt{2} \sin \left (x\right ) + 2\right ) - \frac{1}{8} \, \sqrt{2} \log \left (2 \, \cos \left (x\right )^{2} + 2 \, \sin \left (x\right )^{2} - 2 \, \sqrt{2} \cos \left (x\right ) - 2 \, \sqrt{2} \sin \left (x\right ) + 2\right ) - \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)*tan(2*x),x, algorithm="maxima")

[Out]

1/8*sqrt(2)*log(2*cos(x)^2 + 2*sin(x)^2 + 2*sqrt(2)*cos(x) + 2*sqrt(2)*sin(x) + 2) - 1/8*sqrt(2)*log(2*cos(x)^
2 + 2*sin(x)^2 + 2*sqrt(2)*cos(x) - 2*sqrt(2)*sin(x) + 2) + 1/8*sqrt(2)*log(2*cos(x)^2 + 2*sin(x)^2 - 2*sqrt(2
)*cos(x) + 2*sqrt(2)*sin(x) + 2) - 1/8*sqrt(2)*log(2*cos(x)^2 + 2*sin(x)^2 - 2*sqrt(2)*cos(x) - 2*sqrt(2)*sin(
x) + 2) - sin(x)

________________________________________________________________________________________

Fricas [B]  time = 2.36381, size = 109, normalized size = 5.45 \begin{align*} \frac{1}{4} \, \sqrt{2} \log \left (-\frac{2 \, \cos \left (x\right )^{2} - 2 \, \sqrt{2} \sin \left (x\right ) - 3}{2 \, \cos \left (x\right )^{2} - 1}\right ) - \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)*tan(2*x),x, algorithm="fricas")

[Out]

1/4*sqrt(2)*log(-(2*cos(x)^2 - 2*sqrt(2)*sin(x) - 3)/(2*cos(x)^2 - 1)) - sin(x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sin{\left (x \right )} \tan{\left (2 x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)*tan(2*x),x)

[Out]

Integral(sin(x)*tan(2*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sin \left (x\right ) \tan \left (2 \, x\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)*tan(2*x),x, algorithm="giac")

[Out]

integrate(sin(x)*tan(2*x), x)