3.340 \(\int \sec ^3(\frac {\pi }{4}+3 x) \, dx\)

Optimal. Leaf size=40 \[ \frac {1}{6} \tanh ^{-1}\left (\sin \left (3 x+\frac {\pi }{4}\right )\right )+\frac {1}{6} \tan \left (3 x+\frac {\pi }{4}\right ) \sec \left (3 x+\frac {\pi }{4}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3768, 3770} \[ \frac {1}{6} \tanh ^{-1}\left (\sin \left (3 x+\frac {\pi }{4}\right )\right )+\frac {1}{6} \tan \left (3 x+\frac {\pi }{4}\right ) \sec \left (3 x+\frac {\pi }{4}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sec[Pi/4 + 3*x]^3,x]

[Out]

ArcTanh[Sin[Pi/4 + 3*x]]/6 + (Sec[Pi/4 + 3*x]*Tan[Pi/4 + 3*x])/6

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

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 \sec ^3\left (\frac {\pi }{4}+3 x\right ) \, dx &=\frac {1}{6} \sec \left (\frac {\pi }{4}+3 x\right ) \tan \left (\frac {\pi }{4}+3 x\right )+\frac {1}{2} \int \csc \left (\frac {\pi }{4}-3 x\right ) \, dx\\ &=\frac {1}{6} \tanh ^{-1}\left (\sin \left (\frac {\pi }{4}+3 x\right )\right )+\frac {1}{6} \sec \left (\frac {\pi }{4}+3 x\right ) \tan \left (\frac {\pi }{4}+3 x\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 40, normalized size = 1.00 \[ \frac {1}{6} \tanh ^{-1}\left (\sin \left (3 x+\frac {\pi }{4}\right )\right )+\frac {1}{6} \tan \left (3 x+\frac {\pi }{4}\right ) \sec \left (3 x+\frac {\pi }{4}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[Pi/4 + 3*x]^3,x]

[Out]

ArcTanh[Sin[Pi/4 + 3*x]]/6 + (Sec[Pi/4 + 3*x]*Tan[Pi/4 + 3*x])/6

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sec ^3\left (\frac {\pi }{4}+3 x\right ) \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[Sec[Pi/4 + 3*x]^3,x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [B]  time = 0.74, size = 70, normalized size = 1.75 \[ \frac {\cos \left (\frac {1}{4} \, \pi + 3 \, x\right )^{2} \log \left (\sin \left (\frac {1}{4} \, \pi + 3 \, x\right ) + 1\right ) - \cos \left (\frac {1}{4} \, \pi + 3 \, x\right )^{2} \log \left (-\sin \left (\frac {1}{4} \, \pi + 3 \, x\right ) + 1\right ) + 2 \, \sin \left (\frac {1}{4} \, \pi + 3 \, x\right )}{12 \, \cos \left (\frac {1}{4} \, \pi + 3 \, x\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(1/4*pi+3*x)^3,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.64, size = 53, normalized size = 1.32 \[ -\frac {\sin \left (\frac {1}{4} \, \pi + 3 \, x\right )}{6 \, {\left (\sin \left (\frac {1}{4} \, \pi + 3 \, x\right )^{2} - 1\right )}} + \frac {1}{12} \, \log \left (\sin \left (\frac {1}{4} \, \pi + 3 \, x\right ) + 1\right ) - \frac {1}{12} \, \log \left (-\sin \left (\frac {1}{4} \, \pi + 3 \, x\right ) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(1/4*pi+3*x)^3,x, algorithm="giac")

[Out]

-1/6*sin(1/4*pi + 3*x)/(sin(1/4*pi + 3*x)^2 - 1) + 1/12*log(sin(1/4*pi + 3*x) + 1) - 1/12*log(-sin(1/4*pi + 3*
x) + 1)

________________________________________________________________________________________

maple [A]  time = 0.65, size = 40, normalized size = 1.00




method result size



derivativedivides \(\frac {\sec \left (\frac {\pi }{4}+3 x \right ) \tan \left (\frac {\pi }{4}+3 x \right )}{6}+\frac {\ln \left (\sec \left (\frac {\pi }{4}+3 x \right )+\tan \left (\frac {\pi }{4}+3 x \right )\right )}{6}\) \(40\)
default \(\frac {\sec \left (\frac {\pi }{4}+3 x \right ) \tan \left (\frac {\pi }{4}+3 x \right )}{6}+\frac {\ln \left (\sec \left (\frac {\pi }{4}+3 x \right )+\tan \left (\frac {\pi }{4}+3 x \right )\right )}{6}\) \(40\)
norman \(\frac {\frac {\left (\tan ^{3}\left (\frac {\pi }{8}+\frac {3 x}{2}\right )\right )}{3}+\frac {\tan \left (\frac {\pi }{8}+\frac {3 x}{2}\right )}{3}}{\left (\tan ^{2}\left (\frac {\pi }{8}+\frac {3 x}{2}\right )-1\right )^{2}}-\frac {\ln \left (\tan \left (\frac {\pi }{8}+\frac {3 x}{2}\right )-1\right )}{6}+\frac {\ln \left (\tan \left (\frac {\pi }{8}+\frac {3 x}{2}\right )+1\right )}{6}\) \(66\)
risch \(-\frac {i \left (\left (-1\right )^{\frac {3}{4}} {\mathrm e}^{9 i x}-\left (-1\right )^{\frac {1}{4}} {\mathrm e}^{3 i x}\right )}{3 \left (i {\mathrm e}^{6 i x}+1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{\frac {i \left (\pi +12 x \right )}{4}}+i\right )}{6}-\frac {\ln \left ({\mathrm e}^{\frac {i \left (\pi +12 x \right )}{4}}-i\right )}{6}\) \(67\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/cos(1/4*Pi+3*x)^3,x,method=_RETURNVERBOSE)

[Out]

1/6*sec(1/4*Pi+3*x)*tan(1/4*Pi+3*x)+1/6*ln(sec(1/4*Pi+3*x)+tan(1/4*Pi+3*x))

________________________________________________________________________________________

maxima [A]  time = 0.51, size = 51, normalized size = 1.28 \[ -\frac {\sin \left (\frac {1}{4} \, \pi + 3 \, x\right )}{6 \, {\left (\sin \left (\frac {1}{4} \, \pi + 3 \, x\right )^{2} - 1\right )}} + \frac {1}{12} \, \log \left (\sin \left (\frac {1}{4} \, \pi + 3 \, x\right ) + 1\right ) - \frac {1}{12} \, \log \left (\sin \left (\frac {1}{4} \, \pi + 3 \, x\right ) - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(1/4*pi+3*x)^3,x, algorithm="maxima")

[Out]

-1/6*sin(1/4*pi + 3*x)/(sin(1/4*pi + 3*x)^2 - 1) + 1/12*log(sin(1/4*pi + 3*x) + 1) - 1/12*log(sin(1/4*pi + 3*x
) - 1)

________________________________________________________________________________________

mupad [B]  time = 0.62, size = 35, normalized size = 0.88 \[ \frac {\ln \left (\mathrm {tan}\left (\frac {\Pi }{8}+\frac {3\,x}{2}+\frac {\pi }{4}\right )\right )}{6}+\frac {\mathrm {tan}\left (\frac {\Pi }{4}+3\,x\right )}{6\,\cos \left (\frac {\Pi }{4}+3\,x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/cos(Pi/4 + 3*x)^3,x)

[Out]

log(tan(Pi/8 + (3*x)/2 + pi/4))/6 + tan(Pi/4 + 3*x)/(6*cos(Pi/4 + 3*x))

________________________________________________________________________________________

sympy [B]  time = 1.31, size = 388, normalized size = 9.70 \[ - \frac {\log {\left (\tan {\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 1 \right )} \tan ^{4}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )}}{6 \tan ^{4}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 12 \tan ^{2}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 6} + \frac {2 \log {\left (\tan {\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 1 \right )} \tan ^{2}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )}}{6 \tan ^{4}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 12 \tan ^{2}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 6} - \frac {\log {\left (\tan {\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 1 \right )}}{6 \tan ^{4}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 12 \tan ^{2}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 6} + \frac {\log {\left (\tan {\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 1 \right )} \tan ^{4}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )}}{6 \tan ^{4}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 12 \tan ^{2}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 6} - \frac {2 \log {\left (\tan {\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 1 \right )} \tan ^{2}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )}}{6 \tan ^{4}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 12 \tan ^{2}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 6} + \frac {\log {\left (\tan {\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 1 \right )}}{6 \tan ^{4}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 12 \tan ^{2}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 6} + \frac {2 \tan ^{3}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )}}{6 \tan ^{4}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 12 \tan ^{2}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 6} + \frac {2 \tan {\left (\frac {3 x}{2} + \frac {\pi }{8} \right )}}{6 \tan ^{4}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} - 12 \tan ^{2}{\left (\frac {3 x}{2} + \frac {\pi }{8} \right )} + 6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/cos(1/4*pi+3*x)**3,x)

[Out]

-log(tan(3*x/2 + pi/8) - 1)*tan(3*x/2 + pi/8)**4/(6*tan(3*x/2 + pi/8)**4 - 12*tan(3*x/2 + pi/8)**2 + 6) + 2*lo
g(tan(3*x/2 + pi/8) - 1)*tan(3*x/2 + pi/8)**2/(6*tan(3*x/2 + pi/8)**4 - 12*tan(3*x/2 + pi/8)**2 + 6) - log(tan
(3*x/2 + pi/8) - 1)/(6*tan(3*x/2 + pi/8)**4 - 12*tan(3*x/2 + pi/8)**2 + 6) + log(tan(3*x/2 + pi/8) + 1)*tan(3*
x/2 + pi/8)**4/(6*tan(3*x/2 + pi/8)**4 - 12*tan(3*x/2 + pi/8)**2 + 6) - 2*log(tan(3*x/2 + pi/8) + 1)*tan(3*x/2
 + pi/8)**2/(6*tan(3*x/2 + pi/8)**4 - 12*tan(3*x/2 + pi/8)**2 + 6) + log(tan(3*x/2 + pi/8) + 1)/(6*tan(3*x/2 +
 pi/8)**4 - 12*tan(3*x/2 + pi/8)**2 + 6) + 2*tan(3*x/2 + pi/8)**3/(6*tan(3*x/2 + pi/8)**4 - 12*tan(3*x/2 + pi/
8)**2 + 6) + 2*tan(3*x/2 + pi/8)/(6*tan(3*x/2 + pi/8)**4 - 12*tan(3*x/2 + pi/8)**2 + 6)

________________________________________________________________________________________