Integrand size = 37, antiderivative size = 103 \[ \int \frac {d+e f^{g+h x}}{a+b f^{g+h x}+c f^{2 g+2 h x}} \, dx=\frac {d x}{a}+\frac {(b d-2 a e) \text {arctanh}\left (\frac {b+2 c f^{g+h x}}{\sqrt {b^2-4 a c}}\right )}{a \sqrt {b^2-4 a c} h \log (f)}-\frac {d \log \left (a+b f^{g+h x}+c f^{2 g+2 h x}\right )}{2 a h \log (f)} \] Output:
d*x/a+(-2*a*e+b*d)*arctanh((b+2*c*f^(h*x+g))/(-4*a*c+b^2)^(1/2))/a/(-4*a*c +b^2)^(1/2)/h/ln(f)-1/2*d*ln(a+b*f^(h*x+g)+c*f^(2*h*x+2*g))/a/h/ln(f)
Time = 0.34 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.15 \[ \int \frac {d+e f^{g+h x}}{a+b f^{g+h x}+c f^{2 g+2 h x}} \, dx=\frac {(-2 b d+4 a e) \arctan \left (\frac {b+2 c f^{g+h x}}{\sqrt {-b^2+4 a c}}\right )+\sqrt {-b^2+4 a c} d \left (2 \log \left (f^{g+h x}\right )-\log \left (a+f^{g+h x} \left (b+c f^{g+h x}\right )\right )\right )}{2 a \sqrt {-b^2+4 a c} h \log (f)} \] Input:
Integrate[(d + e*f^(g + h*x))/(a + b*f^(g + h*x) + c*f^(2*g + 2*h*x)),x]
Output:
((-2*b*d + 4*a*e)*ArcTan[(b + 2*c*f^(g + h*x))/Sqrt[-b^2 + 4*a*c]] + Sqrt[ -b^2 + 4*a*c]*d*(2*Log[f^(g + h*x)] - Log[a + f^(g + h*x)*(b + c*f^(g + h* x))]))/(2*a*Sqrt[-b^2 + 4*a*c]*h*Log[f])
Time = 0.53 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.01, 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 f^{g+h x}}{a+b f^{g+h x}+c f^{2 g+2 h x}} \, dx\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \frac {\int \frac {f^{-g-h x} \left (e f^{g+h x}+d\right )}{b f^{g+h x}+c f^{2 g+2 h x}+a}df^{g+h x}}{h \log (f)}\) |
\(\Big \downarrow \) 1200 |
\(\displaystyle \frac {\int \left (\frac {d f^{-g-h x}}{a}+\frac {-c d f^{g+h x}-b d+a e}{a \left (b f^{g+h x}+c f^{2 g+2 h x}+a\right )}\right )df^{g+h x}}{h \log (f)}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {(b d-2 a e) \text {arctanh}\left (\frac {b+2 c f^{g+h x}}{\sqrt {b^2-4 a c}}\right )}{a \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}+\frac {d \log \left (f^{g+h x}\right )}{a}}{h \log (f)}\) |
Input:
Int[(d + e*f^(g + h*x))/(a + b*f^(g + h*x) + c*f^(2*g + 2*h*x)),x]
Output:
(((b*d - 2*a*e)*ArcTanh[(b + 2*c*f^(g + h*x))/Sqrt[b^2 - 4*a*c]])/(a*Sqrt[ b^2 - 4*a*c]) + (d*Log[f^(g + h*x)])/a - (d*Log[a + b*f^(g + h*x) + c*f^(2 *g + 2*h*x)])/(2*a))/(h*Log[f])
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. \(992\) vs. \(2(97)=194\).
Time = 0.18 (sec) , antiderivative size = 993, normalized size of antiderivative = 9.64
method | result | size |
risch | \(\frac {4 \ln \left (f \right )^{2} a c d \,h^{2} x}{4 \ln \left (f \right )^{2} a^{2} c \,h^{2}-\ln \left (f \right )^{2} a \,b^{2} h^{2}}-\frac {\ln \left (f \right )^{2} b^{2} d \,h^{2} x}{4 \ln \left (f \right )^{2} a^{2} c \,h^{2}-\ln \left (f \right )^{2} a \,b^{2} h^{2}}+\frac {4 \ln \left (f \right )^{2} a c d g h}{4 \ln \left (f \right )^{2} a^{2} c \,h^{2}-\ln \left (f \right )^{2} a \,b^{2} h^{2}}-\frac {\ln \left (f \right )^{2} b^{2} d g h}{4 \ln \left (f \right )^{2} a^{2} c \,h^{2}-\ln \left (f \right )^{2} a \,b^{2} h^{2}}-\frac {2 \ln \left (f^{h x +g}+\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 ) h \ln \left (f \right )}+\frac {\ln \left (f^{h x +g}+\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 ) h \ln \left (f \right )}+\frac {\ln \left (f^{h x +g}+\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 ) h \ln \left (f \right )}-\frac {2 \ln \left (f^{h x +g}-\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 ) h \ln \left (f \right )}+\frac {\ln \left (f^{h x +g}-\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 ) h \ln \left (f \right )}-\frac {\ln \left (f^{h x +g}-\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 ) h \ln \left (f \right )}\) | \(993\) |
Input:
int((d+e*f^(h*x+g))/(a+b*f^(h*x+g)+c*f^(2*h*x+2*g)),x,method=_RETURNVERBOS E)
Output:
4/(4*ln(f)^2*a^2*c*h^2-ln(f)^2*a*b^2*h^2)*ln(f)^2*a*c*d*h^2*x-1/(4*ln(f)^2 *a^2*c*h^2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(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+(-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))*(-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)
Time = 0.10 (sec) , antiderivative size = 330, normalized size of antiderivative = 3.20 \[ \int \frac {d+e f^{g+h x}}{a+b f^{g+h x}+c f^{2 g+2 h x}} \, dx=\left [\frac {2 \, {\left (b^{2} - 4 \, a c\right )} d h x \log \left (f\right ) - {\left (b^{2} - 4 \, a c\right )} d \log \left (c f^{2 \, h x + 2 \, g} + b f^{h x + g} + a\right ) - \sqrt {b^{2} - 4 \, a c} {\left (b d - 2 \, a e\right )} \log \left (\frac {2 \, c^{2} f^{2 \, h x + 2 \, g} + b^{2} - 2 \, a c + 2 \, {\left (b c - \sqrt {b^{2} - 4 \, a c} c\right )} f^{h x + g} - \sqrt {b^{2} - 4 \, a c} b}{c f^{2 \, h x + 2 \, g} + b f^{h x + g} + a}\right )}{2 \, {\left (a b^{2} - 4 \, a^{2} c\right )} h \log \left (f\right )}, \frac {2 \, {\left (b^{2} - 4 \, a c\right )} d h x \log \left (f\right ) - {\left (b^{2} - 4 \, a c\right )} d \log \left (c f^{2 \, h x + 2 \, g} + b f^{h x + g} + a\right ) + 2 \, \sqrt {-b^{2} + 4 \, a c} {\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 \, {\left (a b^{2} - 4 \, a^{2} c\right )} h \log \left (f\right )}\right ] \] Input:
integrate((d+e*f^(h*x+g))/(a+b*f^(h*x+g)+c*f^(2*h*x+2*g)),x, algorithm="fr icas")
Output:
[1/2*(2*(b^2 - 4*a*c)*d*h*x*log(f) - (b^2 - 4*a*c)*d*log(c*f^(2*h*x + 2*g) + b*f^(h*x + g) + a) - sqrt(b^2 - 4*a*c)*(b*d - 2*a*e)*log((2*c^2*f^(2*h* x + 2*g) + b^2 - 2*a*c + 2*(b*c - sqrt(b^2 - 4*a*c)*c)*f^(h*x + g) - sqrt( b^2 - 4*a*c)*b)/(c*f^(2*h*x + 2*g) + b*f^(h*x + g) + a)))/((a*b^2 - 4*a^2* c)*h*log(f)), 1/2*(2*(b^2 - 4*a*c)*d*h*x*log(f) - (b^2 - 4*a*c)*d*log(c*f^ (2*h*x + 2*g) + b*f^(h*x + g) + a) + 2*sqrt(-b^2 + 4*a*c)*(b*d - 2*a*e)*ar ctan(-(2*sqrt(-b^2 + 4*a*c)*c*f^(h*x + g) + sqrt(-b^2 + 4*a*c)*b)/(b^2 - 4 *a*c)))/((a*b^2 - 4*a^2*c)*h*log(f))]
Time = 0.62 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.35 \[ \int \frac {d+e f^{g+h x}}{a+b f^{g+h x}+c f^{2 g+2 h x}} \, dx=\operatorname {RootSum} {\left (z^{2} \cdot \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 (f^{g + h x} + \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} \] Input:
integrate((d+e*f**(h*x+g))/(a+b*f**(h*x+g)+c*f**(2*h*x+2*g)),x)
Output:
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*l og(f**(g + h*x) + (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
Exception generated. \[ \int \frac {d+e f^{g+h x}}{a+b f^{g+h x}+c f^{2 g+2 h x}} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((d+e*f^(h*x+g))/(a+b*f^(h*x+g)+c*f^(2*h*x+2*g)),x, algorithm="ma xima")
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 = 119, normalized size of antiderivative = 1.16 \[ \int \frac {d+e f^{g+h x}}{a+b f^{g+h x}+c f^{2 g+2 h x}} \, dx=-\frac {\frac {d \log \left (c f^{2 \, h x} f^{2 \, g} + b f^{h x} f^{g} + a\right )}{a \log \left (f\right )} - \frac {2 \, d \log \left ({\left | f \right |}^{h x} {\left | f \right |}^{g}\right )}{a \log \left (f\right )} + \frac {2 \, {\left (b d - 2 \, a e\right )} \arctan \left (\frac {2 \, c f^{h x} f^{g} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} a \log \left (f\right )}}{2 \, h} \] Input:
integrate((d+e*f^(h*x+g))/(a+b*f^(h*x+g)+c*f^(2*h*x+2*g)),x, algorithm="gi ac")
Output:
-1/2*(d*log(c*f^(2*h*x)*f^(2*g) + b*f^(h*x)*f^g + a)/(a*log(f)) - 2*d*log( abs(f)^(h*x)*abs(f)^g)/(a*log(f)) + 2*(b*d - 2*a*e)*arctan((2*c*f^(h*x)*f^ g + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*a*log(f)))/h
Time = 0.24 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.02 \[ \int \frac {d+e f^{g+h x}}{a+b f^{g+h x}+c f^{2 g+2 h x}} \, dx=\frac {d\,x}{a}-\frac {d\,\ln \left (a+c\,f^{2\,h\,x}\,f^{2\,g}+b\,f^{h\,x}\,f^g\right )}{2\,a\,h\,\ln \left (f\right )}+\frac {\mathrm {atan}\left (\frac {b+2\,c\,f^{h\,x}\,f^g}{\sqrt {4\,a\,c-b^2}}\right )\,\left (2\,a\,e-b\,d\right )}{a\,h\,\ln \left (f\right )\,\sqrt {4\,a\,c-b^2}} \] Input:
int((d + e*f^(g + h*x))/(a + b*f^(g + h*x) + c*f^(2*g + 2*h*x)),x)
Output:
(d*x)/a - (d*log(a + c*f^(2*h*x)*f^(2*g) + b*f^(h*x)*f^g))/(2*a*h*log(f)) + (atan((b + 2*c*f^(h*x)*f^g)/(4*a*c - b^2)^(1/2))*(2*a*e - b*d))/(a*h*log (f)*(4*a*c - b^2)^(1/2))
Time = 0.15 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.81 \[ \int \frac {d+e f^{g+h x}}{a+b f^{g+h x}+c f^{2 g+2 h x}} \, dx=\frac {4 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 f^{h x +g} c +b}{\sqrt {4 a c -b^{2}}}\right ) a e -2 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 f^{h x +g} c +b}{\sqrt {4 a c -b^{2}}}\right ) b d -4 \,\mathrm {log}\left (f^{2 h x +2 g} c +f^{h x +g} b +a \right ) a c d +\mathrm {log}\left (f^{2 h x +2 g} c +f^{h x +g} b +a \right ) b^{2} d +8 \,\mathrm {log}\left (f \right ) a c d h x -2 \,\mathrm {log}\left (f \right ) b^{2} d h x}{2 \,\mathrm {log}\left (f \right ) a h \left (4 a c -b^{2}\right )} \] Input:
int((d+e*f^(h*x+g))/(a+b*f^(h*x+g)+c*f^(2*h*x+2*g)),x)
Output:
(4*sqrt(4*a*c - b**2)*atan((2*f**(g + h*x)*c + b)/sqrt(4*a*c - b**2))*a*e - 2*sqrt(4*a*c - b**2)*atan((2*f**(g + h*x)*c + b)/sqrt(4*a*c - b**2))*b*d - 4*log(f**(2*g + 2*h*x)*c + f**(g + h*x)*b + a)*a*c*d + log(f**(2*g + 2* h*x)*c + f**(g + h*x)*b + a)*b**2*d + 8*log(f)*a*c*d*h*x - 2*log(f)*b**2*d *h*x)/(2*log(f)*a*h*(4*a*c - b**2))