Hmm. Typically, a problem with an integral constraint is dealt with using the Lagrange multiplier method. That is, instead of setting
and solving the DE
you do the following. Set and set
The problem is that in all these cases,
which makes all the resulting equations much too constrained. Even if you let you still have problems. You end up with or an absurdity.
There's something I'm missing here, or something is really whacked out. Can you please double-check your problem statement, and make sure it's correct? In particular, I'd expect to see an floating around somewhere, at least if the calculus of variations is going to be the right tool for the job.