integral does not give results

4 views (last 30 days)
Bilal Ates
Bilal Ates on 24 Aug 2020
Commented: Bruno Luong on 24 Aug 2020
x=sym('x')
int(((x*exp(-x/3))+tan(x)),0,5)
I can't find where I made the mistake, Matlab does not give results

Answers (1)

Star Strider
Star Strider on 24 Aug 2020
It works for me (in R2020a):
x=sym('x')
Int = int(x*exp(-x/3)+tan(x),x,0,5)
producing:
Int =
NaN
To understand the results, plot the function:
figure
fplot(x*exp(-x/3)+tan(x), [0,5])
grid
.
  7 Comments
Bruno Luong
Bruno Luong on 24 Aug 2020
This might be useful
syms x
Int = int(x*exp(-x/3)+tan(x),x,0,5,'PrincipalValue',true)

Sign in to comment.

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!