Integrand size = 29, antiderivative size = 131 \[ \int \frac {g+h x}{(a+b x) (c+d x) \sqrt {e+f x}} \, dx=-\frac {2 (b g-a h) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {b e-a f}}\right )}{\sqrt {b} (b c-a d) \sqrt {b e-a f}}+\frac {2 (d g-c h) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{\sqrt {d} (b c-a d) \sqrt {d e-c f}} \] Output:
-2*(-a*h+b*g)*arctanh(b^(1/2)*(f*x+e)^(1/2)/(-a*f+b*e)^(1/2))/b^(1/2)/(-a* d+b*c)/(-a*f+b*e)^(1/2)+2*(-c*h+d*g)*arctanh(d^(1/2)*(f*x+e)^(1/2)/(-c*f+d *e)^(1/2))/d^(1/2)/(-a*d+b*c)/(-c*f+d*e)^(1/2)
Time = 0.32 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.00 \[ \int \frac {g+h x}{(a+b x) (c+d x) \sqrt {e+f x}} \, dx=\frac {2 (b g-a h) \arctan \left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {-b e+a f}}\right )}{\sqrt {b} (b c-a d) \sqrt {-b e+a f}}+\frac {2 (d g-c h) \arctan \left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {-d e+c f}}\right )}{\sqrt {d} (-b c+a d) \sqrt {-d e+c f}} \] Input:
Integrate[(g + h*x)/((a + b*x)*(c + d*x)*Sqrt[e + f*x]),x]
Output:
(2*(b*g - a*h)*ArcTan[(Sqrt[b]*Sqrt[e + f*x])/Sqrt[-(b*e) + a*f]])/(Sqrt[b ]*(b*c - a*d)*Sqrt[-(b*e) + a*f]) + (2*(d*g - c*h)*ArcTan[(Sqrt[d]*Sqrt[e + f*x])/Sqrt[-(d*e) + c*f]])/(Sqrt[d]*(-(b*c) + a*d)*Sqrt[-(d*e) + c*f])
Time = 0.25 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {174, 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 {g+h x}{(a+b x) (c+d x) \sqrt {e+f x}} \, dx\) |
\(\Big \downarrow \) 174 |
\(\displaystyle \frac {(b g-a h) \int \frac {1}{(a+b x) \sqrt {e+f x}}dx}{b c-a d}-\frac {(d g-c h) \int \frac {1}{(c+d x) \sqrt {e+f x}}dx}{b c-a d}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle \frac {2 (b g-a h) \int \frac {1}{a+\frac {b (e+f x)}{f}-\frac {b e}{f}}d\sqrt {e+f x}}{f (b c-a d)}-\frac {2 (d g-c h) \int \frac {1}{c+\frac {d (e+f x)}{f}-\frac {d e}{f}}d\sqrt {e+f x}}{f (b c-a d)}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {2 (d g-c h) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{\sqrt {d} (b c-a d) \sqrt {d e-c f}}-\frac {2 (b g-a h) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {b e-a f}}\right )}{\sqrt {b} (b c-a d) \sqrt {b e-a f}}\) |
Input:
Int[(g + h*x)/((a + b*x)*(c + d*x)*Sqrt[e + f*x]),x]
Output:
(-2*(b*g - a*h)*ArcTanh[(Sqrt[b]*Sqrt[e + f*x])/Sqrt[b*e - a*f]])/(Sqrt[b] *(b*c - a*d)*Sqrt[b*e - a*f]) + (2*(d*g - c*h)*ArcTanh[(Sqrt[d]*Sqrt[e + f *x])/Sqrt[d*e - c*f]])/(Sqrt[d]*(b*c - a*d)*Sqrt[d*e - c*f])
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[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))* ((c_.) + (d_.)*(x_))), x_] :> Simp[(b*g - a*h)/(b*c - a*d) Int[(e + f*x)^ p/(a + b*x), x], x] - Simp[(d*g - c*h)/(b*c - a*d) Int[(e + f*x)^p/(c + d *x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]
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.54 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.77
method | result | size |
pseudoelliptic | \(\frac {\frac {2 \left (a h -b g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{\sqrt {\left (a f -b e \right ) b}}-\frac {2 \left (c h -d 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}}}{a d -b c}\) | \(101\) |
derivativedivides | \(\frac {2 \left (a h -b g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{\left (a d -b c \right ) \sqrt {\left (a f -b e \right ) b}}+\frac {2 \left (-c h +d g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{\left (a d -b c \right ) \sqrt {\left (c f -d e \right ) d}}\) | \(110\) |
default | \(\frac {2 \left (a h -b g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{\left (a d -b c \right ) \sqrt {\left (a f -b e \right ) b}}+\frac {2 \left (-c h +d g \right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{\left (a d -b c \right ) \sqrt {\left (c f -d e \right ) d}}\) | \(110\) |
Input:
int((h*x+g)/(b*x+a)/(d*x+c)/(f*x+e)^(1/2),x,method=_RETURNVERBOSE)
Output:
2/(a*d-b*c)*((a*h-b*g)/((a*f-b*e)*b)^(1/2)*arctan(b*(f*x+e)^(1/2)/((a*f-b* e)*b)^(1/2))-(c*h-d*g)*arctan(d*(f*x+e)^(1/2)/((c*f-d*e)*d)^(1/2))/((c*f-d *e)*d)^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 231 vs. \(2 (111) = 222\).
Time = 0.34 (sec) , antiderivative size = 971, normalized size of antiderivative = 7.41 \[ \int \frac {g+h x}{(a+b x) (c+d x) \sqrt {e+f x}} \, dx =\text {Too large to display} \] Input:
integrate((h*x+g)/(b*x+a)/(d*x+c)/(f*x+e)^(1/2),x, algorithm="fricas")
Output:
[(sqrt(b^2*e - a*b*f)*((b*d^2*e - b*c*d*f)*g - (a*d^2*e - a*c*d*f)*h)*log( (b*f*x + 2*b*e - a*f - 2*sqrt(b^2*e - a*b*f)*sqrt(f*x + e))/(b*x + a)) + s qrt(d^2*e - c*d*f)*((b^2*d*e - a*b*d*f)*g - (b^2*c*e - a*b*c*f)*h)*log((d* f*x + 2*d*e - c*f + 2*sqrt(d^2*e - c*d*f)*sqrt(f*x + e))/(d*x + c)))/((b^3 *c*d^2 - a*b^2*d^3)*e^2 - (b^3*c^2*d - a^2*b*d^3)*e*f + (a*b^2*c^2*d - a^2 *b*c*d^2)*f^2), (2*sqrt(-b^2*e + a*b*f)*((b*d^2*e - b*c*d*f)*g - (a*d^2*e - a*c*d*f)*h)*arctan(sqrt(-b^2*e + a*b*f)*sqrt(f*x + e)/(b*f*x + b*e)) + s qrt(d^2*e - c*d*f)*((b^2*d*e - a*b*d*f)*g - (b^2*c*e - a*b*c*f)*h)*log((d* f*x + 2*d*e - c*f + 2*sqrt(d^2*e - c*d*f)*sqrt(f*x + e))/(d*x + c)))/((b^3 *c*d^2 - a*b^2*d^3)*e^2 - (b^3*c^2*d - a^2*b*d^3)*e*f + (a*b^2*c^2*d - a^2 *b*c*d^2)*f^2), -(2*sqrt(-d^2*e + c*d*f)*((b^2*d*e - a*b*d*f)*g - (b^2*c*e - a*b*c*f)*h)*arctan(sqrt(-d^2*e + c*d*f)*sqrt(f*x + e)/(d*f*x + d*e)) - sqrt(b^2*e - a*b*f)*((b*d^2*e - b*c*d*f)*g - (a*d^2*e - a*c*d*f)*h)*log((b *f*x + 2*b*e - a*f - 2*sqrt(b^2*e - a*b*f)*sqrt(f*x + e))/(b*x + a)))/((b^ 3*c*d^2 - a*b^2*d^3)*e^2 - (b^3*c^2*d - a^2*b*d^3)*e*f + (a*b^2*c^2*d - a^ 2*b*c*d^2)*f^2), 2*(sqrt(-b^2*e + a*b*f)*((b*d^2*e - b*c*d*f)*g - (a*d^2*e - a*c*d*f)*h)*arctan(sqrt(-b^2*e + a*b*f)*sqrt(f*x + e)/(b*f*x + b*e)) - sqrt(-d^2*e + c*d*f)*((b^2*d*e - a*b*d*f)*g - (b^2*c*e - a*b*c*f)*h)*arcta n(sqrt(-d^2*e + c*d*f)*sqrt(f*x + e)/(d*f*x + d*e)))/((b^3*c*d^2 - a*b^2*d ^3)*e^2 - (b^3*c^2*d - a^2*b*d^3)*e*f + (a*b^2*c^2*d - a^2*b*c*d^2)*f^2...
Time = 20.74 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.24 \[ \int \frac {g+h x}{(a+b x) (c+d x) \sqrt {e+f x}} \, dx=\begin {cases} \frac {2 \left (- \frac {f \left (c h - d g\right ) \operatorname {atan}{\left (\frac {\sqrt {e + f x}}{\sqrt {\frac {c f - d e}{d}}} \right )}}{d \sqrt {\frac {c f - d e}{d}} \left (a d - b c\right )} + \frac {f \left (a h - b g\right ) \operatorname {atan}{\left (\frac {\sqrt {e + f x}}{\sqrt {\frac {a f - b e}{b}}} \right )}}{b \sqrt {\frac {a f - b e}{b}} \left (a d - b c\right )}\right )}{f} & \text {for}\: f \neq 0 \\\frac {\frac {\left (a h - b g\right ) \left (\begin {cases} \frac {x}{a} & \text {for}\: b = 0 \\\frac {\log {\left (a + b x \right )}}{b} & \text {otherwise} \end {cases}\right )}{a d - b c} - \frac {\left (c h - d g\right ) \left (\begin {cases} \frac {x}{c} & \text {for}\: d = 0 \\\frac {\log {\left (c + d x \right )}}{d} & \text {otherwise} \end {cases}\right )}{a d - b c}}{\sqrt {e}} & \text {otherwise} \end {cases} \] Input:
integrate((h*x+g)/(b*x+a)/(d*x+c)/(f*x+e)**(1/2),x)
Output:
Piecewise((2*(-f*(c*h - d*g)*atan(sqrt(e + f*x)/sqrt((c*f - d*e)/d))/(d*sq rt((c*f - d*e)/d)*(a*d - b*c)) + f*(a*h - b*g)*atan(sqrt(e + f*x)/sqrt((a* f - b*e)/b))/(b*sqrt((a*f - b*e)/b)*(a*d - b*c)))/f, Ne(f, 0)), (((a*h - b *g)*Piecewise((x/a, Eq(b, 0)), (log(a + b*x)/b, True))/(a*d - b*c) - (c*h - d*g)*Piecewise((x/c, Eq(d, 0)), (log(c + d*x)/d, True))/(a*d - b*c))/sqr t(e), True))
Exception generated. \[ \int \frac {g+h x}{(a+b x) (c+d x) \sqrt {e+f x}} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((h*x+g)/(b*x+a)/(d*x+c)/(f*x+e)^(1/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 = 113, normalized size of antiderivative = 0.86 \[ \int \frac {g+h x}{(a+b x) (c+d x) \sqrt {e+f x}} \, dx=\frac {2 \, {\left (b g - a h\right )} \arctan \left (\frac {\sqrt {f x + e} b}{\sqrt {-b^{2} e + a b f}}\right )}{\sqrt {-b^{2} e + a b f} {\left (b c - a d\right )}} - \frac {2 \, {\left (d g - c 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} {\left (b c - a d\right )}} \] Input:
integrate((h*x+g)/(b*x+a)/(d*x+c)/(f*x+e)^(1/2),x, algorithm="giac")
Output:
2*(b*g - a*h)*arctan(sqrt(f*x + e)*b/sqrt(-b^2*e + a*b*f))/(sqrt(-b^2*e + a*b*f)*(b*c - a*d)) - 2*(d*g - c*h)*arctan(sqrt(f*x + e)*d/sqrt(-d^2*e + c *d*f))/(sqrt(-d^2*e + c*d*f)*(b*c - a*d))
Time = 4.14 (sec) , antiderivative size = 3821, normalized size of antiderivative = 29.17 \[ \int \frac {g+h x}{(a+b x) (c+d x) \sqrt {e+f x}} \, dx=\text {Too large to display} \] Input:
int((g + h*x)/((e + f*x)^(1/2)*(a + b*x)*(c + d*x)),x)
Output:
(atan(((((e + f*x)^(1/2)*(16*b^3*d^3*f^2*g^2 + 8*a^2*b*d^3*f^2*h^2 + 8*b^3 *c^2*d*f^2*h^2 - 16*a*b^2*d^3*f^2*g*h - 16*b^3*c*d^2*f^2*g*h) - ((-d*(c*f - d*e))^(1/2)*(c*h - d*g)*(((e + f*x)^(1/2)*(-d*(c*f - d*e))^(1/2)*(c*h - d*g)*(8*a*b^4*c^2*d^3*f^3 - 8*b^5*c^3*d^2*f^3 - 8*a^3*b^2*d^5*f^3 + 8*a^2* b^3*c*d^4*f^3 + 16*a^2*b^3*d^5*e*f^2 + 16*b^5*c^2*d^3*e*f^2 - 32*a*b^4*c*d ^4*e*f^2))/(a*d^3*e - a*c*d^2*f - b*c*d^2*e + b*c^2*d*f) - 8*a^2*b^2*d^4*f ^3*g - 8*b^4*c^2*d^2*f^3*g + 8*a^2*b^2*d^4*e*f^2*h + 8*b^4*c^2*d^2*e*f^2*h + 16*a*b^3*c*d^3*f^3*g - 16*a*b^3*c*d^3*e*f^2*h))/(a*d^3*e - a*c*d^2*f - b*c*d^2*e + b*c^2*d*f))*(-d*(c*f - d*e))^(1/2)*(c*h - d*g)*1i)/(a*d^3*e - a*c*d^2*f - b*c*d^2*e + b*c^2*d*f) + (((e + f*x)^(1/2)*(16*b^3*d^3*f^2*g^2 + 8*a^2*b*d^3*f^2*h^2 + 8*b^3*c^2*d*f^2*h^2 - 16*a*b^2*d^3*f^2*g*h - 16*b ^3*c*d^2*f^2*g*h) - ((-d*(c*f - d*e))^(1/2)*(c*h - d*g)*(((e + f*x)^(1/2)* (-d*(c*f - d*e))^(1/2)*(c*h - d*g)*(8*a*b^4*c^2*d^3*f^3 - 8*b^5*c^3*d^2*f^ 3 - 8*a^3*b^2*d^5*f^3 + 8*a^2*b^3*c*d^4*f^3 + 16*a^2*b^3*d^5*e*f^2 + 16*b^ 5*c^2*d^3*e*f^2 - 32*a*b^4*c*d^4*e*f^2))/(a*d^3*e - a*c*d^2*f - b*c*d^2*e + b*c^2*d*f) + 8*a^2*b^2*d^4*f^3*g + 8*b^4*c^2*d^2*f^3*g - 8*a^2*b^2*d^4*e *f^2*h - 8*b^4*c^2*d^2*e*f^2*h - 16*a*b^3*c*d^3*f^3*g + 16*a*b^3*c*d^3*e*f ^2*h))/(a*d^3*e - a*c*d^2*f - b*c*d^2*e + b*c^2*d*f))*(-d*(c*f - d*e))^(1/ 2)*(c*h - d*g)*1i)/(a*d^3*e - a*c*d^2*f - b*c*d^2*e + b*c^2*d*f))/((((e + f*x)^(1/2)*(16*b^3*d^3*f^2*g^2 + 8*a^2*b*d^3*f^2*h^2 + 8*b^3*c^2*d*f^2*...
Time = 0.21 (sec) , antiderivative size = 405, normalized size of antiderivative = 3.09 \[ \int \frac {g+h x}{(a+b x) (c+d x) \sqrt {e+f x}} \, dx=\frac {2 \sqrt {b}\, \sqrt {a f -b e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, b}{\sqrt {b}\, \sqrt {a f -b e}}\right ) a c d f h -2 \sqrt {b}\, \sqrt {a f -b e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, b}{\sqrt {b}\, \sqrt {a f -b e}}\right ) a \,d^{2} e h -2 \sqrt {b}\, \sqrt {a f -b e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, b}{\sqrt {b}\, \sqrt {a f -b e}}\right ) b c d f g +2 \sqrt {b}\, \sqrt {a f -b e}\, \mathit {atan} \left (\frac {\sqrt {f x +e}\, b}{\sqrt {b}\, \sqrt {a f -b e}}\right ) b \,d^{2} e g -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 ) a b c 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 ) a b d f g +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 ) b^{2} c e 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 ) b^{2} d e g}{b d \left (a^{2} c d \,f^{2}-a^{2} d^{2} e f -a b \,c^{2} f^{2}+a b \,d^{2} e^{2}+b^{2} c^{2} e f -b^{2} c d \,e^{2}\right )} \] Input:
int((h*x+g)/(b*x+a)/(d*x+c)/(f*x+e)^(1/2),x)
Output:
(2*(sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e )))*a*c*d*f*h - sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sq rt(a*f - b*e)))*a*d**2*e*h - sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b )/(sqrt(b)*sqrt(a*f - b*e)))*b*c*d*f*g + sqrt(b)*sqrt(a*f - b*e)*atan((sqr t(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*b*d**2*e*g - sqrt(d)*sqrt(c*f - d *e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a*b*c*f*h + sqrt(d)* sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e)))*a*b*d*f* g + sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*sqrt(c*f - d*e )))*b**2*c*e*h - sqrt(d)*sqrt(c*f - d*e)*atan((sqrt(e + f*x)*d)/(sqrt(d)*s qrt(c*f - d*e)))*b**2*d*e*g))/(b*d*(a**2*c*d*f**2 - a**2*d**2*e*f - a*b*c* *2*f**2 + a*b*d**2*e**2 + b**2*c**2*e*f - b**2*c*d*e**2))