So, as I understand it, your current problem is this:
and you want to convert to
Is that correct? If so, can I ask if you have the freedom to assign the and If so, I would go with the following assignments:
Differentiating yields the following:
We would thus have the following system:
Is that what you were seeking?