3 eq 3 unknowns big mess
이전 댓글 표시
Hi, Pls help me solve these 3 equation with 3 unknowns and explain how its done:
1) (7939*cos(y)*sin(z))/100 - (9*cos(y)*cos(z))/20 - (367*sin(y))/50 + 441/200 = 0
2) (7939*cos(x)*cos(z))/100 + (367*cos(y)*sin(x))/50 + (9*cos(x)*sin(z))/20 - (9*cos(z)*sin(x)*sin(y))/20 + (7939*sin(x)*sin(y)*sin(z))/100 + 7263/100 = -75
3) (367*cos(x)*cos(y))/50 - (7939*cos(z)*sin(x))/100 - (9*sin(x)*sin(z))/20 - (9*cos(x)*cos(z)*sin(y))/20 + (7939*cos(x)*sin(y)*sin(z))/100 - 387/100 = 0
At least give me an answer even if it takes mathematica because even that is not giving out answers.
답변 (2개)
Oleg Komarov
2011년 6월 27일
With the optimization tb:
f=@(x)[7939*cos(x(2))*sin(x(3))/100-9*cos(x(2))*cos(x(3))/20-367*sin(x(2))/50+441/200;
7939*cos(x(1))*cos(x(3))/100+367*cos(x(2))*sin(x(1))/50+9*cos(x(1))*sin(x(3))/20-9*cos(x(3))*sin(x(1))*sin(x(2))/20+7939*sin(x(1))*sin(x(2))*sin(x(3))/100+7263/100+75;
367*cos(x(1))*cos(x(2))/50-7939*cos(x(3))*sin(x(1))/100-9*sin(x(1))*sin(x(3))/20-9*cos(x(1))*cos(x(3))*sin(x(2))/20+7939*cos(x(1))*sin(x(2))*sin(x(3))/100-387/100];
EDIT
f = @(x) [2.79 * cos(x(2))*sin(x(2)) - 76.1*sin(x(1))*sin(x(2)) - 2.06*cos(x(2))*cos(x(2)) + 2.06*cos(x(1))*sin(x(2))*sin(x(2)) + 2.79*cos(x(1))*cos(x(2))*sin(x(2));
75 - 2.79*cos(x(2))*sin(x(1)) - 2.06*sin(x(1))*sin(x(2)) - 76.1*cos(x(1));
76.1*cos(x(2))*sin(x(1)) - 2.06*cos(x(2))*sin(x(2)) + 2.79*sin(x(2))*sin(x(2)) - 2.79*cos(x(1))*cos(x(2))*cos(x(2)) - 2.06*cos(x(1))*cos(x(2))*sin(x(2))]
opt = optimset('MaxFunEvals',500);
R = fsolve(f,[0 0 0],opt)
댓글 수: 2
Zoheb Akhtar
2011년 6월 29일
Oleg Komarov
2011년 6월 29일
It's a syntax constraint.
See the edit above.
Walter Roberson
2011년 6월 27일
0 개 추천
My computation is that there are no simultaneous real roots for these equations. There might be imaginary roots.
If you consider the second and third equations together, two equations in three unknowns, and solve each of them for y, you get two pairs of solutions (in terms of x and z). As those two need to be equal, you can construct the list [sol2_A - sol3_A, sol2_B - sol3_A, sol2_A - sol3_B, sol2_B - sol3_B]. At least one member of the list must equal 0 somewhere over (x,z) in order for there to be a solution for the pair of equations. If you ask for a 3D plot of that values of that list over x = 0 to 2*Pi and z = 0 to 2*Pi, you will not get any plot because all members of the list evaluate to imaginary values over that entire range, at least to within the resolution of the plot.
(I also approached the problem in other ways, and with different pairs of variables, and each time found that either there were no solutions or that at least one value had to be imaginary.)
댓글 수: 2
Zoheb Akhtar
2011년 6월 29일
Walter Roberson
2011년 6월 29일
Not possible. You ask to solve for z, but you do not have any z in your expressions.
카테고리
도움말 센터 및 File Exchange에서 Numeric Solvers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!