Integrand size = 21, antiderivative size = 48 \[ \int \frac {\text {b1} \cos (x)+\text {a1} \sin (x)}{b \cos (x)+a \sin (x)} \, dx=\frac {(a \text {a1}+b \text {b1}) x}{a^2+b^2}-\frac {(\text {a1} b-a \text {b1}) \log (b \cos (x)+a \sin (x))}{a^2+b^2} \]
[Out]
Time = 0.03 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {3212} \[ \int \frac {\text {b1} \cos (x)+\text {a1} \sin (x)}{b \cos (x)+a \sin (x)} \, dx=\frac {x (a \text {a1}+b \text {b1})}{a^2+b^2}-\frac {(\text {a1} b-a \text {b1}) \log (a \sin (x)+b \cos (x))}{a^2+b^2} \]
[In]
[Out]
Rule 3212
Rubi steps \begin{align*} \text {integral}& = \frac {(a \text {a1}+b \text {b1}) x}{a^2+b^2}-\frac {(\text {a1} b-a \text {b1}) \log (b \cos (x)+a \sin (x))}{a^2+b^2} \\ \end{align*}
Time = 0.15 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.81 \[ \int \frac {\text {b1} \cos (x)+\text {a1} \sin (x)}{b \cos (x)+a \sin (x)} \, dx=\frac {(a \text {a1}+b \text {b1}) x+(-\text {a1} b+a \text {b1}) \log (b \cos (x)+a \sin (x))}{a^2+b^2} \]
[In]
[Out]
Time = 0.51 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.38
method | result | size |
default | \(\frac {\left (a \operatorname {b1} -\operatorname {a1} b \right ) \ln \left (a \tan \left (x \right )+b \right )}{a^{2}+b^{2}}+\frac {\frac {\left (-a \operatorname {b1} +\operatorname {a1} b \right ) \ln \left (1+\tan ^{2}\left (x \right )\right )}{2}+\left (a \operatorname {a1} +b \operatorname {b1} \right ) \arctan \left (\tan \left (x \right )\right )}{a^{2}+b^{2}}\) | \(66\) |
parallelrisch | \(\frac {-a \operatorname {b1} \ln \left (\frac {1}{\cos \left (x \right )+1}\right )+\operatorname {a1} b \ln \left (\frac {1}{\cos \left (x \right )+1}\right )+a \operatorname {b1} \ln \left (\frac {-b \cos \left (x \right )-a \sin \left (x \right )}{\cos \left (x \right )+1}\right )-\operatorname {a1} b \ln \left (\frac {-b \cos \left (x \right )-a \sin \left (x \right )}{\cos \left (x \right )+1}\right )+x a \operatorname {a1} +x b \operatorname {b1}}{a^{2}+b^{2}}\) | \(86\) |
norman | \(\frac {\frac {\left (a \operatorname {a1} +b \operatorname {b1} \right ) x}{a^{2}+b^{2}}+\frac {\left (a \operatorname {a1} +b \operatorname {b1} \right ) x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{a^{2}+b^{2}}}{1+\tan ^{2}\left (\frac {x}{2}\right )}+\frac {\left (a \operatorname {b1} -\operatorname {a1} b \right ) \ln \left (-b \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+2 a \tan \left (\frac {x}{2}\right )+b \right )}{a^{2}+b^{2}}-\frac {\left (a \operatorname {b1} -\operatorname {a1} b \right ) \ln \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )}{a^{2}+b^{2}}\) | \(121\) |
risch | \(\frac {i x \operatorname {b1}}{i b +a}+\frac {x \operatorname {a1}}{i b +a}-\frac {2 i x a \operatorname {b1}}{a^{2}+b^{2}}+\frac {2 i x \operatorname {a1} b}{a^{2}+b^{2}}+\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {i b -a}{i b +a}\right ) a \operatorname {b1}}{a^{2}+b^{2}}-\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {i b -a}{i b +a}\right ) \operatorname {a1} b}{a^{2}+b^{2}}\) | \(129\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.25 \[ \int \frac {\text {b1} \cos (x)+\text {a1} \sin (x)}{b \cos (x)+a \sin (x)} \, dx=\frac {2 \, {\left (a a_{1} + b b_{1}\right )} x - {\left (a_{1} b - a b_{1}\right )} \log \left (2 \, a b \cos \left (x\right ) \sin \left (x\right ) - {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}\right )}{2 \, {\left (a^{2} + b^{2}\right )}} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.41 (sec) , antiderivative size = 360, normalized size of antiderivative = 7.50 \[ \int \frac {\text {b1} \cos (x)+\text {a1} \sin (x)}{b \cos (x)+a \sin (x)} \, dx=\begin {cases} \tilde {\infty } \left (- a_{1} \log {\left (\cos {\left (x \right )} \right )} + b_{1} x\right ) & \text {for}\: a = 0 \wedge b = 0 \\\frac {a_{1} x + b_{1} \log {\left (\sin {\left (x \right )} \right )}}{a} & \text {for}\: b = 0 \\\frac {a_{1} x \sin {\left (x \right )}}{- 2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} + \frac {i a_{1} x \cos {\left (x \right )}}{- 2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} - \frac {a_{1} \cos {\left (x \right )}}{- 2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} - \frac {i b_{1} x \sin {\left (x \right )}}{- 2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} + \frac {b_{1} x \cos {\left (x \right )}}{- 2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} - \frac {i b_{1} \cos {\left (x \right )}}{- 2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} & \text {for}\: a = - i b \\\frac {a_{1} x \sin {\left (x \right )}}{2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} - \frac {i a_{1} x \cos {\left (x \right )}}{2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} - \frac {a_{1} \cos {\left (x \right )}}{2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} + \frac {i b_{1} x \sin {\left (x \right )}}{2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} + \frac {b_{1} x \cos {\left (x \right )}}{2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} + \frac {i b_{1} \cos {\left (x \right )}}{2 i b \sin {\left (x \right )} + 2 b \cos {\left (x \right )}} & \text {for}\: a = i b \\\frac {a a_{1} x}{a^{2} + b^{2}} + \frac {a b_{1} \log {\left (\frac {a \sin {\left (x \right )}}{b} + \cos {\left (x \right )} \right )}}{a^{2} + b^{2}} - \frac {a_{1} b \log {\left (\frac {a \sin {\left (x \right )}}{b} + \cos {\left (x \right )} \right )}}{a^{2} + b^{2}} + \frac {b b_{1} x}{a^{2} + b^{2}} & \text {otherwise} \end {cases} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 181 vs. \(2 (48) = 96\).
Time = 0.28 (sec) , antiderivative size = 181, normalized size of antiderivative = 3.77 \[ \int \frac {\text {b1} \cos (x)+\text {a1} \sin (x)}{b \cos (x)+a \sin (x)} \, dx=a_{1} {\left (\frac {2 \, a \arctan \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a^{2} + b^{2}} - \frac {b \log \left (-b - \frac {2 \, a \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {b \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{a^{2} + b^{2}} + \frac {b \log \left (\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right )}{a^{2} + b^{2}}\right )} + b_{1} {\left (\frac {2 \, b \arctan \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a^{2} + b^{2}} + \frac {a \log \left (-b - \frac {2 \, a \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {b \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{a^{2} + b^{2}} - \frac {a \log \left (\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right )}{a^{2} + b^{2}}\right )} \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.60 \[ \int \frac {\text {b1} \cos (x)+\text {a1} \sin (x)}{b \cos (x)+a \sin (x)} \, dx=\frac {{\left (a a_{1} + b b_{1}\right )} x}{a^{2} + b^{2}} + \frac {{\left (a_{1} b - a b_{1}\right )} \log \left (\tan \left (x\right )^{2} + 1\right )}{2 \, {\left (a^{2} + b^{2}\right )}} - \frac {{\left (a a_{1} b - a^{2} b_{1}\right )} \log \left ({\left | a \tan \left (x\right ) + b \right |}\right )}{a^{3} + a b^{2}} \]
[In]
[Out]
Time = 10.33 (sec) , antiderivative size = 2034, normalized size of antiderivative = 42.38 \[ \int \frac {\text {b1} \cos (x)+\text {a1} \sin (x)}{b \cos (x)+a \sin (x)} \, dx=\text {Too large to display} \]
[In]
[Out]