solve equation numerically 1=(1/y)x*exp(x*y)

6 views (last 30 days)
hi,
please, i want to solve numerically the following equation in matlab: 1=(1/y)x*exp(x*y)
Sincerely

Accepted Answer

Bruno Luong
Bruno Luong on 10 Aug 2022
Edited: Bruno Luong on 10 Aug 2022
Numercial solution
y = 0.01:0.01:1;
x = nan(size(y));
for k=1:length(y)
yk = y(k);
x(k) = fzero(@(x)x.*exp(x.*yk)-yk, 0.5);
end
plot(x,y)
xlabel('x')
ylabel('y')
  5 Comments

Sign in to comment.

More Answers (1)

KSSV
KSSV on 10 Aug 2022
syms x y
f = 1==1/y*x*exp(x*y)
f = 
solve(f,x)
ans = 
solve(f,y)
Warning: Solutions are only valid under certain conditions. To include parameters and conditions in the solution, specify the 'ReturnConditions' value as 'true'.
ans = 
  3 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by