3.825 \(\int x \sec (5-x^2) \, dx\)

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

[Out]

-ArcTanh[Sin[5 - x^2]]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0117344, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {4204, 3770} \[ -\frac{1}{2} \tanh ^{-1}\left (\sin \left (5-x^2\right )\right ) \]

Antiderivative was successfully verified.

[In]

Int[x*Sec[5 - x^2],x]

[Out]

-ArcTanh[Sin[5 - x^2]]/2

Rule 4204

Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sec[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]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

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

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

Antiderivative was successfully verified.

[In]

Integrate[x*Sec[5 - x^2],x]

[Out]

-ArcTanh[Sin[5 - x^2]]/2

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 17, normalized size = 1.3 \begin{align*}{\frac{\ln \left ( \sec \left ({x}^{2}-5 \right ) +\tan \left ({x}^{2}-5 \right ) \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*sec(x^2-5),x)

[Out]

1/2*ln(sec(x^2-5)+tan(x^2-5))

________________________________________________________________________________________

Maxima [A]  time = 0.962089, size = 22, normalized size = 1.69 \begin{align*} \frac{1}{2} \, \log \left (\sec \left (x^{2} - 5\right ) + \tan \left (x^{2} - 5\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sec(x^2-5),x, algorithm="maxima")

[Out]

1/2*log(sec(x^2 - 5) + tan(x^2 - 5))

________________________________________________________________________________________

Fricas [B]  time = 2.32914, size = 76, normalized size = 5.85 \begin{align*} \frac{1}{4} \, \log \left (\sin \left (x^{2} - 5\right ) + 1\right ) - \frac{1}{4} \, \log \left (-\sin \left (x^{2} - 5\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sec(x^2-5),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.97906, size = 15, normalized size = 1.15 \begin{align*} \frac{\log{\left (\tan{\left (x^{2} - 5 \right )} + \sec{\left (x^{2} - 5 \right )} \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sec(x**2-5),x)

[Out]

log(tan(x**2 - 5) + sec(x**2 - 5))/2

________________________________________________________________________________________

Giac [B]  time = 1.10437, size = 55, normalized size = 4.23 \begin{align*} \frac{1}{8} \, \log \left ({\left | \frac{1}{\sin \left (x^{2} - 5\right )} + \sin \left (x^{2} - 5\right ) + 2 \right |}\right ) - \frac{1}{8} \, \log \left ({\left | \frac{1}{\sin \left (x^{2} - 5\right )} + \sin \left (x^{2} - 5\right ) - 2 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sec(x^2-5),x, algorithm="giac")

[Out]

1/8*log(abs(1/sin(x^2 - 5) + sin(x^2 - 5) + 2)) - 1/8*log(abs(1/sin(x^2 - 5) + sin(x^2 - 5) - 2))