3.930 \(\int (1+2 x) \sec ^2(1+2 x) \, dx\)

Optimal. Leaf size=27 \[ \frac {1}{2} (2 x+1) \tan (2 x+1)+\frac {1}{2} \log (\cos (2 x+1)) \]

[Out]

1/2*ln(cos(1+2*x))+1/2*(1+2*x)*tan(1+2*x)

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Int[(1 + 2*x)*Sec[1 + 2*x]^2,x]

[Out]

Log[Cos[1 + 2*x]]/2 + ((1 + 2*x)*Tan[1 + 2*x])/2

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 30, normalized size = 1.11 \[ x \tan (2 x+1)+\frac {1}{2} \tan (2 x+1)+\frac {1}{2} \log (\cos (2 x+1)) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + 2*x)*Sec[1 + 2*x]^2,x]

[Out]

Log[Cos[1 + 2*x]]/2 + Tan[1 + 2*x]/2 + x*Tan[1 + 2*x]

________________________________________________________________________________________

fricas [A]  time = 0.83, size = 39, normalized size = 1.44 \[ \frac {\cos \left (2 \, x + 1\right ) \log \left (-\cos \left (2 \, x + 1\right )\right ) + {\left (2 \, x + 1\right )} \sin \left (2 \, x + 1\right )}{2 \, \cos \left (2 \, x + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.37, size = 943, normalized size = 34.93 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(log(4*(tan(1/2)^4*tan(x)^8 - 8*tan(1/2)^3*tan(x)^7 - 2*tan(1/2)^2*tan(x)^8 - 2*tan(1/2)^4*tan(x)^4 - 8*ta
n(1/2)^3*tan(x)^5 + 16*tan(1/2)^2*tan(x)^6 + 8*tan(1/2)*tan(x)^7 + tan(x)^8 + 8*tan(1/2)^3*tan(x)^3 + 36*tan(1
/2)^2*tan(x)^4 + 8*tan(1/2)*tan(x)^5 + tan(1/2)^4 + 8*tan(1/2)^3*tan(x) + 16*tan(1/2)^2*tan(x)^2 - 8*tan(1/2)*
tan(x)^3 - 2*tan(x)^4 - 2*tan(1/2)^2 - 8*tan(1/2)*tan(x) + 1)/(tan(1/2)^4 + 2*tan(1/2)^2 + 1))*tan(1/2)^2*tan(
x)^2 - 8*x*tan(1/2)^2*tan(x) - 8*x*tan(1/2)*tan(x)^2 - log(4*(tan(1/2)^4*tan(x)^8 - 8*tan(1/2)^3*tan(x)^7 - 2*
tan(1/2)^2*tan(x)^8 - 2*tan(1/2)^4*tan(x)^4 - 8*tan(1/2)^3*tan(x)^5 + 16*tan(1/2)^2*tan(x)^6 + 8*tan(1/2)*tan(
x)^7 + tan(x)^8 + 8*tan(1/2)^3*tan(x)^3 + 36*tan(1/2)^2*tan(x)^4 + 8*tan(1/2)*tan(x)^5 + tan(1/2)^4 + 8*tan(1/
2)^3*tan(x) + 16*tan(1/2)^2*tan(x)^2 - 8*tan(1/2)*tan(x)^3 - 2*tan(x)^4 - 2*tan(1/2)^2 - 8*tan(1/2)*tan(x) + 1
)/(tan(1/2)^4 + 2*tan(1/2)^2 + 1))*tan(1/2)^2 - 4*log(4*(tan(1/2)^4*tan(x)^8 - 8*tan(1/2)^3*tan(x)^7 - 2*tan(1
/2)^2*tan(x)^8 - 2*tan(1/2)^4*tan(x)^4 - 8*tan(1/2)^3*tan(x)^5 + 16*tan(1/2)^2*tan(x)^6 + 8*tan(1/2)*tan(x)^7
+ tan(x)^8 + 8*tan(1/2)^3*tan(x)^3 + 36*tan(1/2)^2*tan(x)^4 + 8*tan(1/2)*tan(x)^5 + tan(1/2)^4 + 8*tan(1/2)^3*
tan(x) + 16*tan(1/2)^2*tan(x)^2 - 8*tan(1/2)*tan(x)^3 - 2*tan(x)^4 - 2*tan(1/2)^2 - 8*tan(1/2)*tan(x) + 1)/(ta
n(1/2)^4 + 2*tan(1/2)^2 + 1))*tan(1/2)*tan(x) - 4*tan(1/2)^2*tan(x) - log(4*(tan(1/2)^4*tan(x)^8 - 8*tan(1/2)^
3*tan(x)^7 - 2*tan(1/2)^2*tan(x)^8 - 2*tan(1/2)^4*tan(x)^4 - 8*tan(1/2)^3*tan(x)^5 + 16*tan(1/2)^2*tan(x)^6 +
8*tan(1/2)*tan(x)^7 + tan(x)^8 + 8*tan(1/2)^3*tan(x)^3 + 36*tan(1/2)^2*tan(x)^4 + 8*tan(1/2)*tan(x)^5 + tan(1/
2)^4 + 8*tan(1/2)^3*tan(x) + 16*tan(1/2)^2*tan(x)^2 - 8*tan(1/2)*tan(x)^3 - 2*tan(x)^4 - 2*tan(1/2)^2 - 8*tan(
1/2)*tan(x) + 1)/(tan(1/2)^4 + 2*tan(1/2)^2 + 1))*tan(x)^2 - 4*tan(1/2)*tan(x)^2 + 8*x*tan(1/2) + 8*x*tan(x) +
 log(4*(tan(1/2)^4*tan(x)^8 - 8*tan(1/2)^3*tan(x)^7 - 2*tan(1/2)^2*tan(x)^8 - 2*tan(1/2)^4*tan(x)^4 - 8*tan(1/
2)^3*tan(x)^5 + 16*tan(1/2)^2*tan(x)^6 + 8*tan(1/2)*tan(x)^7 + tan(x)^8 + 8*tan(1/2)^3*tan(x)^3 + 36*tan(1/2)^
2*tan(x)^4 + 8*tan(1/2)*tan(x)^5 + tan(1/2)^4 + 8*tan(1/2)^3*tan(x) + 16*tan(1/2)^2*tan(x)^2 - 8*tan(1/2)*tan(
x)^3 - 2*tan(x)^4 - 2*tan(1/2)^2 - 8*tan(1/2)*tan(x) + 1)/(tan(1/2)^4 + 2*tan(1/2)^2 + 1)) + 4*tan(1/2) + 4*ta
n(x))/(tan(1/2)^2*tan(x)^2 - tan(1/2)^2 - 4*tan(1/2)*tan(x) - tan(x)^2 + 1)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 24, normalized size = 0.89 \[ \frac {\ln \left (\cos \left (1+2 x \right )\right )}{2}+\frac {\left (1+2 x \right ) \tan \left (1+2 x \right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+2*x)*sec(1+2*x)^2,x)

[Out]

1/2*ln(cos(1+2*x))+1/2*(1+2*x)*tan(1+2*x)

________________________________________________________________________________________

maxima [B]  time = 0.45, size = 98, normalized size = 3.63 \[ \frac {{\left (\cos \left (4 \, x + 2\right )^{2} + \sin \left (4 \, x + 2\right )^{2} + 2 \, \cos \left (4 \, x + 2\right ) + 1\right )} \log \left (\cos \left (4 \, x + 2\right )^{2} + \sin \left (4 \, x + 2\right )^{2} + 2 \, \cos \left (4 \, x + 2\right ) + 1\right ) + 4 \, {\left (2 \, x + 1\right )} \sin \left (4 \, x + 2\right )}{4 \, {\left (\cos \left (4 \, x + 2\right )^{2} + \sin \left (4 \, x + 2\right )^{2} + 2 \, \cos \left (4 \, x + 2\right ) + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 23, normalized size = 0.85 \[ \frac {\ln \left (\cos \left (2\,x+1\right )\right )}{2}+\frac {\mathrm {tan}\left (2\,x+1\right )\,\left (2\,x+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x + 1)/cos(2*x + 1)^2,x)

[Out]

log(cos(2*x + 1))/2 + (tan(2*x + 1)*(2*x + 1))/2

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________