Integrand size = 20, antiderivative size = 123 \[ \int \frac {(A+B x) (d+e x)^3}{a+b x} \, dx=\frac {(A b-a B) e (b d-a e)^2 x}{b^4}+\frac {(A b-a B) (b d-a e) (d+e x)^2}{2 b^3}+\frac {(A b-a B) (d+e x)^3}{3 b^2}+\frac {B (d+e x)^4}{4 b e}+\frac {(A b-a B) (b d-a e)^3 \log (a+b x)}{b^5} \] Output:
(A*b-B*a)*e*(-a*e+b*d)^2*x/b^4+1/2*(A*b-B*a)*(-a*e+b*d)*(e*x+d)^2/b^3+1/3* (A*b-B*a)*(e*x+d)^3/b^2+1/4*B*(e*x+d)^4/b/e+(A*b-B*a)*(-a*e+b*d)^3*ln(b*x+ a)/b^5
Time = 0.05 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.37 \[ \int \frac {(A+B x) (d+e x)^3}{a+b x} \, dx=\frac {b x \left (-12 a^3 B e^3+6 a^2 b e^2 (6 B d+2 A e+B e x)-2 a b^2 e \left (3 A e (6 d+e x)+B \left (18 d^2+9 d e x+2 e^2 x^2\right )\right )+b^3 \left (2 A e \left (18 d^2+9 d e x+2 e^2 x^2\right )+3 B \left (4 d^3+6 d^2 e x+4 d e^2 x^2+e^3 x^3\right )\right )\right )+12 (A b-a B) (b d-a e)^3 \log (a+b x)}{12 b^5} \] Input:
Integrate[((A + B*x)*(d + e*x)^3)/(a + b*x),x]
Output:
(b*x*(-12*a^3*B*e^3 + 6*a^2*b*e^2*(6*B*d + 2*A*e + B*e*x) - 2*a*b^2*e*(3*A *e*(6*d + e*x) + B*(18*d^2 + 9*d*e*x + 2*e^2*x^2)) + b^3*(2*A*e*(18*d^2 + 9*d*e*x + 2*e^2*x^2) + 3*B*(4*d^3 + 6*d^2*e*x + 4*d*e^2*x^2 + e^3*x^3))) + 12*(A*b - a*B)*(b*d - a*e)^3*Log[a + b*x])/(12*b^5)
Time = 0.27 (sec) , antiderivative size = 123, 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 \frac {(A+B x) (d+e x)^3}{a+b x} \, dx\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \int \left (\frac {(A b-a B) (b d-a e)^3}{b^4 (a+b x)}+\frac {e (A b-a B) (b d-a e)^2}{b^4}+\frac {e (d+e x) (A b-a B) (b d-a e)}{b^3}+\frac {e (d+e x)^2 (A b-a B)}{b^2}+\frac {B (d+e x)^3}{b}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(A b-a B) (b d-a e)^3 \log (a+b x)}{b^5}+\frac {e x (A b-a B) (b d-a e)^2}{b^4}+\frac {(d+e x)^2 (A b-a B) (b d-a e)}{2 b^3}+\frac {(d+e x)^3 (A b-a B)}{3 b^2}+\frac {B (d+e x)^4}{4 b e}\) |
Input:
Int[((A + B*x)*(d + e*x)^3)/(a + b*x),x]
Output:
((A*b - a*B)*e*(b*d - a*e)^2*x)/b^4 + ((A*b - a*B)*(b*d - a*e)*(d + e*x)^2 )/(2*b^3) + ((A*b - a*B)*(d + e*x)^3)/(3*b^2) + (B*(d + e*x)^4)/(4*b*e) + ((A*b - a*B)*(b*d - a*e)^3*Log[a + b*x])/b^5
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]))))
Leaf count of result is larger than twice the leaf count of optimal. \(260\) vs. \(2(117)=234\).
Time = 0.21 (sec) , antiderivative size = 261, normalized size of antiderivative = 2.12
method | result | size |
norman | \(\frac {\left (A \,a^{2} b \,e^{3}-3 A a \,b^{2} d \,e^{2}+3 A \,b^{3} d^{2} e -B \,a^{3} e^{3}+3 B \,a^{2} b d \,e^{2}-3 B a \,b^{2} d^{2} e +b^{3} B \,d^{3}\right ) x}{b^{4}}-\frac {e \left (A a b \,e^{2}-3 A \,b^{2} d e -B \,a^{2} e^{2}+3 B a b d e -3 b^{2} B \,d^{2}\right ) x^{2}}{2 b^{3}}+\frac {e^{2} \left (A b e -B a e +3 B b d \right ) x^{3}}{3 b^{2}}+\frac {B \,e^{3} x^{4}}{4 b}-\frac {\left (A \,a^{3} b \,e^{3}-3 A \,a^{2} b^{2} d \,e^{2}+3 A a \,b^{3} d^{2} e -A \,b^{4} d^{3}-B \,a^{4} e^{3}+3 B \,a^{3} b d \,e^{2}-3 B \,a^{2} b^{2} d^{2} e +B a \,b^{3} d^{3}\right ) \ln \left (b x +a \right )}{b^{5}}\) | \(261\) |
default | \(\frac {\frac {1}{4} b^{3} B \,x^{4} e^{3}+\frac {1}{3} A \,b^{3} e^{3} x^{3}-\frac {1}{3} B a \,b^{2} e^{3} x^{3}+B \,b^{3} d \,e^{2} x^{3}-\frac {1}{2} A a \,b^{2} e^{3} x^{2}+\frac {3}{2} A \,b^{3} d \,e^{2} x^{2}+\frac {1}{2} B \,a^{2} b \,e^{3} x^{2}-\frac {3}{2} B a \,b^{2} d \,e^{2} x^{2}+\frac {3}{2} B \,b^{3} d^{2} e \,x^{2}+A \,a^{2} b \,e^{3} x -3 A a \,b^{2} d \,e^{2} x +3 A \,b^{3} d^{2} e x -B \,a^{3} e^{3} x +3 B \,a^{2} b d \,e^{2} x -3 B a \,b^{2} d^{2} e x +b^{3} B \,d^{3} x}{b^{4}}+\frac {\left (-A \,a^{3} b \,e^{3}+3 A \,a^{2} b^{2} d \,e^{2}-3 A a \,b^{3} d^{2} e +A \,b^{4} d^{3}+B \,a^{4} e^{3}-3 B \,a^{3} b d \,e^{2}+3 B \,a^{2} b^{2} d^{2} e -B a \,b^{3} d^{3}\right ) \ln \left (b x +a \right )}{b^{5}}\) | \(293\) |
risch | \(\frac {B \,e^{3} x^{4}}{4 b}+\frac {A \,e^{3} x^{3}}{3 b}-\frac {B a \,e^{3} x^{3}}{3 b^{2}}+\frac {B d \,e^{2} x^{3}}{b}-\frac {A a \,e^{3} x^{2}}{2 b^{2}}+\frac {3 A d \,e^{2} x^{2}}{2 b}+\frac {B \,a^{2} e^{3} x^{2}}{2 b^{3}}-\frac {3 B a d \,e^{2} x^{2}}{2 b^{2}}+\frac {3 B \,d^{2} e \,x^{2}}{2 b}+\frac {A \,a^{2} e^{3} x}{b^{3}}-\frac {3 A a d \,e^{2} x}{b^{2}}+\frac {3 A \,d^{2} e x}{b}-\frac {B \,a^{3} e^{3} x}{b^{4}}+\frac {3 B \,a^{2} d \,e^{2} x}{b^{3}}-\frac {3 B a \,d^{2} e x}{b^{2}}+\frac {B \,d^{3} x}{b}-\frac {\ln \left (b x +a \right ) A \,a^{3} e^{3}}{b^{4}}+\frac {3 \ln \left (b x +a \right ) A \,a^{2} d \,e^{2}}{b^{3}}-\frac {3 \ln \left (b x +a \right ) A a \,d^{2} e}{b^{2}}+\frac {\ln \left (b x +a \right ) A \,d^{3}}{b}+\frac {\ln \left (b x +a \right ) B \,a^{4} e^{3}}{b^{5}}-\frac {3 \ln \left (b x +a \right ) B \,a^{3} d \,e^{2}}{b^{4}}+\frac {3 \ln \left (b x +a \right ) B \,a^{2} d^{2} e}{b^{3}}-\frac {\ln \left (b x +a \right ) B a \,d^{3}}{b^{2}}\) | \(341\) |
parallelrisch | \(-\frac {-36 A \ln \left (b x +a \right ) a^{2} b^{2} d \,e^{2}+36 A \ln \left (b x +a \right ) a \,b^{3} d^{2} e +36 A x a \,b^{3} d \,e^{2}-36 B x \,a^{2} b^{2} d \,e^{2}+36 B x a \,b^{3} d^{2} e +18 B \,x^{2} a \,b^{3} d \,e^{2}+36 B \ln \left (b x +a \right ) a^{3} b d \,e^{2}-36 B \ln \left (b x +a \right ) a^{2} b^{2} d^{2} e -36 A x \,b^{4} d^{2} e +12 B x \,a^{3} b \,e^{3}+12 A \ln \left (b x +a \right ) a^{3} b \,e^{3}+12 B \ln \left (b x +a \right ) a \,b^{3} d^{3}-4 A \,x^{3} b^{4} e^{3}-12 B x \,b^{4} d^{3}-12 A \ln \left (b x +a \right ) b^{4} d^{3}-12 B \ln \left (b x +a \right ) a^{4} e^{3}-3 B \,x^{4} e^{3} b^{4}+4 B \,x^{3} a \,b^{3} e^{3}-12 B \,x^{3} b^{4} d \,e^{2}+6 A \,x^{2} a \,b^{3} e^{3}-18 A \,x^{2} b^{4} d \,e^{2}-6 B \,x^{2} a^{2} b^{2} e^{3}-18 B \,x^{2} b^{4} d^{2} e -12 A x \,a^{2} b^{2} e^{3}}{12 b^{5}}\) | \(342\) |
Input:
int((B*x+A)*(e*x+d)^3/(b*x+a),x,method=_RETURNVERBOSE)
Output:
(A*a^2*b*e^3-3*A*a*b^2*d*e^2+3*A*b^3*d^2*e-B*a^3*e^3+3*B*a^2*b*d*e^2-3*B*a *b^2*d^2*e+B*b^3*d^3)/b^4*x-1/2/b^3*e*(A*a*b*e^2-3*A*b^2*d*e-B*a^2*e^2+3*B *a*b*d*e-3*B*b^2*d^2)*x^2+1/3/b^2*e^2*(A*b*e-B*a*e+3*B*b*d)*x^3+1/4/b*B*e^ 3*x^4-(A*a^3*b*e^3-3*A*a^2*b^2*d*e^2+3*A*a*b^3*d^2*e-A*b^4*d^3-B*a^4*e^3+3 *B*a^3*b*d*e^2-3*B*a^2*b^2*d^2*e+B*a*b^3*d^3)/b^5*ln(b*x+a)
Leaf count of result is larger than twice the leaf count of optimal. 269 vs. \(2 (119) = 238\).
Time = 0.07 (sec) , antiderivative size = 269, normalized size of antiderivative = 2.19 \[ \int \frac {(A+B x) (d+e x)^3}{a+b x} \, dx=\frac {3 \, B b^{4} e^{3} x^{4} + 4 \, {\left (3 \, B b^{4} d e^{2} - {\left (B a b^{3} - A b^{4}\right )} e^{3}\right )} x^{3} + 6 \, {\left (3 \, B b^{4} d^{2} e - 3 \, {\left (B a b^{3} - A b^{4}\right )} d e^{2} + {\left (B a^{2} b^{2} - A a b^{3}\right )} e^{3}\right )} x^{2} + 12 \, {\left (B b^{4} d^{3} - 3 \, {\left (B a b^{3} - A b^{4}\right )} d^{2} e + 3 \, {\left (B a^{2} b^{2} - A a b^{3}\right )} d e^{2} - {\left (B a^{3} b - A a^{2} b^{2}\right )} e^{3}\right )} x - 12 \, {\left ({\left (B a b^{3} - A b^{4}\right )} d^{3} - 3 \, {\left (B a^{2} b^{2} - A a b^{3}\right )} d^{2} e + 3 \, {\left (B a^{3} b - A a^{2} b^{2}\right )} d e^{2} - {\left (B a^{4} - A a^{3} b\right )} e^{3}\right )} \log \left (b x + a\right )}{12 \, b^{5}} \] Input:
integrate((B*x+A)*(e*x+d)^3/(b*x+a),x, algorithm="fricas")
Output:
1/12*(3*B*b^4*e^3*x^4 + 4*(3*B*b^4*d*e^2 - (B*a*b^3 - A*b^4)*e^3)*x^3 + 6* (3*B*b^4*d^2*e - 3*(B*a*b^3 - A*b^4)*d*e^2 + (B*a^2*b^2 - A*a*b^3)*e^3)*x^ 2 + 12*(B*b^4*d^3 - 3*(B*a*b^3 - A*b^4)*d^2*e + 3*(B*a^2*b^2 - A*a*b^3)*d* e^2 - (B*a^3*b - A*a^2*b^2)*e^3)*x - 12*((B*a*b^3 - A*b^4)*d^3 - 3*(B*a^2* b^2 - A*a*b^3)*d^2*e + 3*(B*a^3*b - A*a^2*b^2)*d*e^2 - (B*a^4 - A*a^3*b)*e ^3)*log(b*x + a))/b^5
Leaf count of result is larger than twice the leaf count of optimal. 221 vs. \(2 (107) = 214\).
Time = 0.39 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.80 \[ \int \frac {(A+B x) (d+e x)^3}{a+b x} \, dx=\frac {B e^{3} x^{4}}{4 b} + x^{3} \left (\frac {A e^{3}}{3 b} - \frac {B a e^{3}}{3 b^{2}} + \frac {B d e^{2}}{b}\right ) + x^{2} \left (- \frac {A a e^{3}}{2 b^{2}} + \frac {3 A d e^{2}}{2 b} + \frac {B a^{2} e^{3}}{2 b^{3}} - \frac {3 B a d e^{2}}{2 b^{2}} + \frac {3 B d^{2} e}{2 b}\right ) + x \left (\frac {A a^{2} e^{3}}{b^{3}} - \frac {3 A a d e^{2}}{b^{2}} + \frac {3 A d^{2} e}{b} - \frac {B a^{3} e^{3}}{b^{4}} + \frac {3 B a^{2} d e^{2}}{b^{3}} - \frac {3 B a d^{2} e}{b^{2}} + \frac {B d^{3}}{b}\right ) + \frac {\left (- A b + B a\right ) \left (a e - b d\right )^{3} \log {\left (a + b x \right )}}{b^{5}} \] Input:
integrate((B*x+A)*(e*x+d)**3/(b*x+a),x)
Output:
B*e**3*x**4/(4*b) + x**3*(A*e**3/(3*b) - B*a*e**3/(3*b**2) + B*d*e**2/b) + x**2*(-A*a*e**3/(2*b**2) + 3*A*d*e**2/(2*b) + B*a**2*e**3/(2*b**3) - 3*B* a*d*e**2/(2*b**2) + 3*B*d**2*e/(2*b)) + x*(A*a**2*e**3/b**3 - 3*A*a*d*e**2 /b**2 + 3*A*d**2*e/b - B*a**3*e**3/b**4 + 3*B*a**2*d*e**2/b**3 - 3*B*a*d** 2*e/b**2 + B*d**3/b) + (-A*b + B*a)*(a*e - b*d)**3*log(a + b*x)/b**5
Leaf count of result is larger than twice the leaf count of optimal. 266 vs. \(2 (119) = 238\).
Time = 0.05 (sec) , antiderivative size = 266, normalized size of antiderivative = 2.16 \[ \int \frac {(A+B x) (d+e x)^3}{a+b x} \, dx=\frac {3 \, B b^{3} e^{3} x^{4} + 4 \, {\left (3 \, B b^{3} d e^{2} - {\left (B a b^{2} - A b^{3}\right )} e^{3}\right )} x^{3} + 6 \, {\left (3 \, B b^{3} d^{2} e - 3 \, {\left (B a b^{2} - A b^{3}\right )} d e^{2} + {\left (B a^{2} b - A a b^{2}\right )} e^{3}\right )} x^{2} + 12 \, {\left (B b^{3} d^{3} - 3 \, {\left (B a b^{2} - A b^{3}\right )} d^{2} e + 3 \, {\left (B a^{2} b - A a b^{2}\right )} d e^{2} - {\left (B a^{3} - A a^{2} b\right )} e^{3}\right )} x}{12 \, b^{4}} - \frac {{\left ({\left (B a b^{3} - A b^{4}\right )} d^{3} - 3 \, {\left (B a^{2} b^{2} - A a b^{3}\right )} d^{2} e + 3 \, {\left (B a^{3} b - A a^{2} b^{2}\right )} d e^{2} - {\left (B a^{4} - A a^{3} b\right )} e^{3}\right )} \log \left (b x + a\right )}{b^{5}} \] Input:
integrate((B*x+A)*(e*x+d)^3/(b*x+a),x, algorithm="maxima")
Output:
1/12*(3*B*b^3*e^3*x^4 + 4*(3*B*b^3*d*e^2 - (B*a*b^2 - A*b^3)*e^3)*x^3 + 6* (3*B*b^3*d^2*e - 3*(B*a*b^2 - A*b^3)*d*e^2 + (B*a^2*b - A*a*b^2)*e^3)*x^2 + 12*(B*b^3*d^3 - 3*(B*a*b^2 - A*b^3)*d^2*e + 3*(B*a^2*b - A*a*b^2)*d*e^2 - (B*a^3 - A*a^2*b)*e^3)*x)/b^4 - ((B*a*b^3 - A*b^4)*d^3 - 3*(B*a^2*b^2 - A*a*b^3)*d^2*e + 3*(B*a^3*b - A*a^2*b^2)*d*e^2 - (B*a^4 - A*a^3*b)*e^3)*lo g(b*x + a)/b^5
Leaf count of result is larger than twice the leaf count of optimal. 298 vs. \(2 (119) = 238\).
Time = 0.12 (sec) , antiderivative size = 298, normalized size of antiderivative = 2.42 \[ \int \frac {(A+B x) (d+e x)^3}{a+b x} \, dx=\frac {3 \, B b^{3} e^{3} x^{4} + 12 \, B b^{3} d e^{2} x^{3} - 4 \, B a b^{2} e^{3} x^{3} + 4 \, A b^{3} e^{3} x^{3} + 18 \, B b^{3} d^{2} e x^{2} - 18 \, B a b^{2} d e^{2} x^{2} + 18 \, A b^{3} d e^{2} x^{2} + 6 \, B a^{2} b e^{3} x^{2} - 6 \, A a b^{2} e^{3} x^{2} + 12 \, B b^{3} d^{3} x - 36 \, B a b^{2} d^{2} e x + 36 \, A b^{3} d^{2} e x + 36 \, B a^{2} b d e^{2} x - 36 \, A a b^{2} d e^{2} x - 12 \, B a^{3} e^{3} x + 12 \, A a^{2} b e^{3} x}{12 \, b^{4}} - \frac {{\left (B a b^{3} d^{3} - A b^{4} d^{3} - 3 \, B a^{2} b^{2} d^{2} e + 3 \, A a b^{3} d^{2} e + 3 \, B a^{3} b d e^{2} - 3 \, A a^{2} b^{2} d e^{2} - B a^{4} e^{3} + A a^{3} b e^{3}\right )} \log \left ({\left | b x + a \right |}\right )}{b^{5}} \] Input:
integrate((B*x+A)*(e*x+d)^3/(b*x+a),x, algorithm="giac")
Output:
1/12*(3*B*b^3*e^3*x^4 + 12*B*b^3*d*e^2*x^3 - 4*B*a*b^2*e^3*x^3 + 4*A*b^3*e ^3*x^3 + 18*B*b^3*d^2*e*x^2 - 18*B*a*b^2*d*e^2*x^2 + 18*A*b^3*d*e^2*x^2 + 6*B*a^2*b*e^3*x^2 - 6*A*a*b^2*e^3*x^2 + 12*B*b^3*d^3*x - 36*B*a*b^2*d^2*e* x + 36*A*b^3*d^2*e*x + 36*B*a^2*b*d*e^2*x - 36*A*a*b^2*d*e^2*x - 12*B*a^3* e^3*x + 12*A*a^2*b*e^3*x)/b^4 - (B*a*b^3*d^3 - A*b^4*d^3 - 3*B*a^2*b^2*d^2 *e + 3*A*a*b^3*d^2*e + 3*B*a^3*b*d*e^2 - 3*A*a^2*b^2*d*e^2 - B*a^4*e^3 + A *a^3*b*e^3)*log(abs(b*x + a))/b^5
Time = 1.00 (sec) , antiderivative size = 268, normalized size of antiderivative = 2.18 \[ \int \frac {(A+B x) (d+e x)^3}{a+b x} \, dx=x\,\left (\frac {B\,d^3+3\,A\,e\,d^2}{b}+\frac {a\,\left (\frac {a\,\left (\frac {A\,e^3+3\,B\,d\,e^2}{b}-\frac {B\,a\,e^3}{b^2}\right )}{b}-\frac {3\,d\,e\,\left (A\,e+B\,d\right )}{b}\right )}{b}\right )-x^2\,\left (\frac {a\,\left (\frac {A\,e^3+3\,B\,d\,e^2}{b}-\frac {B\,a\,e^3}{b^2}\right )}{2\,b}-\frac {3\,d\,e\,\left (A\,e+B\,d\right )}{2\,b}\right )+x^3\,\left (\frac {A\,e^3+3\,B\,d\,e^2}{3\,b}-\frac {B\,a\,e^3}{3\,b^2}\right )+\frac {\ln \left (a+b\,x\right )\,\left (B\,a^4\,e^3-3\,B\,a^3\,b\,d\,e^2-A\,a^3\,b\,e^3+3\,B\,a^2\,b^2\,d^2\,e+3\,A\,a^2\,b^2\,d\,e^2-B\,a\,b^3\,d^3-3\,A\,a\,b^3\,d^2\,e+A\,b^4\,d^3\right )}{b^5}+\frac {B\,e^3\,x^4}{4\,b} \] Input:
int(((A + B*x)*(d + e*x)^3)/(a + b*x),x)
Output:
x*((B*d^3 + 3*A*d^2*e)/b + (a*((a*((A*e^3 + 3*B*d*e^2)/b - (B*a*e^3)/b^2)) /b - (3*d*e*(A*e + B*d))/b))/b) - x^2*((a*((A*e^3 + 3*B*d*e^2)/b - (B*a*e^ 3)/b^2))/(2*b) - (3*d*e*(A*e + B*d))/(2*b)) + x^3*((A*e^3 + 3*B*d*e^2)/(3* b) - (B*a*e^3)/(3*b^2)) + (log(a + b*x)*(A*b^4*d^3 + B*a^4*e^3 - A*a^3*b*e ^3 - B*a*b^3*d^3 + 3*A*a^2*b^2*d*e^2 + 3*B*a^2*b^2*d^2*e - 3*A*a*b^3*d^2*e - 3*B*a^3*b*d*e^2))/b^5 + (B*e^3*x^4)/(4*b)
Time = 0.16 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.26 \[ \int \frac {(A+B x) (d+e x)^3}{a+b x} \, dx=\frac {x \left (e^{3} x^{3}+4 d \,e^{2} x^{2}+6 d^{2} e x +4 d^{3}\right )}{4} \] Input:
int((B*x+A)*(e*x+d)^3/(b*x+a),x)
Output:
(x*(4*d**3 + 6*d**2*e*x + 4*d*e**2*x**2 + e**3*x**3))/4