3.6.74 \(\int \frac {(d+e e^{h+i x}) (f+g x)}{a+b e^{h+i x}+c e^{2 h+2 i x}} \, dx\) [574]

Optimal. Leaf size=428 \[ \frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x)^2}{2 \left (b+\sqrt {b^2-4 a c}\right ) g}+\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x)^2}{2 \left (b-\sqrt {b^2-4 a c}\right ) g}-\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x) \log \left (1+\frac {2 c e^{h+i x}}{b-\sqrt {b^2-4 a c}}\right )}{\left (b-\sqrt {b^2-4 a c}\right ) i}-\frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x) \log \left (1+\frac {2 c e^{h+i x}}{b+\sqrt {b^2-4 a c}}\right )}{\left (b+\sqrt {b^2-4 a c}\right ) i}-\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) g \text {Li}_2\left (-\frac {2 c e^{h+i x}}{b-\sqrt {b^2-4 a c}}\right )}{\left (b-\sqrt {b^2-4 a c}\right ) i^2}-\frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) g \text {Li}_2\left (-\frac {2 c e^{h+i x}}{b+\sqrt {b^2-4 a c}}\right )}{\left (b+\sqrt {b^2-4 a c}\right ) i^2} \]

[Out]

1/2*(g*x+f)^2*(e+(-b*e+2*c*d)/(-4*a*c+b^2)^(1/2))/g/(b-(-4*a*c+b^2)^(1/2))-(g*x+f)*ln(1+2*c*exp(i*x+h)/(b-(-4*
a*c+b^2)^(1/2)))*(e+(-b*e+2*c*d)/(-4*a*c+b^2)^(1/2))/i/(b-(-4*a*c+b^2)^(1/2))-g*polylog(2,-2*c*exp(i*x+h)/(b-(
-4*a*c+b^2)^(1/2)))*(e+(-b*e+2*c*d)/(-4*a*c+b^2)^(1/2))/i^2/(b-(-4*a*c+b^2)^(1/2))+1/2*(g*x+f)^2*(e+(b*e-2*c*d
)/(-4*a*c+b^2)^(1/2))/g/(b+(-4*a*c+b^2)^(1/2))-(g*x+f)*ln(1+2*c*exp(i*x+h)/(b+(-4*a*c+b^2)^(1/2)))*(e+(b*e-2*c
*d)/(-4*a*c+b^2)^(1/2))/i/(b+(-4*a*c+b^2)^(1/2))-g*polylog(2,-2*c*exp(i*x+h)/(b+(-4*a*c+b^2)^(1/2)))*(e+(b*e-2
*c*d)/(-4*a*c+b^2)^(1/2))/i^2/(b+(-4*a*c+b^2)^(1/2))

________________________________________________________________________________________

