How to solve system of nonlinear equations (A-x1)*x2=B?
显示 更早的评论
A and x1 are 300*1 vectors, x2 is a 1*2000 vector, B is a 300*2000 sparse matrix.
(A-x1)*x2=B
we know A, B, then how can we calculate both vector x1 and x2?
回答(1 个)
Hugo
2015-6-9
0 个投票
Notice that (A-x)*y=B (I changed the names of the variables for simplicity) can be written component-wise as (Ai-xi)*yj = Bij, where i and j denote the indexes. This equation is then showing that, for i constant, Bij / yj does not depends on j. In other words, Bij = ki * yj, where ki is a constant that depends on i. Thus, B must be the result of an outer product between two vectors for the equation to be solvable. To find the vectors that generate B, you can use singular value decomposition, which gives you B = U * D * V^T, being D a diagonal matrix. If D has only one value different from zero, then B is effectively an outer product. You can then construct the vectors k and y as k = alpha * u and y = beta * v, where u and v are the columns of U and V associated with the nonzero singular value, and alpha and beta are constants which product must equal the nonzero singular value. x can then be found by computing x = A-k. Notice that there are infinite solutions, since you can choose alpha arbitrarily (beta being bound by the relation to the nonzero singular value).
Hope this helps.
5 个评论
Torsten
2015-6-9
B is given, thus xi can be chosen arbitrarily and yj=Bij/(Ai-xi).
Best wishes
Torsten.
Actually, x cannot be chosen arbitrarily. Even when Bij = ui x vj, fixing j yields (Ai-xi)/ui = constant for all i, therefore establishing a relation between the components of x irrespective of the scaling factor of ui. That is, (Ai1-xi1)/ui1 = (Ai2-xi2)/ui2 where i1 and i2 are two different values of the index i.
Furthermore, B is given, but not all B will make the system of equations consistent. Suppose that A=[0;0] and B=[1,2;3,4]. Then y1 = -1/x1 = -3/x2 which means that x2 = 3*x1. However, y2=-2/x1 = -4/x2, indicating that x2 = 2*x1. This is a contradiction and the system cannot be solved!
Best regards
Hugo
Walter Roberson
2015-6-10
Not a contradiction if x2 and x1 are 0.
Hugo
2015-6-10
Certainly, my bad! Nevertheless, notice that x=0 is not a general solution for the system of equations. Consider B=[1,2;3,-4]. Now y2= -inf = +inf. Thus, x=0 is not a general solution.
Torsten
2015-6-10
I guess Bruno's response under
answers the OP's question.
Best wishes
Torsten.
类别
在 帮助中心 和 File Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!