Solve an exponencial equation

4 views (last 30 days)
Emanuel Thiago
Emanuel Thiago on 15 Apr 2021
Answered: Alan Stevens on 16 Apr 2021
There is my code:
syms k
Mp = exp((-3.8./sqrt(6.784-1221.21*k))./(1-14.44./6.784-1221.21*k)) == 0.07;
s = solve(Mp)
the result:
s =
(1099511627776*root(359552000*z1^3*log(7)*log(10) - 359552000*z1^3*log(10)^2 - 89888000*z1^3*log(7)^2 - 1627664768*z1^2*log(7)*log(10) + 1627664768*z1^2*log(10)^2 + 406916192*z1^2*log(7)^2 - 5047535724*z1*log(7)*log(10) + 1261883931*z1*log(7)^2 + 5047535724*z1*log(10)^2 - 3106559808*log(7)*log(10) + 3106559808*log(10)^2 + 776639952*log(7)^2 - 1297982720, z1, 1))/1342734594956329
(1099511627776*root(359552000*z1^3*log(7)*log(10) - 359552000*z1^3*log(10)^2 - 89888000*z1^3*log(7)^2 - 1627664768*z1^2*log(7)*log(10) + 1627664768*z1^2*log(10)^2 + 406916192*z1^2*log(7)^2 - 5047535724*z1*log(7)*log(10) + 1261883931*z1*log(7)^2 + 5047535724*z1*log(10)^2 - 3106559808*log(7)*log(10) + 3106559808*log(10)^2 + 776639952*log(7)^2 - 1297982720, z1, 2))/1342734594956329
(1099511627776*root(359552000*z1^3*log(7)*log(10) - 359552000*z1^3*log(10)^2 - 89888000*z1^3*log(7)^2 - 1627664768*z1^2*log(7)*log(10) + 1627664768*z1^2*log(10)^2 + 406916192*z1^2*log(7)^2 - 5047535724*z1*log(7)*log(10) + 1261883931*z1*log(7)^2 + 5047535724*z1*log(10)^2 - 3106559808*log(7)*log(10) + 3106559808*log(10)^2 + 776639952*log(7)^2 - 1297982720, z1, 3))/1342734594956329
So, i want to matlab solve a that exponencial equation "exp((-3.8./sqrt(6.784-1221.21*k))./(1-14.44./6.784-1221.21*k)) == 0.07", in k terms, witch i already solve on paper, but the answear is not expected i guess, at least i dont know what to do with that, my answear on paper was -1.653*10^-2, i read on forums that i should use solve function in the way i used in the code, i dont know if im doing something wrong, i would be very gratefull if someone help me.

Accepted Answer

Alan Stevens
Alan Stevens on 16 Apr 2021
Plot a graph of your function first, to see roughly where the root is, then use fzero:
f = @(k) exp((-3.8./sqrt(6.784-1221.21*k))./(1-14.44./6.784-1221.21*k)) - 0.07;
k0 = -2*10^-3;
k = fzero(f,k0);
format long
disp(k)
-0.001327715853814
x = -2*10^-3:10^-5:-10^-3;
plot(x,f(x), k,f(k),'o'),grid

More Answers (0)

Categories

Find more on Physics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!