3.527 \(\int \frac{d+e f^{g+h x}}{a+b f^{g+h x}+c f^{2 g+2 h x}} \, dx\)

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

[Out]

(d*x)/a + ((b*d - 2*a*e)*ArcTanh[(b + 2*c*f^(g + h*x))/Sqrt[b^2 - 4*a*c]])/(a*Sq
rt[b^2 - 4*a*c]*h*Log[f]) - (d*Log[a + b*f^(g + h*x) + c*f^(2*g + 2*h*x)])/(2*a*
h*Log[f])

_______________________________________________________________________________________

Rubi [A]  time = 0.284644, antiderivative size = 103, 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 \[ \frac{(b d-2 a e) \tanh ^{-1}\left (\frac{b+2 c f^{g+h x}}{\sqrt{b^2-4 a c}}\right )}{a h \log (f) \sqrt{b^2-4 a c}}-\frac{d \log \left (a+b f^{g+h x}+c f^{2 g+2 h x}\right )}{2 a h \log (f)}+\frac{d x}{a} \]

Antiderivative was successfully verified.

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

[Out]

(d*x)/a + ((b*d - 2*a*e)*ArcTanh[(b + 2*c*f^(g + h*x))/Sqrt[b^2 - 4*a*c]])/(a*Sq
rt[b^2 - 4*a*c]*h*Log[f]) - (d*Log[a + b*f^(g + h*x) + c*f^(2*g + 2*h*x)])/(2*a*
h*Log[f])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 57.1948, size = 148, normalized size = 1.44 \[ \frac{d f^{- g - h x} f^{g + h x} \log{\left (f^{g + h x} \right )}}{a h \log{\left (f \right )}} - \frac{d f^{- g - h x} f^{g + h x} \log{\left (a + b f^{g + h x} + c f^{2 g + 2 h x} \right )}}{2 a h \log{\left (f \right )}} - \frac{f^{- g - h x} f^{g + h x} \left (2 a e - b d\right ) \operatorname{atanh}{\left (\frac{b + 2 c f^{g + h x}}{\sqrt{- 4 a c + b^{2}}} \right )}}{a h \sqrt{- 4 a c + b^{2}} \log{\left (f \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((d+e*f**(h*x+g))/(a+b*f**(h*x+g)+c*f**(2*h*x+2*g)),x)

[Out]

d*f**(-g - h*x)*f**(g + h*x)*log(f**(g + h*x))/(a*h*log(f)) - d*f**(-g - h*x)*f*
*(g + h*x)*log(a + b*f**(g + h*x) + c*f**(2*g + 2*h*x))/(2*a*h*log(f)) - f**(-g
- h*x)*f**(g + h*x)*(2*a*e - b*d)*atanh((b + 2*c*f**(g + h*x))/sqrt(-4*a*c + b**
2))/(a*h*sqrt(-4*a*c + b**2)*log(f))

_______________________________________________________________________________________

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

Antiderivative was successfully verified.

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

[Out]

-(-2*d*x + (2*(b*d - 2*a*e)*ArcTan[(b + 2*c*f^(g + h*x))/Sqrt[-b^2 + 4*a*c]])/(S
qrt[-b^2 + 4*a*c]*h*Log[f]) + (d*Log[a + f^(g + h*x)*(b + c*f^(g + h*x))])/(h*Lo
g[f]))/(2*a)

_______________________________________________________________________________________

Maple [B]  time = 0.215, size = 993, normalized size = 9.6 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((d+e*f^(h*x+g))/(a+b*f^(h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ln(f^(h*x+g)-1/2*(-2*a*b*e+b^2*d+(-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*a*b^2*c*d^2+b^4*d^2)^(1/2))/c/(
2*a*e-b*d))*b^2*d-1/2/a/(4*a*c-b^2)/h/ln(f)*ln(f^(h*x+g)-1/2*(-2*a*b*e+b^2*d+(-1
6*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*a*b^2*c*d^2+b^4*d^2)^(1/2
))/c/(2*a*e-b*d))*(-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*a*b^
2*c*d^2+b^4*d^2)^(1/2)

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*f^(h*x + g) + d)/(c*f^(2*h*x + 2*g) + b*f^(h*x + g) + a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.420407, size = 1, normalized size = 0.01 \[ \left [\frac{2 \, \sqrt{b^{2} - 4 \, a c} d h x \log \left (f\right ) - \sqrt{b^{2} - 4 \, a c} d \log \left (c f^{2 \, h x + 2 \, g} + b f^{h x + g} + a\right ) -{\left (b d - 2 \, a e\right )} \log \left (\frac{2 \, \sqrt{b^{2} - 4 \, a c} c^{2} f^{2 \, h x + 2 \, g} - b^{3} + 4 \, a b c - 2 \,{\left (b^{2} c - 4 \, a c^{2} - \sqrt{b^{2} - 4 \, a c} b c\right )} f^{h x + g} +{\left (b^{2} - 2 \, a c\right )} \sqrt{b^{2} - 4 \, a c}}{c f^{2 \, h x + 2 \, g} + b f^{h x + g} + a}\right )}{2 \, \sqrt{b^{2} - 4 \, a c} a h \log \left (f\right )}, \frac{2 \, \sqrt{-b^{2} + 4 \, a c} d h x \log \left (f\right ) - \sqrt{-b^{2} + 4 \, a c} d \log \left (c f^{2 \, h x + 2 \, g} + b f^{h x + g} + a\right ) - 2 \,{\left (b d - 2 \, a e\right )} \arctan \left (-\frac{2 \, \sqrt{-b^{2} + 4 \, a c} c f^{h x + g} + \sqrt{-b^{2} + 4 \, a c} b}{b^{2} - 4 \, a c}\right )}{2 \, \sqrt{-b^{2} + 4 \, a c} a h \log \left (f\right )}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*f^(h*x + g) + d)/(c*f^(2*h*x + 2*g) + b*f^(h*x + g) + a),x, algorithm="fricas")

[Out]

[1/2*(2*sqrt(b^2 - 4*a*c)*d*h*x*log(f) - sqrt(b^2 - 4*a*c)*d*log(c*f^(2*h*x + 2*
g) + b*f^(h*x + g) + a) - (b*d - 2*a*e)*log((2*sqrt(b^2 - 4*a*c)*c^2*f^(2*h*x +
2*g) - b^3 + 4*a*b*c - 2*(b^2*c - 4*a*c^2 - sqrt(b^2 - 4*a*c)*b*c)*f^(h*x + g) +
 (b^2 - 2*a*c)*sqrt(b^2 - 4*a*c))/(c*f^(2*h*x + 2*g) + b*f^(h*x + g) + a)))/(sqr
t(b^2 - 4*a*c)*a*h*log(f)), 1/2*(2*sqrt(-b^2 + 4*a*c)*d*h*x*log(f) - sqrt(-b^2 +
 4*a*c)*d*log(c*f^(2*h*x + 2*g) + b*f^(h*x + g) + a) - 2*(b*d - 2*a*e)*arctan(-(
2*sqrt(-b^2 + 4*a*c)*c*f^(h*x + g) + sqrt(-b^2 + 4*a*c)*b)/(b^2 - 4*a*c)))/(sqrt
(-b^2 + 4*a*c)*a*h*log(f))]

_______________________________________________________________________________________

Sympy [A]  time = 1.30853, size = 148, normalized size = 1.44 \[ \operatorname{RootSum}{\left (z^{2} \left (4 a^{2} c h^{2} \log{\left (f \right )}^{2} - a b^{2} h^{2} \log{\left (f \right )}^{2}\right ) + z \left (4 a c d h \log{\left (f \right )} - b^{2} d h \log{\left (f \right )}\right ) + a e^{2} - b d e + c d^{2}, \left ( i \mapsto i \log{\left (e^{\frac{\left (2 g + 2 h x\right ) \log{\left (f \right )}}{2}} + \frac{4 i a^{2} c h \log{\left (f \right )} - i a b^{2} h \log{\left (f \right )} + a b e + 2 a c d - b^{2} d}{2 a c e - b c d} \right )} \right )\right )} + \frac{d x}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d+e*f**(h*x+g))/(a+b*f**(h*x+g)+c*f**(2*h*x+2*g)),x)

[Out]

RootSum(_z**2*(4*a**2*c*h**2*log(f)**2 - a*b**2*h**2*log(f)**2) + _z*(4*a*c*d*h*
log(f) - b**2*d*h*log(f)) + a*e**2 - b*d*e + c*d**2, Lambda(_i, _i*log(exp((2*g
+ 2*h*x)*log(f)/2) + (4*_i*a**2*c*h*log(f) - _i*a*b**2*h*log(f) + a*b*e + 2*a*c*
d - b**2*d)/(2*a*c*e - b*c*d)))) + d*x/a

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{e f^{h x + g} + d}{c f^{2 \, h x + 2 \, g} + b f^{h x + g} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*f^(h*x + g) + d)/(c*f^(2*h*x + 2*g) + b*f^(h*x + g) + a),x, algorithm="giac")

[Out]

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