\(\int \csc (5 x) \sin (x) \, dx\) [9]

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

Optimal result

Integrand size = 7, antiderivative size = 80 \[ \int \csc (5 x) \sin (x) \, dx=-\frac {1}{5} \sqrt {\frac {1}{2} \left (5+\sqrt {5}\right )} \text {arctanh}\left (\sqrt {\frac {1}{5} \left (5-2 \sqrt {5}\right )} \tan (x)\right )+\sqrt {\frac {2}{5 \left (5+\sqrt {5}\right )}} \text {arctanh}\left (\sqrt {\frac {1}{5} \left (5+2 \sqrt {5}\right )} \tan (x)\right ) \] Output:

-1/10*(10+2*5^(1/2))^(1/2)*arctanh(1/5*(25-10*5^(1/2))^(1/2)*tan(x))+2^(1/ 
2)/(25+5*5^(1/2))^(1/2)*arctanh(1/5*(25+10*5^(1/2))^(1/2)*tan(x))
 

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.05 \[ \int \csc (5 x) \sin (x) \, dx=\frac {\sqrt {5+\sqrt {5}} \text {arctanh}\left (\frac {\left (-3+\sqrt {5}\right ) \tan (x)}{\sqrt {10-2 \sqrt {5}}}\right )+\sqrt {5-\sqrt {5}} \text {arctanh}\left (\frac {\left (3+\sqrt {5}\right ) \tan (x)}{\sqrt {2 \left (5+\sqrt {5}\right )}}\right )}{5 \sqrt {2}} \] Input:

Integrate[Csc[5*x]*Sin[x],x]
 

Output:

(Sqrt[5 + Sqrt[5]]*ArcTanh[((-3 + Sqrt[5])*Tan[x])/Sqrt[10 - 2*Sqrt[5]]] + 
 Sqrt[5 - Sqrt[5]]*ArcTanh[((3 + Sqrt[5])*Tan[x])/Sqrt[2*(5 + Sqrt[5])]])/ 
(5*Sqrt[2])
 

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.09, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {3042, 4889, 1480, 220}

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 \sin (x) \csc (5 x) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (x)}{\sin (5 x)}dx\)

\(\Big \downarrow \) 4889

\(\displaystyle \int \frac {\tan ^2(x)+1}{\tan ^4(x)-10 \tan ^2(x)+5}d\tan (x)\)

\(\Big \downarrow \) 1480

\(\displaystyle \frac {1}{10} \left (5+3 \sqrt {5}\right ) \int \frac {1}{\tan ^2(x)-2 \sqrt {5}-5}d\tan (x)+\frac {1}{10} \left (5-3 \sqrt {5}\right ) \int \frac {1}{\tan ^2(x)+2 \sqrt {5}-5}d\tan (x)\)

\(\Big \downarrow \) 220

\(\displaystyle -\frac {\left (5-3 \sqrt {5}\right ) \text {arctanh}\left (\frac {\tan (x)}{\sqrt {5-2 \sqrt {5}}}\right )}{10 \sqrt {5-2 \sqrt {5}}}-\frac {\left (5+3 \sqrt {5}\right ) \text {arctanh}\left (\frac {\tan (x)}{\sqrt {5+2 \sqrt {5}}}\right )}{10 \sqrt {5+2 \sqrt {5}}}\)

Input:

Int[Csc[5*x]*Sin[x],x]
 

Output:

-1/10*((5 - 3*Sqrt[5])*ArcTanh[Tan[x]/Sqrt[5 - 2*Sqrt[5]]])/Sqrt[5 - 2*Sqr 
t[5]] - ((5 + 3*Sqrt[5])*ArcTanh[Tan[x]/Sqrt[5 + 2*Sqrt[5]]])/(10*Sqrt[5 + 
 2*Sqrt[5]])
 

Defintions of rubi rules used

rule 220
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 
1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && 
 (LtQ[a, 0] || GtQ[b, 0])
 

