Integrand size = 25, antiderivative size = 114 \[ \int \frac {(d+e x) (f+g x)}{\sqrt {a+b x+c x^2}} \, dx=-\frac {(3 b e g-4 c (e f+d g)-2 c e g x) \sqrt {a+b x+c x^2}}{4 c^2}+\frac {\left (8 c^2 d f+3 b^2 e g-4 c (b e f+b d g+a e g)\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*e*g-4*c*(d*g+e*f)-2*c*e*g*x)*(c*x^2+b*x+a)^(1/2)/c^2+1/8*(8*c^2* d*f+3*b^2*e*g-4*c*(a*e*g+b*d*g+b*e*f))*arctanh(1/2*(2*c*x+b)/c^(1/2)/(c*x^ 2+b*x+a)^(1/2))/c^(5/2)
Time = 0.57 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.01 \[ \int \frac {(d+e x) (f+g x)}{\sqrt {a+b x+c x^2}} \, dx=\frac {2 \sqrt {c} \sqrt {a+x (b+c x)} (-3 b e g+2 c (2 e f+2 d g+e g x))+\left (-8 c^2 d f-3 b^2 e g+4 c (b e f+b d g+a e g)\right ) \log \left (c^2 \left (b+2 c x-2 \sqrt {c} \sqrt {a+x (b+c x)}\right )\right )}{8 c^{5/2}} \] Input:
Integrate[((d + e*x)*(f + g*x))/Sqrt[a + b*x + c*x^2],x]
Output:
(2*Sqrt[c]*Sqrt[a + x*(b + c*x)]*(-3*b*e*g + 2*c*(2*e*f + 2*d*g + e*g*x)) + (-8*c^2*d*f - 3*b^2*e*g + 4*c*(b*e*f + b*d*g + a*e*g))*Log[c^2*(b + 2*c* x - 2*Sqrt[c]*Sqrt[a + x*(b + c*x)])])/(8*c^(5/2))
Time = 0.42 (sec) , antiderivative size = 114, 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.120, Rules used = {1225, 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+g x)}{\sqrt {a+b x+c x^2}} \, dx\) |
\(\Big \downarrow \) 1225 |
\(\displaystyle \frac {\left (-4 c (a e g+b d g+b e f)+3 b^2 e g+8 c^2 d f\right ) \int \frac {1}{\sqrt {c x^2+b x+a}}dx}{8 c^2}-\frac {\sqrt {a+b x+c x^2} (3 b e g-4 c (d g+e f)-2 c e g x)}{4 c^2}\) |
\(\Big \downarrow \) 1092 |
\(\displaystyle \frac {\left (-4 c (a e g+b d g+b e f)+3 b^2 e g+8 c^2 d f\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}}}{4 c^2}-\frac {\sqrt {a+b x+c x^2} (3 b e g-4 c (d g+e f)-2 c e g x)}{4 c^2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\text {arctanh}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-4 c (a e g+b d g+b e f)+3 b^2 e g+8 c^2 d f\right )}{8 c^{5/2}}-\frac {\sqrt {a+b x+c x^2} (3 b e g-4 c (d g+e f)-2 c e g x)}{4 c^2}\) |
Input:
Int[((d + e*x)*(f + g*x))/Sqrt[a + b*x + c*x^2],x]
Output:
-1/4*((3*b*e*g - 4*c*(e*f + d*g) - 2*c*e*g*x)*Sqrt[a + b*x + c*x^2])/c^2 + ((8*c^2*d*f + 3*b^2*e*g - 4*c*(b*e*f + b*d*g + a*e*g))*ArcTanh[(b + 2*c*x )/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(8*c^(5/2))
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_))*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*( x_)^2)^(p_), x_Symbol] :> Simp[(-(b*e*g*(p + 2) - c*(e*f + d*g)*(2*p + 3) - 2*c*e*g*(p + 1)*x))*((a + b*x + c*x^2)^(p + 1)/(2*c^2*(p + 1)*(2*p + 3))), x] + Simp[(b^2*e*g*(p + 2) - 2*a*c*e*g + c*(2*c*d*f - b*(e*f + d*g))*(2*p + 3))/(2*c^2*(2*p + 3)) Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c , d, e, f, g, p}, x] && !LeQ[p, -1]
Time = 1.86 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.91
method | result | size |
risch | \(-\frac {\left (-2 c e g x +3 b e g -4 c d g -4 f c e \right ) \sqrt {c \,x^{2}+b x +a}}{4 c^{2}}-\frac {\left (4 a c e g -3 b^{2} e g +4 b c d g +4 b c e f -8 c^{2} d f \right ) \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{8 c^{\frac {5}{2}}}\) | \(104\) |
default | \(\frac {d f \ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{\sqrt {c}}+\left (d g +e f \right ) \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 )+e g \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 )\) | \(196\) |
Input:
int((e*x+d)*(g*x+f)/(c*x^2+b*x+a)^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/4*(-2*c*e*g*x+3*b*e*g-4*c*d*g-4*c*e*f)/c^2*(c*x^2+b*x+a)^(1/2)-1/8*(4*a *c*e*g-3*b^2*e*g+4*b*c*d*g+4*b*c*e*f-8*c^2*d*f)/c^(5/2)*ln((1/2*b+c*x)/c^( 1/2)+(c*x^2+b*x+a)^(1/2))
Time = 0.11 (sec) , antiderivative size = 277, normalized size of antiderivative = 2.43 \[ \int \frac {(d+e x) (f+g x)}{\sqrt {a+b x+c x^2}} \, dx=\left [-\frac {{\left (4 \, {\left (2 \, c^{2} d - b c e\right )} f - {\left (4 \, b c d - {\left (3 \, b^{2} - 4 \, a c\right )} e\right )} g\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} e g x + 4 \, c^{2} e f + {\left (4 \, c^{2} d - 3 \, b c e\right )} g\right )} \sqrt {c x^{2} + b x + a}}{16 \, c^{3}}, -\frac {{\left (4 \, {\left (2 \, c^{2} d - b c e\right )} f - {\left (4 \, b c d - {\left (3 \, b^{2} - 4 \, a c\right )} e\right )} g\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} e g x + 4 \, c^{2} e f + {\left (4 \, c^{2} d - 3 \, b c e\right )} g\right )} \sqrt {c x^{2} + b x + a}}{8 \, c^{3}}\right ] \] Input:
integrate((e*x+d)*(g*x+f)/(c*x^2+b*x+a)^(1/2),x, algorithm="fricas")
Output:
[-1/16*((4*(2*c^2*d - b*c*e)*f - (4*b*c*d - (3*b^2 - 4*a*c)*e)*g)*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*e*g*x + 4*c^2*e*f + (4*c^2*d - 3*b*c*e)*g)*sqrt(c*x ^2 + b*x + a))/c^3, -1/8*((4*(2*c^2*d - b*c*e)*f - (4*b*c*d - (3*b^2 - 4*a *c)*e)*g)*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*e*g*x + 4*c^2*e*f + (4*c^2*d - 3*b*c*e) *g)*sqrt(c*x^2 + b*x + a))/c^3]
Leaf count of result is larger than twice the leaf count of optimal. 265 vs. \(2 (109) = 218\).
Time = 1.03 (sec) , antiderivative size = 265, normalized size of antiderivative = 2.32 \[ \int \frac {(d+e x) (f+g x)}{\sqrt {a+b x+c x^2}} \, dx=\begin {cases} \left (\frac {e g x}{2 c} + \frac {- \frac {3 b e g}{4 c} + d g + e f}{c}\right ) \sqrt {a + b x + c x^{2}} + \left (- \frac {a e g}{2 c} - \frac {b \left (- \frac {3 b e g}{4 c} + d g + e f\right )}{2 c} + d f\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 \left (\frac {e g \left (a + b x\right )^{\frac {5}{2}}}{5 b^{2}} + \frac {\left (a + b x\right )^{\frac {3}{2}} \left (- 2 a e g + b d g + b e f\right )}{3 b^{2}} + \frac {\sqrt {a + b x} \left (a^{2} e g - a b d g - a b e f + b^{2} d f\right )}{b^{2}}\right )}{b} & \text {for}\: b \neq 0 \\\frac {d f x + \frac {e g x^{3}}{3} + \frac {x^{2} \left (d g + e f\right )}{2}}{\sqrt {a}} & \text {otherwise} \end {cases} \] Input:
integrate((e*x+d)*(g*x+f)/(c*x**2+b*x+a)**(1/2),x)
Output:
Piecewise(((e*g*x/(2*c) + (-3*b*e*g/(4*c) + d*g + e*f)/c)*sqrt(a + b*x + c *x**2) + (-a*e*g/(2*c) - b*(-3*b*e*g/(4*c) + d*g + e*f)/(2*c) + d*f)*Piece wise((log(b + 2*sqrt(c)*sqrt(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), T rue)), Ne(c, 0)), (2*(e*g*(a + b*x)**(5/2)/(5*b**2) + (a + b*x)**(3/2)*(-2 *a*e*g + b*d*g + b*e*f)/(3*b**2) + sqrt(a + b*x)*(a**2*e*g - a*b*d*g - a*b *e*f + b**2*d*f)/b**2)/b, Ne(b, 0)), ((d*f*x + e*g*x**3/3 + x**2*(d*g + e* f)/2)/sqrt(a), True))
Exception generated. \[ \int \frac {(d+e x) (f+g x)}{\sqrt {a+b x+c x^2}} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((e*x+d)*(g*x+f)/(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.38 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.97 \[ \int \frac {(d+e x) (f+g x)}{\sqrt {a+b x+c x^2}} \, dx=\frac {1}{4} \, \sqrt {c x^{2} + b x + a} {\left (\frac {2 \, e g x}{c} + \frac {4 \, c e f + 4 \, c d g - 3 \, b e g}{c^{2}}\right )} - \frac {{\left (8 \, c^{2} d f - 4 \, b c e f - 4 \, b c d g + 3 \, b^{2} e g - 4 \, a c e g\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((e*x+d)*(g*x+f)/(c*x^2+b*x+a)^(1/2),x, algorithm="giac")
Output:
1/4*sqrt(c*x^2 + b*x + a)*(2*e*g*x/c + (4*c*e*f + 4*c*d*g - 3*b*e*g)/c^2) - 1/8*(8*c^2*d*f - 4*b*c*e*f - 4*b*c*d*g + 3*b^2*e*g - 4*a*c*e*g)*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+g x)}{\sqrt {a+b x+c x^2}} \, dx=\int \frac {\left (f+g\,x\right )\,\left (d+e\,x\right )}{\sqrt {c\,x^2+b\,x+a}} \,d x \] Input:
int(((f + g*x)*(d + e*x))/(a + b*x + c*x^2)^(1/2),x)
Output:
int(((f + g*x)*(d + e*x))/(a + b*x + c*x^2)^(1/2), x)
Time = 0.17 (sec) , antiderivative size = 300, normalized size of antiderivative = 2.63 \[ \int \frac {(d+e x) (f+g x)}{\sqrt {a+b x+c x^2}} \, dx=\frac {-6 \sqrt {c \,x^{2}+b x +a}\, b c e g +8 \sqrt {c \,x^{2}+b x +a}\, c^{2} d g +8 \sqrt {c \,x^{2}+b x +a}\, c^{2} e f +4 \sqrt {c \,x^{2}+b x +a}\, c^{2} e g 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 e g +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} e g -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 d g -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 f +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 f}{8 c^{3}} \] Input:
int((e*x+d)*(g*x+f)/(c*x^2+b*x+a)^(1/2),x)
Output:
( - 6*sqrt(a + b*x + c*x**2)*b*c*e*g + 8*sqrt(a + b*x + c*x**2)*c**2*d*g + 8*sqrt(a + b*x + c*x**2)*c**2*e*f + 4*sqrt(a + b*x + c*x**2)*c**2*e*g*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*e*g + 3*sqrt(c)*log((2*sqrt(c)*sqrt(a + b*x + c*x**2) + b + 2* c*x)/sqrt(4*a*c - b**2))*b**2*e*g - 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*d*g - 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*f + 8*sq rt(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*f)/(8*c**3)