3.757 \(\int x \sec ^2(3 x) \, dx\)

Optimal. Leaf size=19 \[ \frac {1}{3} x \tan (3 x)+\frac {1}{9} \log (\cos (3 x)) \]

[Out]

1/9*ln(cos(3*x))+1/3*x*tan(3*x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4184, 3475} \[ \frac {1}{3} x \tan (3 x)+\frac {1}{9} \log (\cos (3 x)) \]

Antiderivative was successfully verified.

[In]

Int[x*Sec[3*x]^2,x]

[Out]

Log[Cos[3*x]]/9 + (x*Tan[3*x])/3

Rule 3475

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

Rule 4184

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 x \sec ^2(3 x) \, dx &=\frac {1}{3} x \tan (3 x)-\frac {1}{3} \int \tan (3 x) \, dx\\ &=\frac {1}{9} \log (\cos (3 x))+\frac {1}{3} x \tan (3 x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 19, normalized size = 1.00 \[ \frac {1}{3} x \tan (3 x)+\frac {1}{9} \log (\cos (3 x)) \]

Antiderivative was successfully verified.

[In]

Integrate[x*Sec[3*x]^2,x]

[Out]

Log[Cos[3*x]]/9 + (x*Tan[3*x])/3

________________________________________________________________________________________

fricas [A]  time = 0.71, size = 28, normalized size = 1.47 \[ \frac {\cos \left (3 \, x\right ) \log \left (-\cos \left (3 \, x\right )\right ) + 3 \, x \sin \left (3 \, x\right )}{9 \, \cos \left (3 \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/9*(cos(3*x)*log(-cos(3*x)) + 3*x*sin(3*x))/cos(3*x)

________________________________________________________________________________________

giac [B]  time = 0.18, size = 103, normalized size = 5.42 \[ \frac {\log \left (\frac {4 \, {\left (\tan \left (\frac {3}{2} \, x\right )^{4} - 2 \, \tan \left (\frac {3}{2} \, x\right )^{2} + 1\right )}}{\tan \left (\frac {3}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {3}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {3}{2} \, x\right )^{2} - 12 \, x \tan \left (\frac {3}{2} \, x\right ) - \log \left (\frac {4 \, {\left (\tan \left (\frac {3}{2} \, x\right )^{4} - 2 \, \tan \left (\frac {3}{2} \, x\right )^{2} + 1\right )}}{\tan \left (\frac {3}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {3}{2} \, x\right )^{2} + 1}\right )}{18 \, {\left (\tan \left (\frac {3}{2} \, x\right )^{2} - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/18*(log(4*(tan(3/2*x)^4 - 2*tan(3/2*x)^2 + 1)/(tan(3/2*x)^4 + 2*tan(3/2*x)^2 + 1))*tan(3/2*x)^2 - 12*x*tan(3
/2*x) - log(4*(tan(3/2*x)^4 - 2*tan(3/2*x)^2 + 1)/(tan(3/2*x)^4 + 2*tan(3/2*x)^2 + 1)))/(tan(3/2*x)^2 - 1)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 16, normalized size = 0.84 \[ \frac {\ln \left (\cos \left (3 x \right )\right )}{9}+\frac {x \tan \left (3 x \right )}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*sec(3*x)^2,x)

[Out]

1/9*ln(cos(3*x))+1/3*x*tan(3*x)

________________________________________________________________________________________

maxima [B]  time = 0.41, size = 74, normalized size = 3.89 \[ \frac {{\left (\cos \left (6 \, x\right )^{2} + \sin \left (6 \, x\right )^{2} + 2 \, \cos \left (6 \, x\right ) + 1\right )} \log \left (\cos \left (6 \, x\right )^{2} + \sin \left (6 \, x\right )^{2} + 2 \, \cos \left (6 \, x\right ) + 1\right ) + 12 \, x \sin \left (6 \, x\right )}{18 \, {\left (\cos \left (6 \, x\right )^{2} + \sin \left (6 \, x\right )^{2} + 2 \, \cos \left (6 \, x\right ) + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/18*((cos(6*x)^2 + sin(6*x)^2 + 2*cos(6*x) + 1)*log(cos(6*x)^2 + sin(6*x)^2 + 2*cos(6*x) + 1) + 12*x*sin(6*x)
)/(cos(6*x)^2 + sin(6*x)^2 + 2*cos(6*x) + 1)

________________________________________________________________________________________

mupad [B]  time = 2.90, size = 15, normalized size = 0.79 \[ \frac {\ln \left (\cos \left (3\,x\right )\right )}{9}+\frac {x\,\mathrm {tan}\left (3\,x\right )}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x/cos(3*x)^2,x)

[Out]

log(cos(3*x))/9 + (x*tan(3*x))/3

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x \sec ^{2}{\left (3 x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sec(3*x)**2,x)

[Out]

Integral(x*sec(3*x)**2, x)

________________________________________________________________________________________