필터 지우기
필터 지우기

How to solve a equation that appears z2

조회 수: 14 (최근 30일)
yogan sganzerla
yogan sganzerla 2018년 7월 21일
댓글: Walter Roberson 2018년 7월 22일
Hey, I have this equation to find a solution:
I defined this equation:
eqn = ((Sig) + (E*(Sig^(const_1))/const_2) - aux == 0)
And the solve I am using this function:
resp = solve(eqn, Sig)
But in Command Windows appears this message: Warning: Solutions are parameterized by the symbols: z2. To include parameters and conditions in the solution, specify the 'ReturnConditions' value as 'true'.\
Well I search about it and I changed my solve:
resp = solve(eqn, Sig,'ReturnConditions',true)
and the answer is
Why don't I have the exact number that solves this equation? Solving by hand, I found that the variable Sig is equal to 452.
  댓글 수: 3
yogan sganzerla
yogan sganzerla 2018년 7월 22일
This is my hole code Sig is a variable that I would like to find a value.
Walter Roberson
Walter Roberson 2018년 7월 22일
yogan, it would help if you posted your entire code including the assignments to const_1, const_2, E, and aux. That would make it easier to check our code for typing mistakes. It is easy to make typing mistakes when we type from images of numbers.

댓글을 달려면 로그인하십시오.

답변 (2개)

Stephan
Stephan 2018년 7월 22일
편집: Stephan 2018년 7월 22일
Hi,
to get numeric solution use:
vpasolve(eqn,Sig)
after assigning values to the other variables.
Best regards
Stephan
  댓글 수: 3
Stephan
Stephan 2018년 7월 22일
편집: Stephan 2018년 7월 22일
Hi,
This is a good example why people should share code instead of pictures from their equations and values... i have tested the anwer i gave you, and checked it against the anwer from Walter. What should i say - i have didferent results in the values than both of you ;-)
But using my method i do not get a complex result, but the first result that is given by Walters method for finding all the solutions to your problem:
syms Sig
E = 6250;
const_1 = 59/9;
const_2 = 7496282746403319;
aux = 7180524015140341 / 17179869184;
eqn = ((Sig) + (E*(Sig^(const_1))/const_2) - aux == 0);
% my answer
stephan_sol = vpasolve(eqn,Sig)
resp = solve(eqn,Sig,'ReturnConditions',true);
% Walters answer
walter_sol = vpa(solve(resp.conditions).^9)
% same value for non complex numbers?
test = double(stephan_sol) == double(walter_sol(1))
So i do not really understand what gone wrong when you tried. But please share your values in a form that they can be copied and pasted to help prevend missunderstandings.
Best regards
Stephan
Walter Roberson
Walter Roberson 2018년 7월 22일
I went back in my history, and I see now that I missed a '5' in the numerator for aux, so the 352 I came up with was wrong.

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2018년 7월 22일
What the solution is telling you is that eqn has multiple solutions, the 9th power of the set of all values z2 such that z2 satisfies what is in resp.conditions, which holds
z2^59 + (7496282746403319*z2^9)/6250 - 5382511036199773734618773191779/107374182400000 == 0 & -pi/9 < angle(z2) & angle(z2) <= pi/9
You can find the set of values, z2, by doing
sols = solve(resp.conditions)
which gives
ans =
root(z^59 + (7496282746403319*z^9)/6250 - 5382511036199773734618773191779/107374182400000, z, 1)
root(z^59 + (7496282746403319*z^9)/6250 - 5382511036199773734618773191779/107374182400000, z, 18)
root(z^59 + (7496282746403319*z^9)/6250 - 5382511036199773734618773191779/107374182400000, z, 19)
root(z^59 + (7496282746403319*z^9)/6250 - 5382511036199773734618773191779/107374182400000, z, 36)
root(z^59 + (7496282746403319*z^9)/6250 - 5382511036199773734618773191779/107374182400000, z, 37)
root(z^59 + (7496282746403319*z^9)/6250 - 5382511036199773734618773191779/107374182400000, z, 54)
root(z^59 + (7496282746403319*z^9)/6250 - 5382511036199773734618773191779/107374182400000, z, 55)
That is telling you that there are 7 solutions, each of which is one specific root of a degree 59 polynomial. And you will have to raise the solutions to the 9th power to get the values for Sig:
>> vpa(solve(resp.conditions).^9)
ans =
352.29770133833260627658225878862
202.91300541799526990732060006287 - 288.23117984225839253005502676133i
202.91300541799526990732060006287 + 288.23117984225839253005502676133i
- 119.3187617653193655735413104768 - 332.12514661176155734260244429285i
- 119.3187617653193655735413104768 + 332.12514661176155734260244429285i
- 340.71523389147595562891628070432 - 93.040015788380995959327750986162i
- 340.71523389147595562891628070432 + 93.040015788380995959327750986162i
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 7월 22일
편집: Walter Roberson 2018년 7월 22일
Corrected code:
syms Sig
E = sym(6250);
const_1 = sym(59)/sym(9);
const_2 = sym('7496282746403319');
aux = sym('7180524015140341') / sym('17179869184');
eqn = ((Sig) + (E*(Sig^(const_1))/const_2) - aux == 0)
resp = solve(eqn, 'returnconditions', true);
sols = solve(resp.conditions).^9;
vpa(sols)
ans =
501.11351786727628482805542566572
288.11758708793446267122185621152 - 410.0513776055818614958938590984i
288.11758708793446267122185621152 + 410.0513776055818614958938590984i
- 169.95773946380078795972790346387 - 471.54242429792278622685006803953i
- 169.95773946380078795972790346387 + 471.54242429792278622685006803953i
- 483.62567000716230957508622467542 - 131.91490381694147143358175047123i
- 483.62567000716230957508622467542 + 131.91490381694147143358175047123i

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Number Theory에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by