フィルターのクリア

I am trying to get a numerical answer of following improper integral but not getting the correct value

2 ビュー (過去 30 日間)
syms x;
f =(exp(1/cos(x)));
A=vpa(int(f,-11/7,11/7));
A
Please correct me where I am going wrong and how to evaluate this value using some approximations or other functions.

回答 (1 件)

Chunru
Chunru 2021 年 7 月 25 日
Your integration interval [-11/7 11/7] include two points with infinity.
Try the following:
syms x;
f =(exp(1/cos(x)));
A=vpa(int(f, x, -10/7,10/7));
A
A = 
78.865629794567528914520336604775
  2 件のコメント
Walter Roberson
Walter Roberson 2021 年 7 月 25 日
In particular, 11/7 is an approximation of pi/2, and is slightly larger than pi/2 . cos(pi/2) is 0, so 1/cos(pi/2) would pass through infinity.
The situation would have been different if it had been exp(-1/cos(x))
John D'Errico
John D'Errico 2021 年 7 月 25 日
To expand on the answer here...
syms x
f =(exp(1/cos(x)));
fplot(f,[-11/7,-10/7])
fplot(f,[10/7,11/7])
The point being that cos(pi/2) == 0, and that pi/2 is just slightly less than 11/7.
pi/2 < 11/7
ans = logical
1
But just slightly so. That means your integrand has a singularity at +/- pi/2. And that begs the question of whether the integral is well posed, having a finite value at all.

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

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by