Integrand size = 16, antiderivative size = 105 \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=x \sqrt {a \sec ^2(x)}-2 x \text {arctanh}\left (e^{i x}\right ) \cos (x) \sqrt {a \sec ^2(x)}-\text {arctanh}(\sin (x)) \cos (x) \sqrt {a \sec ^2(x)}+i \cos (x) \operatorname {PolyLog}\left (2,-e^{i x}\right ) \sqrt {a \sec ^2(x)}-i \cos (x) \operatorname {PolyLog}\left (2,e^{i x}\right ) \sqrt {a \sec ^2(x)} \] Output:
x*(a*sec(x)^2)^(1/2)-2*x*arctanh(exp(I*x))*cos(x)*(a*sec(x)^2)^(1/2)-arcta nh(sin(x))*cos(x)*(a*sec(x)^2)^(1/2)+I*cos(x)*polylog(2,-exp(I*x))*(a*sec( x)^2)^(1/2)-I*cos(x)*polylog(2,exp(I*x))*(a*sec(x)^2)^(1/2)
Time = 0.09 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.03 \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\left (x+x \cos (x) \left (\log \left (1-e^{i x}\right )-\log \left (1+e^{i x}\right )\right )+\cos (x) \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )-\cos (x) \log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )+i \cos (x) \left (\operatorname {PolyLog}\left (2,-e^{i x}\right )-\operatorname {PolyLog}\left (2,e^{i x}\right )\right )\right ) \sqrt {a \sec ^2(x)} \] Input:
Integrate[x*Csc[x]*Sec[x]*Sqrt[a*Sec[x]^2],x]
Output:
(x + x*Cos[x]*(Log[1 - E^(I*x)] - Log[1 + E^(I*x)]) + Cos[x]*Log[Cos[x/2] - Sin[x/2]] - Cos[x]*Log[Cos[x/2] + Sin[x/2]] + I*Cos[x]*(PolyLog[2, -E^(I *x)] - PolyLog[2, E^(I*x)]))*Sqrt[a*Sec[x]^2]
Time = 0.51 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.59, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {7271, 4920, 2009}
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 x \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx\) |
\(\Big \downarrow \) 7271 |
\(\displaystyle \cos (x) \sqrt {a \sec ^2(x)} \int x \csc (x) \sec ^2(x)dx\) |
\(\Big \downarrow \) 4920 |
\(\displaystyle \cos (x) \sqrt {a \sec ^2(x)} (-\int (\sec (x)-\text {arctanh}(\cos (x)))dx-x \text {arctanh}(\cos (x))+x \sec (x))\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \cos (x) \sqrt {a \sec ^2(x)} \left (-2 x \text {arctanh}\left (e^{i x}\right )-\text {arctanh}(\sin (x))+i \operatorname {PolyLog}\left (2,-e^{i x}\right )-i \operatorname {PolyLog}\left (2,e^{i x}\right )+x \sec (x)\right )\) |
Input:
Int[x*Csc[x]*Sec[x]*Sqrt[a*Sec[x]^2],x]
Output:
Cos[x]*Sqrt[a*Sec[x]^2]*(-2*x*ArcTanh[E^(I*x)] - ArcTanh[Sin[x]] + I*PolyL og[2, -E^(I*x)] - I*PolyLog[2, E^(I*x)] + x*Sec[x])
Int[Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b _.)*(x_)]^(p_.), x_Symbol] :> Module[{u = IntHide[Csc[a + b*x]^n*Sec[a + b* x]^p, x]}, Simp[(c + d*x)^m u, x] - Simp[d*m Int[(c + d*x)^(m - 1)*u, x ], x]] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p] && GtQ[m, 0] && NeQ[n, p]
Int[(u_.)*((a_.)*(v_)^(m_.))^(p_), x_Symbol] :> Simp[a^IntPart[p]*((a*v^m)^ FracPart[p]/v^(m*FracPart[p])) Int[u*v^(m*p), x], x] /; FreeQ[{a, m, p}, x] && !IntegerQ[p] && !FreeQ[v, x] && !(EqQ[a, 1] && EqQ[m, 1]) && !(Eq Q[v, x] && EqQ[m, 1])
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 289 vs. \(2 (87 ) = 174\).
Time = 0.22 (sec) , antiderivative size = 290, normalized size of antiderivative = 2.76
method | result | size |
risch | \(2 \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left (1+{\mathrm e}^{2 i x}\right )^{2}}}\, x +4 \sqrt {\frac {a \,{\mathrm e}^{2 i x}}{\left (1+{\mathrm e}^{2 i x}\right )^{2}}}\, \left (i \left (\frac {\arctan \left ({\mathrm e}^{i x}\right )}{2}-\frac {\ln \left ({\mathrm e}^{i x}+1\right )}{4}+\frac {\ln \left ({\mathrm e}^{i x}-1\right )}{4}\right )-i \left (-\frac {x \ln \left (1+i {\mathrm e}^{i x}\right )}{4}+\frac {x \ln \left (1-i {\mathrm e}^{i x}\right )}{4}+\frac {i \operatorname {dilog}\left (1+i {\mathrm e}^{i x}\right )}{4}-\frac {i \operatorname {dilog}\left (1-i {\mathrm e}^{i x}\right )}{4}-\frac {\operatorname {dilog}\left ({\mathrm e}^{i x}+1\right )}{4}-\frac {i x \ln \left ({\mathrm e}^{i x}+1\right )}{4}-\frac {\operatorname {dilog}\left ({\mathrm e}^{i x}\right )}{4}\right )-i \left (\frac {x \ln \left (1+i {\mathrm e}^{i x}\right )}{4}-\frac {x \ln \left (1-i {\mathrm e}^{i x}\right )}{4}-\frac {i \operatorname {dilog}\left (1+i {\mathrm e}^{i x}\right )}{4}+\frac {i \operatorname {dilog}\left (1-i {\mathrm e}^{i x}\right )}{4}-\frac {\operatorname {dilog}\left ({\mathrm e}^{i x}+1\right )}{4}-\frac {i x \ln \left ({\mathrm e}^{i x}+1\right )}{4}-\frac {\operatorname {dilog}\left ({\mathrm e}^{i x}\right )}{4}\right )-i \left (-\frac {\arctan \left ({\mathrm e}^{i x}\right )}{2}-\frac {\ln \left ({\mathrm e}^{i x}+1\right )}{4}+\frac {\ln \left ({\mathrm e}^{i x}-1\right )}{4}\right )\right ) \cos \left (x \right )\) | \(290\) |
Input:
int(x*csc(x)*sec(x)*(a*sec(x)^2)^(1/2),x,method=_RETURNVERBOSE)
Output:
2*(a*exp(2*I*x)/(1+exp(2*I*x))^2)^(1/2)*x+4*(a*exp(2*I*x)/(1+exp(2*I*x))^2 )^(1/2)*(I*(1/2*arctan(exp(I*x))-1/4*ln(exp(I*x)+1)+1/4*ln(exp(I*x)-1))-I* (-1/4*x*ln(1+I*exp(I*x))+1/4*x*ln(1-I*exp(I*x))+1/4*I*dilog(1+I*exp(I*x))- 1/4*I*dilog(1-I*exp(I*x))-1/4*dilog(exp(I*x)+1)-1/4*I*x*ln(exp(I*x)+1)-1/4 *dilog(exp(I*x)))-I*(1/4*x*ln(1+I*exp(I*x))-1/4*x*ln(1-I*exp(I*x))-1/4*I*d ilog(1+I*exp(I*x))+1/4*I*dilog(1-I*exp(I*x))-1/4*dilog(exp(I*x)+1)-1/4*I*x *ln(exp(I*x)+1)-1/4*dilog(exp(I*x)))-I*(-1/2*arctan(exp(I*x))-1/4*ln(exp(I *x)+1)+1/4*ln(exp(I*x)-1)))*cos(x)
Time = 0.09 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.33 \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=-\frac {1}{2} \, {\left (x \cos \left (x\right ) \log \left (\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) + x \cos \left (x\right ) \log \left (\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) - x \cos \left (x\right ) \log \left (-\cos \left (x\right ) + i \, \sin \left (x\right ) + 1\right ) - x \cos \left (x\right ) \log \left (-\cos \left (x\right ) - i \, \sin \left (x\right ) + 1\right ) + i \, \cos \left (x\right ) {\rm Li}_2\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right ) {\rm Li}_2\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + i \, \cos \left (x\right ) {\rm Li}_2\left (-\cos \left (x\right ) + i \, \sin \left (x\right )\right ) - i \, \cos \left (x\right ) {\rm Li}_2\left (-\cos \left (x\right ) - i \, \sin \left (x\right )\right ) + \cos \left (x\right ) \log \left (-\frac {\sin \left (x\right ) + 1}{\sin \left (x\right ) - 1}\right ) - 2 \, x\right )} \sqrt {\frac {a}{\cos \left (x\right )^{2}}} \] Input:
integrate(x*csc(x)*sec(x)*(a*sec(x)^2)^(1/2),x, algorithm="fricas")
Output:
-1/2*(x*cos(x)*log(cos(x) + I*sin(x) + 1) + x*cos(x)*log(cos(x) - I*sin(x) + 1) - x*cos(x)*log(-cos(x) + I*sin(x) + 1) - x*cos(x)*log(-cos(x) - I*si n(x) + 1) + I*cos(x)*dilog(cos(x) + I*sin(x)) - I*cos(x)*dilog(cos(x) - I* sin(x)) + I*cos(x)*dilog(-cos(x) + I*sin(x)) - I*cos(x)*dilog(-cos(x) - I* sin(x)) + cos(x)*log(-(sin(x) + 1)/(sin(x) - 1)) - 2*x)*sqrt(a/cos(x)^2)
\[ \int x \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\int x \sqrt {a \sec ^{2}{\left (x \right )}} \csc {\left (x \right )} \sec {\left (x \right )}\, dx \] Input:
integrate(x*csc(x)*sec(x)*(a*sec(x)**2)**(1/2),x)
Output:
Integral(x*sqrt(a*sec(x)**2)*csc(x)*sec(x), x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 294 vs. \(2 (80) = 160\).
Time = 0.13 (sec) , antiderivative size = 294, normalized size of antiderivative = 2.80 \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\frac {{\left (2 \, {\left (\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right ) + 1\right )} \arctan \left (\cos \left (x\right ), \sin \left (x\right ) + 1\right ) + 2 \, {\left (\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right ) + 1\right )} \arctan \left (\cos \left (x\right ), -\sin \left (x\right ) + 1\right ) - 2 \, {\left (x \cos \left (2 \, x\right ) + i \, x \sin \left (2 \, x\right ) + x\right )} \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) - 2 \, {\left (x \cos \left (2 \, x\right ) + i \, x \sin \left (2 \, x\right ) + x\right )} \arctan \left (\sin \left (x\right ), -\cos \left (x\right ) + 1\right ) - 4 i \, x \cos \left (x\right ) + 2 \, {\left (\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_2\left (-e^{\left (i \, x\right )}\right ) - 2 \, {\left (\cos \left (2 \, x\right ) + i \, \sin \left (2 \, x\right ) + 1\right )} {\rm Li}_2\left (e^{\left (i \, x\right )}\right ) - {\left (-i \, x \cos \left (2 \, x\right ) + x \sin \left (2 \, x\right ) - i \, x\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) - {\left (i \, x \cos \left (2 \, x\right ) - x \sin \left (2 \, x\right ) + i \, x\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) - {\left (-i \, \cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) - i\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1\right ) - {\left (i \, \cos \left (2 \, x\right ) - \sin \left (2 \, x\right ) + i\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \sin \left (x\right ) + 1\right ) + 4 \, x \sin \left (x\right )\right )} \sqrt {a}}{-2 i \, \cos \left (2 \, x\right ) + 2 \, \sin \left (2 \, x\right ) - 2 i} \] Input:
integrate(x*csc(x)*sec(x)*(a*sec(x)^2)^(1/2),x, algorithm="maxima")
Output:
(2*(cos(2*x) + I*sin(2*x) + 1)*arctan2(cos(x), sin(x) + 1) + 2*(cos(2*x) + I*sin(2*x) + 1)*arctan2(cos(x), -sin(x) + 1) - 2*(x*cos(2*x) + I*x*sin(2* x) + x)*arctan2(sin(x), cos(x) + 1) - 2*(x*cos(2*x) + I*x*sin(2*x) + x)*ar ctan2(sin(x), -cos(x) + 1) - 4*I*x*cos(x) + 2*(cos(2*x) + I*sin(2*x) + 1)* dilog(-e^(I*x)) - 2*(cos(2*x) + I*sin(2*x) + 1)*dilog(e^(I*x)) - (-I*x*cos (2*x) + x*sin(2*x) - I*x)*log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) - (I*x*c os(2*x) - x*sin(2*x) + I*x)*log(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1) - (-I* cos(2*x) + sin(2*x) - I)*log(cos(x)^2 + sin(x)^2 + 2*sin(x) + 1) - (I*cos( 2*x) - sin(2*x) + I)*log(cos(x)^2 + sin(x)^2 - 2*sin(x) + 1) + 4*x*sin(x)) *sqrt(a)/(-2*I*cos(2*x) + 2*sin(2*x) - 2*I)
\[ \int x \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\int { \sqrt {a \sec \left (x\right )^{2}} x \csc \left (x\right ) \sec \left (x\right ) \,d x } \] Input:
integrate(x*csc(x)*sec(x)*(a*sec(x)^2)^(1/2),x, algorithm="giac")
Output:
integrate(sqrt(a*sec(x)^2)*x*csc(x)*sec(x), x)
Timed out. \[ \int x \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\int \frac {x\,\sqrt {\frac {a}{{\cos \left (x\right )}^2}}}{\cos \left (x\right )\,\sin \left (x\right )} \,d x \] Input:
int((x*(a/cos(x)^2)^(1/2))/(cos(x)*sin(x)),x)
Output:
int((x*(a/cos(x)^2)^(1/2))/(cos(x)*sin(x)), x)
\[ \int x \csc (x) \sec (x) \sqrt {a \sec ^2(x)} \, dx=\sqrt {a}\, \left (\int \csc \left (x \right ) \sec \left (x \right )^{2} x d x \right ) \] Input:
int(x*csc(x)*sec(x)*(a*sec(x)^2)^(1/2),x)
Output:
sqrt(a)*int(csc(x)*sec(x)**2*x,x)