3.59 \(\int \frac {\tan ^2(\sqrt {x})}{\sqrt {x}} \, dx\)

Optimal. Leaf size=16 \[ 2 \tan \left (\sqrt {x}\right )-2 \sqrt {x} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3747, 3473, 8} \[ 2 \tan \left (\sqrt {x}\right )-2 \sqrt {x} \]

Antiderivative was successfully verified.

[In]

Int[Tan[Sqrt[x]]^2/Sqrt[x],x]

[Out]

-2*Sqrt[x] + 2*Tan[Sqrt[x]]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3747

Int[(x_)^(m_.)*((a_.) + (b_.)*Tan[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Tan[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 18, normalized size = 1.12 \[ 2 \tan \left (\sqrt {x}\right )-2 \tan ^{-1}\left (\tan \left (\sqrt {x}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[Sqrt[x]]^2/Sqrt[x],x]

[Out]

-2*ArcTan[Tan[Sqrt[x]]] + 2*Tan[Sqrt[x]]

________________________________________________________________________________________

fricas [A]  time = 1.97, size = 12, normalized size = 0.75 \[ -2 \, \sqrt {x} + 2 \, \tan \left (\sqrt {x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x^(1/2))^2/x^(1/2),x, algorithm="fricas")

[Out]

-2*sqrt(x) + 2*tan(sqrt(x))

________________________________________________________________________________________

giac [A]  time = 0.12, size = 12, normalized size = 0.75 \[ -2 \, \sqrt {x} + 2 \, \tan \left (\sqrt {x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x^(1/2))^2/x^(1/2),x, algorithm="giac")

[Out]

-2*sqrt(x) + 2*tan(sqrt(x))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 13, normalized size = 0.81 \[ -2 \sqrt {x}+2 \tan \left (\sqrt {x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x^(1/2))^2/x^(1/2),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.54, size = 12, normalized size = 0.75 \[ -2 \, \sqrt {x} + 2 \, \tan \left (\sqrt {x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x^(1/2))^2/x^(1/2),x, algorithm="maxima")

[Out]

-2*sqrt(x) + 2*tan(sqrt(x))

________________________________________________________________________________________

mupad [B]  time = 2.58, size = 20, normalized size = 1.25 \[ -2\,\sqrt {x}+\frac {4{}\mathrm {i}}{{\mathrm {e}}^{\sqrt {x}\,2{}\mathrm {i}}+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x^(1/2))^2/x^(1/2),x)

[Out]

4i/(exp(x^(1/2)*2i) + 1) - 2*x^(1/2)

________________________________________________________________________________________

sympy [A]  time = 0.18, size = 14, normalized size = 0.88 \[ - 2 \sqrt {x} + 2 \tan {\left (\sqrt {x} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x**(1/2))**2/x**(1/2),x)

[Out]

-2*sqrt(x) + 2*tan(sqrt(x))

________________________________________________________________________________________