Integral of symbolic expression on one of 2 variables

101 Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER

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 be int(t*y,y) for your case. More information is located in the documentation.