Problems with Solving a Complex System of Two Equations
이전 댓글 표시
I am attempting to solve a geometric relation with regards to a geodesic dome. There are two principal relations which should allow the problem to be solved. One is a level-curve function, while the other relates the height of the dome. I will begin with the level curve:
(9*((175-(x^2))^0.5))+(9*((243-(y^2))^0.5))+(((175-(x^2))^0.5)*((243-(y^2))^0.5))+((2^0.5)*x*y) = (81+(162*(2^0.5)))
The others relate the height of the dome:
(x+(((x^2)+(18*((175-(x^2))^0.5)))^0.5)) = h
(y+(((y^2)+(18*((486-(2*(y^2)))^0.5))-162)^0.5)) = h
Therefore:
(x+(((x^2)+(18*((175-(x^2))^0.5)))^0.5)) = (y+(((y^2)+(18*((486-(2*(y^2)))^0.5))-162)^0.5))
Please be advised that I am using MATLAB R2007a, so my syntax for solving certain functions will differ slightly from the most recent version. This was my last attempt at solving the problem using the symbolic math toolbox:
syms x y
S = solve('(x+(((x^2)+(18*((175-(x^2))^0.5)))^0.5)) = (y+(((y^2)+(18*((486-(2*(y^2)))^0.5))-162)^0.5))', '(9*((175-(x^2))^0.5))+(9*((243-(y^2))^0.5))+(((175-(x^2))^0.5)*((243-(y^2))^0.5))+((2^0.5)*x*y) = (81+(162*(2^0.5)))', x, y)
...This input functions, but it takes a very long time to process. In fact, it takes more time to process than I am willing to allow. What I do know from calculations performed in Excel, however, is the precise range in which a single answer for this relation should exist:
13.218 < x < 13.228
15.456 < y < 15.49
Therefore, to reduce the calculation period, I want to specify the range over which MATLAB will evaluate the relations. I think I should be able to obtain the results I'm after if I can do that. Otherwise, would it be more proper to use a different set of functions or re-arrange the inputs into the "solve" function? I'm very curious to know.
...I'm hoping this is a simple problem to solve - I just don't know how to manage it myself!
Respectfully,
-Michael
댓글 수: 2
Walter Roberson
2014년 1월 17일
Your MATLAB is using Maple for the symbolic engine, right? Do you also have the advanced symbolic toolkit that gives you access to all of Maple? Or do you happen to have a version of Maple ?
Michael
2014년 1월 18일
채택된 답변
추가 답변 (1개)
Bruno Pop-Stefanov
2014년 1월 17일
In your case you would write the following, replacing eqn1 and eqn2 with each equation:
% init_guess is a matrix with 2 columns
init_guess = [13.2 13.3; % starting and ending point for x
15.4 15.6]; % starting and ending point for y
syms x y
S = vpasolve([eqn1, eqn2], [x, y], init_guess)
However, I solved your system under a minute on my computer without specifying the range and obtained the following solutions, with a warning that they might be bogus: see attached text file.
카테고리
도움말 센터 및 File Exchange에서 Assumptions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!