Integrand size = 22, antiderivative size = 107 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(c+d x)^2} \, dx=\frac {2 h \sqrt {e+f x}}{d^2}-\frac {(d g-c h) \sqrt {e+f x}}{d^2 (c+d x)}-\frac {(d f g+2 d e h-3 c f h) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{5/2} \sqrt {d e-c f}} \] Output:
2*h*(f*x+e)^(1/2)/d^2-(-c*h+d*g)*(f*x+e)^(1/2)/d^2/(d*x+c)-(-3*c*f*h+2*d*e *h+d*f*g)*arctanh(d^(1/2)*(f*x+e)^(1/2)/(-c*f+d*e)^(1/2))/d^(5/2)/(-c*f+d* e)^(1/2)
Time = 0.28 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.90 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(c+d x)^2} \, dx=\frac {\sqrt {e+f x} (-d g+3 c h+2 d h x)}{d^2 (c+d x)}+\frac {(d f g+2 d e h-3 c f h) \arctan \left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {-d e+c f}}\right )}{d^{5/2} \sqrt {-d e+c f}} \] Input:
Integrate[(Sqrt[e + f*x]*(g + h*x))/(c + d*x)^2,x]
Output:
(Sqrt[e + f*x]*(-(d*g) + 3*c*h + 2*d*h*x))/(d^2*(c + d*x)) + ((d*f*g + 2*d *e*h - 3*c*f*h)*ArcTan[(Sqrt[d]*Sqrt[e + f*x])/Sqrt[-(d*e) + c*f]])/(d^(5/ 2)*Sqrt[-(d*e) + c*f])
Time = 0.33 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.25, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {87, 60, 73, 221}
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 {\sqrt {e+f x} (g+h x)}{(c+d x)^2} \, dx\) |
\(\Big \downarrow \) 87 |
\(\displaystyle \frac {(-3 c f h+2 d e h+d f g) \int \frac {\sqrt {e+f x}}{c+d x}dx}{2 d (d e-c f)}-\frac {(e+f x)^{3/2} (d g-c h)}{d (c+d x) (d e-c f)}\) |
\(\Big \downarrow \) 60 |
\(\displaystyle \frac {(-3 c f h+2 d e h+d f g) \left (\frac {(d e-c f) \int \frac {1}{(c+d x) \sqrt {e+f x}}dx}{d}+\frac {2 \sqrt {e+f x}}{d}\right )}{2 d (d e-c f)}-\frac {(e+f x)^{3/2} (d g-c h)}{d (c+d x) (d e-c f)}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle \frac {(-3 c f h+2 d e h+d f g) \left (\frac {2 (d e-c f) \int \frac {1}{c+\frac {d (e+f x)}{f}-\frac {d e}{f}}d\sqrt {e+f x}}{d f}+\frac {2 \sqrt {e+f x}}{d}\right )}{2 d (d e-c f)}-\frac {(e+f x)^{3/2} (d g-c h)}{d (c+d x) (d e-c f)}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\left (\frac {2 \sqrt {e+f x}}{d}-\frac {2 \sqrt {d e-c f} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{3/2}}\right ) (-3 c f h+2 d e h+d f g)}{2 d (d e-c f)}-\frac {(e+f x)^{3/2} (d g-c h)}{d (c+d x) (d e-c f)}\) |
Input:
Int[(Sqrt[e + f*x]*(g + h*x))/(c + d*x)^2,x]
Output:
-(((d*g - c*h)*(e + f*x)^(3/2))/(d*(d*e - c*f)*(c + d*x))) + ((d*f*g + 2*d *e*h - 3*c*f*h)*((2*Sqrt[e + f*x])/d - (2*Sqrt[d*e - c*f]*ArcTanh[(Sqrt[d] *Sqrt[e + f*x])/Sqrt[d*e - c*f]])/d^(3/2)))/(2*d*(d*e - c*f))
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ (a + b*x)^(m + 1)*((c + d*x)^n/(b*(m + n + 1))), x] + Simp[n*((b*c - a*d)/( b*(m + n + 1))) Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x] && GtQ[n, 0] && NeQ[m + n + 1, 0] && !(IGtQ[m, 0] && ( !Integer Q[n] || (GtQ[m, 0] && LtQ[m - n, 0]))) && !ILtQ[m + n + 2, 0] && IntLinear Q[a, b, c, d, m, n, x]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p _.), x_] :> Simp[(-(b*e - a*f))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)) Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || Intege rQ[p] || !(IntegerQ[n] || !(EqQ[e, 0] || !(EqQ[c, 0] || LtQ[p, n]))))
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Time = 0.42 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.00
method | result | size |
pseudoelliptic | \(\frac {-3 \left (\frac {\left (-2 e h -f g \right ) d}{3}+c f h \right ) \left (x d +c \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )+3 \sqrt {\left (c f -d e \right ) d}\, \left (\frac {\left (2 h x -g \right ) d}{3}+c h \right ) \sqrt {f x +e}}{d^{2} \left (x d +c \right ) \sqrt {\left (c f -d e \right ) d}}\) | \(107\) |
derivativedivides | \(\frac {2 h \sqrt {f x +e}}{d^{2}}-\frac {2 \left (\frac {\left (-\frac {1}{2} c f h +\frac {1}{2} d f g \right ) \sqrt {f x +e}}{\left (f x +e \right ) d +c f -d e}+\frac {\left (3 c f h -2 d e h -d f g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{2 \sqrt {\left (c f -d e \right ) d}}\right )}{d^{2}}\) | \(109\) |
default | \(\frac {2 h \sqrt {f x +e}}{d^{2}}-\frac {2 \left (\frac {\left (-\frac {1}{2} c f h +\frac {1}{2} d f g \right ) \sqrt {f x +e}}{\left (f x +e \right ) d +c f -d e}+\frac {\left (3 c f h -2 d e h -d f g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{2 \sqrt {\left (c f -d e \right ) d}}\right )}{d^{2}}\) | \(109\) |
risch | \(\frac {2 h \sqrt {f x +e}}{d^{2}}-\frac {\frac {2 \left (-\frac {1}{2} c f h +\frac {1}{2} d f g \right ) \sqrt {f x +e}}{\left (f x +e \right ) d +c f -d e}+\frac {\left (3 c f h -2 d e h -d f g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}}}{d^{2}}\) | \(109\) |
Input:
int((f*x+e)^(1/2)*(h*x+g)/(d*x+c)^2,x,method=_RETURNVERBOSE)
Output:
3*(-(1/3*(-2*e*h-f*g)*d+c*f*h)*(d*x+c)*arctan(d*(f*x+e)^(1/2)/((c*f-d*e)*d )^(1/2))+((c*f-d*e)*d)^(1/2)*(1/3*(2*h*x-g)*d+c*h)*(f*x+e)^(1/2))/((c*f-d* e)*d)^(1/2)/d^2/(d*x+c)
Time = 0.09 (sec) , antiderivative size = 381, normalized size of antiderivative = 3.56 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(c+d x)^2} \, dx=\left [-\frac {{\left (c d f g + {\left (2 \, c d e - 3 \, c^{2} f\right )} h + {\left (d^{2} f g + {\left (2 \, d^{2} e - 3 \, c d f\right )} h\right )} x\right )} \sqrt {d^{2} e - c d f} \log \left (\frac {d f x + 2 \, d e - c f + 2 \, \sqrt {d^{2} e - c d f} \sqrt {f x + e}}{d x + c}\right ) - 2 \, {\left (2 \, {\left (d^{3} e - c d^{2} f\right )} h x - {\left (d^{3} e - c d^{2} f\right )} g + 3 \, {\left (c d^{2} e - c^{2} d f\right )} h\right )} \sqrt {f x + e}}{2 \, {\left (c d^{4} e - c^{2} d^{3} f + {\left (d^{5} e - c d^{4} f\right )} x\right )}}, \frac {{\left (c d f g + {\left (2 \, c d e - 3 \, c^{2} f\right )} h + {\left (d^{2} f g + {\left (2 \, d^{2} e - 3 \, c d f\right )} h\right )} x\right )} \sqrt {-d^{2} e + c d f} \arctan \left (\frac {\sqrt {-d^{2} e + c d f} \sqrt {f x + e}}{d f x + d e}\right ) + {\left (2 \, {\left (d^{3} e - c d^{2} f\right )} h x - {\left (d^{3} e - c d^{2} f\right )} g + 3 \, {\left (c d^{2} e - c^{2} d f\right )} h\right )} \sqrt {f x + e}}{c d^{4} e - c^{2} d^{3} f + {\left (d^{5} e - c d^{4} f\right )} x}\right ] \] Input:
integrate((f*x+e)^(1/2)*(h*x+g)/(d*x+c)^2,x, algorithm="fricas")
Output:
[-1/2*((c*d*f*g + (2*c*d*e - 3*c^2*f)*h + (d^2*f*g + (2*d^2*e - 3*c*d*f)*h )*x)*sqrt(d^2*e - c*d*f)*log((d*f*x + 2*d*e - c*f + 2*sqrt(d^2*e - c*d*f)* sqrt(f*x + e))/(d*x + c)) - 2*(2*(d^3*e - c*d^2*f)*h*x - (d^3*e - c*d^2*f) *g + 3*(c*d^2*e - c^2*d*f)*h)*sqrt(f*x + e))/(c*d^4*e - c^2*d^3*f + (d^5*e - c*d^4*f)*x), ((c*d*f*g + (2*c*d*e - 3*c^2*f)*h + (d^2*f*g + (2*d^2*e - 3*c*d*f)*h)*x)*sqrt(-d^2*e + c*d*f)*arctan(sqrt(-d^2*e + c*d*f)*sqrt(f*x + e)/(d*f*x + d*e)) + (2*(d^3*e - c*d^2*f)*h*x - (d^3*e - c*d^2*f)*g + 3*(c *d^2*e - c^2*d*f)*h)*sqrt(f*x + e))/(c*d^4*e - c^2*d^3*f + (d^5*e - c*d^4* f)*x)]
\[ \int \frac {\sqrt {e+f x} (g+h x)}{(c+d x)^2} \, dx=\int \frac {\sqrt {e + f x} \left (g + h x\right )}{\left (c + d x\right )^{2}}\, dx \] Input:
integrate((f*x+e)**(1/2)*(h*x+g)/(d*x+c)**2,x)
Output:
Integral(sqrt(e + f*x)*(g + h*x)/(c + d*x)**2, x)
Exception generated. \[ \int \frac {\sqrt {e+f x} (g+h x)}{(c+d x)^2} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((f*x+e)^(1/2)*(h*x+g)/(d*x+c)^2,x, algorithm="maxima")
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(c*f-d*e>0)', see `assume?` for m ore detail
Time = 0.13 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.07 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(c+d x)^2} \, dx=\frac {2 \, \sqrt {f x + e} h}{d^{2}} + \frac {{\left (d f g + 2 \, d e h - 3 \, c f h\right )} \arctan \left (\frac {\sqrt {f x + e} d}{\sqrt {-d^{2} e + c d f}}\right )}{\sqrt {-d^{2} e + c d f} d^{2}} - \frac {\sqrt {f x + e} d f g - \sqrt {f x + e} c f h}{{\left ({\left (f x + e\right )} d - d e + c f\right )} d^{2}} \] Input:
integrate((f*x+e)^(1/2)*(h*x+g)/(d*x+c)^2,x, algorithm="giac")
Output:
2*sqrt(f*x + e)*h/d^2 + (d*f*g + 2*d*e*h - 3*c*f*h)*arctan(sqrt(f*x + e)*d /sqrt(-d^2*e + c*d*f))/(sqrt(-d^2*e + c*d*f)*d^2) - (sqrt(f*x + e)*d*f*g - sqrt(f*x + e)*c*f*h)/(((f*x + e)*d - d*e + c*f)*d^2)
Time = 0.11 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(c+d x)^2} \, dx=\frac {\sqrt {e+f\,x}\,\left (c\,f\,h-d\,f\,g\right )}{d^3\,\left (e+f\,x\right )-d^3\,e+c\,d^2\,f}+\frac {2\,h\,\sqrt {e+f\,x}}{d^2}+\frac {\mathrm {atan}\left (\frac {\sqrt {d}\,\sqrt {e+f\,x}}{\sqrt {c\,f-d\,e}}\right )\,\left (2\,d\,e\,h-3\,c\,f\,h+d\,f\,g\right )}{d^{5/2}\,\sqrt {c\,f-d\,e}} \] Input:
int(((e + f*x)^(1/2)*(g + h*x))/(c + d*x)^2,x)
Output:
((e + f*x)^(1/2)*(c*f*h - d*f*g))/(d^3*(e + f*x) - d^3*e + c*d^2*f) + (2*h *(e + f*x)^(1/2))/d^2 + (atan((d^(1/2)*(e + f*x)^(1/2))/(c*f - d*e)^(1/2)) *(2*d*e*h - 3*c*f*h + d*f*g))/(d^(5/2)*(c*f - d*e)^(1/2))
Time = 0.16 (sec) , antiderivative size = 363, normalized size of antiderivative = 3.39 \[ \int \frac {\sqrt {e+f x} (g+h x)}{(c+d x)^2} \, dx=\frac {-3 \sqrt {d}\, \sqrt {c f -d e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, d}{\sqrt {d}\, \sqrt {c f -d e}}\right ) c^{2} f h +2 \sqrt {d}\, \sqrt {c f -d e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, d}{\sqrt {d}\, \sqrt {c f -d e}}\right ) c d e h +\sqrt {d}\, \sqrt {c f -d e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, d}{\sqrt {d}\, \sqrt {c f -d e}}\right ) c d f g -3 \sqrt {d}\, \sqrt {c f -d e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, d}{\sqrt {d}\, \sqrt {c f -d e}}\right ) c d f h x +2 \sqrt {d}\, \sqrt {c f -d e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, d}{\sqrt {d}\, \sqrt {c f -d e}}\right ) d^{2} e h x +\sqrt {d}\, \sqrt {c f -d e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, d}{\sqrt {d}\, \sqrt {c f -d e}}\right ) d^{2} f g x +3 \sqrt {f x +e}\, c^{2} d f h -3 \sqrt {f x +e}\, c \,d^{2} e h -\sqrt {f x +e}\, c \,d^{2} f g +2 \sqrt {f x +e}\, c \,d^{2} f h x +\sqrt {f x +e}\, d^{3} e g -2 \sqrt {f x +e}\, d^{3} e h x}{d^{3} \left (c d f x -d^{2} e x +c^{2} f -c d e \right )} \] Input:
int((f*x+e)^(1/2)*(h*x+g)/(d*x+c)^2,x)
Output:
( - 3*sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d *e)))*c**2*f*h + 2*sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d) *sqrt(c*f - d*e)))*c*d*e*h + sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d )/(sqrt(d)*sqrt(c*f - d*e)))*c*d*f*g - 3*sqrt(d)*sqrt(c*f - d*e)*atan((sqr t(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*c*d*f*h*x + 2*sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*d**2*e*h*x + sqrt(d )*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*d**2*f *g*x + 3*sqrt(e + f*x)*c**2*d*f*h - 3*sqrt(e + f*x)*c*d**2*e*h - sqrt(e + f*x)*c*d**2*f*g + 2*sqrt(e + f*x)*c*d**2*f*h*x + sqrt(e + f*x)*d**3*e*g - 2*sqrt(e + f*x)*d**3*e*h*x)/(d**3*(c**2*f - c*d*e + c*d*f*x - d**2*e*x))