integral(f(x,y),dx,0,1-y), then you should get 12y^3-24y^2+12y. and take integral(12y^3-24y^2+12y, dy, 0, 1), you will get 1. There is a double integral here to satisfy your statement "The answer should satisfy that integral of f from -inf to inf should be 1". I hope that helps.