Rubi [A]
time = 0.38, antiderivative size = 428, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.119, Rules used = {2297, 2215, 2221, 2317, 2438} \begin {gather*} -\frac {g \left (\frac {2 c d-b e}{\sqrt {b^2-4 a c}}+e\right ) \text {PolyLog}\left (2,-\frac {2 c e^{h+i x}}{b-\sqrt {b^2-4 a c}}\right )}{i^2 \left (b-\sqrt {b^2-4 a c}\right )}-\frac {g \left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) \text {PolyLog}\left (2,-\frac {2 c e^{h+i x}}{\sqrt {b^2-4 a c}+b}\right )}{i^2 \left (\sqrt {b^2-4 a c}+b\right )}-\frac {(f+g x) \left (\frac {2 c d-b e}{\sqrt {b^2-4 a c}}+e\right ) \log \left (\frac {2 c e^{h+i x}}{b-\sqrt {b^2-4 a c}}+1\right )}{i \left (b-\sqrt {b^2-4 a c}\right )}-\frac {(f+g x) \left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) \log \left (\frac {2 c e^{h+i x}}{\sqrt {b^2-4 a c}+b}+1\right )}{i \left (\sqrt {b^2-4 a c}+b\right )}+\frac {(f+g x)^2 \left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right )}{2 g \left (\sqrt {b^2-4 a c}+b\right )}+\frac {(f+g x)^2 \left (\frac {2 c d-b e}{\sqrt {b^2-4 a c}}+e\right )}{2 g \left (b-\sqrt {b^2-4 a c}\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

((e - (2*c*d - b*e)/Sqrt[b^2 - 4*a*c])*(f + g*x)^2)/(2*(b + Sqrt[b^2 - 4*a*c])*g) + ((e + (2*c*d - b*e)/Sqrt[b
^2 - 4*a*c])*(f + g*x)^2)/(2*(b - Sqrt[b^2 - 4*a*c])*g) - ((e + (2*c*d - b*e)/Sqrt[b^2 - 4*a*c])*(f + g*x)*Log
[1 + (2*c*E^(h + i*x))/(b - Sqrt[b^2 - 4*a*c])])/((b - Sqrt[b^2 - 4*a*c])*i) - ((e - (2*c*d - b*e)/Sqrt[b^2 -
4*a*c])*(f + g*x)*Log[1 + (2*c*E^(h + i*x))/(b + Sqrt[b^2 - 4*a*c])])/((b + Sqrt[b^2 - 4*a*c])*i) - ((e + (2*c
*d - b*e)/Sqrt[b^2 - 4*a*c])*g*PolyLog[2, (-2*c*E^(h + i*x))/(b - Sqrt[b^2 - 4*a*c])])/((b - Sqrt[b^2 - 4*a*c]
)*i^2) - ((e - (2*c*d - b*e)/Sqrt[b^2 - 4*a*c])*g*PolyLog[2, (-2*c*E^(h + i*x))/(b + Sqrt[b^2 - 4*a*c])])/((b
+ Sqrt[b^2 - 4*a*c])*i^2)

Rule 2215

Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[(c
+ d*x)^(m + 1)/(a*d*(m + 1)), x] - Dist[b/a, Int[(c + d*x)^m*((F^(g*(e + f*x)))^n/(a + b*(F^(g*(e + f*x)))^n))
, x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2221

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
 - Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2297

Int[(((i_.)*(F_)^(u_) + (h_))*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.)*(F_)^(v_)), x_Symbo
l] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[Simplify[(2*c*h - b*i)/q] + i, Int[(f + g*x)^m/(b - q + 2*c*F^u), x]
, x] - Dist[Simplify[(2*c*h - b*i)/q] - i, Int[(f + g*x)^m/(b + q + 2*c*F^u), x], x]] /; FreeQ[{F, a, b, c, f,
 g, h, i}, x] && EqQ[v, 2*u] && LinearQ[u, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[m, 0]

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin {align*} \int \frac {\left (d+e e^{h+574 x}\right ) (f+g x)}{a+b e^{h+574 x}+c e^{2 h+1148 x}} \, dx &=-\left (\left (-e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) \int \frac {f+g x}{b+\sqrt {b^2-4 a c}+2 c e^{h+574 x}} \, dx\right )+\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) \int \frac {f+g x}{b-\sqrt {b^2-4 a c}+2 c e^{h+574 x}} \, dx\\ &=\frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x)^2}{2 \left (b+\sqrt {b^2-4 a c}\right ) g}+\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x)^2}{2 \left (b-\sqrt {b^2-4 a c}\right ) g}-\frac {\left (2 c \left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {e^{h+574 x} (f+g x)}{b+\sqrt {b^2-4 a c}+2 c e^{h+574 x}} \, dx}{b+\sqrt {b^2-4 a c}}-\frac {\left (2 c \left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {e^{h+574 x} (f+g x)}{b-\sqrt {b^2-4 a c}+2 c e^{h+574 x}} \, dx}{b-\sqrt {b^2-4 a c}}\\ &=\frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x)^2}{2 \left (b+\sqrt {b^2-4 a c}\right ) g}+\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x)^2}{2 \left (b-\sqrt {b^2-4 a c}\right ) g}-\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x) \log \left (1+\frac {2 c e^{h+574 x}}{b-\sqrt {b^2-4 a c}}\right )}{574 \left (b-\sqrt {b^2-4 a c}\right )}-\frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x) \log \left (1+\frac {2 c e^{h+574 x}}{b+\sqrt {b^2-4 a c}}\right )}{574 \left (b+\sqrt {b^2-4 a c}\right )}+\frac {\left (\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) g\right ) \int \log \left (1+\frac {2 c e^{h+574 x}}{b+\sqrt {b^2-4 a c}}\right ) \, dx}{574 \left (b+\sqrt {b^2-4 a c}\right )}+\frac {\left (\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) g\right ) \int \log \left (1+\frac {2 c e^{h+574 x}}{b-\sqrt {b^2-4 a c}}\right ) \, dx}{574 \left (b-\sqrt {b^2-4 a c}\right )}\\ &=\frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x)^2}{2 \left (b+\sqrt {b^2-4 a c}\right ) g}+\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x)^2}{2 \left (b-\sqrt {b^2-4 a c}\right ) g}-\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x) \log \left (1+\frac {2 c e^{h+574 x}}{b-\sqrt {b^2-4 a c}}\right )}{574 \left (b-\sqrt {b^2-4 a c}\right )}-\frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x) \log \left (1+\frac {2 c e^{h+574 x}}{b+\sqrt {b^2-4 a c}}\right )}{574 \left (b+\sqrt {b^2-4 a c}\right )}+\frac {\left (\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) g\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{x} \, dx,x,e^{h+574 x}\right )}{329476 \left (b+\sqrt {b^2-4 a c}\right )}+\frac {\left (\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) g\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{x} \, dx,x,e^{h+574 x}\right )}{329476 \left (b-\sqrt {b^2-4 a c}\right )}\\ &=\frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x)^2}{2 \left (b+\sqrt {b^2-4 a c}\right ) g}+\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x)^2}{2 \left (b-\sqrt {b^2-4 a c}\right ) g}-\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x) \log \left (1+\frac {2 c e^{h+574 x}}{b-\sqrt {b^2-4 a c}}\right )}{574 \left (b-\sqrt {b^2-4 a c}\right )}-\frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) (f+g x) \log \left (1+\frac {2 c e^{h+574 x}}{b+\sqrt {b^2-4 a c}}\right )}{574 \left (b+\sqrt {b^2-4 a c}\right )}-\frac {\left (e+\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) g \text {Li}_2\left (-\frac {2 c e^{h+574 x}}{b-\sqrt {b^2-4 a c}}\right )}{329476 \left (b-\sqrt {b^2-4 a c}\right )}-\frac {\left (e-\frac {2 c d-b e}{\sqrt {b^2-4 a c}}\right ) g \text {Li}_2\left (-\frac {2 c e^{h+574 x}}{b+\sqrt {b^2-4 a c}}\right )}{329476 \left (b+\sqrt {b^2-4 a c}\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.39, size = 644, normalized size = 1.50 \begin {gather*} -\frac {i \left (-\sqrt {-\left (b^2-4 a c\right )^2} d g i x^2+2 \sqrt {b^2-4 a c} (b d-2 a e) f \tan ^{-1}\left (\frac {b+2 c e^{h+i x}}{\sqrt {-b^2+4 a c}}\right )-2 \sqrt {-\left (b^2-4 a c\right )^2} d f \log \left (e^{h+i x}\right )+\sqrt {-\left (b^2-4 a c\right )^2} d g x \log \left (1+\frac {2 c e^{h+i x}}{b-\sqrt {b^2-4 a c}}\right )+b \sqrt {-b^2+4 a c} d g x \log \left (1+\frac {2 c e^{h+i x}}{b-\sqrt {b^2-4 a c}}\right )-2 a \sqrt {-b^2+4 a c} e g x \log \left (1+\frac {2 c e^{h+i x}}{b-\sqrt {b^2-4 a c}}\right )+\sqrt {-\left (b^2-4 a c\right )^2} d g x \log \left (1+\frac {2 c e^{h+i x}}{b+\sqrt {b^2-4 a c}}\right )-b \sqrt {-b^2+4 a c} d g x \log \left (1+\frac {2 c e^{h+i x}}{b+\sqrt {b^2-4 a c}}\right )+2 a \sqrt {-b^2+4 a c} e g x \log \left (1+\frac {2 c e^{h+i x}}{b+\sqrt {b^2-4 a c}}\right )+\sqrt {-\left (b^2-4 a c\right )^2} d f \log \left (a+e^{h+i x} \left (b+c e^{h+i x}\right )\right )\right )+\left (\sqrt {-\left (b^2-4 a c\right )^2} d+b \sqrt {-b^2+4 a c} d-2 a \sqrt {-b^2+4 a c} e\right ) g \text {Li}_2\left (\frac {2 c e^{h+i x}}{-b+\sqrt {b^2-4 a c}}\right )+\left (\sqrt {-\left (b^2-4 a c\right )^2} d-b \sqrt {-b^2+4 a c} d+2 a \sqrt {-b^2+4 a c} e\right ) g \text {Li}_2\left (-\frac {2 c e^{h+i x}}{b+\sqrt {b^2-4 a c}}\right )}{2 a \sqrt {-\left (b^2-4 a c\right )^2} i^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1260\) vs. \(2(382)=764\).
time = 0.05, size = 1261, normalized size = 2.95

method result size
default \(\text {Expression too large to display}\) \(1261\)
risch \(\frac {d g h x}{i a}-\frac {d g \ln \left (\frac {2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) x}{2 i a}-\frac {d g \ln \left (\frac {2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) h}{2 i^{2} a}+\frac {e g \ln \left (\frac {-2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) x}{i \sqrt {-4 c a +b^{2}}}+\frac {e g \ln \left (\frac {-2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) h}{i^{2} \sqrt {-4 c a +b^{2}}}-\frac {e g \ln \left (\frac {2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) x}{i \sqrt {-4 c a +b^{2}}}-\frac {e g \ln \left (\frac {2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) h}{i^{2} \sqrt {-4 c a +b^{2}}}-\frac {d g \ln \left (\frac {-2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) x}{2 i a}-\frac {d g \ln \left (\frac {-2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) h}{2 i^{2} a}+\frac {d g h \ln \left (a +b \,{\mathrm e}^{i x +h}+c \,{\mathrm e}^{2 i x +2 h}\right )}{2 i^{2} a}-\frac {d g h \ln \left ({\mathrm e}^{i x +h}\right )}{i^{2} a}-\frac {2 e g h \arctan \left (\frac {b +2 c \,{\mathrm e}^{i x +h}}{\sqrt {4 c a -b^{2}}}\right )}{i^{2} \sqrt {4 c a -b^{2}}}+\frac {d g \,h^{2}}{2 i^{2} a}-\frac {d f \ln \left (a +b \,{\mathrm e}^{i x +h}+c \,{\mathrm e}^{2 i x +2 h}\right )}{2 i a}+\frac {d f \ln \left ({\mathrm e}^{i x +h}\right )}{i a}+\frac {2 e f \arctan \left (\frac {b +2 c \,{\mathrm e}^{i x +h}}{\sqrt {4 c a -b^{2}}}\right )}{i \sqrt {4 c a -b^{2}}}-\frac {d g \dilog \left (\frac {-2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 i^{2} a \sqrt {-4 c a +b^{2}}}+\frac {d g \dilog \left (\frac {2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 i^{2} a \sqrt {-4 c a +b^{2}}}-\frac {d f b \arctan \left (\frac {b +2 c \,{\mathrm e}^{i x +h}}{\sqrt {4 c a -b^{2}}}\right )}{i a \sqrt {4 c a -b^{2}}}+\frac {d g \ln \left (\frac {2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) b h}{2 i^{2} a \sqrt {-4 c a +b^{2}}}+\frac {d g h b \arctan \left (\frac {b +2 c \,{\mathrm e}^{i x +h}}{\sqrt {4 c a -b^{2}}}\right )}{i^{2} a \sqrt {4 c a -b^{2}}}-\frac {d g \ln \left (\frac {-2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b x}{2 i a \sqrt {-4 c a +b^{2}}}-\frac {d g \ln \left (\frac {-2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b h}{2 i^{2} a \sqrt {-4 c a +b^{2}}}+\frac {d g \ln \left (\frac {2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right ) b x}{2 i a \sqrt {-4 c a +b^{2}}}+\frac {d g \,x^{2}}{2 a}-\frac {d g \dilog \left (\frac {-2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right )}{2 i^{2} a}-\frac {d g \dilog \left (\frac {2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right )}{2 i^{2} a}+\frac {e g \dilog \left (\frac {-2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right )}{i^{2} \sqrt {-4 c a +b^{2}}}-\frac {e g \dilog \left (\frac {2 c \,{\mathrm e}^{i x +h}+\sqrt {-4 c a +b^{2}}+b}{b +\sqrt {-4 c a +b^{2}}}\right )}{i^{2} \sqrt {-4 c a +b^{2}}}\) \(1319\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*exp(i*x+h))*(g*x+f)/(a+b*exp(i*x+h)+c*exp(2*i*x+2*h)),x,method=_RETURNVERBOSE)

[Out]

-1/2*d*f/i/a*ln(a+b*exp(i*x)*exp(h)+c*exp(i*x)^2*exp(2*h))-d*f/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))+d*f/i/a*ln(exp(i*x))-1/2*d*g/i/
a*x/(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)*exp(h)*ln((2*exp(2*h)*exp(i*x)*c+exp(h)*b-(exp(h)^2*b^2-4*a*c*exp(2*h)
)^(1/2))/(exp(h)*b-(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)))*b+1/2*d*g/i/a*x/(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)*e
xp(h)*ln((2*exp(2*h)*exp(i*x)*c+exp(h)*b+(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2))/(exp(h)*b+(exp(h)^2*b^2-4*a*c*ex
p(2*h))^(1/2)))*b-1/2*d*g/i/a*x*ln((2*exp(2*h)*exp(i*x)*c+exp(h)*b-(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2))/(exp(h
)*b-(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)))-1/2*d*g/i/a*x*ln((2*exp(2*h)*exp(i*x)*c+exp(h)*b+(exp(h)^2*b^2-4*a*c
*exp(2*h))^(1/2))/(exp(h)*b+(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)))+1/2*d*g/i^2/a/(exp(h)^2*b^2-4*a*c*exp(2*h))^
(1/2)*exp(h)*dilog((2*exp(2*h)*exp(i*x)*c+exp(h)*b+(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2))/(exp(h)*b+(exp(h)^2*b^
2-4*a*c*exp(2*h))^(1/2)))*b-1/2*d*g/i^2/a/(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)*exp(h)*dilog((2*exp(2*h)*exp(i*x
)*c+exp(h)*b-(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2))/(exp(h)*b-(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)))*b-1/2*d*g/i^
2/a*dilog((2*exp(2*h)*exp(i*x)*c+exp(h)*b+(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2))/(exp(h)*b+(exp(h)^2*b^2-4*a*c*e
xp(2*h))^(1/2)))-1/2*d*g/i^2/a*dilog((2*exp(2*h)*exp(i*x)*c+exp(h)*b-(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2))/(exp
(h)*b-(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)))+1/2*d*g*x^2/a+2*e*exp(h)*f/i/(4*a*c*exp(2*h)-exp(h)^2*b^2)^(1/2)*a
rctan((exp(h)*b+2*exp(2*h)*exp(i*x)*c)/(4*a*c*exp(2*h)-exp(h)^2*b^2)^(1/2))+e*exp(h)*g/i*x/(exp(h)^2*b^2-4*a*c
*exp(2*h))^(1/2)*ln((2*exp(2*h)*exp(i*x)*c+exp(h)*b-(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2))/(exp(h)*b-(exp(h)^2*b
^2-4*a*c*exp(2*h))^(1/2)))-e*exp(h)*g/i*x/(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)*ln((2*exp(2*h)*exp(i*x)*c+exp(h)
*b+(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2))/(exp(h)*b+(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)))+e*exp(h)*g/i^2/(exp(h)
^2*b^2-4*a*c*exp(2*h))^(1/2)*dilog((2*exp(2*h)*exp(i*x)*c+exp(h)*b-(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2))/(exp(h
)*b-(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)))-e*exp(h)*g/i^2/(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)*dilog((2*exp(2*h)
*exp(i*x)*c+exp(h)*b+(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2))/(exp(h)*b+(exp(h)^2*b^2-4*a*c*exp(2*h))^(1/2)))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more deta

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 885 vs. \(2 (388) = 776\).
time = 0.39, size = 885, normalized size = 2.07 \begin {gather*} \frac {{\left (b^{2} - 4 \, a c\right )} d g h^{2} + {\left (b^{2} - 4 \, a c\right )} d g x^{2} + 2 \, {\left (b^{2} - 4 \, a c\right )} d f x + 2 \, {\left (-i \, b^{2} + 4 i \, a c\right )} d f + {\left (b^{2} - 4 \, a c\right )} d g + 2 \, {\left ({\left (-i \, b^{2} + 4 i \, a c\right )} d f + {\left (b^{2} - 4 \, a c\right )} d g\right )} h + {\left ({\left (b^{2} - 4 \, a c\right )} d g + {\left (a b d g e - 2 \, a^{2} g e^{2}\right )} \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e^{\left (-1\right )}\right )} {\rm Li}_2\left (-\frac {{\left (a \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e^{\left (h + i \, x + 1\right )} + 2 \, a e + b e^{\left (h + i \, x + 1\right )}\right )} e^{\left (-1\right )}}{2 \, a} + 1\right ) + {\left ({\left (b^{2} - 4 \, a c\right )} d g - {\left (a b d g e - 2 \, a^{2} g e^{2}\right )} \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e^{\left (-1\right )}\right )} {\rm Li}_2\left (\frac {{\left (a \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e^{\left (h + i \, x + 1\right )} - 2 \, a e - b e^{\left (h + i \, x + 1\right )}\right )} e^{\left (-1\right )}}{2 \, a} + 1\right ) + {\left ({\left (b^{2} - 4 \, a c\right )} d g h - {\left (-i \, b^{2} + 4 i \, a c\right )} d g x + {\left (b^{2} - 4 \, a c\right )} d g - {\left (2 \, {\left (a^{2} g h + i \, a^{2} g x + a^{2} g\right )} e^{2} - {\left (a b d g h + i \, a b d g x + a b d g\right )} e\right )} \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e^{\left (-1\right )}\right )} \log \left (\frac {{\left (a \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e^{\left (h + i \, x + 1\right )} + 2 \, a e + b e^{\left (h + i \, x + 1\right )}\right )} e^{\left (-1\right )}}{2 \, a}\right ) + {\left ({\left (b^{2} - 4 \, a c\right )} d g h - {\left (-i \, b^{2} + 4 i \, a c\right )} d g x + {\left (b^{2} - 4 \, a c\right )} d g + {\left (2 \, {\left (a^{2} g h + i \, a^{2} g x + a^{2} g\right )} e^{2} - {\left (a b d g h + i \, a b d g x + a b d g\right )} e\right )} \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e^{\left (-1\right )}\right )} \log \left (-\frac {{\left (a \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e^{\left (h + i \, x + 1\right )} - 2 \, a e - b e^{\left (h + i \, x + 1\right )}\right )} e^{\left (-1\right )}}{2 \, a}\right ) - {\left ({\left (b^{2} - 4 \, a c\right )} d g h + {\left (-i \, b^{2} + 4 i \, a c\right )} d f + {\left (b^{2} - 4 \, a c\right )} d g + {\left (2 \, {\left (a^{2} g h - i \, a^{2} f + a^{2} g\right )} e^{2} - {\left (a b d g h - i \, a b d f + a b d g\right )} e\right )} \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e^{\left (-1\right )}\right )} \log \left (\frac {a \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e + b e + 2 \, c e^{\left (h + i \, x + 1\right )}}{2 \, c}\right ) - {\left ({\left (b^{2} - 4 \, a c\right )} d g h + {\left (-i \, b^{2} + 4 i \, a c\right )} d f + {\left (b^{2} - 4 \, a c\right )} d g - {\left (2 \, {\left (a^{2} g h - i \, a^{2} f + a^{2} g\right )} e^{2} - {\left (a b d g h - i \, a b d f + a b d g\right )} e\right )} \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e^{\left (-1\right )}\right )} \log \left (-\frac {a \sqrt {\frac {b^{2} - 4 \, a c}{a^{2}}} e - b e - 2 \, c e^{\left (h + i \, x + 1\right )}}{2 \, c}\right )}{2 \, {\left (a b^{2} - 4 \, a^{2} c\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*((b^2 - 4*a*c)*d*g*h^2 + (b^2 - 4*a*c)*d*g*x^2 + 2*(b^2 - 4*a*c)*d*f*x + 2*(-I*b^2 + 4*I*a*c)*d*f + (b^2 -
 4*a*c)*d*g + 2*((-I*b^2 + 4*I*a*c)*d*f + (b^2 - 4*a*c)*d*g)*h + ((b^2 - 4*a*c)*d*g + (a*b*d*g*e - 2*a^2*g*e^2
)*sqrt((b^2 - 4*a*c)/a^2)*e^(-1))*dilog(-1/2*(a*sqrt((b^2 - 4*a*c)/a^2)*e^(h + I*x + 1) + 2*a*e + b*e^(h + I*x
 + 1))*e^(-1)/a + 1) + ((b^2 - 4*a*c)*d*g - (a*b*d*g*e - 2*a^2*g*e^2)*sqrt((b^2 - 4*a*c)/a^2)*e^(-1))*dilog(1/
2*(a*sqrt((b^2 - 4*a*c)/a^2)*e^(h + I*x + 1) - 2*a*e - b*e^(h + I*x + 1))*e^(-1)/a + 1) + ((b^2 - 4*a*c)*d*g*h
 - (-I*b^2 + 4*I*a*c)*d*g*x + (b^2 - 4*a*c)*d*g - (2*(a^2*g*h + I*a^2*g*x + a^2*g)*e^2 - (a*b*d*g*h + I*a*b*d*
g*x + a*b*d*g)*e)*sqrt((b^2 - 4*a*c)/a^2)*e^(-1))*log(1/2*(a*sqrt((b^2 - 4*a*c)/a^2)*e^(h + I*x + 1) + 2*a*e +
 b*e^(h + I*x + 1))*e^(-1)/a) + ((b^2 - 4*a*c)*d*g*h - (-I*b^2 + 4*I*a*c)*d*g*x + (b^2 - 4*a*c)*d*g + (2*(a^2*
g*h + I*a^2*g*x + a^2*g)*e^2 - (a*b*d*g*h + I*a*b*d*g*x + a*b*d*g)*e)*sqrt((b^2 - 4*a*c)/a^2)*e^(-1))*log(-1/2
*(a*sqrt((b^2 - 4*a*c)/a^2)*e^(h + I*x + 1) - 2*a*e - b*e^(h + I*x + 1))*e^(-1)/a) - ((b^2 - 4*a*c)*d*g*h + (-
I*b^2 + 4*I*a*c)*d*f + (b^2 - 4*a*c)*d*g + (2*(a^2*g*h - I*a^2*f + a^2*g)*e^2 - (a*b*d*g*h - I*a*b*d*f + a*b*d
*g)*e)*sqrt((b^2 - 4*a*c)/a^2)*e^(-1))*log(1/2*(a*sqrt((b^2 - 4*a*c)/a^2)*e + b*e + 2*c*e^(h + I*x + 1))/c) -
((b^2 - 4*a*c)*d*g*h + (-I*b^2 + 4*I*a*c)*d*f + (b^2 - 4*a*c)*d*g - (2*(a^2*g*h - I*a^2*f + a^2*g)*e^2 - (a*b*
d*g*h - I*a*b*d*f + a*b*d*g)*e)*sqrt((b^2 - 4*a*c)/a^2)*e^(-1))*log(-1/2*(a*sqrt((b^2 - 4*a*c)/a^2)*e - b*e -
2*c*e^(h + I*x + 1))/c))/(a*b^2 - 4*a^2*c)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d + e e^{h} e^{i x}\right ) \left (f + g x\right )}{a + b e^{h} e^{i x} + c e^{2 h} e^{2 i x}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((g*x + f)*(d + e^(h + I*x + 1))/(c*e^(2*h + 2*I*x) + b*e^(h + I*x) + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (f+g\,x\right )\,\left (d+e\,{\mathrm {e}}^{h+i\,x}\right )}{a+b\,{\mathrm {e}}^{h+i\,x}+c\,{\mathrm {e}}^{2\,h+2\,i\,x}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________