3.575 \(\int \frac{d+e e^{h+i x}}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx\)

Optimal. Leaf size=95 \[ \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 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} \]

[Out]

(d*x)/a + ((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]*i) - (d*Log[a
+ b*E^(h + i*x) + c*E^(2*h + 2*i*x)])/(2*a*i)

________________________________________________________________________________________

Rubi [A]  time = 0.151467, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 37, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.162, Rules used = {2282, 800, 634, 618, 206, 628} \[ \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 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} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*E^(h + i*x))/(a + b*E^(h + i*x) + c*E^(2*h + 2*i*x)),x]

[Out]

(d*x)/a + ((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]*i) - (d*Log[a
+ b*E^(h + i*x) + c*E^(2*h + 2*i*x)])/(2*a*i)

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{d+e e^{h+575 x}}{a+b e^{h+575 x}+c e^{2 h+1150 x}} \, dx &=\frac{1}{575} \operatorname{Subst}\left (\int \frac{d+e x}{x \left (a+b x+c x^2\right )} \, dx,x,e^{h+575 x}\right )\\ &=\frac{1}{575} \operatorname{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+575 x}\right )\\ &=\frac{d x}{a}+\frac{\operatorname{Subst}\left (\int \frac{-b d+a e-c d x}{a+b x+c x^2} \, dx,x,e^{h+575 x}\right )}{575 a}\\ &=\frac{d x}{a}-\frac{d \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,e^{h+575 x}\right )}{1150 a}-\frac{(b d-2 a e) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,e^{h+575 x}\right )}{1150 a}\\ &=\frac{d x}{a}-\frac{d \log \left (a+b e^{h+575 x}+c e^{2 h+1150 x}\right )}{1150 a}+\frac{(b d-2 a e) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c e^{h+575 x}\right )}{575 a}\\ &=\frac{d x}{a}+\frac{(b d-2 a e) \tanh ^{-1}\left (\frac{b+2 c e^{h+575 x}}{\sqrt{b^2-4 a c}}\right )}{575 a \sqrt{b^2-4 a c}}-\frac{d \log \left (a+b e^{h+575 x}+c e^{2 h+1150 x}\right )}{1150 a}\\ \end{align*}

Mathematica [A]  time = 0.167344, size = 94, normalized size = 0.99 \[ -\frac{\frac{2 (b d-2 a e) \tan ^{-1}\left (\frac{b+2 c e^{h+i x}}{\sqrt{4 a c-b^2}}\right )}{i \sqrt{4 a c-b^2}}+\frac{d \log \left (a+e^{h+i x} \left (b+c e^{h+i x}\right )\right )}{i}-2 d x}{2 a} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*E^(h + i*x))/(a + b*E^(h + i*x) + c*E^(2*h + 2*i*x)),x]

[Out]

-(-2*d*x + (2*(b*d - 2*a*e)*ArcTan[(b + 2*c*E^(h + i*x))/Sqrt[-b^2 + 4*a*c]])/(Sqrt[-b^2 + 4*a*c]*i) + (d*Log[
a + E^(h + i*x)*(b + c*E^(h + i*x))])/i)/(2*a)

________________________________________________________________________________________

Maple [B]  time = 0.003, size = 183, normalized size = 1.9 \begin{align*}{\frac{d\ln \left ({{\rm e}^{ix}} \right ) }{ai}}-{\frac{d\ln \left ( a+b{{\rm e}^{ix}}{{\rm e}^{h}}+c \left ({{\rm e}^{ix}} \right ) ^{2}{{\rm e}^{2\,h}} \right ) }{2\,ai}}-{\frac{d{{\rm e}^{h}}b}{ai}\arctan \left ({({{\rm e}^{h}}b+2\,{{\rm e}^{2\,h}}{{\rm e}^{ix}}c){\frac{1}{\sqrt{4\,ac{{\rm e}^{2\,h}}- \left ({{\rm e}^{h}} \right ) ^{2}{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac{{\rm e}^{2\,h}}- \left ({{\rm e}^{h}} \right ) ^{2}{b}^{2}}}}}+2\,{\frac{e{{\rm e}^{h}}}{i\sqrt{4\,ac{{\rm e}^{2\,h}}- \left ({{\rm e}^{h}} \right ) ^{2}{b}^{2}}}\arctan \left ({\frac{{{\rm e}^{h}}b+2\,{{\rm e}^{2\,h}}{{\rm e}^{ix}}c}{\sqrt{4\,ac{{\rm e}^{2\,h}}- \left ({{\rm e}^{h}} \right ) ^{2}{b}^{2}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x)

[Out]

d/i/a*ln(exp(i*x))-1/2*d/i/a*ln(a+b*exp(i*x)*exp(h)+c*exp(i*x)^2*exp(2*h))-d/i/a*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))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.4407, size = 686, normalized size = 7.22 \begin{align*} \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 ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x, algorithm="fricas")

[Out]

[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)]

________________________________________________________________________________________

Sympy [A]  time = 0.711209, size = 116, normalized size = 1.22 \begin{align*} \operatorname{RootSum}{\left (z^{2} \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} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.2916, size = 161, normalized size = 1.69 \begin{align*} \frac{1}{2} \,{\left (\frac{2 \,{\left (b d e^{\left (3 \, h\right )} - 2 \, a e^{\left (3 \, h + 1\right )}\right )} \arctan \left (\frac{{\left (2 \, c e^{\left (i x + 4 \, h\right )} + b e^{\left (3 \, h\right )}\right )} e^{\left (-3 \, h\right )}}{\sqrt{-b^{2} + 4 \, a c}}\right ) e^{\left (-3 \, h\right )}}{\sqrt{-b^{2} + 4 \, a c} a} - \frac{8 \, d h}{a} + \frac{d \log \left (c e^{\left (2 \, i x + 8 \, h\right )} + b e^{\left (i x + 7 \, h\right )} + a e^{\left (6 \, h\right )}\right )}{a}\right )} i \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*exp(i*x+h))/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x, algorithm="giac")

[Out]

1/2*(2*(b*d*e^(3*h) - 2*a*e^(3*h + 1))*arctan((2*c*e^(i*x + 4*h) + b*e^(3*h))*e^(-3*h)/sqrt(-b^2 + 4*a*c))*e^(
-3*h)/(sqrt(-b^2 + 4*a*c)*a) - 8*d*h/a + d*log(c*e^(2*i*x + 8*h) + b*e^(i*x + 7*h) + a*e^(6*h))/a)*i