need to find to root of equation

조회 수: 2 (최근 30일)
Arvind Sharma
Arvind Sharma 2020년 9월 20일
답변: Walter Roberson 2020년 9월 20일
% need to find the value of x for different values of y
y=0.00:0.001:0.08;
dEv=25 meV;
dEvbm=x.*(1.6)+y.*(-0.52);
C=1.05;
V=C.*sqrt(y);
dEv=(((dEvbm-1.0)+sqrt(((dEvbm+1.0).*(dEvbm+1.0))+(4.V.*V)))/2);
% how to find the value of x

채택된 답변

Walter Roberson
Walter Roberson 2020년 9월 20일
syms x y real
syms delta_x delta_y delta_C real
assume(y >= 0);
assume(delta_x >= -5/100 & delta_x < 5/100);
assume(delta_y >= -5/1000 & delta_y < 5/1000);
assume(delta_C >= -5/1000 & delta_C < 5/1000);
dEv = 25;
dEvbm = x.*(16/10 + delta_x) + y.*(-52/100 + delta_y);
C = 105/100 + delta_C;
V = C .* sqrt(y);
eqn = dEv == (((dEvbm - 1) + sqrt(((dEvbm + 1) .* (dEvbm + 1)) + (4 .* V.*V)))/2);
sol = solve(eqn, x, 'returnconditions', true);
sol.x
sol.conditions
Y = 0.00:0.001:0.08;
X = subs(sol.x, y, Y);
disp(X)
You will get answers similar to
-(delta_C^2/26000 + (21*delta_C)/260000 + delta_y/1000 - 260004967/10400000)/(delta_x + 8/5)
Here, delta_C reflects the undercertainty in the value of C: when you write C = 1.05 then in science that stands in for C being a unknown value that is in the range 1045/1000 (inclusive) and 1055/1000 (exclusive.) It makes no sense to ask for exact solutions to equations that have coefficients that are not exactly known, so I have converted to exact solutions by quantifying the uncertainties.
Does it really make a difference? Yes, it does. For X(2), if you examine over the entire range of uncertainties, the results come out between 15.1518013280886 and 16.1293438703474, which is a quite noticable difference.
I assumed here that dEv = 25 was an exact figure, and that the + 1.0 and - 1.0 were intended to be exact 1's and the 4 multiplying the V^2 was intended to be an exact 4 and the division by 2 was intended to be an exact 2.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by