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

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

I have a starting equation (of random values).

for example,

$\displaystyle 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

$\displaystyle 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 $\displaystyle X_{i}$ that solve the second equation but at the same time minimize the difference between the new $\displaystyle X_{i}$ value and the old (starting) $\displaystyle X_{i}$ value. i.e. minimize $\displaystyle \left( X_{1new} -X_{1old(starting)}\right)$ so in this case $\displaystyle \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.