hey fobos, thanks for the reply, much appreciated!

So I don't have any initial conditions. However I know that this crossover will happen exaclty once, that is there exists

such that

and

, with equality only at

so just to check whether I am understanding correctly what you're saying:

should I split the integral up in two parts (where the breaking point is the kink in x, say

) and then apply the Euler-Lagrange equation for both integrals, using, in both cases, the constrait

?

or am I misunderstanding you?

EDIT: and then maximize wrt