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]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2282, 800, 634, 618, 206, 628} \[ \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]
[Out]
Rule 206
Rule 618
Rule 628
Rule 634
Rule 800
Rule 2282
Rubi steps
\begin {align*} \int \frac {d+e f^{g+h x}}{a+b f^{g+h x}+c f^{2 (g+h x)}} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {d+e x}{x \left (a+b x+c x^2\right )} \, dx,x,f^{g+h x}\right )}{h \log (f)}\\ &=\frac {\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,f^{g+h x}\right )}{h \log (f)}\\ &=\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,f^{g+h x}\right )}{a h \log (f)}\\ &=\frac {d x}{a}-\frac {d \operatorname {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,f^{g+h x}\right )}{2 a h \log (f)}-\frac {(b d-2 a e) \operatorname {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,f^{g+h x}\right )}{2 a h \log (f)}\\ &=\frac {d x}{a}-\frac {d \log \left (a+b f^{g+h x}+c f^{2 g+2 h x}\right )}{2 a h \log (f)}+\frac {(b d-2 a e) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c f^{g+h x}\right )}{a h \log (f)}\\ &=\frac {d x}{a}+\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 \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)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, 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]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 330, normalized size = 3.20 \[ \left [\frac {2 \, {\left (b^{2} - 4 \, a c\right )} d h x \log \relax (f) - {\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 \relax (f)}, \frac {2 \, {\left (b^{2} - 4 \, a c\right )} d h x \log \relax (f) - {\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 \relax (f)}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.49, size = 124, normalized size = 1.20 \[ -\frac {d \log \left (c f^{2 \, h x} f^{2 \, g} + b f^{h x} f^{g} + a\right )}{2 \, a h \log \relax (f)} + \frac {d \log \left ({\left | f \right |}^{h x} {\left | f \right |}^{g}\right )}{a h \log \relax (f)} - \frac {{\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 h \log \relax (f)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.03, size = 993, normalized size = 9.64 \[ \frac {4 a c d \,h^{2} x \ln \relax (f )^{2}}{4 a^{2} c \,h^{2} \ln \relax (f )^{2}-a \,b^{2} h^{2} \ln \relax (f )^{2}}-\frac {b^{2} d \,h^{2} x \ln \relax (f )^{2}}{4 a^{2} c \,h^{2} \ln \relax (f )^{2}-a \,b^{2} h^{2} \ln \relax (f )^{2}}+\frac {4 a c d g h \ln \relax (f )^{2}}{4 a^{2} c \,h^{2} \ln \relax (f )^{2}-a \,b^{2} h^{2} \ln \relax (f )^{2}}-\frac {b^{2} d g h \ln \relax (f )^{2}}{4 a^{2} c \,h^{2} \ln \relax (f )^{2}-a \,b^{2} h^{2} \ln \relax (f )^{2}}+\frac {b^{2} d \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 a \,b^{2} c \,d^{2}+b^{4} d^{2}}}{2 \left (2 a e -b d \right ) c}\right )}{2 \left (4 a c -b^{2}\right ) a h \ln \relax (f )}+\frac {b^{2} d \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 a \,b^{2} c \,d^{2}+b^{4} d^{2}}}{2 \left (2 a e -b d \right ) c}\right )}{2 \left (4 a c -b^{2}\right ) a h \ln \relax (f )}-\frac {2 c d \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 a \,b^{2} c \,d^{2}+b^{4} d^{2}}}{2 \left (2 a e -b d \right ) c}\right )}{\left (4 a c -b^{2}\right ) h \ln \relax (f )}-\frac {2 c d \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 a \,b^{2} c \,d^{2}+b^{4} d^{2}}}{2 \left (2 a e -b d \right ) c}\right )}{\left (4 a c -b^{2}\right ) h \ln \relax (f )}-\frac {\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 a \,b^{2} c \,d^{2}+b^{4} d^{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 a \,b^{2} c \,d^{2}+b^{4} d^{2}}}{2 \left (2 a e -b d \right ) c}\right )}{2 \left (4 a c -b^{2}\right ) a h \ln \relax (f )}+\frac {\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 a \,b^{2} c \,d^{2}+b^{4} d^{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 a \,b^{2} c \,d^{2}+b^{4} d^{2}}}{2 \left (2 a e -b d \right ) c}\right )}{2 \left (4 a c -b^{2}\right ) a h \ln \relax (f )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.00, size = 105, normalized size = 1.02 \[ \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 \relax (f)}+\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 \relax (f)\,\sqrt {4\,a\,c-b^2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.21, size = 139, normalized size = 1.35 \[ \operatorname {RootSum} {\left (z^{2} \left (4 a^{2} c h^{2} \log {\relax (f )}^{2} - a b^{2} h^{2} \log {\relax (f )}^{2}\right ) + z \left (4 a c d h \log {\relax (f )} - b^{2} d h \log {\relax (f )}\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 {\relax (f )} - i a b^{2} h \log {\relax (f )} + 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]
[Out]
________________________________________________________________________________________