フィルターのクリア

Multivariable Integration w.r.t to 1 variable: 2nd variable is a function of 1st

1 回表示 (過去 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.

採用された回答

Torsten
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
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
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 ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by