Integrand size = 15, antiderivative size = 101 \[ \int \frac {\sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {c x}{b^2+c^2}-\frac {2 a c \arctan \left (\frac {c+(a-b) \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2-c^2}}\right )}{\sqrt {a^2-b^2-c^2} \left (b^2+c^2\right )}-\frac {b \log (a+b \cos (x)+c \sin (x))}{b^2+c^2} \]
c*x/(b^2+c^2)-b*ln(a+b*cos(x)+c*sin(x))/(b^2+c^2)-2*a*c*arctan((c+(a-b)*ta n(1/2*x))/(a^2-b^2-c^2)^(1/2))/(b^2+c^2)/(a^2-b^2-c^2)^(1/2)
Time = 0.28 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.79 \[ \int \frac {\sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {c x+\frac {2 a c \text {arctanh}\left (\frac {c+(a-b) \tan \left (\frac {x}{2}\right )}{\sqrt {-a^2+b^2+c^2}}\right )}{\sqrt {-a^2+b^2+c^2}}-b \log (a+b \cos (x)+c \sin (x))}{b^2+c^2} \]
(c*x + (2*a*c*ArcTanh[(c + (a - b)*Tan[x/2])/Sqrt[-a^2 + b^2 + c^2]])/Sqrt [-a^2 + b^2 + c^2] - b*Log[a + b*Cos[x] + c*Sin[x]])/(b^2 + c^2)
Time = 0.33 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.06, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3042, 3616, 3042, 3603, 1083, 217}
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 {\sin (x)}{a+b \cos (x)+c \sin (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (x)}{a+b \cos (x)+c \sin (x)}dx\) |
\(\Big \downarrow \) 3616 |
\(\displaystyle -\frac {a c \int \frac {1}{a+b \cos (x)+c \sin (x)}dx}{b^2+c^2}-\frac {b \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {c x}{b^2+c^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {a c \int \frac {1}{a+b \cos (x)+c \sin (x)}dx}{b^2+c^2}-\frac {b \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {c x}{b^2+c^2}\) |
\(\Big \downarrow \) 3603 |
\(\displaystyle -\frac {2 a c \int \frac {1}{(a-b) \tan ^2\left (\frac {x}{2}\right )+2 c \tan \left (\frac {x}{2}\right )+a+b}d\tan \left (\frac {x}{2}\right )}{b^2+c^2}-\frac {b \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {c x}{b^2+c^2}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {4 a c \int \frac {1}{-\left (2 c+2 (a-b) \tan \left (\frac {x}{2}\right )\right )^2-4 \left (a^2-b^2-c^2\right )}d\left (2 c+2 (a-b) \tan \left (\frac {x}{2}\right )\right )}{b^2+c^2}-\frac {b \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {c x}{b^2+c^2}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle -\frac {2 a c \arctan \left (\frac {2 (a-b) \tan \left (\frac {x}{2}\right )+2 c}{2 \sqrt {a^2-b^2-c^2}}\right )}{\left (b^2+c^2\right ) \sqrt {a^2-b^2-c^2}}-\frac {b \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {c x}{b^2+c^2}\) |
(c*x)/(b^2 + c^2) - (2*a*c*ArcTan[(2*c + 2*(a - b)*Tan[x/2])/(2*Sqrt[a^2 - b^2 - c^2])])/(Sqrt[a^2 - b^2 - c^2]*(b^2 + c^2)) - (b*Log[a + b*Cos[x] + c*Sin[x]])/(b^2 + c^2)
3.5.43.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^ (-1), x_Symbol] :> Module[{f = FreeFactors[Tan[(d + e*x)/2], x]}, Simp[2*(f /e) Subst[Int[1/(a + b + 2*c*f*x + (a - b)*f^2*x^2), x], x, Tan[(d + e*x) /2]/f], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[a^2 - b^2 - c^2, 0]
Int[((A_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_) ]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[c*C*((d + e*x)/ (e*(b^2 + c^2))), x] + (-Simp[b*C*(Log[a + b*Cos[d + e*x] + c*Sin[d + e*x]] /(e*(b^2 + c^2))), x] + Simp[(A*(b^2 + c^2) - a*c*C)/(b^2 + c^2) Int[1/(a + b*Cos[d + e*x] + c*Sin[d + e*x]), x], x]) /; FreeQ[{a, b, c, d, e, A, C} , x] && NeQ[b^2 + c^2, 0] && NeQ[A*(b^2 + c^2) - a*c*C, 0]
Time = 0.80 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.74
method | result | size |
default | \(\frac {2 b \ln \left (1+\tan \left (\frac {x}{2}\right )^{2}\right )+4 c \arctan \left (\tan \left (\frac {x}{2}\right )\right )}{2 b^{2}+2 c^{2}}+\frac {\frac {4 \left (-a b +b^{2}\right ) \ln \left (\tan \left (\frac {x}{2}\right )^{2} a -\tan \left (\frac {x}{2}\right )^{2} b +2 c \tan \left (\frac {x}{2}\right )+a +b \right )}{2 a -2 b}+\frac {4 \left (-a c -c b -\frac {\left (-a b +b^{2}\right ) c}{a -b}\right ) \arctan \left (\frac {2 \left (a -b \right ) \tan \left (\frac {x}{2}\right )+2 c}{2 \sqrt {a^{2}-b^{2}-c^{2}}}\right )}{\sqrt {a^{2}-b^{2}-c^{2}}}}{2 b^{2}+2 c^{2}}\) | \(176\) |
risch | \(\text {Expression too large to display}\) | \(1350\) |
4/(2*b^2+2*c^2)*(1/2*b*ln(1+tan(1/2*x)^2)+c*arctan(tan(1/2*x)))+4/(2*b^2+2 *c^2)*(1/2*(-a*b+b^2)/(a-b)*ln(tan(1/2*x)^2*a-tan(1/2*x)^2*b+2*c*tan(1/2*x )+a+b)+(-a*c-c*b-(-a*b+b^2)*c/(a-b))/(a^2-b^2-c^2)^(1/2)*arctan(1/2*(2*(a- b)*tan(1/2*x)+2*c)/(a^2-b^2-c^2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 212 vs. \(2 (95) = 190\).
Time = 0.31 (sec) , antiderivative size = 579, normalized size of antiderivative = 5.73 \[ \int \frac {\sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\left [-\frac {\sqrt {-a^{2} + b^{2} + c^{2}} a c \log \left (\frac {a^{2} b^{2} - 2 \, b^{4} - c^{4} - {\left (a^{2} + 3 \, b^{2}\right )} c^{2} - {\left (2 \, a^{2} b^{2} - b^{4} - 2 \, a^{2} c^{2} + c^{4}\right )} \cos \left (x\right )^{2} - 2 \, {\left (a b^{3} + a b c^{2}\right )} \cos \left (x\right ) - 2 \, {\left (a b^{2} c + a c^{3} - {\left (b c^{3} - {\left (2 \, a^{2} b - b^{3}\right )} c\right )} \cos \left (x\right )\right )} \sin \left (x\right ) - 2 \, {\left (2 \, a b c \cos \left (x\right )^{2} - a b c + {\left (b^{2} c + c^{3}\right )} \cos \left (x\right ) - {\left (b^{3} + b c^{2} + {\left (a b^{2} - a c^{2}\right )} \cos \left (x\right )\right )} \sin \left (x\right )\right )} \sqrt {-a^{2} + b^{2} + c^{2}}}{2 \, a b \cos \left (x\right ) + {\left (b^{2} - c^{2}\right )} \cos \left (x\right )^{2} + a^{2} + c^{2} + 2 \, {\left (b c \cos \left (x\right ) + a c\right )} \sin \left (x\right )}\right ) + 2 \, {\left (c^{3} - {\left (a^{2} - b^{2}\right )} c\right )} x + {\left (a^{2} b - b^{3} - b c^{2}\right )} \log \left (2 \, a b \cos \left (x\right ) + {\left (b^{2} - c^{2}\right )} \cos \left (x\right )^{2} + a^{2} + c^{2} + 2 \, {\left (b c \cos \left (x\right ) + a c\right )} \sin \left (x\right )\right )}{2 \, {\left (a^{2} b^{2} - b^{4} - c^{4} + {\left (a^{2} - 2 \, b^{2}\right )} c^{2}\right )}}, -\frac {2 \, \sqrt {a^{2} - b^{2} - c^{2}} a c \arctan \left (-\frac {{\left (a b \cos \left (x\right ) + a c \sin \left (x\right ) + b^{2} + c^{2}\right )} \sqrt {a^{2} - b^{2} - c^{2}}}{{\left (c^{3} - {\left (a^{2} - b^{2}\right )} c\right )} \cos \left (x\right ) + {\left (a^{2} b - b^{3} - b c^{2}\right )} \sin \left (x\right )}\right ) + 2 \, {\left (c^{3} - {\left (a^{2} - b^{2}\right )} c\right )} x + {\left (a^{2} b - b^{3} - b c^{2}\right )} \log \left (2 \, a b \cos \left (x\right ) + {\left (b^{2} - c^{2}\right )} \cos \left (x\right )^{2} + a^{2} + c^{2} + 2 \, {\left (b c \cos \left (x\right ) + a c\right )} \sin \left (x\right )\right )}{2 \, {\left (a^{2} b^{2} - b^{4} - c^{4} + {\left (a^{2} - 2 \, b^{2}\right )} c^{2}\right )}}\right ] \]
[-1/2*(sqrt(-a^2 + b^2 + c^2)*a*c*log((a^2*b^2 - 2*b^4 - c^4 - (a^2 + 3*b^ 2)*c^2 - (2*a^2*b^2 - b^4 - 2*a^2*c^2 + c^4)*cos(x)^2 - 2*(a*b^3 + a*b*c^2 )*cos(x) - 2*(a*b^2*c + a*c^3 - (b*c^3 - (2*a^2*b - b^3)*c)*cos(x))*sin(x) - 2*(2*a*b*c*cos(x)^2 - a*b*c + (b^2*c + c^3)*cos(x) - (b^3 + b*c^2 + (a* b^2 - a*c^2)*cos(x))*sin(x))*sqrt(-a^2 + b^2 + c^2))/(2*a*b*cos(x) + (b^2 - c^2)*cos(x)^2 + a^2 + c^2 + 2*(b*c*cos(x) + a*c)*sin(x))) + 2*(c^3 - (a^ 2 - b^2)*c)*x + (a^2*b - b^3 - b*c^2)*log(2*a*b*cos(x) + (b^2 - c^2)*cos(x )^2 + a^2 + c^2 + 2*(b*c*cos(x) + a*c)*sin(x)))/(a^2*b^2 - b^4 - c^4 + (a^ 2 - 2*b^2)*c^2), -1/2*(2*sqrt(a^2 - b^2 - c^2)*a*c*arctan(-(a*b*cos(x) + a *c*sin(x) + b^2 + c^2)*sqrt(a^2 - b^2 - c^2)/((c^3 - (a^2 - b^2)*c)*cos(x) + (a^2*b - b^3 - b*c^2)*sin(x))) + 2*(c^3 - (a^2 - b^2)*c)*x + (a^2*b - b ^3 - b*c^2)*log(2*a*b*cos(x) + (b^2 - c^2)*cos(x)^2 + a^2 + c^2 + 2*(b*c*c os(x) + a*c)*sin(x)))/(a^2*b^2 - b^4 - c^4 + (a^2 - 2*b^2)*c^2)]
Timed out. \[ \int \frac {\sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {\sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(c^2+b^2-a^2>0)', see `assume?` f or more de
Time = 0.29 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.58 \[ \int \frac {\sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {2 \, {\left (\pi \left \lfloor \frac {x}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, x\right ) - b \tan \left (\frac {1}{2} \, x\right ) + c}{\sqrt {a^{2} - b^{2} - c^{2}}}\right )\right )} a c}{\sqrt {a^{2} - b^{2} - c^{2}} {\left (b^{2} + c^{2}\right )}} + \frac {c x}{b^{2} + c^{2}} - \frac {b \log \left (-a \tan \left (\frac {1}{2} \, x\right )^{2} + b \tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, c \tan \left (\frac {1}{2} \, x\right ) - a - b\right )}{b^{2} + c^{2}} + \frac {b \log \left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )}{b^{2} + c^{2}} \]
2*(pi*floor(1/2*x/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*x) - b*ta n(1/2*x) + c)/sqrt(a^2 - b^2 - c^2)))*a*c/(sqrt(a^2 - b^2 - c^2)*(b^2 + c^ 2)) + c*x/(b^2 + c^2) - b*log(-a*tan(1/2*x)^2 + b*tan(1/2*x)^2 - 2*c*tan(1 /2*x) - a - b)/(b^2 + c^2) + b*log(tan(1/2*x)^2 + 1)/(b^2 + c^2)
Time = 40.87 (sec) , antiderivative size = 950, normalized size of antiderivative = 9.41 \[ \int \frac {\sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )+1{}\mathrm {i}\right )}{b-c\,1{}\mathrm {i}}+\frac {\ln \left (64\,\mathrm {tan}\left (\frac {x}{2}\right )\,{\left (a-b\right )}^2-\frac {\left (a^2\,b-b\,c^2-b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )\,\left (32\,a^2\,c+32\,b^2\,c-64\,a\,b\,c+64\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (a-b\right )\,\left (-a^2+b\,a+c^2\right )+\frac {\left (a^2\,b-b\,c^2-b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )\,\left (32\,b\,c^3-32\,a\,c^3-64\,b^3\,c+32\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (a-b\right )\,\left (-2\,b^3+2\,a\,b^2+b\,c^2-2\,a\,c^2\right )+128\,a\,b^2\,c-64\,a^2\,b\,c+\frac {32\,\left (a-b\right )\,\left (a^2\,b-b\,c^2-b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )\,\left (2\,\mathrm {tan}\left (\frac {x}{2}\right )\,a^2\,b^2-4\,a^2\,b\,c-2\,\mathrm {tan}\left (\frac {x}{2}\right )\,a^2\,c^2-2\,\mathrm {tan}\left (\frac {x}{2}\right )\,a\,b^3+a\,b^2\,c-2\,\mathrm {tan}\left (\frac {x}{2}\right )\,a\,b\,c^2+a\,c^3+3\,b^3\,c+3\,\mathrm {tan}\left (\frac {x}{2}\right )\,b^2\,c^2+3\,b\,c^3+3\,\mathrm {tan}\left (\frac {x}{2}\right )\,c^4\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )\,\left (b\,\left (a^2-c^2\right )-b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}-\frac {\ln \left (64\,\mathrm {tan}\left (\frac {x}{2}\right )\,{\left (a-b\right )}^2+\frac {\left (b\,c^2-a^2\,b+b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )\,\left (32\,a^2\,c+32\,b^2\,c-64\,a\,b\,c+64\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (a-b\right )\,\left (-a^2+b\,a+c^2\right )+\frac {\left (b\,c^2-a^2\,b+b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )\,\left (32\,a\,c^3-32\,b\,c^3+64\,b^3\,c-32\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (a-b\right )\,\left (-2\,b^3+2\,a\,b^2+b\,c^2-2\,a\,c^2\right )-128\,a\,b^2\,c+64\,a^2\,b\,c+\frac {32\,\left (a-b\right )\,\left (b\,c^2-a^2\,b+b^3+a\,c\,\sqrt {-a^2+b^2+c^2}\right )\,\left (2\,\mathrm {tan}\left (\frac {x}{2}\right )\,a^2\,b^2-4\,a^2\,b\,c-2\,\mathrm {tan}\left (\frac {x}{2}\right )\,a^2\,c^2-2\,\mathrm {tan}\left (\frac {x}{2}\right )\,a\,b^3+a\,b^2\,c-2\,\mathrm {tan}\left (\frac {x}{2}\right )\,a\,b\,c^2+a\,c^3+3\,b^3\,c+3\,\mathrm {tan}\left (\frac {x}{2}\right )\,b^2\,c^2+3\,b\,c^3+3\,\mathrm {tan}\left (\frac {x}{2}\right )\,c^4\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}\right )\,\left (b^3-b\,\left (a^2-c^2\right )+a\,c\,\sqrt {-a^2+b^2+c^2}\right )}{\left (b^2+c^2\right )\,\left (-a^2+b^2+c^2\right )}+\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{-c+b\,1{}\mathrm {i}} \]
log(tan(x/2) + 1i)/(b - c*1i) + (log(tan(x/2) - 1i)*1i)/(b*1i - c) + (log( 64*tan(x/2)*(a - b)^2 - ((a^2*b - b*c^2 - b^3 + a*c*(b^2 - a^2 + c^2)^(1/2 ))*(32*a^2*c + 32*b^2*c - 64*a*b*c + 64*tan(x/2)*(a - b)*(a*b - a^2 + c^2) + ((a^2*b - b*c^2 - b^3 + a*c*(b^2 - a^2 + c^2)^(1/2))*(32*b*c^3 - 32*a*c ^3 - 64*b^3*c + 32*tan(x/2)*(a - b)*(2*a*b^2 - 2*a*c^2 + b*c^2 - 2*b^3) + 128*a*b^2*c - 64*a^2*b*c + (32*(a - b)*(a^2*b - b*c^2 - b^3 + a*c*(b^2 - a ^2 + c^2)^(1/2))*(3*c^4*tan(x/2) + a*c^3 + 3*b*c^3 + 3*b^3*c + 2*a^2*b^2*t an(x/2) - 2*a^2*c^2*tan(x/2) + 3*b^2*c^2*tan(x/2) - 2*a*b^3*tan(x/2) + a*b ^2*c - 4*a^2*b*c - 2*a*b*c^2*tan(x/2)))/((b^2 + c^2)*(b^2 - a^2 + c^2))))/ ((b^2 + c^2)*(b^2 - a^2 + c^2))))/((b^2 + c^2)*(b^2 - a^2 + c^2)))*(b*(a^2 - c^2) - b^3 + a*c*(b^2 - a^2 + c^2)^(1/2)))/((b^2 + c^2)*(b^2 - a^2 + c^ 2)) - (log(64*tan(x/2)*(a - b)^2 + ((b*c^2 - a^2*b + b^3 + a*c*(b^2 - a^2 + c^2)^(1/2))*(32*a^2*c + 32*b^2*c - 64*a*b*c + 64*tan(x/2)*(a - b)*(a*b - a^2 + c^2) + ((b*c^2 - a^2*b + b^3 + a*c*(b^2 - a^2 + c^2)^(1/2))*(32*a*c ^3 - 32*b*c^3 + 64*b^3*c - 32*tan(x/2)*(a - b)*(2*a*b^2 - 2*a*c^2 + b*c^2 - 2*b^3) - 128*a*b^2*c + 64*a^2*b*c + (32*(a - b)*(b*c^2 - a^2*b + b^3 + a *c*(b^2 - a^2 + c^2)^(1/2))*(3*c^4*tan(x/2) + a*c^3 + 3*b*c^3 + 3*b^3*c + 2*a^2*b^2*tan(x/2) - 2*a^2*c^2*tan(x/2) + 3*b^2*c^2*tan(x/2) - 2*a*b^3*tan (x/2) + a*b^2*c - 4*a^2*b*c - 2*a*b*c^2*tan(x/2)))/((b^2 + c^2)*(b^2 - a^2 + c^2))))/((b^2 + c^2)*(b^2 - a^2 + c^2))))/((b^2 + c^2)*(b^2 - a^2 + ...