Solving 3 equations with 3 unknowns
83 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (3)
Azzi Abdelmalek
am 5 Mär. 2013
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
am 5 Mär. 2013
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 Kommentare
Walter Roberson
am 6 Mär. 2013
Bearbeitet: Walter Roberson
am 6 Mär. 2013
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
am 6 Mär. 2013
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 Kommentare
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!