Solving 3 equations with 3 unknowns
111 次查看(过去 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 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!