Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

指数関数のグラフィカルな比較

次の例は、eππe より大きいかどうかを検出するための興味深いグラフィカルなアプローチを示します。

問題: eππe はどちらが大きいでしょうか。これを知る簡単な方法は、MATLAB® コマンド プロンプト上で直接これを入力してみることです。ですが、この状況を解析する別の方法は、より一般的な質問をすることです。関数 z(x,y)=xy-yx はどのような形状でしょうか。

z のプロットを行います。

% Define the mesh
x = 0:0.16:5;
y = 0:0.16:5;
[xx,yy] = meshgrid(x,y);

% The plot
zz = xx.^yy-yy.^xx;
h = surf(x,y,zz);
h.EdgeColor = [0.7 0.7 0.7];
view(20,50);
colormap(hsv);
title('$z = x^y-y^x$','Interpreter','latex')
xlabel('x')
ylabel('y')
hold on

Figure contains an axes object. The axes object with title z equals x toThePowerOf y baseline minus y toThePowerOf x baseline, xlabel x, ylabel y contains an object of type surface.

方程式 xy-yx=0 の解はとても面白い形状であり、元々の問題は見ただけでは簡単に解けないことがわかります。z=0 になる xy の値をプロットします。

c = contourc(x,y,zz,[0 0]);
list1Len = c(2,1);
xContour = [c(1,2:1+list1Len) NaN c(1,3+list1Len:size(c,2))];
yContour = [c(2,2:1+list1Len) NaN c(2,3+list1Len:size(c,2))];
% Note that the NAN above prevents the end of the first contour line from being
% connected to the beginning of the second line
line(xContour,yContour,'Color','k');

Figure contains an axes object. The axes object with title z equals x toThePowerOf y baseline minus y toThePowerOf x baseline, xlabel x, ylabel y contains 2 objects of type surface, line.

黒色の曲線に沿った xy の一部の組み合わせは整数です。この次のプロットは、方程式 xy-yx=0 に対する整数の解です。24=42 は、xy の場合の "唯一の" 整数解となります。

plot([0:5 2 4],[0:5 4 2],'r.','MarkerSize',25);

Figure contains an axes object. The axes object with title z equals x toThePowerOf y baseline minus y toThePowerOf x baseline, xlabel x, ylabel y contains 3 objects of type surface, line. One or more of the lines displays its values using only markers

最後に、表面上に点 (π,e) および (e,π) をプロットします。この結果から、eππe よりも (それほどではありませんが) 大きいことがわかります。

e = exp(1);
plot([e pi],[pi e],'r.','MarkerSize',25);
plot([e pi],[pi e],'y.','MarkerSize',10);
text(e,3.3,'(e,pi)','Color','k', ...
   'HorizontalAlignment','left','VerticalAlignment','bottom');
text(3.3,e,'(pi,e)','Color','k','HorizontalAlignment','left',...
   'VerticalAlignment','bottom');
hold off;

Figure contains an axes object. The axes object with title z equals x toThePowerOf y baseline minus y toThePowerOf x baseline, xlabel x, ylabel y contains 7 objects of type surface, line, text. One or more of the lines displays its values using only markers

結果を確認します。

e = exp(1);
e^pi
ans = 23.1407
pi^e
ans = 22.4592

参考

|