이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
Can MATLAB solve a integrodifferential equation?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, I have checked some posts on the forum, however to no avail.
I have the given system:
{
syms h g x C
h = 2
g = 4
C = 1/sqrt(2.*pi)
y = ((exp(2.*g.*i.*x./h)).*(((h.^2)./2) + (g.*x)/2.*h.*i));
z = ((exp(-2.*g.*i.*x./h)).*(((h.^2)./2) + (g.*x)/2.*h.*-i));
[int(y.*z*.u, x], 0, 2.*pi)]==1
} which should solve for u. Is it feasible with some modifications?
Thanks
채택된 답변
Torsten
2017년 11월 20일
u = 1/int(y*z,x,0,2*pi)
Best wishes
Torsten.
댓글 수: 21
Sergio Manzetti
2017년 11월 21일
Hi Torsten, maybe I haven't outline the problem correctly:
it should be:
[int(y.*z*.u )*, x], 0, 2.*pi)]==1
where u is inside the integrator. It is not possible to extract u from the integrator by dividing by int(y,z,x,o,2i), that is why it is an integrodifferential eqn. u is inside the integration operation.
Torsten
2017년 11월 21일
If u is a scalar, you can take it out of the int-operator.
What is u if it's not a scalar value ?
Best wishes
Torsten.
Sergio Manzetti
2017년 11월 21일
편집: Sergio Manzetti
2017년 11월 21일
u is a function which is multiplied with y and z, which are functions. The three of them are under then dx symbol, and thus cannot be divided per se in our out of the integral sign.
Torsten
2017년 11월 21일
편집: Torsten
2017년 11월 21일
Of course u can be taken out of the integral if it does not depend on x.
Your equation is solved if you set u to be equal to the scalar value
u = 1/int(y*z,x,0,2*pi)
Maybe there are other requirements on u which make this impossible, but up to now, you didn't state them.
Best wishes
Torsten.
Sergio Manzetti
2017년 11월 21일
편집: Sergio Manzetti
2017년 11월 21일
This is precisely the reason I ask here. In fact, u can even be an operator, such as d/dx
Torsten
2017년 11월 21일
I wonder why you call your equation an "integro-differential equation". Where is the differential operator ?
Best wishes
Torsten.
Sergio Manzetti
2017년 11월 21일
u can be the differential operator, or it can be a simple function, such as "x"
Torsten
2017년 11월 21일
편집: Torsten
2017년 11월 21일
I think you should first take a look at the definition of an integro-differential equation:
https://en.wikipedia.org/wiki/Integro-differential_equation
There is no MATLAB program that directly solves this type of equations.
But what exactly is the equation you are trying to solve ?
If it's the one you stated and u depends on x, you must explicily specify how u depends on x, e.g. u(x)=a*cos(x) with unknown a. Then - as a next step - you can determine "a" via the "solve" command.
Best wishes
Torsten.
Sergio Manzetti
2017년 11월 21일
Tried it, and got "a" not defined
end
syms h g x C
h = 2
g = 4
C = 1/sqrt(2.*pi)
y = ((exp(2.*g.*i.*x./h)).*(((h.^2)./2) + (g.*x)/2.*h.*i));
z = ((exp(-2.*g.*i.*x./h)).*(((h.^2)./2) + (g.*x)/2.*h.*-i));
u = 1/[int(y.*z*.*a*cos(x), x], 0, 2.*pi)]
solve
Sergio Manzetti
2017년 12월 5일
Dear Torsten, I tried this new variant:
if true
% code
end
syms h g x C
h = 1
g = 5
y=@(x)(C - (exp(2.*g.*1i.*x./h));
z=@(x)(C - (exp(-2.*g.*1i.*x./h));
prod=@(x)y(x).*z(x)*(1+x^2);
W= integral(prod,0,2*pi)==1;
and I should get the result for "C", however that is simply 0. It looks incorrect, or is the W part correctly written?
Thanks!
Sergio Manzetti
2017년 12월 5일
PS: Torsten, I get TWO values if I use double(Csol), how does that figure?
Torsten
2017년 12월 5일
From your Ansatz, you get a quadratic equation in C which usually has two solutions.
Let MATLAB show "int(prod,x,0,2*pi)" and you'll see.
Best wishes
Torsten.
GNANASEKARAN S
2022년 5월 24일
Dear Torsten,
I have the source term of the form u(1-int u) in two dimension. How to write the FDM code? Could you please tell.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Least Squares에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)
