Hello Everyone, I'm not 100% sure I have posted this in the right section but I think it is.

My problem is as follows:

I have a linear function

and are Constants, with and are variables with

I have a starting equation (of random values).

for example,

Then I get a set of new values

What I want to find are the values of that solve the second equation but at the same time minimize the difference between the new value and the old (starting) value. i.e. minimize so in this case

I don't know if anyone can help me with this, but even just a suggestion of where to look / what to try would be great.