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} \] Output:
d*x/a+(-2*a*e+b*d)*arctanh((b+2*c*exp(i*x+h))/(-4*a*c+b^2)^(1/2))/a/(-4*a* c+b^2)^(1/2)/i-1/2*d*ln(a+b*exp(i*x+h)+c*exp(2*i*x+2*h))/a/i
Time = 0.33 (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} \] Input:
Integrate[(d + e*E^(h + i*x))/(a + b*E^(h + i*x) + c*E^(2*h + 2*i*x)),x]
Output:
(((-2*b*d + 4*a*e)*ArcTan[(b + 2*c*E^(h + i*x))/Sqrt[-b^2 + 4*a*c]])/Sqrt[ -b^2 + 4*a*c] + d*(2*Log[E^(h + i*x)] - Log[a + E^(h + i*x)*(b + c*E^(h + i*x))]))/(2*a*i)
Time = 0.52 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.05, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.081, Rules used = {2720, 1200, 2009}
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 {d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \frac {\int \frac {e^{-h-i x} \left (d+e e^{h+i x}\right )}{a+b e^{h+i x}+c e^{2 h+2 i x}}de^{h+i x}}{i}\) |
\(\Big \downarrow \) 1200 |
\(\displaystyle \frac {\int \left (\frac {e^{-h-i x} d}{a}+\frac {-c e^{h+i x} d-b d+a e}{a \left (a+b e^{h+i x}+c e^{2 h+2 i x}\right )}\right )de^{h+i x}}{i}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\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}}-\frac {d \log \left (a+b e^{h+i x}+c e^{2 h+2 i x}\right )}{2 a}+\frac {d \log \left (e^{h+i x}\right )}{a}}{i}\) |
Input:
Int[(d + e*E^(h + i*x))/(a + b*E^(h + i*x) + c*E^(2*h + 2*i*x)),x]
Output:
(((b*d - 2*a*e)*ArcTanh[(b + 2*c*E^(h + i*x))/Sqrt[b^2 - 4*a*c]])/(a*Sqrt[ b^2 - 4*a*c]) + (d*Log[E^(h + i*x)])/a - (d*Log[a + b*E^(h + i*x) + c*E^(2 *h + 2*i*x)])/(2*a))/i
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_.) + (b_.)* (x_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g* x)^n/(a + b*x + c*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && In tegersQ[n]
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
Leaf count of result is larger than twice the leaf count of optimal. \(175\) vs. \(2(86)=172\).
Time = 0.14 (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} b^{2} a c +b^{4} d^{2}}}{2 c \left (2 a e -b d \right )}\right ) c d}{\left (4 a c -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} b^{2} a c +b^{4} d^{2}}}{2 c \left (2 a e -b d \right )}\right ) b^{2} d}{2 a \left (4 a c -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} b^{2} a 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} b^{2} a c +b^{4} d^{2}}}{2 a \left (4 a c -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} b^{2} a c +b^{4} d^{2}}}{2 c \left (2 a e -b d \right )}\right ) c d}{\left (4 a c -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} b^{2} a c +b^{4} d^{2}}}{2 c \left (2 a e -b d \right )}\right ) b^{2} d}{2 a \left (4 a c -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} b^{2} a 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} b^{2} a c +b^{4} d^{2}}}{2 a \left (4 a c -b^{2}\right ) i}\) | \(915\) |
Input:
int((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x,method=_RETURNVER BOSE)
Output:
d/i*(1/a*ln(exp(i*x))+1/a*(-1/2*ln(a+b*exp(i*x)*exp(h)+c*exp(i*x)^2*exp(2* h))-exp(h)*b/(4*a*c*exp(2*h)-exp(h)^2*b^2)^(1/2)*arctan((exp(h)*b+2*exp(2* h)*exp(i*x)*c)/(4*a*c*exp(2*h)-exp(h)^2*b^2)^(1/2))))+2*e*exp(h)/i/(4*a*c* exp(2*h)-exp(h)^2*b^2)^(1/2)*arctan((exp(h)*b+2*exp(2*h)*exp(i*x)*c)/(4*a* c*exp(2*h)-exp(h)^2*b^2)^(1/2))
Time = 0.10 (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 ] \] Input:
integrate((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x, algorithm= "fricas")
Output:
[1/2*(2*(b^2 - 4*a*c)*d*i*x - (b^2 - 4*a*c)*d*log(c*e^(2*i*x + 2*h) + b*e^ (i*x + h) + a) - sqrt(b^2 - 4*a*c)*(b*d - 2*a*e)*log((2*c^2*e^(2*i*x + 2*h ) + 2*b*c*e^(i*x + h) + b^2 - 2*a*c - sqrt(b^2 - 4*a*c)*(2*c*e^(i*x + h) + b))/(c*e^(2*i*x + 2*h) + b*e^(i*x + h) + a)))/((a*b^2 - 4*a^2*c)*i), 1/2* (2*(b^2 - 4*a*c)*d*i*x - (b^2 - 4*a*c)*d*log(c*e^(2*i*x + 2*h) + b*e^(i*x + h) + a) + 2*sqrt(-b^2 + 4*a*c)*(b*d - 2*a*e)*arctan(-sqrt(-b^2 + 4*a*c)* (2*c*e^(i*x + h) + b)/(b^2 - 4*a*c)))/((a*b^2 - 4*a^2*c)*i)]
Time = 0.53 (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} \] Input:
integrate((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x)
Output:
RootSum(_z**2*(4*a**2*c*i**2 - a*b**2*i**2) + _z*(4*a*c*d*i - b**2*d*i) + a*e**2 - b*d*e + c*d**2, Lambda(_i, _i*log(exp(h + i*x) + (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)))) + d*x/a
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} \] Input:
integrate((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x, algorithm= "maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for more deta
Time = 0.14 (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} \] Input:
integrate((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x, algorithm= "giac")
Output:
1/2*(2*(i*x + h)*d/a - d*log(c*e^(2*i*x + 2*h) + b*e^(i*x + h) + a)/a - 2* (b*d - 2*a*e)*arctan((2*c*e^(i*x + h) + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*a))/i
Time = 0.17 (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}} \] Input:
int((d + e*exp(h + i*x))/(a + b*exp(h + i*x) + c*exp(2*h + 2*i*x)),x)
Output:
(d*x)/a - (d*log(a + b*exp(i*x)*exp(h) + c*exp(2*h)*exp(2*i*x)))/(2*a*i) + (atan((b + 2*c*exp(i*x)*exp(h))/(4*a*c - b^2)^(1/2))*(2*a*e - b*d))/(a*i* (4*a*c - b^2)^(1/2))
Time = 0.16 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.87 \[ \int \frac {d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx=\frac {-4 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 e^{i x +h} c +b}{\sqrt {4 a c -b^{2}}}\right ) a e i +2 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 e^{i x +h} c +b}{\sqrt {4 a c -b^{2}}}\right ) b d i +4 \,\mathrm {log}\left (e^{2 i x +2 h} c +e^{i x +h} b +a \right ) a c d i -\mathrm {log}\left (e^{2 i x +2 h} c +e^{i x +h} b +a \right ) b^{2} d i +8 a c d x -2 b^{2} d x}{2 a \left (4 a c -b^{2}\right )} \] Input:
int((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x)
Output:
( - 4*sqrt(4*a*c - b**2)*atan((2*e**(h + i*x)*c + b)/sqrt(4*a*c - b**2))*a *e*i + 2*sqrt(4*a*c - b**2)*atan((2*e**(h + i*x)*c + b)/sqrt(4*a*c - b**2) )*b*d*i + 4*log(e**(2*h + 2*i*x)*c + e**(h + i*x)*b + a)*a*c*d*i - log(e** (2*h + 2*i*x)*c + e**(h + i*x)*b + a)*b**2*d*i + 8*a*c*d*x - 2*b**2*d*x)/( 2*a*(4*a*c - b**2))