Solving equation with two solutions

조회 수: 11 (최근 30일)
renee
renee 2022년 12월 27일
댓글: Torsten 2022년 12월 27일
I would like to solve for example the equation m*exp(-x m^2/2)=0.2. When you plot this function it should become clear that this has two real solutions, but MATLAB only gives the smallest solution, whereas I need the larger one. Can anyone help me to get the solution for this? I tried adding the inequality M>1 for obtaining the larger value but this has unfortunatly no result.
syms r M;
assume(M,'real')
F = [M*exp(-M^2/2)==0.2, M>1];
solve(F, M)
Thanks a lot!

답변 (1개)

Torsten
Torsten 2022년 12월 27일
편집: Torsten 2022년 12월 27일
syms M
F = M*exp(-M^2/2)==0.2;
vpasolve(F, [1 Inf])
ans = 
2.1872798705256122911063716969905
  댓글 수: 2
renee
renee 2022년 12월 27일
thank you so much! Do you know what I should do to get the analytical largest solution, e.g. for
F = M*exp(-M^2/2)==1/r?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by