Integrand size = 20, antiderivative size = 81 \[ \int (c+d x) \sqrt {e+f x} (g+h x) \, dx=-\frac {2 (d e-c f) (f g-e h) (e+f x)^{3/2}}{3 f^3}+\frac {2 (d f g-2 d e h+c f h) (e+f x)^{5/2}}{5 f^3}+\frac {2 d h (e+f x)^{7/2}}{7 f^3} \] Output:
-2/3*(-c*f+d*e)*(-e*h+f*g)*(f*x+e)^(3/2)/f^3+2/5*(c*f*h-2*d*e*h+d*f*g)*(f* x+e)^(5/2)/f^3+2/7*d*h*(f*x+e)^(7/2)/f^3
Time = 0.05 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.86 \[ \int (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2 (e+f x)^{3/2} \left (7 c f (5 f g-2 e h+3 f h x)+d \left (8 e^2 h+3 f^2 x (7 g+5 h x)-2 e f (7 g+6 h x)\right )\right )}{105 f^3} \] Input:
Integrate[(c + d*x)*Sqrt[e + f*x]*(g + h*x),x]
Output:
(2*(e + f*x)^(3/2)*(7*c*f*(5*f*g - 2*e*h + 3*f*h*x) + d*(8*e^2*h + 3*f^2*x *(7*g + 5*h*x) - 2*e*f*(7*g + 6*h*x))))/(105*f^3)
Time = 0.22 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {86, 2009}
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 (c+d x) \sqrt {e+f x} (g+h x) \, dx\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \int \left (\frac {(e+f x)^{3/2} (c f h-2 d e h+d f g)}{f^2}+\frac {\sqrt {e+f x} (c f-d e) (f g-e h)}{f^2}+\frac {d h (e+f x)^{5/2}}{f^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 (e+f x)^{5/2} (c f h-2 d e h+d f g)}{5 f^3}-\frac {2 (e+f x)^{3/2} (d e-c f) (f g-e h)}{3 f^3}+\frac {2 d h (e+f x)^{7/2}}{7 f^3}\) |
Input:
Int[(c + d*x)*Sqrt[e + f*x]*(g + h*x),x]
Output:
(-2*(d*e - c*f)*(f*g - e*h)*(e + f*x)^(3/2))/(3*f^3) + (2*(d*f*g - 2*d*e*h + c*f*h)*(e + f*x)^(5/2))/(5*f^3) + (2*d*h*(e + f*x)^(7/2))/(7*f^3)
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Time = 0.58 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.75
method | result | size |
pseudoelliptic | \(-\frac {4 \left (\frac {\left (-3 x \left (\frac {5 h x}{7}+g \right ) d -5 c \left (\frac {3 h x}{5}+g \right )\right ) f^{2}}{2}+\left (\left (\frac {6 h x}{7}+g \right ) d +c h \right ) e f -\frac {4 d \,e^{2} h}{7}\right ) \left (f x +e \right )^{\frac {3}{2}}}{15 f^{3}}\) | \(61\) |
gosper | \(-\frac {2 \left (f x +e \right )^{\frac {3}{2}} \left (-15 d h \,x^{2} f^{2}-21 c \,f^{2} h x +12 d e f h x -21 d \,f^{2} g x +14 c e f h -35 c g \,f^{2}-8 d \,e^{2} h +14 d e f g \right )}{105 f^{3}}\) | \(73\) |
derivativedivides | \(\frac {\frac {2 d h \left (f x +e \right )^{\frac {7}{2}}}{7}+\frac {2 \left (\left (c f -d e \right ) h +d \left (-e h +f g \right )\right ) \left (f x +e \right )^{\frac {5}{2}}}{5}+\frac {2 \left (c f -d e \right ) \left (-e h +f g \right ) \left (f x +e \right )^{\frac {3}{2}}}{3}}{f^{3}}\) | \(73\) |
orering | \(-\frac {2 \left (f x +e \right )^{\frac {3}{2}} \left (-15 d h \,x^{2} f^{2}-21 c \,f^{2} h x +12 d e f h x -21 d \,f^{2} g x +14 c e f h -35 c g \,f^{2}-8 d \,e^{2} h +14 d e f g \right )}{105 f^{3}}\) | \(73\) |
default | \(\frac {\frac {2 d h \left (f x +e \right )^{\frac {7}{2}}}{7}+\frac {2 \left (-\left (-c f +d e \right ) h -d \left (e h -f g \right )\right ) \left (f x +e \right )^{\frac {5}{2}}}{5}+\frac {2 \left (-c f +d e \right ) \left (e h -f g \right ) \left (f x +e \right )^{\frac {3}{2}}}{3}}{f^{3}}\) | \(75\) |
trager | \(-\frac {2 \left (-15 d h \,f^{3} x^{3}-21 c \,f^{3} h \,x^{2}-3 d e \,f^{2} h \,x^{2}-21 d \,f^{3} g \,x^{2}-7 c e \,f^{2} h x -35 c \,f^{3} g x +4 d \,e^{2} f h x -7 d e \,f^{2} g x +14 c \,e^{2} f h -35 c e \,f^{2} g -8 d \,e^{3} h +14 d \,e^{2} f g \right ) \sqrt {f x +e}}{105 f^{3}}\) | \(121\) |
risch | \(-\frac {2 \left (-15 d h \,f^{3} x^{3}-21 c \,f^{3} h \,x^{2}-3 d e \,f^{2} h \,x^{2}-21 d \,f^{3} g \,x^{2}-7 c e \,f^{2} h x -35 c \,f^{3} g x +4 d \,e^{2} f h x -7 d e \,f^{2} g x +14 c \,e^{2} f h -35 c e \,f^{2} g -8 d \,e^{3} h +14 d \,e^{2} f g \right ) \sqrt {f x +e}}{105 f^{3}}\) | \(121\) |
Input:
int((d*x+c)*(f*x+e)^(1/2)*(h*x+g),x,method=_RETURNVERBOSE)
Output:
-4/15*(1/2*(-3*x*(5/7*h*x+g)*d-5*c*(3/5*h*x+g))*f^2+((6/7*h*x+g)*d+c*h)*e* f-4/7*d*e^2*h)*(f*x+e)^(3/2)/f^3
Time = 0.07 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.52 \[ \int (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2 \, {\left (15 \, d f^{3} h x^{3} + 3 \, {\left (7 \, d f^{3} g + {\left (d e f^{2} + 7 \, c f^{3}\right )} h\right )} x^{2} - 7 \, {\left (2 \, d e^{2} f - 5 \, c e f^{2}\right )} g + 2 \, {\left (4 \, d e^{3} - 7 \, c e^{2} f\right )} h + {\left (7 \, {\left (d e f^{2} + 5 \, c f^{3}\right )} g - {\left (4 \, d e^{2} f - 7 \, c e f^{2}\right )} h\right )} x\right )} \sqrt {f x + e}}{105 \, f^{3}} \] Input:
integrate((d*x+c)*(f*x+e)^(1/2)*(h*x+g),x, algorithm="fricas")
Output:
2/105*(15*d*f^3*h*x^3 + 3*(7*d*f^3*g + (d*e*f^2 + 7*c*f^3)*h)*x^2 - 7*(2*d *e^2*f - 5*c*e*f^2)*g + 2*(4*d*e^3 - 7*c*e^2*f)*h + (7*(d*e*f^2 + 5*c*f^3) *g - (4*d*e^2*f - 7*c*e*f^2)*h)*x)*sqrt(f*x + e)/f^3
Time = 0.82 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.53 \[ \int (c+d x) \sqrt {e+f x} (g+h x) \, dx=\begin {cases} \frac {2 \left (\frac {d h \left (e + f x\right )^{\frac {7}{2}}}{7 f^{2}} + \frac {\left (e + f x\right )^{\frac {5}{2}} \left (c f h - 2 d e h + d f g\right )}{5 f^{2}} + \frac {\left (e + f x\right )^{\frac {3}{2}} \left (- c e f h + c f^{2} g + d e^{2} h - d e f g\right )}{3 f^{2}}\right )}{f} & \text {for}\: f \neq 0 \\\sqrt {e} \left (c g x + \frac {d h x^{3}}{3} + \frac {x^{2} \left (c h + d g\right )}{2}\right ) & \text {otherwise} \end {cases} \] Input:
integrate((d*x+c)*(f*x+e)**(1/2)*(h*x+g),x)
Output:
Piecewise((2*(d*h*(e + f*x)**(7/2)/(7*f**2) + (e + f*x)**(5/2)*(c*f*h - 2* d*e*h + d*f*g)/(5*f**2) + (e + f*x)**(3/2)*(-c*e*f*h + c*f**2*g + d*e**2*h - d*e*f*g)/(3*f**2))/f, Ne(f, 0)), (sqrt(e)*(c*g*x + d*h*x**3/3 + x**2*(c *h + d*g)/2), True))
Time = 0.03 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.99 \[ \int (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2 \, {\left (15 \, {\left (f x + e\right )}^{\frac {7}{2}} d h + 21 \, {\left (d f g - {\left (2 \, d e - c f\right )} h\right )} {\left (f x + e\right )}^{\frac {5}{2}} - 35 \, {\left ({\left (d e f - c f^{2}\right )} g - {\left (d e^{2} - c e f\right )} h\right )} {\left (f x + e\right )}^{\frac {3}{2}}\right )}}{105 \, f^{3}} \] Input:
integrate((d*x+c)*(f*x+e)^(1/2)*(h*x+g),x, algorithm="maxima")
Output:
2/105*(15*(f*x + e)^(7/2)*d*h + 21*(d*f*g - (2*d*e - c*f)*h)*(f*x + e)^(5/ 2) - 35*((d*e*f - c*f^2)*g - (d*e^2 - c*e*f)*h)*(f*x + e)^(3/2))/f^3
Leaf count of result is larger than twice the leaf count of optimal. 261 vs. \(2 (69) = 138\).
Time = 0.13 (sec) , antiderivative size = 261, normalized size of antiderivative = 3.22 \[ \int (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2 \, {\left (105 \, \sqrt {f x + e} c e g + 35 \, {\left ({\left (f x + e\right )}^{\frac {3}{2}} - 3 \, \sqrt {f x + e} e\right )} c g + \frac {35 \, {\left ({\left (f x + e\right )}^{\frac {3}{2}} - 3 \, \sqrt {f x + e} e\right )} d e g}{f} + \frac {35 \, {\left ({\left (f x + e\right )}^{\frac {3}{2}} - 3 \, \sqrt {f x + e} e\right )} c e h}{f} + \frac {7 \, {\left (3 \, {\left (f x + e\right )}^{\frac {5}{2}} - 10 \, {\left (f x + e\right )}^{\frac {3}{2}} e + 15 \, \sqrt {f x + e} e^{2}\right )} d g}{f} + \frac {7 \, {\left (3 \, {\left (f x + e\right )}^{\frac {5}{2}} - 10 \, {\left (f x + e\right )}^{\frac {3}{2}} e + 15 \, \sqrt {f x + e} e^{2}\right )} d e h}{f^{2}} + \frac {7 \, {\left (3 \, {\left (f x + e\right )}^{\frac {5}{2}} - 10 \, {\left (f x + e\right )}^{\frac {3}{2}} e + 15 \, \sqrt {f x + e} e^{2}\right )} c h}{f} + \frac {3 \, {\left (5 \, {\left (f x + e\right )}^{\frac {7}{2}} - 21 \, {\left (f x + e\right )}^{\frac {5}{2}} e + 35 \, {\left (f x + e\right )}^{\frac {3}{2}} e^{2} - 35 \, \sqrt {f x + e} e^{3}\right )} d h}{f^{2}}\right )}}{105 \, f} \] Input:
integrate((d*x+c)*(f*x+e)^(1/2)*(h*x+g),x, algorithm="giac")
Output:
2/105*(105*sqrt(f*x + e)*c*e*g + 35*((f*x + e)^(3/2) - 3*sqrt(f*x + e)*e)* c*g + 35*((f*x + e)^(3/2) - 3*sqrt(f*x + e)*e)*d*e*g/f + 35*((f*x + e)^(3/ 2) - 3*sqrt(f*x + e)*e)*c*e*h/f + 7*(3*(f*x + e)^(5/2) - 10*(f*x + e)^(3/2 )*e + 15*sqrt(f*x + e)*e^2)*d*g/f + 7*(3*(f*x + e)^(5/2) - 10*(f*x + e)^(3 /2)*e + 15*sqrt(f*x + e)*e^2)*d*e*h/f^2 + 7*(3*(f*x + e)^(5/2) - 10*(f*x + e)^(3/2)*e + 15*sqrt(f*x + e)*e^2)*c*h/f + 3*(5*(f*x + e)^(7/2) - 21*(f*x + e)^(5/2)*e + 35*(f*x + e)^(3/2)*e^2 - 35*sqrt(f*x + e)*e^3)*d*h/f^2)/f
Time = 0.05 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.99 \[ \int (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2\,{\left (e+f\,x\right )}^{3/2}\,\left (15\,d\,h\,{\left (e+f\,x\right )}^2+35\,c\,f^2\,g+35\,d\,e^2\,h+21\,c\,f\,h\,\left (e+f\,x\right )-42\,d\,e\,h\,\left (e+f\,x\right )+21\,d\,f\,g\,\left (e+f\,x\right )-35\,c\,e\,f\,h-35\,d\,e\,f\,g\right )}{105\,f^3} \] Input:
int((e + f*x)^(1/2)*(g + h*x)*(c + d*x),x)
Output:
(2*(e + f*x)^(3/2)*(15*d*h*(e + f*x)^2 + 35*c*f^2*g + 35*d*e^2*h + 21*c*f* h*(e + f*x) - 42*d*e*h*(e + f*x) + 21*d*f*g*(e + f*x) - 35*c*e*f*h - 35*d* e*f*g))/(105*f^3)
Time = 0.16 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.47 \[ \int (c+d x) \sqrt {e+f x} (g+h x) \, dx=\frac {2 \sqrt {f x +e}\, \left (15 d \,f^{3} h \,x^{3}+21 c \,f^{3} h \,x^{2}+3 d e \,f^{2} h \,x^{2}+21 d \,f^{3} g \,x^{2}+7 c e \,f^{2} h x +35 c \,f^{3} g x -4 d \,e^{2} f h x +7 d e \,f^{2} g x -14 c \,e^{2} f h +35 c e \,f^{2} g +8 d \,e^{3} h -14 d \,e^{2} f g \right )}{105 f^{3}} \] Input:
int((d*x+c)*(f*x+e)^(1/2)*(h*x+g),x)
Output:
(2*sqrt(e + f*x)*( - 14*c*e**2*f*h + 35*c*e*f**2*g + 7*c*e*f**2*h*x + 35*c *f**3*g*x + 21*c*f**3*h*x**2 + 8*d*e**3*h - 14*d*e**2*f*g - 4*d*e**2*f*h*x + 7*d*e*f**2*g*x + 3*d*e*f**2*h*x**2 + 21*d*f**3*g*x**2 + 15*d*f**3*h*x** 3))/(105*f**3)