Integrand size = 11, antiderivative size = 32 \[ \int \frac {1}{\sin (3 x)+\sin (5 x)} \, dx=-\frac {1}{8} \text {arctanh}(\cos (x))+\frac {\text {arctanh}\left (\sqrt {2} \cos (x)\right )}{2 \sqrt {2}}-\frac {\sec (x)}{8} \] Output:
-1/8*arctanh(cos(x))+1/4*arctanh(cos(x)*2^(1/2))*2^(1/2)-1/8*sec(x)
Result contains complex when optimal does not.
Time = 0.22 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.28 \[ \int \frac {1}{\sin (3 x)+\sin (5 x)} \, dx=\frac {1}{8} \left ((2+2 i) (-1)^{3/4} \text {arctanh}\left (\frac {-1+\tan \left (\frac {x}{2}\right )}{\sqrt {2}}\right )+(2-2 i) \sqrt [4]{-1} \text {arctanh}\left (\frac {1+\tan \left (\frac {x}{2}\right )}{\sqrt {2}}\right )-\log \left (\cos \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )\right )-\sec (x)\right ) \] Input:
Integrate[(Sin[3*x] + Sin[5*x])^(-1),x]
Output:
((2 + 2*I)*(-1)^(3/4)*ArcTanh[(-1 + Tan[x/2])/Sqrt[2]] + (2 - 2*I)*(-1)^(1 /4)*ArcTanh[(1 + Tan[x/2])/Sqrt[2]] - Log[Cos[x/2]] + Log[Sin[x/2]] - Sec[ x])/8
Time = 0.21 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.94, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.545, Rules used = {3042, 4824, 27, 382, 397, 219}
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 (3 x)+\sin (5 x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (3 x)+\sin (5 x)}dx\) |
\(\Big \downarrow \) 4824 |
\(\displaystyle -\int -\frac {\sec ^2(x)}{8 \left (1-2 \cos ^2(x)\right ) \left (1-\cos ^2(x)\right )}d\cos (x)\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{8} \int \frac {\sec ^2(x)}{\left (1-2 \cos ^2(x)\right ) \left (1-\cos ^2(x)\right )}d\cos (x)\) |
\(\Big \downarrow \) 382 |
\(\displaystyle \frac {1}{8} \left (\int \frac {3-2 \cos ^2(x)}{\left (1-2 \cos ^2(x)\right ) \left (1-\cos ^2(x)\right )}d\cos (x)-\sec (x)\right )\) |
\(\Big \downarrow \) 397 |
\(\displaystyle \frac {1}{8} \left (4 \int \frac {1}{1-2 \cos ^2(x)}d\cos (x)-\int \frac {1}{1-\cos ^2(x)}d\cos (x)-\sec (x)\right )\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {1}{8} \left (-\text {arctanh}(\cos (x))+2 \sqrt {2} \text {arctanh}\left (\sqrt {2} \cos (x)\right )-\sec (x)\right )\) |
Input:
Int[(Sin[3*x] + Sin[5*x])^(-1),x]
Output:
(-ArcTanh[Cos[x]] + 2*Sqrt[2]*ArcTanh[Sqrt[2]*Cos[x]] - Sec[x])/8
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_) , x_Symbol] :> Simp[(e*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/ (a*c*e*(m + 1))), x] - Simp[1/(a*c*e^2*(m + 1)) Int[(e*x)^(m + 2)*(a + b* x^2)^p*(c + d*x^2)^q*Simp[(b*c + a*d)*(m + 3) + 2*(b*c*p + a*d*q) + b*d*(m + 2*p + 2*q + 5)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, p, q}, x] && NeQ[ b*c - a*d, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, d, e, m, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^2), x], x] - Simp[ (d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e , f}, x]
Int[((a_.)*sin[(m_.)*((c_.) + (d_.)*(x_))] + (b_.)*sin[(n_.)*((c_.) + (d_.) *(x_))])^(p_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Simplify[TrigExpand[a* Sin[m*ArcCos[x]] + b*Sin[n*ArcCos[x]]]]^p/Sqrt[1 - x^2], x], x, Cos[c + d*x ]], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[(p - 1)/2, 0] && IntegerQ[(m - 1)/ 2] && IntegerQ[(n - 1)/2]
Time = 0.69 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.06
method | result | size |
default | \(\frac {\operatorname {arctanh}\left (\sqrt {2}\, \cos \left (x \right )\right ) \sqrt {2}}{4}+\frac {\ln \left (\cos \left (x \right )-1\right )}{16}-\frac {1}{8 \cos \left (x \right )}-\frac {\ln \left (1+\cos \left (x \right )\right )}{16}\) | \(34\) |
risch | \(-\frac {{\mathrm e}^{i x}}{4 \left ({\mathrm e}^{2 i x}+1\right )}-\frac {\ln \left ({\mathrm e}^{i x}+1\right )}{8}+\frac {\ln \left ({\mathrm e}^{i x}-1\right )}{8}+\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 i x}+\sqrt {2}\, {\mathrm e}^{i x}+1\right )}{8}-\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 i x}-\sqrt {2}\, {\mathrm e}^{i x}+1\right )}{8}\) | \(83\) |
Input:
int(1/(sin(3*x)+sin(5*x)),x,method=_RETURNVERBOSE)
Output:
1/4*arctanh(2^(1/2)*cos(x))*2^(1/2)+1/16*ln(cos(x)-1)-1/8/cos(x)-1/16*ln(1 +cos(x))
Leaf count of result is larger than twice the leaf count of optimal. 64 vs. \(2 (22) = 44\).
Time = 0.09 (sec) , antiderivative size = 64, normalized size of antiderivative = 2.00 \[ \int \frac {1}{\sin (3 x)+\sin (5 x)} \, dx=\frac {2 \, \sqrt {2} \cos \left (x\right ) \log \left (-\frac {2 \, \cos \left (x\right )^{2} + 2 \, \sqrt {2} \cos \left (x\right ) + 1}{2 \, \cos \left (x\right )^{2} - 1}\right ) - \cos \left (x\right ) \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + \cos \left (x\right ) \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - 2}{16 \, \cos \left (x\right )} \] Input:
integrate(1/(sin(3*x)+sin(5*x)),x, algorithm="fricas")
Output:
1/16*(2*sqrt(2)*cos(x)*log(-(2*cos(x)^2 + 2*sqrt(2)*cos(x) + 1)/(2*cos(x)^ 2 - 1)) - cos(x)*log(1/2*cos(x) + 1/2) + cos(x)*log(-1/2*cos(x) + 1/2) - 2 )/cos(x)
\[ \int \frac {1}{\sin (3 x)+\sin (5 x)} \, dx=\int \frac {1}{\sin {\left (3 x \right )} + \sin {\left (5 x \right )}}\, dx \] Input:
integrate(1/(sin(3*x)+sin(5*x)),x)
Output:
Integral(1/(sin(3*x) + sin(5*x)), x)
Leaf count of result is larger than twice the leaf count of optimal. 305 vs. \(2 (22) = 44\).
Time = 0.13 (sec) , antiderivative size = 305, normalized size of antiderivative = 9.53 \[ \int \frac {1}{\sin (3 x)+\sin (5 x)} \, dx=-\frac {4 \, \cos \left (2 \, x\right ) \cos \left (x\right ) - {\left (\sqrt {2} \cos \left (2 \, x\right )^{2} + \sqrt {2} \sin \left (2 \, x\right )^{2} + 2 \, \sqrt {2} \cos \left (2 \, x\right ) + \sqrt {2}\right )} \log \left (2 \, \sqrt {2} \sin \left (2 \, x\right ) \sin \left (x\right ) + 2 \, {\left (\sqrt {2} \cos \left (x\right ) + 1\right )} \cos \left (2 \, x\right ) + \cos \left (2 \, x\right )^{2} + 2 \, \cos \left (x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \sin \left (x\right )^{2} + 2 \, \sqrt {2} \cos \left (x\right ) + 1\right ) + {\left (\sqrt {2} \cos \left (2 \, x\right )^{2} + \sqrt {2} \sin \left (2 \, x\right )^{2} + 2 \, \sqrt {2} \cos \left (2 \, x\right ) + \sqrt {2}\right )} \log \left (-2 \, \sqrt {2} \sin \left (2 \, x\right ) \sin \left (x\right ) - 2 \, {\left (\sqrt {2} \cos \left (x\right ) - 1\right )} \cos \left (2 \, x\right ) + \cos \left (2 \, x\right )^{2} + 2 \, \cos \left (x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \sin \left (x\right )^{2} - 2 \, \sqrt {2} \cos \left (x\right ) + 1\right ) + {\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) - {\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )} \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) + 4 \, \sin \left (2 \, x\right ) \sin \left (x\right ) + 4 \, \cos \left (x\right )}{16 \, {\left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) + 1\right )}} \] Input:
integrate(1/(sin(3*x)+sin(5*x)),x, algorithm="maxima")
Output:
-1/16*(4*cos(2*x)*cos(x) - (sqrt(2)*cos(2*x)^2 + sqrt(2)*sin(2*x)^2 + 2*sq rt(2)*cos(2*x) + sqrt(2))*log(2*sqrt(2)*sin(2*x)*sin(x) + 2*(sqrt(2)*cos(x ) + 1)*cos(2*x) + cos(2*x)^2 + 2*cos(x)^2 + sin(2*x)^2 + 2*sin(x)^2 + 2*sq rt(2)*cos(x) + 1) + (sqrt(2)*cos(2*x)^2 + sqrt(2)*sin(2*x)^2 + 2*sqrt(2)*c os(2*x) + sqrt(2))*log(-2*sqrt(2)*sin(2*x)*sin(x) - 2*(sqrt(2)*cos(x) - 1) *cos(2*x) + cos(2*x)^2 + 2*cos(x)^2 + sin(2*x)^2 + 2*sin(x)^2 - 2*sqrt(2)* cos(x) + 1) + (cos(2*x)^2 + sin(2*x)^2 + 2*cos(2*x) + 1)*log(cos(x)^2 + si n(x)^2 + 2*cos(x) + 1) - (cos(2*x)^2 + sin(2*x)^2 + 2*cos(2*x) + 1)*log(co s(x)^2 + sin(x)^2 - 2*cos(x) + 1) + 4*sin(2*x)*sin(x) + 4*cos(x))/(cos(2*x )^2 + sin(2*x)^2 + 2*cos(2*x) + 1)
Leaf count of result is larger than twice the leaf count of optimal. 82 vs. \(2 (22) = 44\).
Time = 0.12 (sec) , antiderivative size = 82, normalized size of antiderivative = 2.56 \[ \int \frac {1}{\sin (3 x)+\sin (5 x)} \, dx=\frac {1}{8} \, \sqrt {2} \log \left (\frac {{\left | -4 \, \sqrt {2} - \frac {2 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} - 6 \right |}}{{\left | 4 \, \sqrt {2} - \frac {2 \, {\left (\cos \left (x\right ) - 1\right )}}{\cos \left (x\right ) + 1} - 6 \right |}}\right ) - \frac {1}{4 \, {\left (\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1} + 1\right )}} + \frac {1}{16} \, \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1}\right ) \] Input:
integrate(1/(sin(3*x)+sin(5*x)),x, algorithm="giac")
Output:
1/8*sqrt(2)*log(abs(-4*sqrt(2) - 2*(cos(x) - 1)/(cos(x) + 1) - 6)/abs(4*sq rt(2) - 2*(cos(x) - 1)/(cos(x) + 1) - 6)) - 1/4/((cos(x) - 1)/(cos(x) + 1) + 1) + 1/16*log(-(cos(x) - 1)/(cos(x) + 1))
Time = 23.94 (sec) , antiderivative size = 67, normalized size of antiderivative = 2.09 \[ \int \frac {1}{\sin (3 x)+\sin (5 x)} \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{8}+\frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {29\,\sqrt {2}}{8\,\left (\frac {239\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8}-\frac {41}{8}\right )}-\frac {169\,\sqrt {2}\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8\,\left (\frac {239\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8}-\frac {41}{8}\right )}\right )}{4}+\frac {1}{4\,\left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2-1\right )} \] Input:
int(1/(sin(3*x) + sin(5*x)),x)
Output:
log(tan(x/2))/8 + (2^(1/2)*atanh((29*2^(1/2))/(8*((239*tan(x/2)^2)/8 - 41/ 8)) - (169*2^(1/2)*tan(x/2)^2)/(8*((239*tan(x/2)^2)/8 - 41/8))))/4 + 1/(4* (tan(x/2)^2 - 1))
\[ \int \frac {1}{\sin (3 x)+\sin (5 x)} \, dx=\int \frac {1}{\sin \left (5 x \right )+\sin \left (3 x \right )}d x \] Input:
int(1/(sin(3*x)+sin(5*x)),x)
Output:
int(1/(sin(5*x) + sin(3*x)),x)