Integrand size = 19, antiderivative size = 116 \[ \int \frac {A+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {c C x}{b^2+c^2}+\frac {2 \left (A \left (b^2+c^2\right )-a c C\right ) \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 C \log (a+b \cos (x)+c \sin (x))}{b^2+c^2} \]
c*C*x/(b^2+c^2)-b*C*ln(a+b*cos(x)+c*sin(x))/(b^2+c^2)+2*(A*(b^2+c^2)-a*c*C )*arctan((c+(a-b)*tan(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.36 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.83 \[ \int \frac {A+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {-\frac {2 \left (A \left (b^2+c^2\right )-a c C\right ) \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}}+C (c x-b \log (a+b \cos (x)+c \sin (x)))}{b^2+c^2} \]
((-2*(A*(b^2 + c^2) - a*c*C)*ArcTanh[(c + (a - b)*Tan[x/2])/Sqrt[-a^2 + b^ 2 + c^2]])/Sqrt[-a^2 + b^2 + c^2] + C*(c*x - b*Log[a + b*Cos[x] + c*Sin[x] ]))/(b^2 + c^2)
Time = 0.35 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.98, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, 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 {A+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+C \sin (x)}{a+b \cos (x)+c \sin (x)}dx\) |
\(\Big \downarrow \) 3616 |
\(\displaystyle \left (A-\frac {a c C}{b^2+c^2}\right ) \int \frac {1}{a+b \cos (x)+c \sin (x)}dx-\frac {b C \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {c C x}{b^2+c^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \left (A-\frac {a c C}{b^2+c^2}\right ) \int \frac {1}{a+b \cos (x)+c \sin (x)}dx-\frac {b C \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {c C x}{b^2+c^2}\) |
\(\Big \downarrow \) 3603 |
\(\displaystyle 2 \left (A-\frac {a c C}{b^2+c^2}\right ) \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 )-\frac {b C \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {c C x}{b^2+c^2}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle -4 \left (A-\frac {a c C}{b^2+c^2}\right ) \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 )-\frac {b C \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {c C x}{b^2+c^2}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {2 \left (A-\frac {a c C}{b^2+c^2}\right ) \arctan \left (\frac {2 (a-b) \tan \left (\frac {x}{2}\right )+2 c}{2 \sqrt {a^2-b^2-c^2}}\right )}{\sqrt {a^2-b^2-c^2}}-\frac {b C \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {c C x}{b^2+c^2}\) |
(c*C*x)/(b^2 + c^2) + (2*(A - (a*c*C)/(b^2 + c^2))*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*C*Log[a + b*Cos[x] + c*Sin[x]])/(b^2 + c^2)
3.6.40.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.98 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.61
method | result | size |
default | \(\frac {\frac {2 \left (-a b C +b^{2} C \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 {2 \left (A \,b^{2}+A \,c^{2}-a c C -C b c -\frac {\left (-a b C +b^{2} C \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}}}}{b^{2}+c^{2}}+\frac {2 C \left (\frac {b \ln \left (1+\tan \left (\frac {x}{2}\right )^{2}\right )}{2}+c \arctan \left (\tan \left (\frac {x}{2}\right )\right )\right )}{b^{2}+c^{2}}\) | \(187\) |
risch | \(\text {Expression too large to display}\) | \(4029\) |
2/(b^2+c^2)*(1/2*(-C*a*b+C*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*b^2+A*c^2-a*c*C-C*b*c-(-C*a*b+C*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)))+2*C/ (b^2+c^2)*(1/2*b*ln(1+tan(1/2*x)^2)+c*arctan(tan(1/2*x)))
Leaf count of result is larger than twice the leaf count of optimal. 235 vs. \(2 (110) = 220\).
Time = 0.32 (sec) , antiderivative size = 625, normalized size of antiderivative = 5.39 \[ \int \frac {A+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\left [\frac {{\left (A b^{2} - C a c + A c^{2}\right )} \sqrt {-a^{2} + b^{2} + c^{2}} \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 c^{3} - {\left (C a^{2} - C b^{2}\right )} c\right )} x - {\left (C a^{2} b - C b^{3} - C 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 \, {\left (A b^{2} - C a c + A c^{2}\right )} \sqrt {a^{2} - b^{2} - c^{2}} \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 c^{3} - {\left (C a^{2} - C b^{2}\right )} c\right )} x - {\left (C a^{2} b - C b^{3} - C 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*((A*b^2 - C*a*c + A*c^2)*sqrt(-a^2 + b^2 + c^2)*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*c^3 - (C*a^2 - C*b^2)*c)*x - (C*a^2*b - C*b^3 - C*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*(A*b^2 - C*a*c + A* c^2)*sqrt(a^2 - b^2 - c^2)*arctan(-(a*b*cos(x) + a*c*sin(x) + b^2 + c^2)*s qrt(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*c^3 - (C*a^2 - C*b^2)*c)*x - (C*a^2*b - C*b^3 - C*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)]
Timed out. \[ \int \frac {A+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {A+C \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.28 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.53 \[ \int \frac {A+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {C c x}{b^{2} + c^{2}} - \frac {C 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 {C b \log \left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )}{b^{2} + c^{2}} - \frac {2 \, {\left (A b^{2} - C a c + A c^{2}\right )} {\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 )}}{\sqrt {a^{2} - b^{2} - c^{2}} {\left (b^{2} + c^{2}\right )}} \]
C*c*x/(b^2 + c^2) - C*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) + C*b*log(tan(1/2*x)^2 + 1)/(b^2 + c^2) - 2*(A*b^ 2 - C*a*c + A*c^2)*(pi*floor(1/2*x/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a* tan(1/2*x) - b*tan(1/2*x) + c)/sqrt(a^2 - b^2 - c^2)))/(sqrt(a^2 - b^2 - c ^2)*(b^2 + c^2))
Time = 62.21 (sec) , antiderivative size = 1741, normalized size of antiderivative = 15.01 \[ \int \frac {A+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\text {Too large to display} \]
(C*log(tan(x/2) + 1i))/(b - c*1i) + (C*log(tan(x/2) - 1i)*1i)/(b*1i - c) - (log(32*A*C^2*a^2 + 32*A*C^2*b^2 - 64*A*C^2*a*b - 32*A^2*C*a*c + 32*A^2*C *b*c + 32*C*tan(x/2)*(a - b)*(A^2*b + 2*C^2*a - 2*C^2*b - 2*A*C*c) + ((C*b ^3 + A*b^2*(b^2 - a^2 + c^2)^(1/2) - C*a^2*b + A*c^2*(b^2 - a^2 + c^2)^(1/ 2) + C*b*c^2 - C*a*c*(b^2 - a^2 + c^2)^(1/2))*(64*A^2*b^2*c + 32*C^2*a^2*c + 32*C^2*b^2*c + 64*A*C*b^3 + 32*tan(x/2)*(a - b)*(A^2*b^2 - A^2*c^2 - 2* C^2*a^2 + 2*C^2*c^2 + 2*C^2*a*b + 2*A*C*a*c - 4*A*C*b*c) - 128*A*C*a*b^2 + 64*A*C*a^2*b - 64*A^2*a*b*c - 64*C^2*a*b*c + ((C*b^3 + A*b^2*(b^2 - a^2 + c^2)^(1/2) - C*a^2*b + A*c^2*(b^2 - a^2 + c^2)^(1/2) + C*b*c^2 - C*a*c*(b ^2 - a^2 + c^2)^(1/2))*(32*A*b^4 + 32*A*a^2*b^2 - 32*A*a^2*c^2 + 32*A*b^2* c^2 - 32*tan(x/2)*(a - b)*(2*A*c^3 - 2*C*b^3 + 2*A*b^2*c + 2*C*a*b^2 - 2*C *a*c^2 + C*b*c^2 - 2*A*a*b*c) - 64*A*a*b^3 + 32*C*a*c^3 - 32*C*b*c^3 + 64* C*b^3*c - 128*C*a*b^2*c + 64*C*a^2*b*c + (32*(a - b)*(C*b^3 + A*b^2*(b^2 - a^2 + c^2)^(1/2) - C*a^2*b + A*c^2*(b^2 - a^2 + c^2)^(1/2) + C*b*c^2 - C* 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*ta n(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)))*(C*b^3 - b*(C*a^2 - C*c^2) + A*b^2*(b^2 - a^2 + c^2)^(1/2) + A*c^2*(b ^2 - a^2 + c^2)^(1/2) - C*a*c*(b^2 - a^2 + c^2)^(1/2)))/((b^2 + c^2)*(b...