3.87 \(\int \frac {\sec (2 t)}{1+\sec ^2(t)+3 \tan (t)} \, dt\)

Optimal. Leaf size=45 \[ -\frac {1}{2 (\tan (t)+1)}-\frac {1}{12} \log (\cos (t)-\sin (t))-\frac {1}{4} \log (\sin (t)+\cos (t))+\frac {1}{3} \log (\sin (t)+2 \cos (t)) \]

[Out]

-1/12*ln(cos(t)-sin(t))-1/4*ln(cos(t)+sin(t))+1/3*ln(2*cos(t)+sin(t))-1/2/(1+tan(t))

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {709, 800} \[ -\frac {1}{2 (\tan (t)+1)}-\frac {1}{12} \log (\cos (t)-\sin (t))-\frac {1}{4} \log (\sin (t)+\cos (t))+\frac {1}{3} \log (\sin (t)+2 \cos (t)) \]

Antiderivative was successfully verified.

[In]

Int[Sec[2*t]/(1 + Sec[t]^2 + 3*Tan[t]),t]

[Out]

-Log[Cos[t] - Sin[t]]/12 - Log[Cos[t] + Sin[t]]/4 + Log[2*Cos[t] + Sin[t]]/3 - 1/(2*(1 + Tan[t]))

Rule 709

