フィルターのクリア

How to solve a system of nonlinear equations with three unknowns & three equations?

2 ビュー (過去 30 日間)
Farid
Farid 2013 年 11 月 3 日
コメント済み: Walter Roberson 2013 年 11 月 8 日
I tried to solve the system of nonlinear equations with fsolve function but the answers for unknowns are not true,I think there is a problem with number of iterations or the reasonable error.
How can I set these parameters?
Here are the equations:
311*cos(0.5236-x(3))+x(1)*cos(x(2)+x(3))-311=0
311*sin(.5236-x(3))-(x(1)*sin(x(2)+x(3)))=0
(x(1)^2)*(tan(.5236)*cos(x(2))*cos(x(2)-.7526)-(1/tan(.5236))*(sin(x(2))*sin(x(2)-.7526)))-7036.18=0
x(1) is a positive and x(2) and x(3) are angles then it is reasonable to be between 0 and 2pi
  5 件のコメント
Walter Roberson
Walter Roberson 2013 年 11 月 3 日
Probably that all of them should equal 0.
Farid
Farid 2013 年 11 月 4 日
Yeah, all of them are equal to zero, x(1) is a positive and x(2) and x(3) are angles then it is reasonable to be between 0 and 2pi

サインインしてコメントする。

回答 (2 件)

Matt J
Matt J 2013 年 11 月 4 日
編集済み: Matt J 2013 年 11 月 4 日
Seems a matter of making a lucky initial guess. Here's one solution
x =
146.6872 3.9507 0.9997
Here's another
x =
592.2262 2.9287 9.3271
And another
x =
592.2262 2.9287 3.0439
  7 件のコメント
Matt J
Matt J 2013 年 11 月 5 日
That, I do not know.
Farid
Farid 2013 年 11 月 5 日
ok,thanks about your consideration

サインインしてコメントする。


Walter Roberson
Walter Roberson 2013 年 11 月 6 日
編集済み: Walter Roberson 2013 年 11 月 6 日
x = [146.6871682461996007408428, 3.950714907905676528151964, 0.9997481449580266590840019]
To the accuracy used, this is the only solution with x(1) positive and the other two in [0, 2*Pi]
The x(1) in the 592 range (given by Matt J) appear to be false solutions.
Method of solution:
The third equation can be solved for x1 to give x1 in terms of x2.
The second equation can be solved for x3 to give x3 in terms of x2.
Substituting the x1 and x3 terms into the first equation gives an equation in terms of x2 only. This equation goes imaginary for some values of x2 in [0, 2*Pi] . By examining the plot, you can see that there is a single 0 crossing, somewhere near x2 = 5*Pi/4. You can use fzero() or equivalent to find the x2 for which the equation becomes 0.
Then, with the numeric x2 in hand, you can substitute into the two previous forms to get x1 and x3. Although there is an arctan() involved, there is only one solution that works.
  4 件のコメント
Farid
Farid 2013 年 11 月 7 日
these equations are not completely true and maybe the some coefficients should be changed,I'm looking for a general solution for these equation in MATLAB codes
Walter Roberson
Walter Roberson 2013 年 11 月 8 日
Your equations involve the values 0.5236 and 0.7526 . Is there a formula that relates those two values? If I replace 0.5236 with the symbol alpha, then can 0.7526 be expressed in terms of alpha, or is it an independent variable?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeNumeric Solvers についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by