3.1.29 \(\int t \sec ^2(t) \, dt\) [29]

Optimal. Leaf size=8 \[ \log (\cos (t))+t \tan (t) \]

[Out]

ln(cos(t))+t*tan(t)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 8, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4269, 3556} \begin {gather*} t \tan (t)+\log (\cos (t)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[t*Sec[t]^2,t]

[Out]

Log[Cos[t]] + t*Tan[t]

Rule 3556

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

Rule 4269

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rubi steps

\begin {align*} \int t \sec ^2(t) \, dt &=t \tan (t)-\int \tan (t) \, dt\\ &=\log (\cos (t))+t \tan (t)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 8, normalized size = 1.00 \begin {gather*} \log (\cos (t))+t \tan (t) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[t*Sec[t]^2,t]

[Out]

Log[Cos[t]] + t*Tan[t]

________________________________________________________________________________________

Mathics [B] Leaf count is larger than twice the leaf count of optimal. \(121\) vs. \(2(8)=16\).
time = 4.45, size = 105, normalized size = 13.12 \begin {gather*} \frac {t \left (-1+\text {Tan}\left [\frac {t}{2}\right ]^2\right ) \text {Sin}\left [t\right ]+\frac {\left (-1+\text {Cos}\left [t\right ]\right ) \left (-1+\text {Tan}\left [\frac {t}{2}\right ]^2\right ) \left (\text {Log}\left [-1+\text {Tan}\left [\frac {t}{2}\right ]\right ]+\text {Log}\left [1+\text {Tan}\left [\frac {t}{2}\right ]\right ]\right )}{2}+\text {Cos}\left [t\right ] \left (\text {Log}\left [\frac {2}{1+\text {Cos}\left [t\right ]}\right ]-\text {Log}\left [-1+\text {Tan}\left [\frac {t}{2}\right ]\right ]-\text {Log}\left [1+\text {Tan}\left [\frac {t}{2}\right ]\right ]-\text {Log}\left [\frac {2}{1+\text {Cos}\left [t\right ]}\right ] \text {Tan}\left [\frac {t}{2}\right ]^2\right )}{\text {Cos}\left [t\right ] \left (-1+\text {Tan}\left [\frac {t}{2}\right ]^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[t*Sec[t]^2,t]')

[Out]

(t (-1 + Tan[t / 2] ^ 2) Sin[t] + (-1 + Cos[t]) (-1 + Tan[t / 2] ^ 2) (Log[-1 + Tan[t / 2]] + Log[1 + Tan[t /
2]]) / 2 + Cos[t] (Log[2 / (1 + Cos[t])] - Log[-1 + Tan[t / 2]] - Log[1 + Tan[t / 2]] - Log[2 / (1 + Cos[t])]
Tan[t / 2] ^ 2)) / (Cos[t] (-1 + Tan[t / 2] ^ 2))

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 9, normalized size = 1.12

method result size
default \(\ln \left (\cos \left (t \right )\right )+t \tan \left (t \right )\) \(9\)
risch \(-2 i t +\frac {2 i t}{{\mathrm e}^{2 i t}+1}+\ln \left ({\mathrm e}^{2 i t}+1\right )\) \(27\)
norman \(-\frac {2 t \tan \left (\frac {t}{2}\right )}{\tan ^{2}\left (\frac {t}{2}\right )-1}-\ln \left (1+\tan ^{2}\left (\frac {t}{2}\right )\right )+\ln \left (\tan \left (\frac {t}{2}\right )-1\right )+\ln \left (\tan \left (\frac {t}{2}\right )+1\right )\) \(44\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(t*sec(t)^2,t,method=_RETURNVERBOSE)

[Out]

ln(cos(t))+t*tan(t)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (8) = 16\).
time = 0.35, size = 74, normalized size = 9.25 \begin {gather*} \frac {{\left (\cos \left (2 \, t\right )^{2} + \sin \left (2 \, t\right )^{2} + 2 \, \cos \left (2 \, t\right ) + 1\right )} \log \left (\cos \left (2 \, t\right )^{2} + \sin \left (2 \, t\right )^{2} + 2 \, \cos \left (2 \, t\right ) + 1\right ) + 4 \, t \sin \left (2 \, t\right )}{2 \, {\left (\cos \left (2 \, t\right )^{2} + \sin \left (2 \, t\right )^{2} + 2 \, \cos \left (2 \, t\right ) + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(t*sec(t)^2,t, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 18 vs. \(2 (8) = 16\).
time = 0.34, size = 18, normalized size = 2.25 \begin {gather*} \frac {\cos \left (t\right ) \log \left (-\cos \left (t\right )\right ) + t \sin \left (t\right )}{\cos \left (t\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(t*sec(t)^2,t, algorithm="fricas")

[Out]

(cos(t)*log(-cos(t)) + t*sin(t))/cos(t)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int t \sec ^{2}{\left (t \right )}\, dt \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(t*sec(t)**2,t)

[Out]

Integral(t*sec(t)**2, t)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 103 vs. \(2 (8) = 16\).
time = 0.01, size = 116, normalized size = 14.50 \begin {gather*} \frac {-4 t \tan \left (\frac {t}{2}\right )+\ln \left (\frac {4 \tan ^{4}\left (\frac {t}{2}\right )-8 \tan ^{2}\left (\frac {t}{2}\right )+4}{\tan ^{4}\left (\frac {t}{2}\right )+2 \tan ^{2}\left (\frac {t}{2}\right )+1}\right ) \tan ^{2}\left (\frac {t}{2}\right )-\ln \left (\frac {4 \tan ^{4}\left (\frac {t}{2}\right )-8 \tan ^{2}\left (\frac {t}{2}\right )+4}{\tan ^{4}\left (\frac {t}{2}\right )+2 \tan ^{2}\left (\frac {t}{2}\right )+1}\right )}{2 \tan ^{2}\left (\frac {t}{2}\right )-2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(t*sec(t)^2,t)

[Out]

1/2*(log(4*(tan(1/2*t)^4 - 2*tan(1/2*t)^2 + 1)/(tan(1/2*t)^4 + 2*tan(1/2*t)^2 + 1))*tan(1/2*t)^2 - 4*t*tan(1/2
*t) - log(4*(tan(1/2*t)^4 - 2*tan(1/2*t)^2 + 1)/(tan(1/2*t)^4 + 2*tan(1/2*t)^2 + 1)))/(tan(1/2*t)^2 - 1)

________________________________________________________________________________________

Mupad [B]
time = 0.02, size = 8, normalized size = 1.00 \begin {gather*} \ln \left (\cos \left (t\right )\right )+t\,\mathrm {tan}\left (t\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(t/cos(t)^2,t)

[Out]

log(cos(t)) + t*tan(t)

________________________________________________________________________________________