Integrand size = 37, antiderivative size = 95 \[ \int \frac {d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx=\frac {d x}{a}+\frac {(b d-2 a e) \text {arctanh}\left (\frac {b+2 c e^{h+i x}}{\sqrt {b^2-4 a c}}\right )}{a \sqrt {b^2-4 a c} i}-\frac {d \log \left (a+b e^{h+i x}+c e^{2 h+2 i x}\right )}{2 a i} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.162, Rules used = {2320, 814, 648, 632, 212, 642} \[ \int \frac {d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx=\frac {(b d-2 a e) \text {arctanh}\left (\frac {b+2 c e^{h+i x}}{\sqrt {b^2-4 a c}}\right )}{a i \sqrt {b^2-4 a c}}-\frac {d \log \left (a+b e^{h+i x}+c e^{2 h+2 i x}\right )}{2 a i}+\frac {d x}{a} \]
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 814
Rule 2320
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {d+e x}{x \left (a+b x+c x^2\right )} \, dx,x,e^{h+i x}\right )}{i} \\ & = \frac {\text {Subst}\left (\int \left (\frac {d}{a x}+\frac {-b d+a e-c d x}{a \left (a+b x+c x^2\right )}\right ) \, dx,x,e^{h+i x}\right )}{i} \\ & = \frac {d x}{a}+\frac {\text {Subst}\left (\int \frac {-b d+a e-c d x}{a+b x+c x^2} \, dx,x,e^{h+i x}\right )}{a i} \\ & = \frac {d x}{a}-\frac {d \text {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,e^{h+i x}\right )}{2 a i}-\frac {(b d-2 a e) \text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,e^{h+i x}\right )}{2 a i} \\ & = \frac {d x}{a}-\frac {d \log \left (a+b e^{h+i x}+c e^{2 h+2 i x}\right )}{2 a i}+\frac {(b d-2 a e) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c e^{h+i x}\right )}{a i} \\ & = \frac {d x}{a}+\frac {(b d-2 a e) \tanh ^{-1}\left (\frac {b+2 c e^{h+i x}}{\sqrt {b^2-4 a c}}\right )}{a \sqrt {b^2-4 a c} i}-\frac {d \log \left (a+b e^{h+i x}+c e^{2 h+2 i x}\right )}{2 a i} \\ \end{align*}
Time = 0.18 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.05 \[ \int \frac {d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx=\frac {\frac {(-2 b d+4 a e) \arctan \left (\frac {b+2 c e^{h+i x}}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}+d \left (2 \log \left (e^{h+i x}\right )-\log \left (a+e^{h+i x} \left (b+c e^{h+i x}\right )\right )\right )}{2 a i} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(175\) vs. \(2(86)=172\).
Time = 0.12 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.85
method | result | size |
default | \(\frac {d \left (\frac {\ln \left ({\mathrm e}^{i x}\right )}{a}+\frac {-\frac {\ln \left (a +b \,{\mathrm e}^{i x} {\mathrm e}^{h}+c \,{\mathrm e}^{2 i x} {\mathrm e}^{2 h}\right )}{2}-\frac {{\mathrm e}^{h} b \arctan \left (\frac {{\mathrm e}^{h} b +2 \,{\mathrm e}^{2 h} {\mathrm e}^{i x} c}{\sqrt {4 a c \,{\mathrm e}^{2 h}-{\mathrm e}^{2 h} b^{2}}}\right )}{\sqrt {4 a c \,{\mathrm e}^{2 h}-{\mathrm e}^{2 h} b^{2}}}}{a}\right )}{i}+\frac {2 e \,{\mathrm e}^{h} \arctan \left (\frac {{\mathrm e}^{h} b +2 \,{\mathrm e}^{2 h} {\mathrm e}^{i x} c}{\sqrt {4 a c \,{\mathrm e}^{2 h}-{\mathrm e}^{2 h} b^{2}}}\right )}{i \sqrt {4 a c \,{\mathrm e}^{2 h}-{\mathrm e}^{2 h} b^{2}}}\) | \(176\) |
risch | \(\frac {4 a c d \,i^{2} x}{4 a^{2} c \,i^{2}-a \,b^{2} i^{2}}-\frac {b^{2} d \,i^{2} x}{4 a^{2} c \,i^{2}-a \,b^{2} i^{2}}+\frac {4 a c d h i}{4 a^{2} c \,i^{2}-a \,b^{2} i^{2}}-\frac {b^{2} d h i}{4 a^{2} c \,i^{2}-a \,b^{2} i^{2}}-\frac {2 \ln \left ({\mathrm e}^{i x +h}+\frac {2 a b e -b^{2} d +\sqrt {-16 a^{3} c \,e^{2}+4 a^{2} b^{2} e^{2}+16 a^{2} b c d e -4 a \,b^{3} d e -4 d^{2} a \,b^{2} c +b^{4} d^{2}}}{2 c \left (2 a e -b d \right )}\right ) c d}{\left (4 c a -b^{2}\right ) i}+\frac {\ln \left ({\mathrm e}^{i x +h}+\frac {2 a b e -b^{2} d +\sqrt {-16 a^{3} c \,e^{2}+4 a^{2} b^{2} e^{2}+16 a^{2} b c d e -4 a \,b^{3} d e -4 d^{2} a \,b^{2} c +b^{4} d^{2}}}{2 c \left (2 a e -b d \right )}\right ) b^{2} d}{2 a \left (4 c a -b^{2}\right ) i}+\frac {\ln \left ({\mathrm e}^{i x +h}+\frac {2 a b e -b^{2} d +\sqrt {-16 a^{3} c \,e^{2}+4 a^{2} b^{2} e^{2}+16 a^{2} b c d e -4 a \,b^{3} d e -4 d^{2} a \,b^{2} c +b^{4} d^{2}}}{2 c \left (2 a e -b d \right )}\right ) \sqrt {-16 a^{3} c \,e^{2}+4 a^{2} b^{2} e^{2}+16 a^{2} b c d e -4 a \,b^{3} d e -4 d^{2} a \,b^{2} c +b^{4} d^{2}}}{2 a \left (4 c a -b^{2}\right ) i}-\frac {2 \ln \left ({\mathrm e}^{i x +h}-\frac {-2 a b e +b^{2} d +\sqrt {-16 a^{3} c \,e^{2}+4 a^{2} b^{2} e^{2}+16 a^{2} b c d e -4 a \,b^{3} d e -4 d^{2} a \,b^{2} c +b^{4} d^{2}}}{2 c \left (2 a e -b d \right )}\right ) c d}{\left (4 c a -b^{2}\right ) i}+\frac {\ln \left ({\mathrm e}^{i x +h}-\frac {-2 a b e +b^{2} d +\sqrt {-16 a^{3} c \,e^{2}+4 a^{2} b^{2} e^{2}+16 a^{2} b c d e -4 a \,b^{3} d e -4 d^{2} a \,b^{2} c +b^{4} d^{2}}}{2 c \left (2 a e -b d \right )}\right ) b^{2} d}{2 a \left (4 c a -b^{2}\right ) i}-\frac {\ln \left ({\mathrm e}^{i x +h}-\frac {-2 a b e +b^{2} d +\sqrt {-16 a^{3} c \,e^{2}+4 a^{2} b^{2} e^{2}+16 a^{2} b c d e -4 a \,b^{3} d e -4 d^{2} a \,b^{2} c +b^{4} d^{2}}}{2 c \left (2 a e -b d \right )}\right ) \sqrt {-16 a^{3} c \,e^{2}+4 a^{2} b^{2} e^{2}+16 a^{2} b c d e -4 a \,b^{3} d e -4 d^{2} a \,b^{2} c +b^{4} d^{2}}}{2 a \left (4 c a -b^{2}\right ) i}\) | \(915\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 291, normalized size of antiderivative = 3.06 \[ \int \frac {d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx=\left [\frac {2 \, {\left (b^{2} - 4 \, a c\right )} d i x - {\left (b^{2} - 4 \, a c\right )} d \log \left (c e^{\left (2 \, i x + 2 \, h\right )} + b e^{\left (i x + h\right )} + a\right ) - \sqrt {b^{2} - 4 \, a c} {\left (b d - 2 \, a e\right )} \log \left (\frac {2 \, c^{2} e^{\left (2 \, i x + 2 \, h\right )} + 2 \, b c e^{\left (i x + h\right )} + b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} {\left (2 \, c e^{\left (i x + h\right )} + b\right )}}{c e^{\left (2 \, i x + 2 \, h\right )} + b e^{\left (i x + h\right )} + a}\right )}{2 \, {\left (a b^{2} - 4 \, a^{2} c\right )} i}, \frac {2 \, {\left (b^{2} - 4 \, a c\right )} d i x - {\left (b^{2} - 4 \, a c\right )} d \log \left (c e^{\left (2 \, i x + 2 \, h\right )} + b e^{\left (i x + h\right )} + a\right ) + 2 \, \sqrt {-b^{2} + 4 \, a c} {\left (b d - 2 \, a e\right )} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c e^{\left (i x + h\right )} + b\right )}}{b^{2} - 4 \, a c}\right )}{2 \, {\left (a b^{2} - 4 \, a^{2} c\right )} i}\right ] \]
[In]
[Out]
Time = 0.49 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.22 \[ \int \frac {d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx=\operatorname {RootSum} {\left (z^{2} \cdot \left (4 a^{2} c i^{2} - a b^{2} i^{2}\right ) + z \left (4 a c d i - b^{2} d i\right ) + a e^{2} - b d e + c d^{2}, \left ( i \mapsto i \log {\left (e^{h + i x} + \frac {4 i a^{2} c i - i a b^{2} i + a b e + 2 a c d - b^{2} d}{2 a c e - b c d} \right )} \right )\right )} + \frac {d x}{a} \]
[In]
[Out]
Exception generated. \[ \int \frac {d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.00 \[ \int \frac {d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx=\frac {\frac {2 \, {\left (i x + h\right )} d}{a} - \frac {d \log \left (c e^{\left (2 \, i x + 2 \, h\right )} + b e^{\left (i x + h\right )} + a\right )}{a} - \frac {2 \, {\left (b d - 2 \, a e\right )} \arctan \left (\frac {2 \, c e^{\left (i x + h\right )} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} a}}{2 \, i} \]
[In]
[Out]
Time = 0.48 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.96 \[ \int \frac {d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx=\frac {d\,x}{a}-\frac {d\,\ln \left (a+b\,{\mathrm {e}}^{i\,x}\,{\mathrm {e}}^h+c\,{\mathrm {e}}^{2\,h}\,{\mathrm {e}}^{2\,i\,x}\right )}{2\,a\,i}+\frac {\mathrm {atan}\left (\frac {b+2\,c\,{\mathrm {e}}^{i\,x}\,{\mathrm {e}}^h}{\sqrt {4\,a\,c-b^2}}\right )\,\left (2\,a\,e-b\,d\right )}{a\,i\,\sqrt {4\,a\,c-b^2}} \]
[In]
[Out]