Solving 3 equations with 3 unknowns
조회 수: 233 (최근 30일)
이전 댓글 표시
Dear members;
I would like to solve 3 equations using matlab. following are the 3 equations.
0.0972=ve*ln(mo/(mo-1010mp))
0.11285=ve*ln((mo-1010mp)/(mo-2145mp))
0.10953=ve*ln((mo-2145mp)/(mo-3395mp))
The unknowns in these equations are ve, mo and mp. is there a way to solve for the unknowns?
Thanks in advance
댓글 수: 0
답변 (3개)
Azzi Abdelmalek
2013년 3월 5일
syms me ve mo mp
eq1=0.0972-ve*log(mo/me)
eq2=0.11285-ve*log((mo-1010*mp)/(mo-2145*mp))
eq3=0.10953-ve*log((mo-2145*mp)/(mo-3395*mp))
solve(eq1,eq2,eq3,ve,mo,mp)
Youssef Khmou
2013년 3월 5일
hi try ,
D=solve('x*log(y/a)=0.0972','x*log((y-1010*z)/(y-2145*z))=0.11285','x*log((y-2145*z)/(y-3395*z))=0.10953','x','y','z')
what is me? it is replaced with a
댓글 수: 6
Walter Roberson
2013년 3월 6일
편집: Walter Roberson
2013년 3월 6일
One solution is
mo = me, mp = 0, ve = infinity
There might be other solutions; I have my system checking.
... There do not appear to be any other real solutions.
Roger Stafford
2013년 3월 6일
I claim there are either no solutions or infinitely many solutions to your three equations, and I'll tell you why, Hamza. By manipulating the equations appropriately one can rewrite them in the form:
exp(0.0972/ve) = 1/(1-1010*r)
exp(0.11285/ve) = (1-1010*r)/(1-2145*r)
exp(0.10953/ve) = (1-2145*r)/(1-3395*r)
where r = mp/mo. As you can see from this, you have in effect three equations but only two unknowns, namely 've' and 'r', and they are unlikely to have a solution. You can find out if that is so by solving, say, just the first two of these equations. These two can be expressed as:
1-1010*r = exp(-0.0972/ve)
1-2145*r = (1-2145*r)/(1-1010*r) * (1-1010*r)
= exp(-0.11285/ve)*exp(-0.0972/ve)
= exp(-.21005/ve)
Solving for r in each equation gives
r = (1-exp(-0.0972/ve))/1010 = (1-exp(-.21005/ve))/2145
2145*(1-exp(-0.0972/ve)) = 1010*(1-exp(-.21005/ve))
1010*exp(-.21005/ve)-2145*exp(-0.0972/ve)+1135 = 0
You can use matlab's 'fzero' to solve this last equation for 've' and from that determine 'r'. As I say, any such solutions are unlikely to also satisfy the third equation above. If they do, then you will have infinitely many solutions corresponding to all the ways of satisfying r = mp/mo.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!