One function is greater than other

조회 수: 1 (최근 30일)
Fatima Majeed
Fatima Majeed 2024년 6월 10일
답변: Sam Chak 2024년 6월 11일
I would like to determine the range of values for \( z \) where the following inequality holds true:
this is my trying
syms z real
assume(z > exp(1))
% Define the function
f = z - 8.02 * log(z) - (3.359 / 21.233) * log(z) * z;
sol = solve(f > 0, z, 'ReturnConditions', true);
Warning: Unable to find explicit solution. For options, see help.
vpa(sol.conditions)
ans = Empty sym: 0-by-1

채택된 답변

Matt J
Matt J 2024년 6월 10일
편집: Matt J 2024년 6월 10일
Let us reorganize the inequality as,
Since log(z)>0 in the given domain of z, this implies which in turn implies that log(z)<1/0.1582, or in turn that z<556.19. Therefore, if the inequality is ever going to be satisfied, it must be satisfied somewhere in the interval [e,556.2]. We can see from plotting that this never occurs,
syms z real
fplot(z, [exp(1),556]); hold on
fplot(log(z).*(0.1582*z+8.02), [exp(1),556.2]); hold on; legend(Location='NW')
but we can also check it with fminbnd,
[zmin,fmin]=fminbnd(@(z) log(z).*(0.1582*z+8.02)-z ,exp(1),556.2)
zmin = 143.8330
fmin = 9.0742

추가 답변 (2개)

Walter Roberson
Walter Roberson 2024년 6월 10일
Q = @(v) sym(v);
syms z real
assume(z > exp(1))
% Define the function
f = z - Q(802)/Q(10)^2 * log(z) == (Q(3359)/Q(10)^3 / (Q(21233)/Q(10)^3)) * log(z) * z;
F = lhs(f) - rhs(f)
F = 
limit(F, z, inf)
ans = 
fplot(F, [exp(1), 1000])
fplot(lhs(f), [exp(1), 200])
hold on
fplot(rhs(f), [exp(1), 200])
legend({'lhs', 'rhs'})
There is no solution. Everywhere in the range, the left hand side is less than the right hand side.
  댓글 수: 3
Walter Roberson
Walter Roberson 2024년 6월 10일
편집: Walter Roberson 2024년 6월 10일
You have stated
assume(z > exp(1))
so we are justified in starting from exp(1) in the fplot()
Walter Roberson
Walter Roberson 2024년 6월 10일
I do not prove that there are no crossings... but I give evidence.
Q = @(v) sym(v);
syms z real
assume(z > exp(1))
% Define the function
f = z - Q(802)/Q(10)^2 * log(z) == (Q(3359)/Q(10)^3 / (Q(21233)/Q(10)^3)) * log(z) * z;
F = lhs(f) - rhs(f)
F = 
limit(F, z, inf)
ans = 
The limit of the difference is -infinity, so there must be an even number of zero crossings (no zero crossings counts as an even number of them.)
fplot(lhs(f), [exp(1), 1000000])
hold on
fplot(rhs(f), [exp(1), 1000000])
legend({'lhs', 'rhs'})
The two are getting further apart up to at least 1 million.
Additional logic would be needed to establish that there are definitely no crossings.

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


Sam Chak
Sam Chak 2024년 6월 11일
The search below covers this range .
z = linspace(0, exp(1), 3001);
fun = @(z) z - 8.02*log(z) - (3.359/21.233)*log(z).*z;
plot(z, fun(z)), grid on
sol = fzero(fun, 1)
sol = 1.1506
f1 = z - 8.02*log(z); % LHS of inequality
f2 = (3.359/21.233)*log(z).*z; % RHS of inequality
plot(z, [f1; f2]), grid on, ylim([-0.2 2]), xlabel('z')
txt = sprintf('%.4f', sol);
xline(sol, '--', txt)
legend({'$z - 8.02 \log(z)$', '$\frac{3.359}{21.233} \log(z) z$', ''}, 'interpreter', 'latex', 'fontsize', 14);
Thus, the inequality holds at .

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by