在计算定积分时,在用​exp(1)作为上限​时出现离谱答案。

>> int(sin(log(x)),1,exp(1))
ans =
1/2 - (3060513257434037*2^(1/2)*cos(pi/4 + log(3060513257434037/1125899906842624)))/2251799813685248
>> int(x*log(x),1,exp(1))
ans =
(9366741398929500034245406117369*log(3060513257434037/1125899906842624))/2535301200456458802993406410752
想请问下这是为什么?怎么解决?

 採用された回答

humgwa
humgwa 2023 年 5 月 20 日

0 投票

仅供参考,可以数值积分
integral(@(x) sin(log(x)),1,exp(1))
integral(@(x) x.*log(x),1,exp(1))

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange指数和对数 についてさらに検索

質問済み:

2023 年 5 月 20 日

回答済み:

2023 年 5 月 20 日

Community Treasure Hunt

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

Start Hunting!