Optimal. Leaf size=54 \[ -\frac {2 \left (-a q+b p+f^2 (-p)\right ) \log \left (\sqrt {a x+b}+f\right )}{a^2}-\frac {2 f p \sqrt {a x+b}}{a^2}+\frac {p x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.38, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 1, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.036, Rules used = {697} \[ -\frac {2 \left (-a q+b p+f^2 (-p)\right ) \log \left (\sqrt {a x+b}+f\right )}{a^2}-\frac {2 f p \sqrt {a x+b}}{a^2}+\frac {p x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 697
Rubi steps
\begin {align*} \int \frac {q+p x}{\sqrt {b+a x} \left (f+\sqrt {b+a x}\right )} \, dx &=\frac {2 \operatorname {Subst}\left (\int \frac {-b p+a q+p x^2}{f+x} \, dx,x,\sqrt {b+a x}\right )}{a^2}\\ &=\frac {2 \operatorname {Subst}\left (\int \left (-f p+p x+\frac {-b p+f^2 p+a q}{f+x}\right ) \, dx,x,\sqrt {b+a x}\right )}{a^2}\\ &=\frac {p x}{a}-\frac {2 f p \sqrt {b+a x}}{a^2}-\frac {2 \left (b p-f^2 p-a q\right ) \log \left (f+\sqrt {b+a x}\right )}{a^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 50, normalized size = 0.93 \[ \frac {2 \left (a q-b p+f^2 p\right ) \log \left (\sqrt {a x+b}+f\right )+p \left (a x-2 f \sqrt {a x+b}\right )}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 45, normalized size = 0.83 \[ \frac {a p x - 2 \, \sqrt {a x + b} f p + 2 \, {\left ({\left (f^{2} - b\right )} p + a q\right )} \log \left (f + \sqrt {a x + b}\right )}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.32, size = 61, normalized size = 1.13 \[ \frac {2 \, {\left (f^{2} p - b p + a q\right )} \log \left ({\left | f + \sqrt {a x + b} \right |}\right )}{a^{2}} - \frac {2 \, \sqrt {a x + b} a^{2} f p - {\left (a x + b\right )} a^{2} p}{a^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.00, size = 80, normalized size = 1.48 \[ \frac {2 f^{2} p \ln \left (f +\sqrt {a x +b}\right )}{a^{2}}+\frac {p x}{a}+\frac {2 q \ln \left (f +\sqrt {a x +b}\right )}{a}-\frac {2 b p \ln \left (f +\sqrt {a x +b}\right )}{a^{2}}+\frac {b p}{a^{2}}-\frac {2 \sqrt {a x +b}\, f p}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.88, size = 58, normalized size = 1.07 \[ \frac {\frac {2 \, {\left ({\left (f^{2} - b\right )} p + a q\right )} \log \left (f + \sqrt {a x + b}\right )}{a} - \frac {2 \, \sqrt {a x + b} f p - {\left (a x + b\right )} p}{a}}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.10, size = 50, normalized size = 0.93 \[ \frac {\ln \left (f+\sqrt {b+a\,x}\right )\,\left (2\,p\,f^2+2\,a\,q-2\,b\,p\right )}{a^2}+\frac {p\,x}{a}-\frac {2\,f\,p\,\sqrt {b+a\,x}}{a^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 32.90, size = 99, normalized size = 1.83 \[ - \frac {2 f p \sqrt {a x + b}}{a^{2}} - \frac {2 f \left (- a q + b p - f^{2} p\right ) \left (\begin {cases} \frac {1}{\sqrt {a x + b}} & \text {for}\: f = 0 \\\frac {\log {\left (\frac {f}{\sqrt {a x + b}} + 1 \right )}}{f} & \text {otherwise} \end {cases}\right )}{a^{2}} + \frac {p \left (a x + b\right )}{a^{2}} + \frac {2 \left (- a q + b p - f^{2} p\right ) \log {\left (\frac {1}{\sqrt {a x + b}} \right )}}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________