I have a function defined like this:
syms t;
syms y;
x(t,y) = t*y;
Now I want to know the integral of this symbolic expression, by fixing y as a constant, from 0 to inf.
is there a way to do this using a symbolic expression, containing 2 variables? So I can have a symbolic expression only depending of one variable.
You almost have it already. As suggested by Michael Burr. If you want to solve an integral using MATLAB, you need to use
int(expr,var), which would beint(t*y,y)for your case. More information is located in the documentation.