Solving 3 Simultaneous Exponential Equations
Ältere Kommentare anzeigen
I am trying to solve these 3 simultaneous exponential equations for a,b and c (This is from Vogels Viscosity Equation):
159.2543 = a*exp(b/(291.15-c))
117.2699 = a*exp(b/(293.15-c))
63.8384 = a*exp(b/(299.15-c))
I would really appriciate it if someone could show me how to write the code to solve them please!
Thank you in advance!
Akzeptierte Antwort
Weitere Antworten (1)
David Goodmanson
am 21 Dez. 2019
HI Rory,
just for completeness
y1 = 159.2543;
y2 = 117.2699;
y3 = 63.8384;
x1 = 291.15;
x2 = 293.15;
x3 = 299.15;
A1 = log(y1/y2)/log(y2/y3);
A2 = (x2-x1)/(x3-x2);
c = (x1*A1-x3*A2)/(A1-A2);
% back substitute
b = log(y1/y2)*(x1-c)*(x2-c)/(x2-x1);
a = y1/exp(b/(x1-c));
a
b
c
a =
10.6205
b =
42.5004
c =
275.4539
% these should be small
y1 - a*exp(b/(x1-c))
y2 - a*exp(b/(x2-c))
y3 - a*exp(b/(x3-c))
ans =
0
ans =
-4.2633e-14
ans =
-7.1054e-14
The c result is fairly close to Star Strider's, but for some reason a and b differ from that result by quite a bit. The checks here show agreement at all three y points, but the best fit isn't necessarily the one that goes through all three points exactly.
1 Kommentar
Rory Thornton
am 22 Dez. 2019
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!