How can I solve this equation?

1 view (last 30 days)
I have this equation and it seems hard to calculate manually so I decided to write a code... but I cannot :(
a+b*x=x/(b*ln((x-e)/x));
Only x is the variable, a,b and e is known.
Thank!

Accepted Answer

Walter Roberson
Walter Roberson on 4 May 2020
syms x
eqn = a+b*x==x/(b*log((x-e)/x));
vpasolve(eqn, x)
Or
eqn = @(x) (a+b*x) - (x/(b*log((x-e)/x)));
fzero(eqn, InitialGuess)

More Answers (1)

John D'Errico
John D'Errico on 4 May 2020
There will probably be no analytical solution to the problem, as I doubt lambertW or wrightOmega will suffice. However, given the known values of the constants a,b,e, just use fzero, or fsolve, or vpasolve as you prefer.

Categories

Find more on Optimization 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!