I have the equation: $$ x_i = a \sum_{j=1}^n A_{ij} k_j x_{j}^b$$ Given a, b, $A_{ij}$ and $K_j$, can I use iterate numerical method to solve $x_i$?
That is given the initial value of $x_j$ on the RHS and solve the $x_i$ on the LHS, then assign the value of $x_i$ on the LHS to the $x_j$ on the RHS, and so on until $|x_i - x_j|$ is very small.
I write the following matlab code
n = 100;
X = ones(n,1);
diff = 1;
tol = 10^(-10);
%b = 3.2;
b = 0.8;
a = 1.2;
A = magic(n)
K = rand(n,1)
while diff>tol
X_new = a*A*(X.^b.*K);
diff = norm(X - X_new);
X = X_new;
end
My questions are:
- Is this method right?
- If it is right, under what condition can I find the solution?