Integrand size = 19, antiderivative size = 46 \[ \int \frac {\sec ^2(x) \left (2+\tan ^2(x)\right )}{1+\tan ^3(x)} \, dx=\frac {2 x}{\sqrt {3}}+\frac {2 \arctan \left (\frac {1-2 \cos ^2(x)}{2+\sqrt {3}-2 \cos (x) \sin (x)}\right )}{\sqrt {3}}+\log (1+\tan (x)) \] Output:
2/3*x*3^(1/2)+2/3*arctan((1-2*cos(x)^2)/(2+3^(1/2)-2*cos(x)*sin(x)))*3^(1/ 2)+ln(1+tan(x))
Time = 6.04 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.70 \[ \int \frac {\sec ^2(x) \left (2+\tan ^2(x)\right )}{1+\tan ^3(x)} \, dx=-\frac {2 \arctan \left (\frac {1-2 \tan (x)}{\sqrt {3}}\right )}{\sqrt {3}}-\log (\cos (x))+\log (\cos (x)+\sin (x)) \] Input:
Integrate[(Sec[x]^2*(2 + Tan[x]^2))/(1 + Tan[x]^3),x]
Output:
(-2*ArcTan[(1 - 2*Tan[x])/Sqrt[3]])/Sqrt[3] - Log[Cos[x]] + Log[Cos[x] + S in[x]]
Time = 0.27 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.57, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3042, 4842, 2402, 16, 1083, 217}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (\tan ^2(x)+2\right ) \sec ^2(x)}{\tan ^3(x)+1} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (\tan (x)^2+2\right ) \sec (x)^2}{\tan (x)^3+1}dx\) |
\(\Big \downarrow \) 4842 |
\(\displaystyle \int \frac {\tan ^2(x)+2}{\tan ^3(x)+1}d\tan (x)\) |
\(\Big \downarrow \) 2402 |
\(\displaystyle \int \frac {1}{\tan ^2(x)-\tan (x)+1}d\tan (x)+\int \frac {1}{\tan (x)+1}d\tan (x)\) |
\(\Big \downarrow \) 16 |
\(\displaystyle \int \frac {1}{\tan ^2(x)-\tan (x)+1}d\tan (x)+\log (\tan (x)+1)\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \log (\tan (x)+1)-2 \int \frac {1}{-(2 \tan (x)-1)^2-3}d(2 \tan (x)-1)\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {2 \arctan \left (\frac {2 \tan (x)-1}{\sqrt {3}}\right )}{\sqrt {3}}+\log (\tan (x)+1)\) |
Input:
Int[(Sec[x]^2*(2 + Tan[x]^2))/(1 + Tan[x]^3),x]
Output:
(2*ArcTan[(-1 + 2*Tan[x])/Sqrt[3]])/Sqrt[3] + Log[1 + Tan[x]]
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[(P2_)/((a_) + (b_.)*(x_)^3), x_Symbol] :> With[{A = Coeff[P2, x, 0], B = Coeff[P2, x, 1], C = Coeff[P2, x, 2]}, With[{q = a^(1/3)/b^(1/3)}, Simp[C /b Int[1/(q + x), x], x] + Simp[(B + C*q)/b Int[1/(q^2 - q*x + x^2), x] , x]] /; EqQ[A*b^(2/3) - a^(1/3)*b^(1/3)*B - 2*a^(2/3)*C, 0]] /; FreeQ[{a, b}, x] && PolyQ[P2, x, 2]
Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^2, x_Symbol] :> With[{d = FreeFac tors[Tan[c*(a + b*x)], x]}, Simp[d/(b*c) Subst[Int[SubstFor[1, Tan[c*(a + b*x)]/d, u, x], x], x, Tan[c*(a + b*x)]/d], x] /; FunctionOfQ[Tan[c*(a + b *x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && NonsumQ[u] && (EqQ[F, Sec] | | EqQ[F, sec])
Time = 0.62 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.52
method | result | size |
derivativedivides | \(\frac {2 \sqrt {3}\, \arctan \left (\frac {\left (2 \tan \left (x \right )-1\right ) \sqrt {3}}{3}\right )}{3}+\ln \left (1+\tan \left (x \right )\right )\) | \(24\) |
default | \(\frac {2 \sqrt {3}\, \arctan \left (\frac {\left (2 \tan \left (x \right )-1\right ) \sqrt {3}}{3}\right )}{3}+\ln \left (1+\tan \left (x \right )\right )\) | \(24\) |
risch | \(\frac {i \sqrt {3}\, \ln \left ({\mathrm e}^{2 i x}-i \sqrt {3}-2 i\right )}{3}-\frac {i \sqrt {3}\, \ln \left ({\mathrm e}^{2 i x}+i \sqrt {3}-2 i\right )}{3}-\ln \left (1+{\mathrm e}^{2 i x}\right )+\ln \left ({\mathrm e}^{2 i x}+i\right )\) | \(63\) |
Input:
int(sec(x)^2*(2+tan(x)^2)/(1+tan(x)^3),x,method=_RETURNVERBOSE)
Output:
2/3*3^(1/2)*arctan(1/3*(2*tan(x)-1)*3^(1/2))+ln(1+tan(x))
Time = 0.10 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.13 \[ \int \frac {\sec ^2(x) \left (2+\tan ^2(x)\right )}{1+\tan ^3(x)} \, dx=\frac {1}{3} \, \sqrt {3} \arctan \left (\frac {4 \, \sqrt {3} \cos \left (x\right ) \sin \left (x\right ) - \sqrt {3}}{3 \, {\left (2 \, \cos \left (x\right )^{2} - 1\right )}}\right ) - \frac {1}{2} \, \log \left (\cos \left (x\right )^{2}\right ) + \frac {1}{2} \, \log \left (2 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) \] Input:
integrate(sec(x)^2*(2+tan(x)^2)/(1+tan(x)^3),x, algorithm="fricas")
Output:
1/3*sqrt(3)*arctan(1/3*(4*sqrt(3)*cos(x)*sin(x) - sqrt(3))/(2*cos(x)^2 - 1 )) - 1/2*log(cos(x)^2) + 1/2*log(2*cos(x)*sin(x) + 1)
Time = 2.57 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.89 \[ \int \frac {\sec ^2(x) \left (2+\tan ^2(x)\right )}{1+\tan ^3(x)} \, dx=\frac {2 \sqrt {3} \left (\operatorname {atan}{\left (\frac {2 \sqrt {3} \left (\tan {\left (x \right )} - \frac {1}{2}\right )}{3} \right )} + \pi \left \lfloor {\frac {x - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{3} + \log {\left (\tan {\left (x \right )} + 1 \right )} \] Input:
integrate(sec(x)**2*(2+tan(x)**2)/(1+tan(x)**3),x)
Output:
2*sqrt(3)*(atan(2*sqrt(3)*(tan(x) - 1/2)/3) + pi*floor((x - pi/2)/pi))/3 + log(tan(x) + 1)
Time = 0.13 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.50 \[ \int \frac {\sec ^2(x) \left (2+\tan ^2(x)\right )}{1+\tan ^3(x)} \, dx=\frac {2}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, \tan \left (x\right ) - 1\right )}\right ) + \log \left (\tan \left (x\right ) + 1\right ) \] Input:
integrate(sec(x)^2*(2+tan(x)^2)/(1+tan(x)^3),x, algorithm="maxima")
Output:
2/3*sqrt(3)*arctan(1/3*sqrt(3)*(2*tan(x) - 1)) + log(tan(x) + 1)
Time = 0.14 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.52 \[ \int \frac {\sec ^2(x) \left (2+\tan ^2(x)\right )}{1+\tan ^3(x)} \, dx=\frac {2}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, \tan \left (x\right ) - 1\right )}\right ) + \log \left ({\left | \tan \left (x\right ) + 1 \right |}\right ) \] Input:
integrate(sec(x)^2*(2+tan(x)^2)/(1+tan(x)^3),x, algorithm="giac")
Output:
2/3*sqrt(3)*arctan(1/3*sqrt(3)*(2*tan(x) - 1)) + log(abs(tan(x) + 1))
Time = 16.49 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.65 \[ \int \frac {\sec ^2(x) \left (2+\tan ^2(x)\right )}{1+\tan ^3(x)} \, dx=\ln \left (\mathrm {tan}\left (x\right )+1\right )-\frac {2\,\sqrt {3}\,\mathrm {atan}\left (\frac {\sqrt {3}-\sqrt {3}\,\mathrm {tan}\left (x\right )}{\mathrm {tan}\left (x\right )+1}\right )}{3} \] Input:
int((tan(x)^2 + 2)/(cos(x)^2*(tan(x)^3 + 1)),x)
Output:
log(tan(x) + 1) - (2*3^(1/2)*atan((3^(1/2) - 3^(1/2)*tan(x))/(tan(x) + 1)) )/3
\[ \int \frac {\sec ^2(x) \left (2+\tan ^2(x)\right )}{1+\tan ^3(x)} \, dx =\text {Too large to display} \] Input:
int(sec(x)^2*(2+tan(x)^2)/(1+tan(x)^3),x)
Output:
(6408*sqrt(2)*log( - sqrt(2) + tan(x/2) - 1) - 6408*sqrt(2)*log(sqrt(2) + tan(x/2) - 1) + 9072*int(cos(x)/(cos(x)*sin(x)**3 + sin(x)**4 - 2*sin(x)** 2 + 1),x) - 768*int(cos(x)/(cos(x)*sin(x)**2 - cos(x) - sin(x)**3),x) - 26 46*int(sin(x)**4/(cos(x)*sin(x)**3 + sin(x)**4 - 2*sin(x)**2 + 1),x) + 892 8*int(sin(x)**3/(cos(x)*sin(x)**3 + sin(x)**4 - 2*sin(x)**2 + 1),x) - 456* int(sin(x)**3/(cos(x)*sin(x)**2 - cos(x) - sin(x)**3),x) - 1512*int(sin(x) **2/(cos(x)*sin(x)**3 + sin(x)**4 - 2*sin(x)**2 + 1),x) + 48*int(sin(x)**2 /(cos(x)*sin(x)**2 - cos(x) - sin(x)**3),x) - 11904*int(sin(x)/(cos(x)*sin (x)**3 + sin(x)**4 - 2*sin(x)**2 + 1),x) + 912*int(sin(x)/(cos(x)*sin(x)** 2 - cos(x) - sin(x)**3),x) + 2976*int((cos(x)*sin(x)**3)/(cos(x)*sin(x)**3 + sin(x)**4 - 2*sin(x)**2 + 1),x) + 3024*int((cos(x)*sin(x)**2)/(cos(x)*s in(x)**3 + sin(x)**4 - 2*sin(x)**2 + 1),x) - 336*int((cos(x)*sin(x)**2)/(c os(x)*sin(x)**2 - cos(x) - sin(x)**3),x) - 11904*int((cos(x)*sin(x))/(cos( x)*sin(x)**3 + sin(x)**4 - 2*sin(x)**2 + 1),x) + 912*int((cos(x)*sin(x))/( cos(x)*sin(x)**2 - cos(x) - sin(x)**3),x) + 9072*int(1/(cos(x)*sin(x)**3 + sin(x)**4 - 2*sin(x)**2 + 1),x) - 768*int(1/(cos(x)*sin(x)**2 - cos(x) - sin(x)**3),x) + 497*log(tan(x/2)**4 + 2*tan(x/2)**3 + 2*tan(x/2)**2 - 2*ta n(x/2) + 1) + 3207*log(tan(x/2)**2 + 1) - 9112*log( - sqrt(2) + tan(x/2) - 1) - 9112*log(sqrt(2) + tan(x/2) - 1) + 1935*log(tan(x/2) - 1) + 7887*log (tan(x/2) + 1) - 225*x)/3