One function is greater than other

2 次查看(过去 30 天)
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