Int[((d_.) + (e_.)*(x_))^(m_)/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(e*(d + e*x)^(m + 1))/((m
 + 1)*(c*d^2 - b*d*e + a*e^2)), x] + Dist[1/(c*d^2 - b*d*e + a*e^2), Int[((d + e*x)^(m + 1)*Simp[c*d - b*e - c
*e*x, x])/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && LtQ[m, -1]

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rubi steps

\begin {align*} \int \frac {\sec (2 t)}{1+\sec ^2(t)+3 \tan (t)} \, dt &=\operatorname {Subst}\left (\int \frac {1}{(1+t)^2 \left (2-t-t^2\right )} \, dt,t,\tan (t)\right )\\ &=-\frac {1}{2 (1+\tan (t))}+\frac {1}{2} \operatorname {Subst}\left (\int \frac {t}{(1+t) \left (2-t-t^2\right )} \, dt,t,\tan (t)\right )\\ &=-\frac {1}{2 (1+\tan (t))}+\frac {1}{2} \operatorname {Subst}\left (\int \left (-\frac {1}{6 (-1+t)}-\frac {1}{2 (1+t)}+\frac {2}{3 (2+t)}\right ) \, dt,t,\tan (t)\right )\\ &=-\frac {1}{12} \log (\cos (t)-\sin (t))-\frac {1}{4} \log (\cos (t)+\sin (t))+\frac {1}{3} \log (2 \cos (t)+\sin (t))-\frac {1}{2 (1+\tan (t))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 73, normalized size = 1.62 \[ -\frac {\cos (t) (\log (\cos (t)-\sin (t))+3 \log (\sin (t)+\cos (t))-4 \log (\sin (t)+2 \cos (t)))+\sin (t) (\log (\cos (t)-\sin (t))+3 \log (\sin (t)+\cos (t))-4 \log (\sin (t)+2 \cos (t))-6)}{12 (\sin (t)+\cos (t))} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[2*t]/(1 + Sec[t]^2 + 3*Tan[t]),t]

[Out]

-1/12*(Cos[t]*(Log[Cos[t] - Sin[t]] + 3*Log[Cos[t] + Sin[t]] - 4*Log[2*Cos[t] + Sin[t]]) + (-6 + Log[Cos[t] -
Sin[t]] + 3*Log[Cos[t] + Sin[t]] - 4*Log[2*Cos[t] + Sin[t]])*Sin[t])/(Cos[t] + Sin[t])

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 71, normalized size = 1.58 \[ \frac {4 \, {\left (\cos \relax (t) + \sin \relax (t)\right )} \log \left (\frac {3}{4} \, \cos \relax (t)^{2} + \cos \relax (t) \sin \relax (t) + \frac {1}{4}\right ) - 3 \, {\left (\cos \relax (t) + \sin \relax (t)\right )} \log \left (2 \, \cos \relax (t) \sin \relax (t) + 1\right ) - {\left (\cos \relax (t) + \sin \relax (t)\right )} \log \left (-2 \, \cos \relax (t) \sin \relax (t) + 1\right ) - 6 \, \cos \relax (t) + 6 \, \sin \relax (t)}{24 \, {\left (\cos \relax (t) + \sin \relax (t)\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(2*t)/(1+sec(t)^2+3*tan(t)),t, algorithm="fricas")

[Out]

1/24*(4*(cos(t) + sin(t))*log(3/4*cos(t)^2 + cos(t)*sin(t) + 1/4) - 3*(cos(t) + sin(t))*log(2*cos(t)*sin(t) +
1) - (cos(t) + sin(t))*log(-2*cos(t)*sin(t) + 1) - 6*cos(t) + 6*sin(t))/(cos(t) + sin(t))

________________________________________________________________________________________

giac [A]  time = 1.04, size = 33, normalized size = 0.73 \[ -\frac {1}{2 \, {\left (\tan \relax (t) + 1\right )}} + \frac {1}{3} \, \log \left ({\left | \tan \relax (t) + 2 \right |}\right ) - \frac {1}{4} \, \log \left ({\left | \tan \relax (t) + 1 \right |}\right ) - \frac {1}{12} \, \log \left ({\left | \tan \relax (t) - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(2*t)/(1+sec(t)^2+3*tan(t)),t, algorithm="giac")

[Out]

-1/2/(tan(t) + 1) + 1/3*log(abs(tan(t) + 2)) - 1/4*log(abs(tan(t) + 1)) - 1/12*log(abs(tan(t) - 1))

________________________________________________________________________________________

maple [A]  time = 0.27, size = 31, normalized size = 0.69 \[ -\frac {\ln \left (\tan \relax (t )+1\right )}{4}-\frac {\ln \left (\tan \relax (t )-1\right )}{12}+\frac {\ln \left (\tan \relax (t )+2\right )}{3}-\frac {1}{2 \left (\tan \relax (t )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(2*t)/(1+sec(t)^2+3*tan(t)),t)

[Out]

-1/2/(1+tan(t))-1/4*ln(1+tan(t))+1/3*ln(tan(t)+2)-1/12*ln(tan(t)-1)

________________________________________________________________________________________

maxima [B]  time = 1.98, size = 256, normalized size = 5.69 \[ \frac {3 \, {\left (\cos \left (2 \, t\right )^{2} + \sin \left (2 \, t\right )^{2} + 2 \, \sin \left (2 \, t\right ) + 1\right )} \log \left (953674316406250 \, {\left (3 \, \cos \left (2 \, t\right ) + \sin \left (2 \, t\right ) + 4\right )} \cos \left (4 \, t\right ) + 2384185791015625 \, \cos \left (4 \, t\right )^{2} + 953674316406250 \, \cos \left (2 \, t\right )^{2} - 953674316406250 \, {\left (\cos \left (2 \, t\right ) - 3 \, \sin \left (2 \, t\right ) + 3\right )} \sin \left (4 \, t\right ) + 2384185791015625 \, \sin \left (4 \, t\right )^{2} + 953674316406250 \, \sin \left (2 \, t\right )^{2} + 2861022949218750 \, \cos \left (2 \, t\right ) - 953674316406250 \, \sin \left (2 \, t\right ) + 2384185791015625\right ) - 6 \, {\left (\cos \left (2 \, t\right )^{2} + \sin \left (2 \, t\right )^{2} + 2 \, \sin \left (2 \, t\right ) + 1\right )} \log \left (\cos \left (2 \, t\right )^{2} + \sin \left (2 \, t\right )^{2} + 2 \, \sin \left (2 \, t\right ) + 1\right ) + 5 \, {\left (\cos \left (2 \, t\right )^{2} + \sin \left (2 \, t\right )^{2} + 2 \, \sin \left (2 \, t\right ) + 1\right )} \log \left (\frac {5 \, \cos \left (2 \, t\right )^{2} + 5 \, \sin \left (2 \, t\right )^{2} + 6 \, \cos \left (2 \, t\right ) + 8 \, \sin \left (2 \, t\right ) + 5}{5 \, {\left (\cos \left (2 \, t\right )^{2} + \sin \left (2 \, t\right )^{2} - 2 \, \sin \left (2 \, t\right ) + 1\right )}}\right ) - 24 \, \cos \left (2 \, t\right )}{48 \, {\left (\cos \left (2 \, t\right )^{2} + \sin \left (2 \, t\right )^{2} + 2 \, \sin \left (2 \, t\right ) + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(2*t)/(1+sec(t)^2+3*tan(t)),t, algorithm="maxima")

[Out]

1/48*(3*(cos(2*t)^2 + sin(2*t)^2 + 2*sin(2*t) + 1)*log(953674316406250*(3*cos(2*t) + sin(2*t) + 4)*cos(4*t) +
2384185791015625*cos(4*t)^2 + 953674316406250*cos(2*t)^2 - 953674316406250*(cos(2*t) - 3*sin(2*t) + 3)*sin(4*t
) + 2384185791015625*sin(4*t)^2 + 953674316406250*sin(2*t)^2 + 2861022949218750*cos(2*t) - 953674316406250*sin
(2*t) + 2384185791015625) - 6*(cos(2*t)^2 + sin(2*t)^2 + 2*sin(2*t) + 1)*log(cos(2*t)^2 + sin(2*t)^2 + 2*sin(2
*t) + 1) + 5*(cos(2*t)^2 + sin(2*t)^2 + 2*sin(2*t) + 1)*log(1/5*(5*cos(2*t)^2 + 5*sin(2*t)^2 + 6*cos(2*t) + 8*
sin(2*t) + 5)/(cos(2*t)^2 + sin(2*t)^2 - 2*sin(2*t) + 1)) - 24*cos(2*t))/(cos(2*t)^2 + sin(2*t)^2 + 2*sin(2*t)
 + 1)

________________________________________________________________________________________

mupad [B]  time = 0.72, size = 32, normalized size = 0.71 \[ \frac {\ln \left (\mathrm {tan}\relax (t)+2\right )}{3}-\frac {\ln \left (\mathrm {tan}\relax (t)+1\right )}{4}-\frac {\ln \left (\mathrm {tan}\relax (t)-1\right )}{12}-\frac {1}{2\,\left (\mathrm {tan}\relax (t)+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(2*t)*(3*tan(t) + 1/cos(t)^2 + 1)),t)

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec {\left (2 t \right )}}{3 \tan {\relax (t )} + \sec ^{2}{\relax (t )} + 1}\, dt \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(2*t)/(1+sec(t)**2+3*tan(t)),t)

[Out]

Integral(sec(2*t)/(3*tan(t) + sec(t)**2 + 1), t)

________________________________________________________________________________________