2*(d-5)*d-(d+1)^3=(2d-10)*d-(d+1)^3=2d^2-10d-(d+1)^3=2d^2-10d-(d^3+3d^2+3d+1)=2d^2-10d-d^3-3d^2-3d-1=-d^2-10d-d^3-3d-1=-d^3-d^2-13d-1
2*(d-5)*d-(d+1)^3=(2d-10)*d-(d+1)^3=2d^2-10d-(d+1)^3=2d^2-10d-(d^3+3d^2+3d+1)=2d^2-10d-d^3-3d^2-3d-1=-d^2-10d-d^3-3d-1=-d^3-d^2-13d-1