Integrand size = 29, antiderivative size = 219 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^2 \sqrt {e+f x}} \, dx=-\frac {2 d (2 a d f h-b (d f g-d e h+2 c f h)) \sqrt {e+f x}}{b^3 f^2}-\frac {(b c-a d)^2 (b g-a h) \sqrt {e+f x}}{b^3 (b e-a f) (a+b x)}+\frac {2 d^2 h (e+f x)^{3/2}}{3 b^2 f^2}-\frac {(b c-a d) \left (5 a^2 d f h+b^2 (4 d e g-c f g+2 c e h)-a b (3 d f g+6 d e h+c f h)\right ) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {b e-a f}}\right )}{b^{7/2} (b e-a f)^{3/2}} \] Output:
-2*d*(2*a*d*f*h-b*(2*c*f*h-d*e*h+d*f*g))*(f*x+e)^(1/2)/b^3/f^2-(-a*d+b*c)^ 2*(-a*h+b*g)*(f*x+e)^(1/2)/b^3/(-a*f+b*e)/(b*x+a)+2/3*d^2*h*(f*x+e)^(3/2)/ b^2/f^2-(-a*d+b*c)*(5*a^2*d*f*h+b^2*(2*c*e*h-c*f*g+4*d*e*g)-a*b*(c*f*h+6*d *e*h+3*d*f*g))*arctanh(b^(1/2)*(f*x+e)^(1/2)/(-a*f+b*e)^(1/2))/b^(7/2)/(-a *f+b*e)^(3/2)
Time = 0.70 (sec) , antiderivative size = 291, normalized size of antiderivative = 1.33 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^2 \sqrt {e+f x}} \, dx=-\frac {\sqrt {e+f x} \left (-15 a^3 d^2 f^2 h+a^2 b d f (18 c f h+d (9 f g+8 e h-10 f h x))+b^3 \left (3 c^2 f^2 g-12 c d e f h x-2 d^2 e x (3 f g-2 e h+f h x)\right )+a b^2 \left (-3 c^2 f^2 h-6 c d f (2 e h+f (g-2 h x))+2 d^2 \left (2 e^2 h-3 e f (g-h x)+f^2 x (3 g+h x)\right )\right )\right )}{3 b^3 f^2 (b e-a f) (a+b x)}-\frac {(b c-a d) \left (5 a^2 d f h+b^2 (4 d e g-c f g+2 c e h)-a b (3 d f g+6 d e h+c f h)\right ) \arctan \left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {-b e+a f}}\right )}{b^{7/2} (-b e+a f)^{3/2}} \] Input:
Integrate[((c + d*x)^2*(g + h*x))/((a + b*x)^2*Sqrt[e + f*x]),x]
Output:
-1/3*(Sqrt[e + f*x]*(-15*a^3*d^2*f^2*h + a^2*b*d*f*(18*c*f*h + d*(9*f*g + 8*e*h - 10*f*h*x)) + b^3*(3*c^2*f^2*g - 12*c*d*e*f*h*x - 2*d^2*e*x*(3*f*g - 2*e*h + f*h*x)) + a*b^2*(-3*c^2*f^2*h - 6*c*d*f*(2*e*h + f*(g - 2*h*x)) + 2*d^2*(2*e^2*h - 3*e*f*(g - h*x) + f^2*x*(3*g + h*x)))))/(b^3*f^2*(b*e - a*f)*(a + b*x)) - ((b*c - a*d)*(5*a^2*d*f*h + b^2*(4*d*e*g - c*f*g + 2*c* e*h) - a*b*(3*d*f*g + 6*d*e*h + c*f*h))*ArcTan[(Sqrt[b]*Sqrt[e + f*x])/Sqr t[-(b*e) + a*f]])/(b^(7/2)*(-(b*e) + a*f)^(3/2))
Time = 0.45 (sec) , antiderivative size = 271, normalized size of antiderivative = 1.24, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {166, 27, 25, 164, 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 {(c+d x)^2 (g+h x)}{(a+b x)^2 \sqrt {e+f x}} \, dx\) |
\(\Big \downarrow \) 166 |
\(\displaystyle \frac {\int \frac {(c+d x) ((4 d e+c f) (b g-a h)-2 b c (f g-e h)+d (3 b f g+2 b e h-5 a f h) x)}{2 (a+b x) \sqrt {e+f x}}dx}{b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{b (a+b x) (b e-a f)}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int -\frac {(c+d x) (a (4 d e+c f) h-b (4 d e g-c f g+2 c e h)-d (3 b f g+2 b e h-5 a f h) x)}{(a+b x) \sqrt {e+f x}}dx}{2 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{b (a+b x) (b e-a f)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \frac {(c+d x) (a (4 d e+c f) h-b (4 d e g-c f g+2 c e h)-d (3 b f g+2 b e h-5 a f h) x)}{(a+b x) \sqrt {e+f x}}dx}{2 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{b (a+b x) (b e-a f)}\) |
\(\Big \downarrow \) 164 |
\(\displaystyle -\frac {-\frac {(b c-a d) \left (5 a^2 d f h-a b (c f h+6 d e h+3 d f g)+b^2 (2 c e h-c f g+4 d e g)\right ) \int \frac {1}{(a+b x) \sqrt {e+f x}}dx}{b^2}-\frac {2 d \sqrt {e+f x} \left (15 a^2 d f^2 h-a b f (18 c f h+8 d e h+9 d f g)+b d f x (-5 a f h+2 b e h+3 b f g)+2 b^2 (3 c f (2 e h+f g)+d e (3 f g-2 e h))\right )}{3 b^2 f^2}}{2 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{b (a+b x) (b e-a f)}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle -\frac {-\frac {2 (b c-a d) \left (5 a^2 d f h-a b (c f h+6 d e h+3 d f g)+b^2 (2 c e h-c f g+4 d e g)\right ) \int \frac {1}{a+\frac {b (e+f x)}{f}-\frac {b e}{f}}d\sqrt {e+f x}}{b^2 f}-\frac {2 d \sqrt {e+f x} \left (15 a^2 d f^2 h-a b f (18 c f h+8 d e h+9 d f g)+b d f x (-5 a f h+2 b e h+3 b f g)+2 b^2 (3 c f (2 e h+f g)+d e (3 f g-2 e h))\right )}{3 b^2 f^2}}{2 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{b (a+b x) (b e-a f)}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle -\frac {\frac {2 (b c-a d) \text {arctanh}\left (\frac {\sqrt {b} \sqrt {e+f x}}{\sqrt {b e-a f}}\right ) \left (5 a^2 d f h-a b (c f h+6 d e h+3 d f g)+b^2 (2 c e h-c f g+4 d e g)\right )}{b^{5/2} \sqrt {b e-a f}}-\frac {2 d \sqrt {e+f x} \left (15 a^2 d f^2 h-a b f (18 c f h+8 d e h+9 d f g)+b d f x (-5 a f h+2 b e h+3 b f g)+2 b^2 (3 c f (2 e h+f g)+d e (3 f g-2 e h))\right )}{3 b^2 f^2}}{2 b (b e-a f)}-\frac {(c+d x)^2 \sqrt {e+f x} (b g-a h)}{b (a+b x) (b e-a f)}\) |
Input:
Int[((c + d*x)^2*(g + h*x))/((a + b*x)^2*Sqrt[e + f*x]),x]
Output:
-(((b*g - a*h)*(c + d*x)^2*Sqrt[e + f*x])/(b*(b*e - a*f)*(a + b*x))) - ((- 2*d*Sqrt[e + f*x]*(15*a^2*d*f^2*h - a*b*f*(9*d*f*g + 8*d*e*h + 18*c*f*h) + 2*b^2*(d*e*(3*f*g - 2*e*h) + 3*c*f*(f*g + 2*e*h)) + b*d*f*(3*b*f*g + 2*b* e*h - 5*a*f*h)*x))/(3*b^2*f^2) + (2*(b*c - a*d)*(5*a^2*d*f*h + b^2*(4*d*e* g - c*f*g + 2*c*e*h) - a*b*(3*d*f*g + 6*d*e*h + c*f*h))*ArcTanh[(Sqrt[b]*S qrt[e + f*x])/Sqrt[b*e - a*f]])/(b^(5/2)*Sqrt[b*e - a*f]))/(2*b*(b*e - a*f ))
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_))^(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_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_ ))*((g_.) + (h_.)*(x_)), x_] :> Simp[(-(a*d*f*h*(n + 2) + b*c*f*h*(m + 2) - b*d*(f*g + e*h)*(m + n + 3) - b*d*f*h*(m + n + 2)*x))*(a + b*x)^(m + 1)*(( c + d*x)^(n + 1)/(b^2*d^2*(m + n + 2)*(m + n + 3))), x] + Simp[(a^2*d^2*f*h *(n + 1)*(n + 2) + a*b*d*(n + 1)*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 3)) + b^2*(c^2*f*h*(m + 1)*(m + 2) - c*d*(f*g + e*h)*(m + 1)*(m + n + 3) + d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2*d^2*(m + n + 2)*(m + n + 3)) Int[( a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && NeQ[m + n + 2, 0] && NeQ[m + n + 3, 0]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[(b*g - a*h)*(a + b*x)^(m + 1)*(c + d*x)^n*((e + f*x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] - Simp[1/(b*(b*e - a*f)*(m + 1)) Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^p*Simp[b* c*(f*g - e*h)*(m + 1) + (b*g - a*h)*(d*e*n + c*f*(p + 1)) + d*(b*(f*g - e*h )*(m + 1) + f*(b*g - a*h)*(n + p + 1))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, h, p}, x] && ILtQ[m, -1] && GtQ[n, 0]
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.53 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.03
method | result | size |
risch | \(-\frac {2 d \left (-h f d b x +6 a d f h -6 b c f h +2 b d e h -3 b d f g \right ) \sqrt {f x +e}}{3 f^{2} b^{3}}+\frac {\left (2 a d -2 b c \right ) \left (-\frac {f \left (a^{2} d h -a b c h -a b d g +b^{2} c g \right ) \sqrt {f x +e}}{2 \left (a f -b e \right ) \left (\left (f x +e \right ) b +a f -b e \right )}+\frac {\left (5 a^{2} d f h -a b c f h -6 a b d e h -3 a b d f g +2 b^{2} c e h -b^{2} c f g +4 b^{2} d e g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{2 \left (a f -b e \right ) \sqrt {\left (a f -b e \right ) b}}\right )}{b^{3}}\) | \(226\) |
pseudoelliptic | \(-\frac {5 \left (-\left (\frac {\left (-c f g +2 e \left (c h +2 d g \right )\right ) b^{2}}{5}-\frac {a \left (\left (c h +3 d g \right ) f +6 d e h \right ) b}{5}+a^{2} d f h \right ) \left (a d -b c \right ) \left (b x +a \right ) f^{2} \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )+\left (\frac {\left (-g \,f^{2} c^{2}+4 x d \left (\frac {\left (\frac {h x}{3}+g \right ) d}{2}+c h \right ) e f -\frac {4 d^{2} e^{2} h x}{3}\right ) b^{3}}{5}+\frac {a \left (\left (2 \left (-\frac {1}{3} h \,x^{2}-g x \right ) d^{2}+2 c \left (-2 h x +g \right ) d +h \,c^{2}\right ) f^{2}+4 d \left (\frac {\left (-h x +g \right ) d}{2}+c h \right ) e f -\frac {4 d^{2} e^{2} h}{3}\right ) b^{2}}{5}-\frac {6 a^{2} d \left (\left (\left (-\frac {5 h x}{9}+\frac {g}{2}\right ) d +c h \right ) f +\frac {4 d e h}{9}\right ) f b}{5}+a^{3} d^{2} f^{2} h \right ) \sqrt {f x +e}\, \sqrt {\left (a f -b e \right ) b}\right )}{\sqrt {\left (a f -b e \right ) b}\, f^{2} b^{3} \left (a f -b e \right ) \left (b x +a \right )}\) | \(305\) |
derivativedivides | \(\frac {-\frac {2 d \left (-\frac {d h \left (f x +e \right )^{\frac {3}{2}} b}{3}+2 a d f h \sqrt {f x +e}-2 b c f h \sqrt {f x +e}+b d e h \sqrt {f x +e}-b d f g \sqrt {f x +e}\right )}{b^{3}}+\frac {2 f^{2} \left (-\frac {f \left (h \,d^{2} a^{3}-2 a^{2} b c d h -a^{2} b \,d^{2} g +a \,b^{2} c^{2} h +2 a \,b^{2} c d g -b^{3} c^{2} g \right ) \sqrt {f x +e}}{2 \left (a f -b e \right ) \left (\left (f x +e \right ) b +a f -b e \right )}+\frac {\left (5 a^{3} d^{2} f h -6 a^{2} b c d f h -6 a^{2} b \,d^{2} e h -3 a^{2} b \,d^{2} f g +a \,b^{2} c^{2} f h +8 a \,b^{2} c d e h +2 a \,b^{2} c d f g +4 a \,b^{2} d^{2} e g -2 b^{3} c^{2} e h +b^{3} c^{2} f g -4 b^{3} c d e g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{2 \left (a f -b e \right ) \sqrt {\left (a f -b e \right ) b}}\right )}{b^{3}}}{f^{2}}\) | \(335\) |
default | \(\frac {-\frac {2 d \left (-\frac {d h \left (f x +e \right )^{\frac {3}{2}} b}{3}+2 a d f h \sqrt {f x +e}-2 b c f h \sqrt {f x +e}+b d e h \sqrt {f x +e}-b d f g \sqrt {f x +e}\right )}{b^{3}}+\frac {2 f^{2} \left (-\frac {f \left (h \,d^{2} a^{3}-2 a^{2} b c d h -a^{2} b \,d^{2} g +a \,b^{2} c^{2} h +2 a \,b^{2} c d g -b^{3} c^{2} g \right ) \sqrt {f x +e}}{2 \left (a f -b e \right ) \left (\left (f x +e \right ) b +a f -b e \right )}+\frac {\left (5 a^{3} d^{2} f h -6 a^{2} b c d f h -6 a^{2} b \,d^{2} e h -3 a^{2} b \,d^{2} f g +a \,b^{2} c^{2} f h +8 a \,b^{2} c d e h +2 a \,b^{2} c d f g +4 a \,b^{2} d^{2} e g -2 b^{3} c^{2} e h +b^{3} c^{2} f g -4 b^{3} c d e g \right ) \arctan \left (\frac {b \sqrt {f x +e}}{\sqrt {\left (a f -b e \right ) b}}\right )}{2 \left (a f -b e \right ) \sqrt {\left (a f -b e \right ) b}}\right )}{b^{3}}}{f^{2}}\) | \(335\) |
Input:
int((d*x+c)^2*(h*x+g)/(b*x+a)^2/(f*x+e)^(1/2),x,method=_RETURNVERBOSE)
Output:
-2/3*d*(-b*d*f*h*x+6*a*d*f*h-6*b*c*f*h+2*b*d*e*h-3*b*d*f*g)*(f*x+e)^(1/2)/ f^2/b^3+1/b^3*(2*a*d-2*b*c)*(-1/2*f*(a^2*d*h-a*b*c*h-a*b*d*g+b^2*c*g)/(a*f -b*e)*(f*x+e)^(1/2)/((f*x+e)*b+a*f-b*e)+1/2*(5*a^2*d*f*h-a*b*c*f*h-6*a*b*d *e*h-3*a*b*d*f*g+2*b^2*c*e*h-b^2*c*f*g+4*b^2*d*e*g)/(a*f-b*e)/((a*f-b*e)*b )^(1/2)*arctan(b*(f*x+e)^(1/2)/((a*f-b*e)*b)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 766 vs. \(2 (201) = 402\).
Time = 0.13 (sec) , antiderivative size = 1546, normalized size of antiderivative = 7.06 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^2 \sqrt {e+f x}} \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)^2*(h*x+g)/(b*x+a)^2/(f*x+e)^(1/2),x, algorithm="fricas")
Output:
[1/6*(3*sqrt(b^2*e - a*b*f)*((4*(a*b^3*c*d - a^2*b^2*d^2)*e*f^2 - (a*b^3*c ^2 + 2*a^2*b^2*c*d - 3*a^3*b*d^2)*f^3)*g + (2*(a*b^3*c^2 - 4*a^2*b^2*c*d + 3*a^3*b*d^2)*e*f^2 - (a^2*b^2*c^2 - 6*a^3*b*c*d + 5*a^4*d^2)*f^3)*h + ((4 *(b^4*c*d - a*b^3*d^2)*e*f^2 - (b^4*c^2 + 2*a*b^3*c*d - 3*a^2*b^2*d^2)*f^3 )*g + (2*(b^4*c^2 - 4*a*b^3*c*d + 3*a^2*b^2*d^2)*e*f^2 - (a*b^3*c^2 - 6*a^ 2*b^2*c*d + 5*a^3*b*d^2)*f^3)*h)*x)*log((b*f*x + 2*b*e - a*f - 2*sqrt(b^2* e - a*b*f)*sqrt(f*x + e))/(b*x + a)) + 2*(2*(b^5*d^2*e^2*f - 2*a*b^4*d^2*e *f^2 + a^2*b^3*d^2*f^3)*h*x^2 + 3*(2*a*b^4*d^2*e^2*f - (b^5*c^2 - 2*a*b^4* c*d + 5*a^2*b^3*d^2)*e*f^2 + (a*b^4*c^2 - 2*a^2*b^3*c*d + 3*a^3*b^2*d^2)*f ^3)*g - (4*a*b^4*d^2*e^3 - 4*(3*a*b^4*c*d - a^2*b^3*d^2)*e^2*f - (3*a*b^4* c^2 - 30*a^2*b^3*c*d + 23*a^3*b^2*d^2)*e*f^2 + 3*(a^2*b^3*c^2 - 6*a^3*b^2* c*d + 5*a^4*b*d^2)*f^3)*h + 2*(3*(b^5*d^2*e^2*f - 2*a*b^4*d^2*e*f^2 + a^2* b^3*d^2*f^3)*g - (2*b^5*d^2*e^3 - (6*b^5*c*d - a*b^4*d^2)*e^2*f + 4*(3*a*b ^4*c*d - 2*a^2*b^3*d^2)*e*f^2 - (6*a^2*b^3*c*d - 5*a^3*b^2*d^2)*f^3)*h)*x) *sqrt(f*x + e))/(a*b^6*e^2*f^2 - 2*a^2*b^5*e*f^3 + a^3*b^4*f^4 + (b^7*e^2* f^2 - 2*a*b^6*e*f^3 + a^2*b^5*f^4)*x), 1/3*(3*sqrt(-b^2*e + a*b*f)*((4*(a* b^3*c*d - a^2*b^2*d^2)*e*f^2 - (a*b^3*c^2 + 2*a^2*b^2*c*d - 3*a^3*b*d^2)*f ^3)*g + (2*(a*b^3*c^2 - 4*a^2*b^2*c*d + 3*a^3*b*d^2)*e*f^2 - (a^2*b^2*c^2 - 6*a^3*b*c*d + 5*a^4*d^2)*f^3)*h + ((4*(b^4*c*d - a*b^3*d^2)*e*f^2 - (b^4 *c^2 + 2*a*b^3*c*d - 3*a^2*b^2*d^2)*f^3)*g + (2*(b^4*c^2 - 4*a*b^3*c*d ...
Timed out. \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^2 \sqrt {e+f x}} \, dx=\text {Timed out} \] Input:
integrate((d*x+c)**2*(h*x+g)/(b*x+a)**2/(f*x+e)**(1/2),x)
Output:
Timed out
Exception generated. \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^2 \sqrt {e+f x}} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((d*x+c)^2*(h*x+g)/(b*x+a)^2/(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(a*f-b*e>0)', see `assume?` for m ore detail
Leaf count of result is larger than twice the leaf count of optimal. 408 vs. \(2 (201) = 402\).
Time = 0.13 (sec) , antiderivative size = 408, normalized size of antiderivative = 1.86 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^2 \sqrt {e+f x}} \, dx=\frac {{\left (4 \, b^{3} c d e g - 4 \, a b^{2} d^{2} e g - b^{3} c^{2} f g - 2 \, a b^{2} c d f g + 3 \, a^{2} b d^{2} f g + 2 \, b^{3} c^{2} e h - 8 \, a b^{2} c d e h + 6 \, a^{2} b d^{2} e h - a b^{2} c^{2} f h + 6 \, a^{2} b c d f h - 5 \, a^{3} d^{2} f h\right )} \arctan \left (\frac {\sqrt {f x + e} b}{\sqrt {-b^{2} e + a b f}}\right )}{{\left (b^{4} e - a b^{3} f\right )} \sqrt {-b^{2} e + a b f}} - \frac {\sqrt {f x + e} b^{3} c^{2} f g - 2 \, \sqrt {f x + e} a b^{2} c d f g + \sqrt {f x + e} a^{2} b d^{2} f g - \sqrt {f x + e} a b^{2} c^{2} f h + 2 \, \sqrt {f x + e} a^{2} b c d f h - \sqrt {f x + e} a^{3} d^{2} f h}{{\left (b^{4} e - a b^{3} f\right )} {\left ({\left (f x + e\right )} b - b e + a f\right )}} + \frac {2 \, {\left (3 \, \sqrt {f x + e} b^{4} d^{2} f^{5} g + {\left (f x + e\right )}^{\frac {3}{2}} b^{4} d^{2} f^{4} h - 3 \, \sqrt {f x + e} b^{4} d^{2} e f^{4} h + 6 \, \sqrt {f x + e} b^{4} c d f^{5} h - 6 \, \sqrt {f x + e} a b^{3} d^{2} f^{5} h\right )}}{3 \, b^{6} f^{6}} \] Input:
integrate((d*x+c)^2*(h*x+g)/(b*x+a)^2/(f*x+e)^(1/2),x, algorithm="giac")
Output:
(4*b^3*c*d*e*g - 4*a*b^2*d^2*e*g - b^3*c^2*f*g - 2*a*b^2*c*d*f*g + 3*a^2*b *d^2*f*g + 2*b^3*c^2*e*h - 8*a*b^2*c*d*e*h + 6*a^2*b*d^2*e*h - a*b^2*c^2*f *h + 6*a^2*b*c*d*f*h - 5*a^3*d^2*f*h)*arctan(sqrt(f*x + e)*b/sqrt(-b^2*e + a*b*f))/((b^4*e - a*b^3*f)*sqrt(-b^2*e + a*b*f)) - (sqrt(f*x + e)*b^3*c^2 *f*g - 2*sqrt(f*x + e)*a*b^2*c*d*f*g + sqrt(f*x + e)*a^2*b*d^2*f*g - sqrt( f*x + e)*a*b^2*c^2*f*h + 2*sqrt(f*x + e)*a^2*b*c*d*f*h - sqrt(f*x + e)*a^3 *d^2*f*h)/((b^4*e - a*b^3*f)*((f*x + e)*b - b*e + a*f)) + 2/3*(3*sqrt(f*x + e)*b^4*d^2*f^5*g + (f*x + e)^(3/2)*b^4*d^2*f^4*h - 3*sqrt(f*x + e)*b^4*d ^2*e*f^4*h + 6*sqrt(f*x + e)*b^4*c*d*f^5*h - 6*sqrt(f*x + e)*a*b^3*d^2*f^5 *h)/(b^6*f^6)
Time = 0.22 (sec) , antiderivative size = 450, normalized size of antiderivative = 2.05 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^2 \sqrt {e+f x}} \, dx=\sqrt {e+f\,x}\,\left (\frac {2\,d^2\,f\,g-6\,d^2\,e\,h+4\,c\,d\,f\,h}{b^2\,f^2}-\frac {4\,d^2\,h\,\left (a\,f-b\,e\right )}{b^3\,f^2}\right )+\frac {\sqrt {e+f\,x}\,\left (-f\,h\,a^3\,d^2+2\,f\,h\,a^2\,b\,c\,d+f\,g\,a^2\,b\,d^2-f\,h\,a\,b^2\,c^2-2\,f\,g\,a\,b^2\,c\,d+f\,g\,b^3\,c^2\right )}{\left (a\,f-b\,e\right )\,\left (b^4\,\left (e+f\,x\right )-b^4\,e+a\,b^3\,f\right )}+\frac {2\,d^2\,h\,{\left (e+f\,x\right )}^{3/2}}{3\,b^2\,f^2}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,\sqrt {e+f\,x}\,\left (a\,d-b\,c\right )\,\left (b^2\,c\,f\,g-2\,b^2\,c\,e\,h-4\,b^2\,d\,e\,g-5\,a^2\,d\,f\,h+a\,b\,c\,f\,h+6\,a\,b\,d\,e\,h+3\,a\,b\,d\,f\,g\right )}{\sqrt {a\,f-b\,e}\,\left (b^3\,c^2\,f\,g-2\,b^3\,c^2\,e\,h+5\,a^3\,d^2\,f\,h+4\,a\,b^2\,d^2\,e\,g+a\,b^2\,c^2\,f\,h-6\,a^2\,b\,d^2\,e\,h-3\,a^2\,b\,d^2\,f\,g-4\,b^3\,c\,d\,e\,g+8\,a\,b^2\,c\,d\,e\,h+2\,a\,b^2\,c\,d\,f\,g-6\,a^2\,b\,c\,d\,f\,h\right )}\right )\,\left (a\,d-b\,c\right )\,\left (b^2\,c\,f\,g-2\,b^2\,c\,e\,h-4\,b^2\,d\,e\,g-5\,a^2\,d\,f\,h+a\,b\,c\,f\,h+6\,a\,b\,d\,e\,h+3\,a\,b\,d\,f\,g\right )}{b^{7/2}\,{\left (a\,f-b\,e\right )}^{3/2}} \] Input:
int(((g + h*x)*(c + d*x)^2)/((e + f*x)^(1/2)*(a + b*x)^2),x)
Output:
(e + f*x)^(1/2)*((2*d^2*f*g - 6*d^2*e*h + 4*c*d*f*h)/(b^2*f^2) - (4*d^2*h* (a*f - b*e))/(b^3*f^2)) + ((e + f*x)^(1/2)*(b^3*c^2*f*g - a^3*d^2*f*h - a* b^2*c^2*f*h + a^2*b*d^2*f*g - 2*a*b^2*c*d*f*g + 2*a^2*b*c*d*f*h))/((a*f - b*e)*(b^4*(e + f*x) - b^4*e + a*b^3*f)) + (2*d^2*h*(e + f*x)^(3/2))/(3*b^2 *f^2) + (atan((b^(1/2)*(e + f*x)^(1/2)*(a*d - b*c)*(b^2*c*f*g - 2*b^2*c*e* h - 4*b^2*d*e*g - 5*a^2*d*f*h + a*b*c*f*h + 6*a*b*d*e*h + 3*a*b*d*f*g))/(( a*f - b*e)^(1/2)*(b^3*c^2*f*g - 2*b^3*c^2*e*h + 5*a^3*d^2*f*h + 4*a*b^2*d^ 2*e*g + a*b^2*c^2*f*h - 6*a^2*b*d^2*e*h - 3*a^2*b*d^2*f*g - 4*b^3*c*d*e*g + 8*a*b^2*c*d*e*h + 2*a*b^2*c*d*f*g - 6*a^2*b*c*d*f*h)))*(a*d - b*c)*(b^2* c*f*g - 2*b^2*c*e*h - 4*b^2*d*e*g - 5*a^2*d*f*h + a*b*c*f*h + 6*a*b*d*e*h + 3*a*b*d*f*g))/(b^(7/2)*(a*f - b*e)^(3/2))
Time = 0.17 (sec) , antiderivative size = 1740, normalized size of antiderivative = 7.95 \[ \int \frac {(c+d x)^2 (g+h x)}{(a+b x)^2 \sqrt {e+f x}} \, dx =\text {Too large to display} \] Input:
int((d*x+c)^2*(h*x+g)/(b*x+a)^2/(f*x+e)^(1/2),x)
Output:
(15*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e )))*a**4*d**2*f**3*h - 18*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/( sqrt(b)*sqrt(a*f - b*e)))*a**3*b*c*d*f**3*h - 18*sqrt(b)*sqrt(a*f - b*e)*a tan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**3*b*d**2*e*f**2*h - 9* sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))* a**3*b*d**2*f**3*g + 15*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sq rt(b)*sqrt(a*f - b*e)))*a**3*b*d**2*f**3*h*x + 3*sqrt(b)*sqrt(a*f - b*e)*a tan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**2*b**2*c**2*f**3*h + 2 4*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)) )*a**2*b**2*c*d*e*f**2*h + 6*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b )/(sqrt(b)*sqrt(a*f - b*e)))*a**2*b**2*c*d*f**3*g - 18*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**2*b**2*c*d*f**3* h*x + 12*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**2*b**2*d**2*e*f**2*g - 18*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**2*b**2*d**2*e*f**2*h*x - 9*sqrt(b )*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a**2*b **2*d**2*f**3*g*x - 6*sqrt(b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt (b)*sqrt(a*f - b*e)))*a*b**3*c**2*e*f**2*h + 3*sqrt(b)*sqrt(a*f - b*e)*ata n((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a*b**3*c**2*f**3*g + 3*sqrt (b)*sqrt(a*f - b*e)*atan((sqrt(e + f*x)*b)/(sqrt(b)*sqrt(a*f - b*e)))*a...