In Mathematica v10, this happens:
Why is the derivative of y=f(x) not evaluated inside the integral to give 2x?
How can I re-write the input to cause the expression inside the integral to be evaluated prior to performing integration (definite)?
I'm trying to think back to my Lisp days for a hint, but it's not helping :)
The y that you defined using an delayed evaluation is not a function (it has no arguments). Define it like this instead:
y[x_] := x^2
(As an aside, your parameters a and b do not need to be defined using a delayed evaluation.)
Although Mathematica has some elements inherited from Lisp, its syntax is not the same. So guessing proper syntax is likely to elad to all sorts of problems. A quick course on things for folks coming from other languages is here and can be helpful in getting you jumpstarted in using Mathematica and divorcing you from pre-suppositions when thinking of other languages that you know: