Integrand size = 19, antiderivative size = 114 \[ \int \frac {A+C \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, dx=\frac {2 (a A-c C) \arctan \left (\frac {c+(a-b) \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2-c^2}}\right )}{\left (a^2-b^2-c^2\right )^{3/2}}-\frac {b C-(A c-a C) \cos (x)+A b \sin (x)}{\left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {3233, 3203, 632, 210} \[ \int \frac {A+C \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, dx=\frac {2 (a A-c C) \arctan \left (\frac {(a-b) \tan \left (\frac {x}{2}\right )+c}{\sqrt {a^2-b^2-c^2}}\right )}{\left (a^2-b^2-c^2\right )^{3/2}}-\frac {-\cos (x) (A c-a C)+A b \sin (x)+b C}{\left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))} \]
[In]
[Out]
Rule 210
Rule 632
Rule 3203
Rule 3233
Rubi steps \begin{align*} \text {integral}& = -\frac {b C-(A c-a C) \cos (x)+A b \sin (x)}{\left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))}+\frac {(a A-c C) \int \frac {1}{a+b \cos (x)+c \sin (x)} \, dx}{a^2-b^2-c^2} \\ & = -\frac {b C-(A c-a C) \cos (x)+A b \sin (x)}{\left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))}+\frac {(2 (a A-c C)) \text {Subst}\left (\int \frac {1}{a+b+2 c x+(a-b) x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )}{a^2-b^2-c^2} \\ & = -\frac {b C-(A c-a C) \cos (x)+A b \sin (x)}{\left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))}-\frac {(4 (a A-c C)) \text {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2-c^2\right )-x^2} \, dx,x,2 c+2 (a-b) \tan \left (\frac {x}{2}\right )\right )}{a^2-b^2-c^2} \\ & = \frac {2 (a A-c C) \arctan \left (\frac {c+(a-b) \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2-c^2}}\right )}{\left (a^2-b^2-c^2\right )^{3/2}}-\frac {b C-(A c-a C) \cos (x)+A b \sin (x)}{\left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))} \\ \end{align*}
Time = 0.48 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.08 \[ \int \frac {A+C \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, dx=\frac {2 (a A-c C) \text {arctanh}\left (\frac {c+(a-b) \tan \left (\frac {x}{2}\right )}{\sqrt {-a^2+b^2+c^2}}\right )}{\left (-a^2+b^2+c^2\right )^{3/2}}+\frac {a A c-a^2 C+b^2 C+\left (A \left (b^2+c^2\right )-a c C\right ) \sin (x)}{b \left (-a^2+b^2+c^2\right ) (a+b \cos (x)+c \sin (x))} \]
[In]
[Out]
Time = 0.91 (sec) , antiderivative size = 207, normalized size of antiderivative = 1.82
method | result | size |
default | \(\frac {-\frac {2 \left (A a b -A \,b^{2}-A \,c^{2}+a c C -C b c \right ) \tan \left (\frac {x}{2}\right )}{a^{3}-a^{2} b -a \,b^{2}-a \,c^{2}+b^{3}+c^{2} b}+\frac {2 \left (A a c -C \,a^{2}+b^{2} C \right )}{a^{3}-a^{2} b -a \,b^{2}-a \,c^{2}+b^{3}+c^{2} b}}{\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}+\frac {2 \left (A a -C c \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 )}{\left (a^{2}-b^{2}-c^{2}\right )^{\frac {3}{2}}}\) | \(207\) |
risch | \(\frac {2 i \left (-i A \,b^{2}-i A \,c^{2}+i a c C -i A a b \,{\mathrm e}^{i x}+i C b c \,{\mathrm e}^{i x}-A a c \,{\mathrm e}^{i x}+C \,a^{2} {\mathrm e}^{i x}-C \,b^{2} {\mathrm e}^{i x}\right )}{\left (a^{2}-b^{2}-c^{2}\right ) \left (i b +c \right ) \left (-i c \,{\mathrm e}^{2 i x}+b \,{\mathrm e}^{2 i x}+i c +2 a \,{\mathrm e}^{i x}+b \right )}-\frac {\ln \left ({\mathrm e}^{i x}+\frac {i a c \sqrt {-a^{2}+b^{2}+c^{2}}+i a^{2} b -i b^{3}-i b \,c^{2}+a b \sqrt {-a^{2}+b^{2}+c^{2}}-a^{2} c +b^{2} c +c^{3}}{\left (b^{2}+c^{2}\right ) \sqrt {-a^{2}+b^{2}+c^{2}}}\right ) A a}{\sqrt {-a^{2}+b^{2}+c^{2}}\, \left (a^{2}-b^{2}-c^{2}\right )}+\frac {\ln \left ({\mathrm e}^{i x}+\frac {i a c \sqrt {-a^{2}+b^{2}+c^{2}}+i a^{2} b -i b^{3}-i b \,c^{2}+a b \sqrt {-a^{2}+b^{2}+c^{2}}-a^{2} c +b^{2} c +c^{3}}{\left (b^{2}+c^{2}\right ) \sqrt {-a^{2}+b^{2}+c^{2}}}\right ) C c}{\sqrt {-a^{2}+b^{2}+c^{2}}\, \left (a^{2}-b^{2}-c^{2}\right )}+\frac {\ln \left ({\mathrm e}^{i x}+\frac {i a c \sqrt {-a^{2}+b^{2}+c^{2}}-i a^{2} b +i b^{3}+i b \,c^{2}+a b \sqrt {-a^{2}+b^{2}+c^{2}}+a^{2} c -b^{2} c -c^{3}}{\left (b^{2}+c^{2}\right ) \sqrt {-a^{2}+b^{2}+c^{2}}}\right ) A a}{\sqrt {-a^{2}+b^{2}+c^{2}}\, \left (a^{2}-b^{2}-c^{2}\right )}-\frac {\ln \left ({\mathrm e}^{i x}+\frac {i a c \sqrt {-a^{2}+b^{2}+c^{2}}-i a^{2} b +i b^{3}+i b \,c^{2}+a b \sqrt {-a^{2}+b^{2}+c^{2}}+a^{2} c -b^{2} c -c^{3}}{\left (b^{2}+c^{2}\right ) \sqrt {-a^{2}+b^{2}+c^{2}}}\right ) C c}{\sqrt {-a^{2}+b^{2}+c^{2}}\, \left (a^{2}-b^{2}-c^{2}\right )}\) | \(681\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 569 vs. \(2 (107) = 214\).
Time = 0.32 (sec) , antiderivative size = 1301, normalized size of antiderivative = 11.41 \[ \int \frac {A+C \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \frac {A+C \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
Exception generated. \[ \int \frac {A+C \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.81 \[ \int \frac {A+C \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, 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 )} {\left (A a - C c\right )}}{{\left (a^{2} - b^{2} - c^{2}\right )}^{\frac {3}{2}}} - \frac {2 \, {\left (A a b \tan \left (\frac {1}{2} \, x\right ) - A b^{2} \tan \left (\frac {1}{2} \, x\right ) + C a c \tan \left (\frac {1}{2} \, x\right ) - C b c \tan \left (\frac {1}{2} \, x\right ) - A c^{2} \tan \left (\frac {1}{2} \, x\right ) + C a^{2} - C b^{2} - A a c\right )}}{{\left (a^{3} - a^{2} b - a b^{2} + b^{3} - a c^{2} + b c^{2}\right )} {\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 )}} \]
[In]
[Out]
Time = 28.45 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.79 \[ \int \frac {A+C \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, dx=\frac {2\,\mathrm {atanh}\left (\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (2\,a-2\,b\right )+\frac {2\,\left (-a^2\,c+b^2\,c+c^3\right )}{-a^2+b^2+c^2}}{2\,\sqrt {-a^2+b^2+c^2}}\right )\,\left (A\,a-C\,c\right )}{{\left (-a^2+b^2+c^2\right )}^{3/2}}-\frac {\frac {2\,\left (-C\,a^2+A\,c\,a+C\,b^2\right )}{\left (a-b\right )\,\left (-a^2+b^2+c^2\right )}+\frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (A\,b^2+C\,b\,c-A\,a\,b+A\,c^2-C\,a\,c\right )}{\left (a-b\right )\,\left (-a^2+b^2+c^2\right )}}{\left (a-b\right )\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,c\,\mathrm {tan}\left (\frac {x}{2}\right )+a+b} \]
[In]
[Out]