why use limit function goes wrong

1 回表示 (過去 30 日間)
warnerchang
warnerchang 2022 年 4 月 9 日
コメント済み: Walter Roberson 2022 年 4 月 9 日
syms x
f=(2/pi*atan(x))^x;
limit(f,x,inf,'right')
Prompt:Inconsistent limit direction.
however,I tried to transform the f and used limit function to get the limit. It has a result.
% y = 1 - 2 / pi * atan( x ); % transformation,x -> ∞ ,y -> 0
% x = tan( pi/2 - pi/2 * y ); % equation
syms y
f = ( 1 - y ) .^ ( tan( pi/2 - pi/2 * y ) )
limit( f, y, 0 )
ans =
exp(-2/pi)

採用された回答

Walter Roberson
Walter Roberson 2022 年 4 月 9 日
Asking for the "right" limit means that you want the limit from above. As you are asking for the limit at infinity, that would be asking for the limit from "above" infinity. However, MATLAB does not have any support for transfinite numbers.
  2 件のコメント
warnerchang
warnerchang 2022 年 4 月 9 日
however,when you use limit(f,x,inf,'left') instead, you will also get a wrong result: inf
Walter Roberson
Walter Roberson 2022 年 4 月 9 日
syms x
f=(2/sym(pi)*atan(x))^x;
limit(f,x,inf,'left')
MATLAB does not identify 2/pi (numeric double precision) as being the same as 1/(π/2) (the symbolic limit)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumber Theory についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by