Integrand size = 7, antiderivative size = 47 \[ \int \sin (x) \tan (3 x) \, dx=-\frac {1}{6} \log (1-2 \sin (x))-\frac {1}{6} \log (1-\sin (x))+\frac {1}{6} \log (1+\sin (x))+\frac {1}{6} \log (1+2 \sin (x))-\sin (x) \]
Time = 0.03 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.45 \[ \int \sin (x) \tan (3 x) \, dx=\frac {1}{3} \text {arctanh}(\sin (x))+\frac {1}{3} \text {arctanh}(2 \sin (x))-\sin (x) \]
Time = 0.27 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.21, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {3042, 4878, 1602, 27, 1475, 1081, 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 \sin (x) \tan (3 x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (x) \tan (3 x)dx\) |
\(\Big \downarrow \) 4878 |
\(\displaystyle \int \frac {\sin ^2(x) \left (3-4 \sin ^2(x)\right )}{4 \sin ^4(x)-5 \sin ^2(x)+1}d\sin (x)\) |
\(\Big \downarrow \) 1602 |
\(\displaystyle -\frac {1}{4} \int -\frac {4 \left (1-2 \sin ^2(x)\right )}{4 \sin ^4(x)-5 \sin ^2(x)+1}d\sin (x)-\sin (x)\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {1-2 \sin ^2(x)}{4 \sin ^4(x)-5 \sin ^2(x)+1}d\sin (x)-\sin (x)\) |
\(\Big \downarrow \) 1475 |
\(\displaystyle -\frac {1}{4} \int \frac {1}{\sin ^2(x)-\frac {\sin (x)}{2}-\frac {1}{2}}d\sin (x)-\frac {1}{4} \int \frac {1}{\sin ^2(x)+\frac {\sin (x)}{2}-\frac {1}{2}}d\sin (x)-\sin (x)\) |
\(\Big \downarrow \) 1081 |
\(\displaystyle -\frac {1}{4} \int \left (-\frac {2}{3 (\sin (x)+1)}-\frac {4}{3 (1-2 \sin (x))}\right )d\sin (x)-\frac {1}{4} \int \left (-\frac {4}{3 (2 \sin (x)+1)}-\frac {2}{3 (1-\sin (x))}\right )d\sin (x)-\sin (x)\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\sin (x)+\frac {1}{4} \left (\frac {2}{3} \log (\sin (x)+1)-\frac {2}{3} \log (1-2 \sin (x))\right )+\frac {1}{4} \left (\frac {2}{3} \log (2 \sin (x)+1)-\frac {2}{3} \log (1-\sin (x))\right )\) |
((-2*Log[1 - 2*Sin[x]])/3 + (2*Log[1 + Sin[x]])/3)/4 + ((-2*Log[1 - Sin[x] ])/3 + (2*Log[1 + 2*Sin[x]])/3)/4 - Sin[x]
3.1.75.3.1 Defintions of rubi rules used
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_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[c Int[ExpandIntegrand[1/((b/2 - q/2 + c*x)*(b/2 + q/2 + c*x)), x], x], x]] /; FreeQ[{a, b, c}, x] && NiceSqrtQ[b^2 - 4*a*c]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : > With[{q = Rt[2*(d/e) - b/c, 2]}, Simp[e/(2*c) Int[1/Simp[d/e + q*x + x^ 2, x], x], x] + Simp[e/(2*c) Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; F reeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && (GtQ[2*(d/e) - b/c, 0] || ( !LtQ[2*(d/e) - b/c, 0] && EqQ[d - e*Rt[a/c, 2] , 0]))
Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*( x_)^4)^(p_), x_Symbol] :> Simp[e*f*(f*x)^(m - 1)*((a + b*x^2 + c*x^4)^(p + 1)/(c*(m + 4*p + 3))), x] - Simp[f^2/(c*(m + 4*p + 3)) Int[(f*x)^(m - 2)* (a + b*x^2 + c*x^4)^p*Simp[a*e*(m - 1) + (b*e*(m + 2*p + 1) - c*d*(m + 4*p + 3))*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && NeQ[b^2 - 4*a*c , 0] && GtQ[m, 1] && NeQ[m + 4*p + 3, 0] && IntegerQ[2*p] && (IntegerQ[p] | | IntegerQ[m])
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, Simp[With[{d = FreeFa ctors[Sin[v], x]}, d/Coefficient[v, x, 1] Subst[Int[SubstFor[1, Sin[v]/d, u/Cos[v], x], x], x, Sin[v]/d]], x] /; !FalseQ[v] && FunctionOfQ[NonfreeF actors[Sin[v], x], u/Cos[v], x]]
Time = 1.00 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.81
method | result | size |
default | \(\frac {\ln \left (1+2 \sin \left (x \right )\right )}{6}-\frac {\ln \left (\sin \left (x \right )-1\right )}{6}+\frac {\ln \left (1+\sin \left (x \right )\right )}{6}-\frac {\ln \left (2 \sin \left (x \right )-1\right )}{6}-\sin \left (x \right )\) | \(38\) |
risch | \(\frac {i {\mathrm e}^{i x}}{2}-\frac {i {\mathrm e}^{-i x}}{2}-\frac {\ln \left ({\mathrm e}^{i x}-i\right )}{3}+\frac {\ln \left (i+{\mathrm e}^{i x}\right )}{3}+\frac {\ln \left (i {\mathrm e}^{i x}+{\mathrm e}^{2 i x}-1\right )}{6}-\frac {\ln \left (-i {\mathrm e}^{i x}+{\mathrm e}^{2 i x}-1\right )}{6}\) | \(76\) |
Time = 0.24 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.83 \[ \int \sin (x) \tan (3 x) \, dx=\frac {1}{6} \, \log \left (2 \, \sin \left (x\right ) + 1\right ) + \frac {1}{6} \, \log \left (\sin \left (x\right ) + 1\right ) - \frac {1}{6} \, \log \left (-\sin \left (x\right ) + 1\right ) - \frac {1}{6} \, \log \left (-2 \, \sin \left (x\right ) + 1\right ) - \sin \left (x\right ) \]
1/6*log(2*sin(x) + 1) + 1/6*log(sin(x) + 1) - 1/6*log(-sin(x) + 1) - 1/6*l og(-2*sin(x) + 1) - sin(x)
\[ \int \sin (x) \tan (3 x) \, dx=\int \sin {\left (x \right )} \tan {\left (3 x \right )}\, dx \]
\[ \int \sin (x) \tan (3 x) \, dx=\int { \sin \left (x\right ) \tan \left (3 \, x\right ) \,d x } \]
integrate(-1/3*((cos(3*x) + cos(x))*cos(4*x) - (cos(2*x) - 1)*cos(3*x) - c os(2*x)*cos(x) + (sin(3*x) + sin(x))*sin(4*x) - sin(3*x)*sin(2*x) - sin(2* x)*sin(x) + cos(x))/(2*(cos(2*x) - 1)*cos(4*x) - cos(4*x)^2 - cos(2*x)^2 - sin(4*x)^2 + 2*sin(4*x)*sin(2*x) - sin(2*x)^2 + 2*cos(2*x) - 1), x) + 1/6 *log(cos(x)^2 + sin(x)^2 + 2*sin(x) + 1) - 1/6*log(cos(x)^2 + sin(x)^2 - 2 *sin(x) + 1) - sin(x)
Leaf count of result is larger than twice the leaf count of optimal. 364 vs. \(2 (39) = 78\).
Time = 0.35 (sec) , antiderivative size = 364, normalized size of antiderivative = 7.74 \[ \int \sin (x) \tan (3 x) \, dx=\frac {\log \left (\frac {\tan \left (\frac {1}{2} \, x\right )^{4} + 8 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 8 \, \tan \left (\frac {1}{2} \, x\right ) + 1}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{2} - \log \left (\frac {\tan \left (\frac {1}{2} \, x\right )^{4} - 8 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 8 \, \tan \left (\frac {1}{2} \, x\right ) + 1}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{2} + \log \left (\frac {\tan \left (\frac {1}{2} \, x\right )^{4} + 8 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 8 \, \tan \left (\frac {1}{2} \, x\right ) + 1}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) - \log \left (\frac {\tan \left (\frac {1}{2} \, x\right )^{4} - 8 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 18 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 8 \, \tan \left (\frac {1}{2} \, x\right ) + 1}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) + 2 \, \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) - 2 \, \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, \tan \left (\frac {1}{2} \, x\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) - 24 \, \tan \left (\frac {1}{2} \, x\right )}{12 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )}} \]
1/12*(log((tan(1/2*x)^4 + 8*tan(1/2*x)^3 + 18*tan(1/2*x)^2 + 8*tan(1/2*x) + 1)/(tan(1/2*x)^4 + 2*tan(1/2*x)^2 + 1))*tan(1/2*x)^2 - log((tan(1/2*x)^4 - 8*tan(1/2*x)^3 + 18*tan(1/2*x)^2 - 8*tan(1/2*x) + 1)/(tan(1/2*x)^4 + 2* tan(1/2*x)^2 + 1))*tan(1/2*x)^2 + 2*log(2*(tan(1/2*x)^2 + 2*tan(1/2*x) + 1 )/(tan(1/2*x)^2 + 1))*tan(1/2*x)^2 - 2*log(2*(tan(1/2*x)^2 - 2*tan(1/2*x) + 1)/(tan(1/2*x)^2 + 1))*tan(1/2*x)^2 + log((tan(1/2*x)^4 + 8*tan(1/2*x)^3 + 18*tan(1/2*x)^2 + 8*tan(1/2*x) + 1)/(tan(1/2*x)^4 + 2*tan(1/2*x)^2 + 1) ) - log((tan(1/2*x)^4 - 8*tan(1/2*x)^3 + 18*tan(1/2*x)^2 - 8*tan(1/2*x) + 1)/(tan(1/2*x)^4 + 2*tan(1/2*x)^2 + 1)) + 2*log(2*(tan(1/2*x)^2 + 2*tan(1/ 2*x) + 1)/(tan(1/2*x)^2 + 1)) - 2*log(2*(tan(1/2*x)^2 - 2*tan(1/2*x) + 1)/ (tan(1/2*x)^2 + 1)) - 24*tan(1/2*x))/(tan(1/2*x)^2 + 1)
Time = 26.01 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.55 \[ \int \sin (x) \tan (3 x) \, dx=\frac {2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {x}{2}\right )}{\cos \left (\frac {x}{2}\right )}\right )}{3}+\frac {\mathrm {atanh}\left (2\,\sin \left (x\right )\right )}{3}-\sin \left (x\right ) \]