Integrand size = 21, antiderivative size = 108 \[ \int \frac {\cos (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=-\frac {\arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {\sin (c+d x)}{d \sqrt {a+a \sec (c+d x)}} \] Output:
-arctan(a^(1/2)*tan(d*x+c)/(a+a*sec(d*x+c))^(1/2))/a^(1/2)/d+2^(1/2)*arcta n(1/2*a^(1/2)*tan(d*x+c)*2^(1/2)/(a+a*sec(d*x+c))^(1/2))/a^(1/2)/d+sin(d*x +c)/d/(a+a*sec(d*x+c))^(1/2)
Time = 0.09 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.97 \[ \int \frac {\cos (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=-\frac {\left (\text {arctanh}\left (\sqrt {1-\sec (c+d x)}\right )-\sqrt {2} \text {arctanh}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right )-\cos (c+d x) \sqrt {1-\sec (c+d x)}\right ) \tan (c+d x)}{d \sqrt {1-\sec (c+d x)} \sqrt {a (1+\sec (c+d x))}} \] Input:
Integrate[Cos[c + d*x]/Sqrt[a + a*Sec[c + d*x]],x]
Output:
-(((ArcTanh[Sqrt[1 - Sec[c + d*x]]] - Sqrt[2]*ArcTanh[Sqrt[1 - Sec[c + d*x ]]/Sqrt[2]] - Cos[c + d*x]*Sqrt[1 - Sec[c + d*x]])*Tan[c + d*x])/(d*Sqrt[1 - Sec[c + d*x]]*Sqrt[a*(1 + Sec[c + d*x])]))
Time = 0.53 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.01, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 4310, 3042, 4392, 3042, 4375, 383, 216}
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 {\cos (c+d x)}{\sqrt {a \sec (c+d x)+a}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\csc \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a \csc \left (c+d x+\frac {\pi }{2}\right )+a}}dx\) |
\(\Big \downarrow \) 4310 |
\(\displaystyle \frac {\sin (c+d x)}{d \sqrt {a \sec (c+d x)+a}}-\frac {\int \frac {a-a \sec (c+d x)}{\sqrt {\sec (c+d x) a+a}}dx}{2 a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sin (c+d x)}{d \sqrt {a \sec (c+d x)+a}}-\frac {\int \frac {a-a \csc \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{2 a}\) |
\(\Big \downarrow \) 4392 |
\(\displaystyle \frac {1}{2} a \int \frac {\tan ^2(c+d x)}{(\sec (c+d x) a+a)^{3/2}}dx+\frac {\sin (c+d x)}{d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} a \int \frac {\cot \left (c+d x+\frac {\pi }{2}\right )^2}{\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^{3/2}}dx+\frac {\sin (c+d x)}{d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 4375 |
\(\displaystyle \frac {\sin (c+d x)}{d \sqrt {a \sec (c+d x)+a}}-\frac {a \int \frac {\tan ^2(c+d x)}{(\sec (c+d x) a+a) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{d}\) |
\(\Big \downarrow \) 383 |
\(\displaystyle \frac {\sin (c+d x)}{d \sqrt {a \sec (c+d x)+a}}-\frac {a \left (\frac {2 \int \frac {1}{\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{a}-\frac {\int \frac {1}{\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{a}\right )}{d}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\sin (c+d x)}{d \sqrt {a \sec (c+d x)+a}}-\frac {a \left (\frac {\arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{a^{3/2}}-\frac {\sqrt {2} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{a^{3/2}}\right )}{d}\) |
Input:
Int[Cos[c + d*x]/Sqrt[a + a*Sec[c + d*x]],x]
Output:
-((a*(ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]]/a^(3/2) - (S qrt[2]*ArcTan[(Sqrt[a]*Tan[c + d*x])/(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/ a^(3/2)))/d) + Sin[c + d*x]/(d*Sqrt[a + a*Sec[c + d*x]])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((e_.)*(x_))^(m_.)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_Sym bol] :> Simp[(-a)*(e^2/(b*c - a*d)) Int[(e*x)^(m - 2)/(a + b*x^2), x], x] + Simp[c*(e^2/(b*c - a*d)) Int[(e*x)^(m - 2)/(c + d*x^2), x], x] /; Free Q[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && LeQ[2, m, 3]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*n*Sqrt[a + b*Csc[e + f*x]])), x] + Simp[1/(2*b*d*n) Int[(d*Csc[e + f*x])^(n + 1)*((a + b*(2*n + 1)*Csc[e + f*x])/Sqrt[a + b*Csc[e + f*x]]), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[n, 0] && IntegerQ[2*n]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d) Subst[Int[x^m*((2 + a*x^2 )^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] ]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I ntegerQ[n - 1/2]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m Int[Cot[e + f*x]^(2*m)*( c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && E qQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] && !( IntegerQ[n] && GtQ[m - n, 0])
Leaf count of result is larger than twice the leaf count of optimal. \(198\) vs. \(2(91)=182\).
Time = 2.48 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.84
method | result | size |
default | \(-\frac {\left (\left (\cos \left (d x +c \right )+1\right ) \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{\sqrt {\csc \left (d x +c \right )^{2}-2 \cot \left (d x +c \right ) \csc \left (d x +c \right )+\cot \left (d x +c \right )^{2}-1}}\right )+\left (-2 \cos \left (d x +c \right )-2\right ) \ln \left (\sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-2 \sin \left (d x +c \right ) \cos \left (d x +c \right )\right ) \sqrt {a \left (1+\sec \left (d x +c \right )\right )}}{2 d a \left (\cos \left (d x +c \right )+1\right )}\) | \(199\) |
Input:
int(cos(d*x+c)/(a+a*sec(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/2/d/a*((cos(d*x+c)+1)*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*arct anh(2^(1/2)/(csc(d*x+c)^2-2*cot(d*x+c)*csc(d*x+c)+cot(d*x+c)^2-1)^(1/2)*(- cot(d*x+c)+csc(d*x+c)))+(-2*cos(d*x+c)-2)*ln((-2*cos(d*x+c)/(cos(d*x+c)+1) )^(1/2)-cot(d*x+c)+csc(d*x+c))*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)-2*sin( d*x+c)*cos(d*x+c))*(a*(1+sec(d*x+c)))^(1/2)/(cos(d*x+c)+1)
Time = 0.11 (sec) , antiderivative size = 417, normalized size of antiderivative = 3.86 \[ \int \frac {\cos (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\left [\frac {\sqrt {2} {\left (a \cos \left (d x + c\right ) + a\right )} \sqrt {-\frac {1}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - \sqrt {-a} {\left (\cos \left (d x + c\right ) + 1\right )} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}, \frac {\sqrt {a} {\left (\cos \left (d x + c\right ) + 1\right )} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) + \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - \frac {\sqrt {2} {\left (a \cos \left (d x + c\right ) + a\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a}}}{a d \cos \left (d x + c\right ) + a d}\right ] \] Input:
integrate(cos(d*x+c)/(a+a*sec(d*x+c))^(1/2),x, algorithm="fricas")
Output:
[1/2*(sqrt(2)*(a*cos(d*x + c) + a)*sqrt(-1/a)*log(-(2*sqrt(2)*sqrt((a*cos( d*x + c) + a)/cos(d*x + c))*sqrt(-1/a)*cos(d*x + c)*sin(d*x + c) - 3*cos(d *x + c)^2 - 2*cos(d*x + c) + 1)/(cos(d*x + c)^2 + 2*cos(d*x + c) + 1)) - s qrt(-a)*(cos(d*x + c) + 1)*log((2*a*cos(d*x + c)^2 - 2*sqrt(-a)*sqrt((a*co s(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d*x + c) + a*cos(d*x + c) - a)/(cos(d*x + c) + 1)) + 2*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d* x + c)*sin(d*x + c))/(a*d*cos(d*x + c) + a*d), (sqrt(a)*(cos(d*x + c) + 1) *arctan(sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(sqrt(a)*sin( d*x + c))) + sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d*x + c) - sqrt(2)*(a*cos(d*x + c) + a)*arctan(sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(sqrt(a)*sin(d*x + c)))/sqrt(a))/(a*d*cos(d* x + c) + a*d)]
\[ \int \frac {\cos (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {\cos {\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \] Input:
integrate(cos(d*x+c)/(a+a*sec(d*x+c))**(1/2),x)
Output:
Integral(cos(c + d*x)/sqrt(a*(sec(c + d*x) + 1)), x)
\[ \int \frac {\cos (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int { \frac {\cos \left (d x + c\right )}{\sqrt {a \sec \left (d x + c\right ) + a}} \,d x } \] Input:
integrate(cos(d*x+c)/(a+a*sec(d*x+c))^(1/2),x, algorithm="maxima")
Output:
integrate(cos(d*x + c)/sqrt(a*sec(d*x + c) + a), x)
Leaf count of result is larger than twice the leaf count of optimal. 326 vs. \(2 (91) = 182\).
Time = 0.40 (sec) , antiderivative size = 326, normalized size of antiderivative = 3.02 \[ \int \frac {\cos (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\sqrt {2} {\left (\frac {\sqrt {2} \sqrt {-a} \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right )}{{\left | a \right |}} - \frac {2 \, \log \left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2}\right )}{\sqrt {-a}} - \frac {8 \, {\left (3 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} \sqrt {-a} - \sqrt {-a} a\right )}}{{\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}}\right )}}{4 \, d \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} \] Input:
integrate(cos(d*x+c)/(a+a*sec(d*x+c))^(1/2),x, algorithm="giac")
Output:
1/4*sqrt(2)*(sqrt(2)*sqrt(-a)*log(abs(2*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - s qrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 - 4*sqrt(2)*abs(a) - 6*a)/abs(2*(sqr t(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 + 4*sq rt(2)*abs(a) - 6*a))/abs(a) - 2*log((sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt( -a*tan(1/2*d*x + 1/2*c)^2 + a))^2)/sqrt(-a) - 8*(3*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2*sqrt(-a) - sqrt(-a)*a)/(( sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^4 - 6 *(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2*a + a^2))/(d*sgn(cos(d*x + c)))
Timed out. \[ \int \frac {\cos (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {\cos \left (c+d\,x\right )}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \] Input:
int(cos(c + d*x)/(a + a/cos(c + d*x))^(1/2),x)
Output:
int(cos(c + d*x)/(a + a/cos(c + d*x))^(1/2), x)
\[ \int \frac {\cos (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\sqrt {a}\, \left (\int \frac {\sqrt {\sec \left (d x +c \right )+1}\, \cos \left (d x +c \right )}{\sec \left (d x +c \right )+1}d x \right )}{a} \] Input:
int(cos(d*x+c)/(a+a*sec(d*x+c))^(1/2),x)
Output:
(sqrt(a)*int((sqrt(sec(c + d*x) + 1)*cos(c + d*x))/(sec(c + d*x) + 1),x))/ a