Integrand size = 25, antiderivative size = 116 \[ \int \frac {d+e x+f x^2}{\sqrt {a+b x+c x^2}} \, dx=\frac {(4 c e-3 b f) \sqrt {a+b x+c x^2}}{4 c^2}+\frac {f x \sqrt {a+b x+c x^2}}{2 c}+\frac {\left (8 c^2 d+3 b^2 f-4 c (b e+a f)\right ) \text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{8 c^{5/2}} \] Output:
1/4*(-3*b*f+4*c*e)*(c*x^2+b*x+a)^(1/2)/c^2+1/2*f*x*(c*x^2+b*x+a)^(1/2)/c+1 /8*(8*c^2*d+3*b^2*f-4*c*(a*f+b*e))*arctanh(1/2*(2*c*x+b)/c^(1/2)/(c*x^2+b* x+a)^(1/2))/c^(5/2)
Time = 0.68 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.84 \[ \int \frac {d+e x+f x^2}{\sqrt {a+b x+c x^2}} \, dx=\frac {\sqrt {c} (4 c e-3 b f+2 c f x) \sqrt {a+x (b+c x)}+\left (8 c^2 d+3 b^2 f-4 c (b e+a f)\right ) \text {arctanh}\left (\frac {\sqrt {c} x}{-\sqrt {a}+\sqrt {a+x (b+c x)}}\right )}{4 c^{5/2}} \] Input:
Integrate[(d + e*x + f*x^2)/Sqrt[a + b*x + c*x^2],x]
Output:
(Sqrt[c]*(4*c*e - 3*b*f + 2*c*f*x)*Sqrt[a + x*(b + c*x)] + (8*c^2*d + 3*b^ 2*f - 4*c*(b*e + a*f))*ArcTanh[(Sqrt[c]*x)/(-Sqrt[a] + Sqrt[a + x*(b + c*x )])])/(4*c^(5/2))
Time = 0.29 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.04, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2192, 27, 1160, 1092, 219}
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 {d+e x+f x^2}{\sqrt {a+b x+c x^2}} \, dx\) |
\(\Big \downarrow \) 2192 |
\(\displaystyle \frac {\int \frac {4 c d-2 a f+(4 c e-3 b f) x}{2 \sqrt {c x^2+b x+a}}dx}{2 c}+\frac {f x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {2 (2 c d-a f)+(4 c e-3 b f) x}{\sqrt {c x^2+b x+a}}dx}{4 c}+\frac {f x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 1160 |
\(\displaystyle \frac {\frac {\left (-4 c (a f+b e)+3 b^2 f+8 c^2 d\right ) \int \frac {1}{\sqrt {c x^2+b x+a}}dx}{2 c}+\frac {\sqrt {a+b x+c x^2} (4 c e-3 b f)}{c}}{4 c}+\frac {f x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 1092 |
\(\displaystyle \frac {\frac {\left (-4 c (a f+b e)+3 b^2 f+8 c^2 d\right ) \int \frac {1}{4 c-\frac {(b+2 c x)^2}{c x^2+b x+a}}d\frac {b+2 c x}{\sqrt {c x^2+b x+a}}}{c}+\frac {\sqrt {a+b x+c x^2} (4 c e-3 b f)}{c}}{4 c}+\frac {f x \sqrt {a+b x+c x^2}}{2 c}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-4 c (a f+b e)+3 b^2 f+8 c^2 d\right )}{2 c^{3/2}}+\frac {\sqrt {a+b x+c x^2} (4 c e-3 b f)}{c}}{4 c}+\frac {f x \sqrt {a+b x+c x^2}}{2 c}\) |
Input:
Int[(d + e*x + f*x^2)/Sqrt[a + b*x + c*x^2],x]
Output:
(f*x*Sqrt[a + b*x + c*x^2])/(2*c) + (((4*c*e - 3*b*f)*Sqrt[a + b*x + c*x^2 ])/c + ((8*c^2*d + 3*b^2*f - 4*c*(b*e + a*f))*ArcTanh[(b + 2*c*x)/(2*Sqrt[ c]*Sqrt[a + b*x + c*x^2])])/(2*c^(3/2)))/(4*c)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2 Subst[I nt[1/(4*c - x^2), x], x, (b + 2*c*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a , b, c}, x]
Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol ] :> Simp[e*((a + b*x + c*x^2)^(p + 1)/(2*c*(p + 1))), x] + Simp[(2*c*d - b *e)/(2*c) Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[p, -1]
Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expon[Pq, x]]}, Simp[e*x^(q - 1)*((a + b*x + c*x^2)^(p + 1)/(c*(q + 2*p + 1))), x] + Simp[1/(c*(q + 2*p + 1)) Int[(a + b*x + c*x^2)^p*ExpandToSum[c*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b *e*(q + p)*x^(q - 1) - c*e*(q + 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, c , p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && !LeQ[p, -1]
Time = 1.55 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.74
method | result | size |
risch | \(-\frac {\left (-2 c f x +3 f b -4 c e \right ) \sqrt {c \,x^{2}+b x +a}}{4 c^{2}}-\frac {\left (4 a c f -3 b^{2} f +4 b c e -8 c^{2} d \right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {5}{2}}}\) | \(86\) |
default | \(\frac {d \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{\sqrt {c}}+e \left (\frac {\sqrt {c \,x^{2}+b x +a}}{c}-\frac {b \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}}}\right )+f \left (\frac {x \sqrt {c \,x^{2}+b x +a}}{2 c}-\frac {3 b \left (\frac {\sqrt {c \,x^{2}+b x +a}}{c}-\frac {b \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}}}\right )}{4 c}-\frac {a \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{2 c^{\frac {3}{2}}}\right )\) | \(188\) |
Input:
int((f*x^2+e*x+d)/(c*x^2+b*x+a)^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/4*(-2*c*f*x+3*b*f-4*c*e)/c^2*(c*x^2+b*x+a)^(1/2)-1/8*(4*a*c*f-3*b^2*f+4 *b*c*e-8*c^2*d)/c^(5/2)*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))
Time = 0.10 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.96 \[ \int \frac {d+e x+f x^2}{\sqrt {a+b x+c x^2}} \, dx=\left [-\frac {{\left (8 \, c^{2} d - 4 \, b c e + {\left (3 \, b^{2} - 4 \, a c\right )} f\right )} \sqrt {c} \log \left (-8 \, c^{2} x^{2} - 8 \, b c x - b^{2} + 4 \, \sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {c} - 4 \, a c\right ) - 4 \, {\left (2 \, c^{2} f x + 4 \, c^{2} e - 3 \, b c f\right )} \sqrt {c x^{2} + b x + a}}{16 \, c^{3}}, -\frac {{\left (8 \, c^{2} d - 4 \, b c e + {\left (3 \, b^{2} - 4 \, a c\right )} f\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (2 \, c x + b\right )} \sqrt {-c}}{2 \, {\left (c^{2} x^{2} + b c x + a c\right )}}\right ) - 2 \, {\left (2 \, c^{2} f x + 4 \, c^{2} e - 3 \, b c f\right )} \sqrt {c x^{2} + b x + a}}{8 \, c^{3}}\right ] \] Input:
integrate((f*x^2+e*x+d)/(c*x^2+b*x+a)^(1/2),x, algorithm="fricas")
Output:
[-1/16*((8*c^2*d - 4*b*c*e + (3*b^2 - 4*a*c)*f)*sqrt(c)*log(-8*c^2*x^2 - 8 *b*c*x - b^2 + 4*sqrt(c*x^2 + b*x + a)*(2*c*x + b)*sqrt(c) - 4*a*c) - 4*(2 *c^2*f*x + 4*c^2*e - 3*b*c*f)*sqrt(c*x^2 + b*x + a))/c^3, -1/8*((8*c^2*d - 4*b*c*e + (3*b^2 - 4*a*c)*f)*sqrt(-c)*arctan(1/2*sqrt(c*x^2 + b*x + a)*(2 *c*x + b)*sqrt(-c)/(c^2*x^2 + b*c*x + a*c)) - 2*(2*c^2*f*x + 4*c^2*e - 3*b *c*f)*sqrt(c*x^2 + b*x + a))/c^3]
Leaf count of result is larger than twice the leaf count of optimal. 226 vs. \(2 (102) = 204\).
Time = 0.36 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.95 \[ \int \frac {d+e x+f x^2}{\sqrt {a+b x+c x^2}} \, dx=\begin {cases} \left (\frac {f x}{2 c} + \frac {- \frac {3 b f}{4 c} + e}{c}\right ) \sqrt {a + b x + c x^{2}} + \left (- \frac {a f}{2 c} - \frac {b \left (- \frac {3 b f}{4 c} + e\right )}{2 c} + d\right ) \left (\begin {cases} \frac {\log {\left (b + 2 \sqrt {c} \sqrt {a + b x + c x^{2}} + 2 c x \right )}}{\sqrt {c}} & \text {for}\: a - \frac {b^{2}}{4 c} \neq 0 \\\frac {\left (\frac {b}{2 c} + x\right ) \log {\left (\frac {b}{2 c} + x \right )}}{\sqrt {c \left (\frac {b}{2 c} + x\right )^{2}}} & \text {otherwise} \end {cases}\right ) & \text {for}\: c \neq 0 \\\frac {2 d \sqrt {a + b x} + \frac {2 e \left (- a \sqrt {a + b x} + \frac {\left (a + b x\right )^{\frac {3}{2}}}{3}\right )}{b} + \frac {2 f \left (a^{2} \sqrt {a + b x} - \frac {2 a \left (a + b x\right )^{\frac {3}{2}}}{3} + \frac {\left (a + b x\right )^{\frac {5}{2}}}{5}\right )}{b^{2}}}{b} & \text {for}\: b \neq 0 \\\frac {d x + \frac {e x^{2}}{2} + \frac {f x^{3}}{3}}{\sqrt {a}} & \text {otherwise} \end {cases} \] Input:
integrate((f*x**2+e*x+d)/(c*x**2+b*x+a)**(1/2),x)
Output:
Piecewise(((f*x/(2*c) + (-3*b*f/(4*c) + e)/c)*sqrt(a + b*x + c*x**2) + (-a *f/(2*c) - b*(-3*b*f/(4*c) + e)/(2*c) + d)*Piecewise((log(b + 2*sqrt(c)*sq rt(a + b*x + c*x**2) + 2*c*x)/sqrt(c), Ne(a - b**2/(4*c), 0)), ((b/(2*c) + x)*log(b/(2*c) + x)/sqrt(c*(b/(2*c) + x)**2), True)), Ne(c, 0)), ((2*d*sq rt(a + b*x) + 2*e*(-a*sqrt(a + b*x) + (a + b*x)**(3/2)/3)/b + 2*f*(a**2*sq rt(a + b*x) - 2*a*(a + b*x)**(3/2)/3 + (a + b*x)**(5/2)/5)/b**2)/b, Ne(b, 0)), ((d*x + e*x**2/2 + f*x**3/3)/sqrt(a), True))
Exception generated. \[ \int \frac {d+e x+f x^2}{\sqrt {a+b x+c x^2}} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((f*x^2+e*x+d)/(c*x^2+b*x+a)^(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(4*a*c-b^2>0)', see `assume?` for more deta
Time = 0.15 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.80 \[ \int \frac {d+e x+f x^2}{\sqrt {a+b x+c x^2}} \, dx=\frac {1}{4} \, \sqrt {c x^{2} + b x + a} {\left (\frac {2 \, f x}{c} + \frac {4 \, c e - 3 \, b f}{c^{2}}\right )} - \frac {{\left (8 \, c^{2} d - 4 \, b c e + 3 \, b^{2} f - 4 \, a c f\right )} \log \left ({\left | 2 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} \sqrt {c} + b \right |}\right )}{8 \, c^{\frac {5}{2}}} \] Input:
integrate((f*x^2+e*x+d)/(c*x^2+b*x+a)^(1/2),x, algorithm="giac")
Output:
1/4*sqrt(c*x^2 + b*x + a)*(2*f*x/c + (4*c*e - 3*b*f)/c^2) - 1/8*(8*c^2*d - 4*b*c*e + 3*b^2*f - 4*a*c*f)*log(abs(2*(sqrt(c)*x - sqrt(c*x^2 + b*x + a) )*sqrt(c) + b))/c^(5/2)
Timed out. \[ \int \frac {d+e x+f x^2}{\sqrt {a+b x+c x^2}} \, dx=\int \frac {f\,x^2+e\,x+d}{\sqrt {c\,x^2+b\,x+a}} \,d x \] Input:
int((d + e*x + f*x^2)/(a + b*x + c*x^2)^(1/2),x)
Output:
int((d + e*x + f*x^2)/(a + b*x + c*x^2)^(1/2), x)
Time = 0.15 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.99 \[ \int \frac {d+e x+f x^2}{\sqrt {a+b x+c x^2}} \, dx=\frac {-6 \sqrt {c \,x^{2}+b x +a}\, b c f +8 \sqrt {c \,x^{2}+b x +a}\, c^{2} e +4 \sqrt {c \,x^{2}+b x +a}\, c^{2} f x -4 \sqrt {c}\, \mathrm {log}\left (\frac {2 \sqrt {c}\, \sqrt {c \,x^{2}+b x +a}+b +2 c x}{\sqrt {4 a c -b^{2}}}\right ) a c f +3 \sqrt {c}\, \mathrm {log}\left (\frac {2 \sqrt {c}\, \sqrt {c \,x^{2}+b x +a}+b +2 c x}{\sqrt {4 a c -b^{2}}}\right ) b^{2} f -4 \sqrt {c}\, \mathrm {log}\left (\frac {2 \sqrt {c}\, \sqrt {c \,x^{2}+b x +a}+b +2 c x}{\sqrt {4 a c -b^{2}}}\right ) b c e +8 \sqrt {c}\, \mathrm {log}\left (\frac {2 \sqrt {c}\, \sqrt {c \,x^{2}+b x +a}+b +2 c x}{\sqrt {4 a c -b^{2}}}\right ) c^{2} d}{8 c^{3}} \] Input:
int((f*x^2+e*x+d)/(c*x^2+b*x+a)^(1/2),x)
Output:
( - 6*sqrt(a + b*x + c*x**2)*b*c*f + 8*sqrt(a + b*x + c*x**2)*c**2*e + 4*s qrt(a + b*x + c*x**2)*c**2*f*x - 4*sqrt(c)*log((2*sqrt(c)*sqrt(a + b*x + c *x**2) + b + 2*c*x)/sqrt(4*a*c - b**2))*a*c*f + 3*sqrt(c)*log((2*sqrt(c)*s qrt(a + b*x + c*x**2) + b + 2*c*x)/sqrt(4*a*c - b**2))*b**2*f - 4*sqrt(c)* log((2*sqrt(c)*sqrt(a + b*x + c*x**2) + b + 2*c*x)/sqrt(4*a*c - b**2))*b*c *e + 8*sqrt(c)*log((2*sqrt(c)*sqrt(a + b*x + c*x**2) + b + 2*c*x)/sqrt(4*a *c - b**2))*c**2*d)/(8*c**3)