Integrand size = 9, antiderivative size = 90 \[ \int \frac {1}{(\sin (x)+\sin (5 x))^2} \, dx=-\frac {3}{4} \text {arctanh}(2 \cos (x) \sin (x))-\frac {\cot (x)}{36}-\frac {4 \log \left (\sqrt {3} \cos (x)-\sin (x)\right )}{3 \sqrt {3}}+\frac {4 \log \left (\sqrt {3} \cos (x)+\sin (x)\right )}{3 \sqrt {3}}+\frac {\tan (x) \left (43-25 \tan ^2(x)\right )}{18 \left (3-4 \tan ^2(x)+\tan ^4(x)\right )} \] Output:
-3/4*arctanh(2*cos(x)*sin(x))-1/36*cot(x)-4/9*ln(3^(1/2)*cos(x)-sin(x))*3^ (1/2)+4/9*ln(3^(1/2)*cos(x)+sin(x))*3^(1/2)+tan(x)*(43-25*tan(x)^2)/(54-72 *tan(x)^2+18*tan(x)^4)
Time = 0.11 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.92 \[ \int \frac {1}{(\sin (x)+\sin (5 x))^2} \, dx=\frac {1}{36} \left (32 \sqrt {3} \text {arctanh}\left (\frac {\tan (x)}{\sqrt {3}}\right )-\cot (x)+27 \log (\cos (x)-\sin (x))-27 \log (\cos (x)+\sin (x))+\frac {9 \sin (x)}{\cos (x)-\sin (x)}+\frac {9 \sin (x)}{\cos (x)+\sin (x)}+\frac {16 \sin (2 x)}{1+2 \cos (2 x)}\right ) \] Input:
Integrate[(Sin[x] + Sin[5*x])^(-2),x]
Output:
(32*Sqrt[3]*ArcTanh[Tan[x]/Sqrt[3]] - Cot[x] + 27*Log[Cos[x] - Sin[x]] - 2 7*Log[Cos[x] + Sin[x]] + (9*Sin[x])/(Cos[x] - Sin[x]) + (9*Sin[x])/(Cos[x] + Sin[x]) + (16*Sin[2*x])/(1 + 2*Cos[2*x]))/36
Time = 0.34 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.70, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.778, Rules used = {3042, 4822, 27, 1673, 27, 2195, 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 \frac {1}{(\sin (x)+\sin (5 x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(\sin (x)+\sin (5 x))^2}dx\) |
\(\Big \downarrow \) 4822 |
\(\displaystyle \int \frac {\left (\tan ^2(x)+1\right )^4 \cot ^2(x)}{4 \left (\tan ^4(x)-4 \tan ^2(x)+3\right )^2}d\tan (x)\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{4} \int \frac {\cot ^2(x) \left (\tan ^2(x)+1\right )^4}{\left (\tan ^4(x)-4 \tan ^2(x)+3\right )^2}d\tan (x)\) |
\(\Big \downarrow \) 1673 |
\(\displaystyle \frac {1}{4} \left (\frac {2 \tan (x) \left (43-25 \tan ^2(x)\right )}{9 \left (\tan ^4(x)-4 \tan ^2(x)+3\right )}-\frac {1}{24} \int -\frac {8 \cot ^2(x) \left (-41 \tan ^4(x)-70 \tan ^2(x)+3\right )}{3 \left (\tan ^4(x)-4 \tan ^2(x)+3\right )}d\tan (x)\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{9} \int \frac {\cot ^2(x) \left (-41 \tan ^4(x)-70 \tan ^2(x)+3\right )}{\tan ^4(x)-4 \tan ^2(x)+3}d\tan (x)+\frac {2 \tan (x) \left (43-25 \tan ^2(x)\right )}{9 \left (\tan ^4(x)-4 \tan ^2(x)+3\right )}\right )\) |
\(\Big \downarrow \) 2195 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{9} \int \left (\cot ^2(x)-\frac {96}{\tan ^2(x)-3}+\frac {54}{\tan ^2(x)-1}\right )d\tan (x)+\frac {2 \tan (x) \left (43-25 \tan ^2(x)\right )}{9 \left (\tan ^4(x)-4 \tan ^2(x)+3\right )}\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{9} \left (-54 \text {arctanh}(\tan (x))+32 \sqrt {3} \text {arctanh}\left (\frac {\tan (x)}{\sqrt {3}}\right )-\cot (x)\right )+\frac {2 \tan (x) \left (43-25 \tan ^2(x)\right )}{9 \left (\tan ^4(x)-4 \tan ^2(x)+3\right )}\right )\) |
Input:
Int[(Sin[x] + Sin[5*x])^(-2),x]
Output:
((-54*ArcTanh[Tan[x]] + 32*Sqrt[3]*ArcTanh[Tan[x]/Sqrt[3]] - Cot[x])/9 + ( 2*Tan[x]*(43 - 25*Tan[x]^2))/(9*(3 - 4*Tan[x]^2 + Tan[x]^4)))/4
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(x_)^(m_)*((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^ 4)^(p_), x_Symbol] :> With[{f = Coeff[PolynomialRemainder[x^m*(d + e*x^2)^q , a + b*x^2 + c*x^4, x], x, 0], g = Coeff[PolynomialRemainder[x^m*(d + e*x^ 2)^q, a + b*x^2 + c*x^4, x], x, 2]}, Simp[x*(a + b*x^2 + c*x^4)^(p + 1)*((a *b*g - f*(b^2 - 2*a*c) - c*(b*f - 2*a*g)*x^2)/(2*a*(p + 1)*(b^2 - 4*a*c))), x] + Simp[1/(2*a*(p + 1)*(b^2 - 4*a*c)) Int[x^m*(a + b*x^2 + c*x^4)^(p + 1)*Simp[ExpandToSum[(2*a*(p + 1)*(b^2 - 4*a*c)*PolynomialQuotient[x^m*(d + e*x^2)^q, a + b*x^2 + c*x^4, x])/x^m + (b^2*f*(2*p + 3) - 2*a*c*f*(4*p + 5 ) - a*b*g)/x^m + c*(4*p + 7)*(b*f - 2*a*g)*x^(2 - m), x], x], x], x]] /; Fr eeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1] && IGtQ[q, 1] && ILtQ[m/2, 0]
Int[(Pq_)*((d_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_ Symbol] :> Int[ExpandIntegrand[(d*x)^m*Pq*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, m}, x] && PolyQ[Pq, x^2] && IGtQ[p, -2]
Int[((a_.)*sin[(m_.)*((c_.) + (d_.)*(x_))] + (b_.)*sin[(n_.)*((c_.) + (d_.) *(x_))])^(p_), x_Symbol] :> Simp[1/d Subst[Int[Simplify[TrigExpand[a*Sin[ m*ArcTan[x]] + b*Sin[n*ArcTan[x]]]]^p/(1 + x^2), x], x, Tan[c + d*x]], x] / ; FreeQ[{a, b, c, d}, x] && ILtQ[p/2, 0] && IntegerQ[(m - 1)/2] && IntegerQ [(n - 1)/2]
Time = 1.25 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.70
method | result | size |
default | \(-\frac {1}{4 \left (\tan \left (x \right )-1\right )}+\frac {3 \ln \left (\tan \left (x \right )-1\right )}{4}-\frac {1}{4 \left (\tan \left (x \right )+1\right )}-\frac {3 \ln \left (\tan \left (x \right )+1\right )}{4}-\frac {8 \tan \left (x \right )}{9 \left (\tan \left (x \right )^{2}-3\right )}+\frac {8 \sqrt {3}\, \operatorname {arctanh}\left (\frac {\tan \left (x \right ) \sqrt {3}}{3}\right )}{9}-\frac {1}{36 \tan \left (x \right )}\) | \(63\) |
risch | \(\frac {i \left ({\mathrm e}^{8 i x}+4 \,{\mathrm e}^{6 i x}-2 \,{\mathrm e}^{4 i x}+{\mathrm e}^{2 i x}-6\right )}{6 \,{\mathrm e}^{10 i x}+6 \,{\mathrm e}^{6 i x}-6 \,{\mathrm e}^{4 i x}-6}-\frac {3 \ln \left ({\mathrm e}^{2 i x}+i\right )}{4}+\frac {4 \sqrt {3}\, \ln \left ({\mathrm e}^{2 i x}+\frac {1}{2}+\frac {i \sqrt {3}}{2}\right )}{9}-\frac {4 \sqrt {3}\, \ln \left ({\mathrm e}^{2 i x}+\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}{9}+\frac {3 \ln \left ({\mathrm e}^{2 i x}-i\right )}{4}\) | \(112\) |
Input:
int(1/(sin(x)+sin(5*x))^2,x,method=_RETURNVERBOSE)
Output:
-1/4/(tan(x)-1)+3/4*ln(tan(x)-1)-1/4/(tan(x)+1)-3/4*ln(tan(x)+1)-8/9*tan(x )/(tan(x)^2-3)+8/9*3^(1/2)*arctanh(1/3*tan(x)*3^(1/2))-1/36/tan(x)
Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (72) = 144\).
Time = 0.10 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.91 \[ \int \frac {1}{(\sin (x)+\sin (5 x))^2} \, dx=-\frac {288 \, \cos \left (x\right )^{5} - 384 \, \cos \left (x\right )^{3} + 27 \, {\left (8 \, \cos \left (x\right )^{4} - 6 \, \cos \left (x\right )^{2} + 1\right )} \log \left (2 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) \sin \left (x\right ) - 27 \, {\left (8 \, \cos \left (x\right )^{4} - 6 \, \cos \left (x\right )^{2} + 1\right )} \log \left (-2 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) \sin \left (x\right ) - 16 \, {\left (8 \, \sqrt {3} \cos \left (x\right )^{4} - 6 \, \sqrt {3} \cos \left (x\right )^{2} + \sqrt {3}\right )} \log \left (-\frac {8 \, \cos \left (x\right )^{4} - 16 \, \cos \left (x\right )^{2} - 4 \, {\left (2 \, \sqrt {3} \cos \left (x\right )^{3} + \sqrt {3} \cos \left (x\right )\right )} \sin \left (x\right ) - 1}{16 \, \cos \left (x\right )^{4} - 8 \, \cos \left (x\right )^{2} + 1}\right ) \sin \left (x\right ) + 102 \, \cos \left (x\right )}{72 \, {\left (8 \, \cos \left (x\right )^{4} - 6 \, \cos \left (x\right )^{2} + 1\right )} \sin \left (x\right )} \] Input:
integrate(1/(sin(x)+sin(5*x))^2,x, algorithm="fricas")
Output:
-1/72*(288*cos(x)^5 - 384*cos(x)^3 + 27*(8*cos(x)^4 - 6*cos(x)^2 + 1)*log( 2*cos(x)*sin(x) + 1)*sin(x) - 27*(8*cos(x)^4 - 6*cos(x)^2 + 1)*log(-2*cos( x)*sin(x) + 1)*sin(x) - 16*(8*sqrt(3)*cos(x)^4 - 6*sqrt(3)*cos(x)^2 + sqrt (3))*log(-(8*cos(x)^4 - 16*cos(x)^2 - 4*(2*sqrt(3)*cos(x)^3 + sqrt(3)*cos( x))*sin(x) - 1)/(16*cos(x)^4 - 8*cos(x)^2 + 1))*sin(x) + 102*cos(x))/((8*c os(x)^4 - 6*cos(x)^2 + 1)*sin(x))
\[ \int \frac {1}{(\sin (x)+\sin (5 x))^2} \, dx=\int \frac {1}{\left (\sin {\left (x \right )} + \sin {\left (5 x \right )}\right )^{2}}\, dx \] Input:
integrate(1/(sin(x)+sin(5*x))**2,x)
Output:
Integral((sin(x) + sin(5*x))**(-2), x)
Exception generated. \[ \int \frac {1}{(\sin (x)+\sin (5 x))^2} \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(1/(sin(x)+sin(5*x))^2,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is un defined.
Time = 0.13 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.90 \[ \int \frac {1}{(\sin (x)+\sin (5 x))^2} \, dx=-\frac {4}{9} \, \sqrt {3} \log \left (\frac {{\left | -2 \, \sqrt {3} + 2 \, \tan \left (x\right ) \right |}}{{\left | 2 \, \sqrt {3} + 2 \, \tan \left (x\right ) \right |}}\right ) - \frac {17 \, \tan \left (x\right )^{4} - 30 \, \tan \left (x\right )^{2} + 1}{12 \, {\left (\tan \left (x\right )^{5} - 4 \, \tan \left (x\right )^{3} + 3 \, \tan \left (x\right )\right )}} - \frac {3}{4} \, \log \left ({\left | \tan \left (x\right ) + 1 \right |}\right ) + \frac {3}{4} \, \log \left ({\left | \tan \left (x\right ) - 1 \right |}\right ) \] Input:
integrate(1/(sin(x)+sin(5*x))^2,x, algorithm="giac")
Output:
-4/9*sqrt(3)*log(abs(-2*sqrt(3) + 2*tan(x))/abs(2*sqrt(3) + 2*tan(x))) - 1 /12*(17*tan(x)^4 - 30*tan(x)^2 + 1)/(tan(x)^5 - 4*tan(x)^3 + 3*tan(x)) - 3 /4*log(abs(tan(x) + 1)) + 3/4*log(abs(tan(x) - 1))
Time = 21.86 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.42 \[ \int \frac {1}{(\sin (x)+\sin (5 x))^2} \, dx=\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{72}+\frac {3\,\mathrm {atanh}\left (\frac {1417674752\,\mathrm {tan}\left (\frac {x}{2}\right )}{531441\,\left (\frac {708837376\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{531441}-\frac {708837376}{531441}\right )}\right )}{2}-\frac {8\,\sqrt {3}\,\mathrm {atanh}\left (\frac {181462368256\,\sqrt {3}\,\mathrm {tan}\left (\frac {x}{2}\right )}{14348907\,\left (\frac {90731184128\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{4782969}-\frac {90731184128}{4782969}\right )}\right )}{9}-\frac {\frac {347\,{\mathrm {tan}\left (\frac {x}{2}\right )}^8}{216}-\frac {155\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6}{18}+\frac {949\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4}{108}-\frac {31\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{18}+\frac {1}{72}}{{\mathrm {tan}\left (\frac {x}{2}\right )}^9-\frac {28\,{\mathrm {tan}\left (\frac {x}{2}\right )}^7}{3}+22\,{\mathrm {tan}\left (\frac {x}{2}\right )}^5-\frac {28\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{3}+\mathrm {tan}\left (\frac {x}{2}\right )} \] Input:
int(1/(sin(5*x) + sin(x))^2,x)
Output:
tan(x/2)/72 + (3*atanh((1417674752*tan(x/2))/(531441*((708837376*tan(x/2)^ 2)/531441 - 708837376/531441))))/2 - (8*3^(1/2)*atanh((181462368256*3^(1/2 )*tan(x/2))/(14348907*((90731184128*tan(x/2)^2)/4782969 - 90731184128/4782 969))))/9 - ((949*tan(x/2)^4)/108 - (31*tan(x/2)^2)/18 - (155*tan(x/2)^6)/ 18 + (347*tan(x/2)^8)/216 + 1/72)/(tan(x/2) - (28*tan(x/2)^3)/3 + 22*tan(x /2)^5 - (28*tan(x/2)^7)/3 + tan(x/2)^9)
\[ \int \frac {1}{(\sin (x)+\sin (5 x))^2} \, dx=\int \frac {1}{\sin \left (5 x \right )^{2}+2 \sin \left (5 x \right ) \sin \left (x \right )+\sin \left (x \right )^{2}}d x \] Input:
int(1/(sin(x)+sin(5*x))^2,x)
Output:
int(1/(sin(5*x)**2 + 2*sin(5*x)*sin(x) + sin(x)**2),x)