integral does not give results

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)

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

x=sym('x')
int(((x*exp(-x/3))),0,5) + int(tan(x),0,pi/36)
it worked...
That is not the same as in your original Question.
tan (x) gives an error, isn't it true?
It gives NaN (in R2020a) when evaluated across . or any other angle x where .
syms x
I = int(tan(x), 0, 5)
produces:
I =
NaN
It may give different results in other versions.
.
Thank you sur
My pleasure!
This might be useful
syms x
Int = int(x*exp(-x/3)+tan(x),x,0,5,'PrincipalValue',true)

Sign in to comment.

Asked:

on 24 Aug 2020

Commented:

on 24 Aug 2020

Community Treasure Hunt

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

Start Hunting!