I want to integral x and y first,but there were a variable w stuck in my function.Can I left it and integral x,y first?
No, integral2() is strictly numeric. Every variable involved must have a numeric value (or be one of the two named parameters.)
Symbolic integration is the way to go for this task.