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 AX_{1} + BX_{2} + CX_{3} +DX_{4} = Q \left ( A+B+C+D \right )<br />

A,B,C,D and Q are Constants, with  0<=Q<=1 and X_{1}, X_{2} ,X_{3},X_{4} are variables with  0<=X_{i}<=1

I have a starting equation (of random values).

for example,

3\left ( .4 \right )+2\left ( .5\right )+9\left ( .6\right )+4\left ( .3\right ) =  .49(3+2+9+4)

Then I get a set of new values

11\left ( X_{1} \right )+7\left ( X_{2}\right )+2\left ( X_{3}\right )+36\left ( X_{4}\right ) =  .57(11+7+2+36)

What I want to find are the values of  X_{i} that solve the second equation but at the same time minimize the difference between the new X_{i} value and the old (starting) X_{i} value. i.e. minimize  \left( X_{1new} -X_{1old(starting)}\right) so in this case  \left( X_{1new} -.4\right)

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.