\(\int \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \tan (3 x) \, dx\) [733]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 43 \[ \int \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \tan (3 x) \, dx=-\frac {1}{3} \sqrt {5} \text {arcsinh}\left (\sqrt {5} \cos (3 x)\right )+\frac {1}{3} \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \]

[Out]

-1/3*arcsinh(cos(3*x)*5^(1/2))*5^(1/2)+1/3*sec(3*x)*(1+5*cos(3*x)^2)^(1/2)

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {283, 221} \[ \int \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \tan (3 x) \, dx=\frac {1}{3} \sqrt {5 \cos ^2(3 x)+1} \sec (3 x)-\frac {1}{3} \sqrt {5} \text {arcsinh}\left (\sqrt {5} \cos (3 x)\right ) \]

[In]

Int[Sqrt[1 + 5*Cos[3*x]^2]*Sec[3*x]*Tan[3*x],x]

[Out]

-1/3*(Sqrt[5]*ArcSinh[Sqrt[5]*Cos[3*x]]) + (Sqrt[1 + 5*Cos[3*x]^2]*Sec[3*x])/3

Rule 221

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt[a])]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 283

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^p/(c*(m + 1
))), x] - Dist[b*n*(p/(c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b, c}, x] &&
IGtQ[n, 0] && GtQ[p, 0] && LtQ[m, -1] &&  !ILtQ[(m + n*p + n + 1)/n, 0] && IntBinomialQ[a, b, c, n, m, p, x]

Rubi steps \begin{align*} \text {integral}& = -\left (\frac {1}{3} \text {Subst}\left (\int \frac {\sqrt {1+5 x^2}}{x^2} \, dx,x,\cos (3 x)\right )\right ) \\ & = \frac {1}{3} \sqrt {1+5 \cos ^2(3 x)} \sec (3 x)-\frac {5}{3} \text {Subst}\left (\int \frac {1}{\sqrt {1+5 x^2}} \, dx,x,\cos (3 x)\right ) \\ & = -\frac {1}{3} \sqrt {5} \text {arcsinh}\left (\sqrt {5} \cos (3 x)\right )+\frac {1}{3} \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.98 \[ \int \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \tan (3 x) \, dx=\frac {1}{3} \left (-\sqrt {5} \text {arcsinh}\left (\sqrt {5} \cos (3 x)\right )+\sqrt {1+5 \cos ^2(3 x)} \sec (3 x)\right ) \]

[In]

Integrate[Sqrt[1 + 5*Cos[3*x]^2]*Sec[3*x]*Tan[3*x],x]

[Out]

(-(Sqrt[5]*ArcSinh[Sqrt[5]*Cos[3*x]]) + Sqrt[1 + 5*Cos[3*x]^2]*Sec[3*x])/3

Maple [A] (verified)

Time = 1.01 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.51

method result size
derivativedivides \(\frac {\sqrt {\frac {\sec \left (3 x \right )^{2}+5}{\sec \left (3 x \right )^{2}}}\, \sec \left (3 x \right ) \left (\sqrt {\sec \left (3 x \right )^{2}+5}-\sqrt {5}\, \operatorname {arctanh}\left (\frac {\sqrt {5}}{\sqrt {\sec \left (3 x \right )^{2}+5}}\right )\right )}{3 \sqrt {\sec \left (3 x \right )^{2}+5}}\) \(65\)
default \(\frac {\sqrt {\frac {\sec \left (3 x \right )^{2}+5}{\sec \left (3 x \right )^{2}}}\, \sec \left (3 x \right ) \left (\sqrt {\sec \left (3 x \right )^{2}+5}-\sqrt {5}\, \operatorname {arctanh}\left (\frac {\sqrt {5}}{\sqrt {\sec \left (3 x \right )^{2}+5}}\right )\right )}{3 \sqrt {\sec \left (3 x \right )^{2}+5}}\) \(65\)

[In]

int(sec(3*x)*(1+5*cos(3*x)^2)^(1/2)*tan(3*x),x,method=_RETURNVERBOSE)

[Out]

1/3*((sec(3*x)^2+5)/sec(3*x)^2)^(1/2)*sec(3*x)/(sec(3*x)^2+5)^(1/2)*((sec(3*x)^2+5)^(1/2)-5^(1/2)*arctanh(5^(1
/2)/(sec(3*x)^2+5)^(1/2)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (33) = 66\).

Time = 0.26 (sec) , antiderivative size = 122, normalized size of antiderivative = 2.84 \[ \int \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \tan (3 x) \, dx=\frac {\sqrt {5} \cos \left (3 \, x\right ) \log \left (80000 \, \cos \left (3 \, x\right )^{8} + 32000 \, \cos \left (3 \, x\right )^{6} + 4000 \, \cos \left (3 \, x\right )^{4} + 160 \, \cos \left (3 \, x\right )^{2} - 8 \, {\left (2000 \, \sqrt {5} \cos \left (3 \, x\right )^{7} + 600 \, \sqrt {5} \cos \left (3 \, x\right )^{5} + 50 \, \sqrt {5} \cos \left (3 \, x\right )^{3} + \sqrt {5} \cos \left (3 \, x\right )\right )} \sqrt {5 \, \cos \left (3 \, x\right )^{2} + 1} + 1\right ) + 8 \, \sqrt {5 \, \cos \left (3 \, x\right )^{2} + 1}}{24 \, \cos \left (3 \, x\right )} \]

[In]

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

[Out]

1/24*(sqrt(5)*cos(3*x)*log(80000*cos(3*x)^8 + 32000*cos(3*x)^6 + 4000*cos(3*x)^4 + 160*cos(3*x)^2 - 8*(2000*sq
rt(5)*cos(3*x)^7 + 600*sqrt(5)*cos(3*x)^5 + 50*sqrt(5)*cos(3*x)^3 + sqrt(5)*cos(3*x))*sqrt(5*cos(3*x)^2 + 1) +
 1) + 8*sqrt(5*cos(3*x)^2 + 1))/cos(3*x)

Sympy [F]

\[ \int \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \tan (3 x) \, dx=\int \sqrt {5 \cos ^{2}{\left (3 x \right )} + 1} \tan {\left (3 x \right )} \sec {\left (3 x \right )}\, dx \]

[In]

integrate(sec(3*x)*(1+5*cos(3*x)**2)**(1/2)*tan(3*x),x)

[Out]

Integral(sqrt(5*cos(3*x)**2 + 1)*tan(3*x)*sec(3*x), x)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.81 \[ \int \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \tan (3 x) \, dx=-\frac {1}{3} \, \sqrt {5} \operatorname {arsinh}\left (\sqrt {5} \cos \left (3 \, x\right )\right ) + \frac {\sqrt {5 \, \cos \left (3 \, x\right )^{2} + 1}}{3 \, \cos \left (3 \, x\right )} \]

[In]

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

[Out]

-1/3*sqrt(5)*arcsinh(sqrt(5)*cos(3*x)) + 1/3*sqrt(5*cos(3*x)^2 + 1)/cos(3*x)

Giac [F]

\[ \int \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \tan (3 x) \, dx=\int { \sqrt {5 \, \cos \left (3 \, x\right )^{2} + 1} \sec \left (3 \, x\right ) \tan \left (3 \, x\right ) \,d x } \]

[In]

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

[Out]

integrate(sqrt(5*cos(3*x)^2 + 1)*sec(3*x)*tan(3*x), x)

Mupad [B] (verification not implemented)

Time = 26.70 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.84 \[ \int \sqrt {1+5 \cos ^2(3 x)} \sec (3 x) \tan (3 x) \, dx=\frac {\sqrt {\frac {5\,\cos \left (6\,x\right )}{2}+\frac {7}{2}}}{3\,\cos \left (3\,x\right )}+\frac {\sqrt {5}\,\mathrm {asin}\left (\sqrt {5}\,\cos \left (3\,x\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{3} \]

[In]

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

[Out]

(5^(1/2)*asin(5^(1/2)*cos(3*x)*1i)*1i)/3 + ((5*cos(6*x))/2 + 7/2)^(1/2)/(3*cos(3*x))