Different answers when I do the same integration
1 回表示 (過去 30 日間)
古いコメントを表示
Hey,
I'm getting different answers when I perform the same integration but by just expanding the squared term.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1123680/image.jpeg)
How is this possible?
As I procced further, I'm getting 2 completely different answers as my result.
Which one is correct?
PS: I'm getting the same answer even after using 'IgnoreAnalyticConstraints',true.
Thanks
4 件のコメント
回答 (1 件)
David Hill
2022 年 9 月 13 日
They are not the same expressions.
syms x
int((1+cos(x))^2,0,pi)
int(1+2*cos(x)+cos(x)^2,0,pi)
int(1+cos(x)^2-2*(1-cos(x)),0,pi)%this is not the same expression
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!