Wrong integration trigonometric function
显示 更早的评论
Hi all,
I was getting wrong answers for the integeral of the next expression,
>> syms x
>> f(x)=sin(x)+2*cos(x)
f(x) =
2*cos(x) + sin(x)
>> F=int(f(x))
The result integral came as:
F =
-2*cos(x/2)*(cos(x/2) - 2*sin(x/2))
So I tried to operate each term separately to get the right answer, which is different than the first one.
>> F2=int(sin(x))+int(2*cos(x))
F2 =
2*sin(x) - cos(x)
I tried the web version of matlab to check possible bugs within the version I'm using, but I found the same error anyway.
Maybe I am doing it wrong. Please help.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


