필터 지우기
필터 지우기

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 CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by