3.904 \(\int x \sec (1+x) \tan (1+x) \, dx\)

Optimal. Leaf size=14 \[ x \sec (x+1)-\tanh ^{-1}(\sin (x+1)) \]

[Out]

-ArcTanh[Sin[1 + x]] + x*Sec[1 + x]

________________________________________________________________________________________

Rubi [A]  time = 0.0106727, antiderivative size = 14, 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 = {3757, 3770} \[ x \sec (x+1)-\tanh ^{-1}(\sin (x+1)) \]

Antiderivative was successfully verified.

[In]

Int[x*Sec[1 + x]*Tan[1 + x],x]

[Out]

-ArcTanh[Sin[1 + x]] + x*Sec[1 + x]

Rule 3757

Int[(x_)^(m_.)*Sec[(a_.) + (b_.)*(x_)^(n_.)]^(p_.)*Tan[(a_.) + (b_.)*(x_)^(n_.)]^(q_.), x_Symbol] :> Simp[(x^(
m - n + 1)*Sec[a + b*x^n]^p)/(b*n*p), x] - Dist[(m - n + 1)/(b*n*p), Int[x^(m - n)*Sec[a + b*x^n]^p, x], x] /;
 FreeQ[{a, b, p}, x] && IntegerQ[n] && GeQ[m, n] && EqQ[q, 1]

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 (1+x) \tan (1+x) \, dx &=x \sec (1+x)-\int \sec (1+x) \, dx\\ &=-\tanh ^{-1}(\sin (1+x))+x \sec (1+x)\\ \end{align*}

Mathematica [B]  time = 0.0400587, size = 47, normalized size = 3.36 \[ x \sec (x+1)+\log \left (\cos \left (\frac{x+1}{2}\right )-\sin \left (\frac{x+1}{2}\right )\right )-\log \left (\sin \left (\frac{x+1}{2}\right )+\cos \left (\frac{x+1}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x*Sec[1 + x]*Tan[1 + x],x]

[Out]

Log[Cos[(1 + x)/2] - Sin[(1 + x)/2]] - Log[Cos[(1 + x)/2] + Sin[(1 + x)/2]] + x*Sec[1 + x]

________________________________________________________________________________________

Maple [B]  time = 0.011, size = 32, normalized size = 2.3 \begin{align*}{\frac{1+x}{\cos \left ( 1+x \right ) }}-\ln \left ( \sec \left ( 1+x \right ) +\tan \left ( 1+x \right ) \right ) - \left ( \cos \left ( 1+x \right ) \right ) ^{-1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*sec(1+x)*tan(1+x),x)

[Out]

(1+x)/cos(1+x)-ln(sec(1+x)+tan(1+x))-1/cos(1+x)

________________________________________________________________________________________

Maxima [B]  time = 1.46521, size = 238, normalized size = 17. \begin{align*} \frac{4 \,{\left (x + 1\right )} \cos \left (2 \, x + 2\right ) \cos \left (x + 1\right ) + 4 \,{\left (x + 1\right )} \sin \left (2 \, x + 2\right ) \sin \left (x + 1\right ) + 4 \,{\left (x + 1\right )} \cos \left (x + 1\right ) -{\left (\cos \left (2 \, x + 2\right )^{2} + \sin \left (2 \, x + 2\right )^{2} + 2 \, \cos \left (2 \, x + 2\right ) + 1\right )} \log \left (\cos \left (x + 1\right )^{2} + \sin \left (x + 1\right )^{2} + 2 \, \sin \left (x + 1\right ) + 1\right ) +{\left (\cos \left (2 \, x + 2\right )^{2} + \sin \left (2 \, x + 2\right )^{2} + 2 \, \cos \left (2 \, x + 2\right ) + 1\right )} \log \left (\cos \left (x + 1\right )^{2} + \sin \left (x + 1\right )^{2} - 2 \, \sin \left (x + 1\right ) + 1\right )}{2 \,{\left (\cos \left (2 \, x + 2\right )^{2} + \sin \left (2 \, x + 2\right )^{2} + 2 \, \cos \left (2 \, x + 2\right ) + 1\right )}} - \frac{1}{\cos \left (x + 1\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sec(1+x)*tan(1+x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.05271, size = 122, normalized size = 8.71 \begin{align*} -\frac{\cos \left (x + 1\right ) \log \left (\sin \left (x + 1\right ) + 1\right ) - \cos \left (x + 1\right ) \log \left (-\sin \left (x + 1\right ) + 1\right ) - 2 \, x}{2 \, \cos \left (x + 1\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sec(1+x)*tan(1+x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sec(1+x)*tan(1+x),x)

[Out]

Integral(x*tan(x + 1)*sec(x + 1), x)

________________________________________________________________________________________

Giac [B]  time = 1.44736, size = 1592, normalized size = 113.71 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sec(1+x)*tan(1+x),x, algorithm="giac")

[Out]

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