Solving 3 equations with 3 unknowns

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

Risposte (3)

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)

1 Commento

thanks But i guess i don't have the symbolic maths toolbox. can you post me the answers please?
And you can replace 'me' with '(mo-1010mp)' Thanks

Accedi per commentare.

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 Commenti

sorry I've edited my question and replaced 'me'
i'm getting the following error message
Undefined function 'solve' for input arguments of type 'char'.
ok, then Symbolic Math toolbox is missing ...
oh! Can you post me the results if you have it? Thanks
The solution could not be found ! check again the equations .
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.
these results are based on the new first equation which I have edited?

Accedi per commentare.

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.

Categorie

Richiesto:

il 5 Mar 2013

Community Treasure Hunt

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

Start Hunting!

Translated by