Multivariable Integration w.r.t to 1 variable: 2nd variable is a function of 1st
2 次查看(过去 30 天)
显示 更早的评论
I need to find the integral of the function: , where g is an algebraic polynomial. I have been using the symbolic toolbox but the integral cant be evaluated and I obtain just the command as the output. The integration is w.r.t y, but there is a catch y itself is a function of x (my phyical model is such, but x and y represent two different quantitites). Moreover the limits of the integration w.r.t to y are functions of x. This is possible with the int function of sym toolbox but can't use as above mentioned.
I am trying using integral through a numerical approach which looks like this:
k = @(T) T;
w = @(k,T) log(1 - exp(-k^2 + 1/T))
a = @(T) double(T);
b = @(T) double(2*T);
W = @(T) integral(@(k) w(k,T), a, b )
This time I get two errors during execution: i) a and b must be floating scalars
ii) W just returns the exact line of the command again viz: "integral(@(k) w(k,T), a, b )"
If any can suggest a way out, it will be really helpful.
0 个评论
采纳的回答
Torsten
2023-12-30
编辑:Torsten
2023-12-30
If y is a function of x, your integrand equals F(y(x~))*y'(x~) dx~. Thus your integral equals
integral_{x~=f_lower(x)}^{x~=f_upper(x)} F(y(x~))*y'(x~) dx~
and the result is a function of x.
So what is f_lower(x), f_upper(x) and y(x) in your case ?
11 个评论
Torsten
2023-12-30
编辑:Torsten
2023-12-30
Finally could you let me know if there is a way to approach this using the symbolic toolbox, as my existing framework is using that approach only.
W(2) is a symbolic expression - thus you are back in the realm of symbolic computations.
I don't think you can convert W = W(T) into a symbolic function since a numerical function (integral) is involved.
Dyuman Joshi
2023-12-31
There's a good chance that the symbolic integral can not be computed.
If you want a numerical value, it will be better to go with numerical integration as Torsten has shown above.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!