How to get the simplified integral after using "piecewise"?
3 次查看(过去 30 天)
显示 更早的评论
Good morning,
I wrote a code by using "piecewise" function , but after that when I tried to get the result of any integration , I got the result as a function of piecewise
How to delete this " getting the result without piecewise" ?
Thanks alot
% Code
clc
clear all;
syms x w n
int((sin(x))*sin(x*n),x)
ans =
piecewise(n == 1, x/2 - sin(2*x)/4, n == -1, sin(2*x)/4 - x/2, ~n in {-1, 1}, sin(x*(n - 1))/(2*n - 2) - sin(x*(n + 1))/(2*n + 2))
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!