rule 1480
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(e/2 + (2*c*d - b*e)/(2*q))   Int[1/( 
b/2 - q/2 + c*x^2), x], x] + Simp[(e/2 - (2*c*d - b*e)/(2*q))   Int[1/(b/2 
+ q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] 
 && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^2 - 4*a*c]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4889
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, With[{d = FreeFactors 
[Tan[v], x]}, Simp[d/Coefficient[v, x, 1]   Subst[Int[SubstFor[1/(1 + d^2*x 
^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /;  !FalseQ[v] && FunctionOfQ[N 
onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] &&  !MatchQ[ 
u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I 
ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.17 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.52

method result size
risch \(\munderset {\textit {\_R} =\operatorname {RootOf}\left (2000 \textit {\_Z}^{4}-100 \textit {\_Z}^{2}+1\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 i x}-500 i \textit {\_R}^{3}+50 \textit {\_R}^{2}+15 i \textit {\_R} -1\right )\) \(42\)
default \(-\frac {\sqrt {5}\, \left (\sqrt {5}-3\right ) \operatorname {arctanh}\left (\frac {\tan \left (x \right )}{\sqrt {5-2 \sqrt {5}}}\right )}{10 \sqrt {5-2 \sqrt {5}}}-\frac {\left (3+\sqrt {5}\right ) \sqrt {5}\, \operatorname {arctanh}\left (\frac {\tan \left (x \right )}{\sqrt {5+2 \sqrt {5}}}\right )}{10 \sqrt {5+2 \sqrt {5}}}\) \(66\)

Input:

int(csc(5*x)*sin(x),x,method=_RETURNVERBOSE)
 

Output:

sum(_R*ln(exp(2*I*x)-500*I*_R^3+50*_R^2+15*I*_R-1),_R=RootOf(2000*_Z^4-100 
*_Z^2+1))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 201 vs. \(2 (53) = 106\).

Time = 0.10 (sec) , antiderivative size = 201, normalized size of antiderivative = 2.51 \[ \int \csc (5 x) \sin (x) \, dx=-\frac {1}{20} \, \sqrt {\frac {1}{2} \, \sqrt {5} + \frac {5}{2}} \log \left (2 \, {\left (\sqrt {5} - 1\right )} \sqrt {\frac {1}{2} \, \sqrt {5} + \frac {5}{2}} \cos \left (x\right ) \sin \left (x\right ) + 2 \, {\left (\sqrt {5} + 1\right )} \cos \left (x\right )^{2} - \sqrt {5} + 3\right ) + \frac {1}{20} \, \sqrt {\frac {1}{2} \, \sqrt {5} + \frac {5}{2}} \log \left (-2 \, {\left (\sqrt {5} - 1\right )} \sqrt {\frac {1}{2} \, \sqrt {5} + \frac {5}{2}} \cos \left (x\right ) \sin \left (x\right ) + 2 \, {\left (\sqrt {5} + 1\right )} \cos \left (x\right )^{2} - \sqrt {5} + 3\right ) - \frac {1}{20} \, \sqrt {-\frac {1}{2} \, \sqrt {5} + \frac {5}{2}} \log \left (2 \, {\left (\sqrt {5} + 1\right )} \sqrt {-\frac {1}{2} \, \sqrt {5} + \frac {5}{2}} \cos \left (x\right ) \sin \left (x\right ) + 2 \, {\left (\sqrt {5} - 1\right )} \cos \left (x\right )^{2} - \sqrt {5} - 3\right ) + \frac {1}{20} \, \sqrt {-\frac {1}{2} \, \sqrt {5} + \frac {5}{2}} \log \left (-2 \, {\left (\sqrt {5} + 1\right )} \sqrt {-\frac {1}{2} \, \sqrt {5} + \frac {5}{2}} \cos \left (x\right ) \sin \left (x\right ) + 2 \, {\left (\sqrt {5} - 1\right )} \cos \left (x\right )^{2} - \sqrt {5} - 3\right ) \] Input:

integrate(csc(5*x)*sin(x),x, algorithm="fricas")
 

Output:

-1/20*sqrt(1/2*sqrt(5) + 5/2)*log(2*(sqrt(5) - 1)*sqrt(1/2*sqrt(5) + 5/2)* 
cos(x)*sin(x) + 2*(sqrt(5) + 1)*cos(x)^2 - sqrt(5) + 3) + 1/20*sqrt(1/2*sq 
rt(5) + 5/2)*log(-2*(sqrt(5) - 1)*sqrt(1/2*sqrt(5) + 5/2)*cos(x)*sin(x) + 
2*(sqrt(5) + 1)*cos(x)^2 - sqrt(5) + 3) - 1/20*sqrt(-1/2*sqrt(5) + 5/2)*lo 
g(2*(sqrt(5) + 1)*sqrt(-1/2*sqrt(5) + 5/2)*cos(x)*sin(x) + 2*(sqrt(5) - 1) 
*cos(x)^2 - sqrt(5) - 3) + 1/20*sqrt(-1/2*sqrt(5) + 5/2)*log(-2*(sqrt(5) + 
 1)*sqrt(-1/2*sqrt(5) + 5/2)*cos(x)*sin(x) + 2*(sqrt(5) - 1)*cos(x)^2 - sq 
rt(5) - 3)
 

Sympy [F]

\[ \int \csc (5 x) \sin (x) \, dx=\int \sin {\left (x \right )} \csc {\left (5 x \right )}\, dx \] Input:

integrate(csc(5*x)*sin(x),x)
 

Output:

Integral(sin(x)*csc(5*x), x)
 

Maxima [F]

\[ \int \csc (5 x) \sin (x) \, dx=\int { \csc \left (5 \, x\right ) \sin \left (x\right ) \,d x } \] Input:

integrate(csc(5*x)*sin(x),x, algorithm="maxima")
 

Output:

integrate(csc(5*x)*sin(x), x)
 

Giac [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.31 \[ \int \csc (5 x) \sin (x) \, dx=-\frac {1}{20} \, \sqrt {2 \, \sqrt {5} + 10} \log \left ({\left | \sqrt {2 \, \sqrt {5} + 5} + \tan \left (x\right ) \right |}\right ) + \frac {1}{20} \, \sqrt {2 \, \sqrt {5} + 10} \log \left ({\left | -\sqrt {2 \, \sqrt {5} + 5} + \tan \left (x\right ) \right |}\right ) + \frac {1}{20} \, \sqrt {-2 \, \sqrt {5} + 10} \log \left ({\left | \sqrt {-2 \, \sqrt {5} + 5} + \tan \left (x\right ) \right |}\right ) - \frac {1}{20} \, \sqrt {-2 \, \sqrt {5} + 10} \log \left ({\left | -\sqrt {-2 \, \sqrt {5} + 5} + \tan \left (x\right ) \right |}\right ) \] Input:

integrate(csc(5*x)*sin(x),x, algorithm="giac")
 

Output:

-1/20*sqrt(2*sqrt(5) + 10)*log(abs(sqrt(2*sqrt(5) + 5) + tan(x))) + 1/20*s 
qrt(2*sqrt(5) + 10)*log(abs(-sqrt(2*sqrt(5) + 5) + tan(x))) + 1/20*sqrt(-2 
*sqrt(5) + 10)*log(abs(sqrt(-2*sqrt(5) + 5) + tan(x))) - 1/20*sqrt(-2*sqrt 
(5) + 10)*log(abs(-sqrt(-2*sqrt(5) + 5) + tan(x)))
 

Mupad [B] (verification not implemented)

Time = 16.56 (sec) , antiderivative size = 217, normalized size of antiderivative = 2.71 \[ \int \csc (5 x) \sin (x) \, dx=\frac {\sqrt {2}\,\mathrm {atanh}\left (-\frac {34359738368\,\sqrt {2}\,\mathrm {tan}\left (\frac {x}{2}\right )\,\sqrt {\sqrt {5}+5}}{1953125\,\left (\frac {90194313216\,\sqrt {5}}{1953125}-\frac {90194313216\,\sqrt {5}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{1953125}-\frac {201863462912\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{1953125}+\frac {201863462912}{1953125}\right )}-\frac {77309411328\,\sqrt {2}\,\sqrt {5}\,\mathrm {tan}\left (\frac {x}{2}\right )\,\sqrt {\sqrt {5}+5}}{9765625\,\left (\frac {90194313216\,\sqrt {5}}{1953125}-\frac {90194313216\,\sqrt {5}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{1953125}-\frac {201863462912\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{1953125}+\frac {201863462912}{1953125}\right )}\right )\,\sqrt {\sqrt {5}+5}}{10}-\frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {77309411328\,\sqrt {2}\,\sqrt {5}\,\mathrm {tan}\left (\frac {x}{2}\right )\,\sqrt {5-\sqrt {5}}}{9765625\,\left (\frac {90194313216\,\sqrt {5}}{1953125}-\frac {90194313216\,\sqrt {5}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{1953125}+\frac {201863462912\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{1953125}-\frac {201863462912}{1953125}\right )}-\frac {34359738368\,\sqrt {2}\,\mathrm {tan}\left (\frac {x}{2}\right )\,\sqrt {5-\sqrt {5}}}{1953125\,\left (\frac {90194313216\,\sqrt {5}}{1953125}-\frac {90194313216\,\sqrt {5}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{1953125}+\frac {201863462912\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{1953125}-\frac {201863462912}{1953125}\right )}\right )\,\sqrt {5-\sqrt {5}}}{10} \] Input:

int(sin(x)/sin(5*x),x)
 

Output:

(2^(1/2)*atanh(- (34359738368*2^(1/2)*tan(x/2)*(5^(1/2) + 5)^(1/2))/(19531 
25*((90194313216*5^(1/2))/1953125 - (90194313216*5^(1/2)*tan(x/2)^2)/19531 
25 - (201863462912*tan(x/2)^2)/1953125 + 201863462912/1953125)) - (7730941 
1328*2^(1/2)*5^(1/2)*tan(x/2)*(5^(1/2) + 5)^(1/2))/(9765625*((90194313216* 
5^(1/2))/1953125 - (90194313216*5^(1/2)*tan(x/2)^2)/1953125 - (20186346291 
2*tan(x/2)^2)/1953125 + 201863462912/1953125)))*(5^(1/2) + 5)^(1/2))/10 - 
(2^(1/2)*atanh((77309411328*2^(1/2)*5^(1/2)*tan(x/2)*(5 - 5^(1/2))^(1/2))/ 
(9765625*((90194313216*5^(1/2))/1953125 - (90194313216*5^(1/2)*tan(x/2)^2) 
/1953125 + (201863462912*tan(x/2)^2)/1953125 - 201863462912/1953125)) - (3 
4359738368*2^(1/2)*tan(x/2)*(5 - 5^(1/2))^(1/2))/(1953125*((90194313216*5^ 
(1/2))/1953125 - (90194313216*5^(1/2)*tan(x/2)^2)/1953125 + (201863462912* 
tan(x/2)^2)/1953125 - 201863462912/1953125)))*(5 - 5^(1/2))^(1/2))/10
 

Reduce [F]

\[ \int \csc (5 x) \sin (x) \, dx=\int \csc \left (5 x \right ) \sin \left (x \right )d x \] Input:

int(csc(5*x)*sin(x),x)
 

Output:

int(csc(5*x)*sin(x),x)