\(\int \frac {q+p x}{\sqrt {b+a x} (f+\sqrt {b+a x})} \, dx\) [722]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 54 \[ \int \frac {q+p x}{\sqrt {b+a x} \left (f+\sqrt {b+a x}\right )} \, dx=\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} \]

[Out]

p*x/a-2*(-f^2*p-a*q+b*p)*ln(f+(a*x+b)^(1/2))/a^2-2*f*p*(a*x+b)^(1/2)/a^2

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.036, Rules used = {711} \[ \int \frac {q+p x}{\sqrt {b+a x} \left (f+\sqrt {b+a x}\right )} \, dx=-\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} \]

[In]

Int[(q + p*x)/(Sqrt[b + a*x]*(f + Sqrt[b + a*x])),x]

[Out]

(p*x)/a - (2*f*p*Sqrt[b + a*x])/a^2 - (2*(b*p - f^2*p - a*q)*Log[f + Sqrt[b + a*x]])/a^2

Rule 711

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {2 \text {Subst}\left (\int \frac {-b p+a q+p x^2}{f+x} \, dx,x,\sqrt {b+a x}\right )}{a^2} \\ & = \frac {2 \text {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] (verified)

Time = 0.05 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.94 \[ \int \frac {q+p x}{\sqrt {b+a x} \left (f+\sqrt {b+a x}\right )} \, dx=\frac {p \left (b+a x-2 f \sqrt {b+a x}\right )+2 \left (-b p+f^2 p+a q\right ) \log \left (f+\sqrt {b+a x}\right )}{a^2} \]

[In]

Integrate[(q + p*x)/(Sqrt[b + a*x]*(f + Sqrt[b + a*x])),x]

[Out]

(p*(b + a*x - 2*f*Sqrt[b + a*x]) + 2*(-(b*p) + f^2*p + a*q)*Log[f + Sqrt[b + a*x]])/a^2

Maple [A] (verified)

Time = 1.01 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.93

method result size
derivativedivides \(\frac {-2 f p \sqrt {a x +b}+p \left (a x +b \right )+2 \left (f^{2} p +a q -b p \right ) \ln \left (f +\sqrt {a x +b}\right )}{a^{2}}\) \(50\)
default \(\frac {-2 f p \sqrt {a x +b}+p \left (a x +b \right )+2 \left (f^{2} p +a q -b p \right ) \ln \left (f +\sqrt {a x +b}\right )}{a^{2}}\) \(50\)

[In]

int((p*x+q)/(a*x+b)^(1/2)/(f+(a*x+b)^(1/2)),x,method=_RETURNVERBOSE)

[Out]

2/a^2*(-f*p*(a*x+b)^(1/2)+1/2*p*(a*x+b)+(f^2*p+a*q-b*p)*ln(f+(a*x+b)^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.83 \[ \int \frac {q+p x}{\sqrt {b+a x} \left (f+\sqrt {b+a x}\right )} \, dx=\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}} \]

[In]

integrate((p*x+q)/(a*x+b)^(1/2)/(f+(a*x+b)^(1/2)),x, algorithm="fricas")

[Out]

(a*p*x - 2*sqrt(a*x + b)*f*p + 2*((f^2 - b)*p + a*q)*log(f + sqrt(a*x + b)))/a^2

Sympy [A] (verification not implemented)

Time = 1.28 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.35 \[ \int \frac {q+p x}{\sqrt {b+a x} \left (f+\sqrt {b+a x}\right )} \, dx=\begin {cases} \frac {2 \left (- \frac {f p \sqrt {a x + b}}{a} + \frac {p \left (a x + b\right )}{2 a} - \frac {\left (- a q + b p - f^{2} p\right ) \log {\left (f + \sqrt {a x + b} \right )}}{a}\right )}{a} & \text {for}\: a \neq 0 \\\frac {\frac {p x^{2}}{2} + q x}{\sqrt {b} \left (\sqrt {b} + f\right )} & \text {otherwise} \end {cases} \]

[In]

integrate((p*x+q)/(a*x+b)**(1/2)/(f+(a*x+b)**(1/2)),x)

[Out]

Piecewise((2*(-f*p*sqrt(a*x + b)/a + p*(a*x + b)/(2*a) - (-a*q + b*p - f**2*p)*log(f + sqrt(a*x + b))/a)/a, Ne
(a, 0)), ((p*x**2/2 + q*x)/(sqrt(b)*(sqrt(b) + f)), True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.07 \[ \int \frac {q+p x}{\sqrt {b+a x} \left (f+\sqrt {b+a x}\right )} \, dx=\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} \]

[In]

integrate((p*x+q)/(a*x+b)^(1/2)/(f+(a*x+b)^(1/2)),x, algorithm="maxima")

[Out]

(2*((f^2 - b)*p + a*q)*log(f + sqrt(a*x + b))/a - (2*sqrt(a*x + b)*f*p - (a*x + b)*p)/a)/a

Giac [A] (verification not implemented)

none

Time = 0.42 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.13 \[ \int \frac {q+p x}{\sqrt {b+a x} \left (f+\sqrt {b+a x}\right )} \, dx=\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}} \]

[In]

integrate((p*x+q)/(a*x+b)^(1/2)/(f+(a*x+b)^(1/2)),x, algorithm="giac")

[Out]

2*(f^2*p - b*p + a*q)*log(abs(f + sqrt(a*x + b)))/a^2 - (2*sqrt(a*x + b)*a^2*f*p - (a*x + b)*a^2*p)/a^4

Mupad [B] (verification not implemented)

Time = 18.26 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.93 \[ \int \frac {q+p x}{\sqrt {b+a x} \left (f+\sqrt {b+a x}\right )} \, dx=\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} \]

[In]

int((q + p*x)/((f + (b + a*x)^(1/2))*(b + a*x)^(1/2)),x)

[Out]

(log(f + (b + a*x)^(1/2))*(2*a*q - 2*b*p + 2*f^2*p))/a^2 + (p*x)/a - (2*f*p*(b + a*x)^(1/2))/a^2