It is the Y to be integrated. Stay up late last night and figured it out. Got the correct answer.
Shame the equation in the paper was wrong!
Will post after I've cleaned up the code, and as pe your suggestions Lynn, removed some of the standard calcs from the loop.