Optimal. Leaf size=94 \[ \frac {b \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 {\log \left (a+b f^{g+h x}+c f^{2 g+2 h x}\right )}{2 a h \log (f)}+\frac {x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {2282, 705, 29, 634, 618, 206, 628} \[ \frac {b \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 {\log \left (a+b f^{g+h x}+c f^{2 g+2 h x}\right )}{2 a h \log (f)}+\frac {x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 206
Rule 618
Rule 628
Rule 634
Rule 705
Rule 2282
Rubi steps
\begin {align*} \int \frac {1}{a+b f^{g+h x}+c f^{2 (g+h x)}} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{x \left (a+b x+c x^2\right )} \, dx,x,f^{g+h x}\right )}{h \log (f)}\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,f^{g+h x}\right )}{a h \log (f)}+\frac {\operatorname {Subst}\left (\int \frac {-b-c x}{a+b x+c x^2} \, dx,x,f^{g+h x}\right )}{a h \log (f)}\\ &=\frac {x}{a}-\frac {\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 \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 {x}{a}-\frac {\log \left (a+b f^{g+h x}+c f^{2 g+2 h x}\right )}{2 a h \log (f)}+\frac {b \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 {x}{a}+\frac {b \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 {\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.15, size = 93, normalized size = 0.99 \[ -\frac {\frac {2 b \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 {\log \left (a+f^{g+h x} \left (b+c f^{g+h x}\right )\right )}{h \log (f)}-2 x}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 309, normalized size = 3.29 \[ \left [\frac {2 \, {\left (b^{2} - 4 \, a c\right )} h x \log \relax (f) + \sqrt {b^{2} - 4 \, a c} b \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 ) - {\left (b^{2} - 4 \, a c\right )} \log \left (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 )} h x \log \relax (f) + 2 \, \sqrt {-b^{2} + 4 \, a c} b \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 ) - {\left (b^{2} - 4 \, a c\right )} \log \left (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)}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.43, size = 114, normalized size = 1.21 \[ -\frac {b \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)} - \frac {\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 {\log \left ({\left | f \right |}^{h x} {\left | f \right |}^{g}\right )}{a h \log \relax (f)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.11, size = 546, normalized size = 5.81 \[ \frac {4 a c \,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} 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 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} 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} \ln \left (f^{h x +g}-\frac {-b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{2 \left (4 a c -b^{2}\right ) a h \ln \relax (f )}+\frac {b^{2} \ln \left (f^{h x +g}+\frac {b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{2 \left (4 a c -b^{2}\right ) a h \ln \relax (f )}-\frac {2 c \ln \left (f^{h x +g}-\frac {-b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{\left (4 a c -b^{2}\right ) h \ln \relax (f )}-\frac {2 c \ln \left (f^{h x +g}+\frac {b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{\left (4 a c -b^{2}\right ) h \ln \relax (f )}+\frac {\sqrt {-4 a \,b^{2} c +b^{4}}\, \ln \left (f^{h x +g}-\frac {-b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b c}\right )}{2 \left (4 a c -b^{2}\right ) a h \ln \relax (f )}-\frac {\sqrt {-4 a \,b^{2} c +b^{4}}\, \ln \left (f^{h x +g}+\frac {b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 b 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 = 3.81, size = 96, normalized size = 1.02 \[ \frac {x}{a}-\frac {\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 {b\,\mathrm {atan}\left (\frac {b+2\,c\,f^{h\,x}\,f^g}{\sqrt {4\,a\,c-b^2}}\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 = 0.50, size = 104, normalized size = 1.11 \[ \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 h \log {\relax (f )} - b^{2} h \log {\relax (f )}\right ) + c, \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 )} - 2 a c + b^{2}}{b c} \right )} \right )\right )} + \frac {x}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________