Effacer les filtres
Effacer les filtres

One function is greater than other

3 vues (au cours des 30 derniers jours)
Fatima Majeed
Fatima Majeed le 10 Juin 2024
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

Réponse acceptée

Matt J
Matt J le 10 Juin 2024
Modifié(e) : Matt J le 10 Juin 2024
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

Plus de réponses (2)

Walter Roberson
Walter Roberson le 10 Juin 2024
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 commentaires
Walter Roberson
Walter Roberson le 10 Juin 2024
Modifié(e) : Walter Roberson le 10 Juin 2024
You have stated
assume(z > exp(1))
so we are justified in starting from exp(1) in the fplot()
Walter Roberson
Walter Roberson le 10 Juin 2024
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.

Connectez-vous pour commenter.


Sam Chak
Sam Chak le 11 Juin 2024
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 .

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by