How to solve a boundary value problem (differential equations) which contains dependent variable values at the boundary??? The equation is like a integro-differential equation.
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
(-iy+y'''')=(A+Bx)y'''(0)+(C+Dx)y''(0)
- Here A,B,C and D are constants.
- y'''(0) are the dependent variable 3rd order derivative at x=0.
- Like wise y''(0) is the 2nd oder derivative of y at x=0
- BCs y(0)=0, y'(0)=1, y''(1)=0 and y'''(1)=0
채택된 답변
Try "dsolve" on the problem
(-iy+y'''')=(A+Bx)*C2+(C+Dx)*C1
with boundary conditions
y(0)=0, y'(0)=1, y''(1)=0, y'''(1)=0, y''(0)=C1, y'''(0)=C2.
Best wishes
Torsten.
댓글 수: 7
Thanks Torsten. I did implemented "dsolve", but the solution I got is a lengthy one (in form of piece wise function). Is there any possibility to have a numerical solution????? Because I am planning to add more terms (x-dependent) in the differential equation and this might make my equation more complex Here is the code where i have used "dsolve"
clear all
close all
clc
syms y(x) C1 C2
%%%%A=B=C=D=1 taken for simplification
Dy=diff(y,x);
D2y=diff(y,x,2);
D3y=diff(y,x,3);
eqn = -1i*y+diff(y,x,4) == (1+x)*C2+(1+x)*C1;
cond1 = y(0) == 0;
cond2 = Dy(0) == 1;
cond3 = D2y(1) == 0;
cond4 = D3y(1) == 0;
cond5 = D2y(0) == C1;
cond6 = D3y(0) == C2;
conds = [cond1 cond2 cond3 cond4 cond5 cond6];
uSol(x) = dsolve(eqn,conds)
Use bvp4c with the option of using two free parameters, namely C1 and C2, with the boundary conditions equal to the ones you used with dsolve.
Take a look at the example
Compute Fourth Eigenvalue of Mathieu's Equation
under
https://de.mathworks.com/help/matlab/ref/bvp4c.html
to see how to proceed.
I think it will be necessary to split y in real and imaginary part first.
Best wishes
Torsten.
After going through the reference for the introduction of parameters in bvp4c, i have written the code for my differential equation. Its showing an error "Not enough input arguments". Can you please help me out. Here is the code which i have written. Here again i have taken A=B=C=D=1 for simplicity and also I have taken C1=C2=0 as the initial guess.
clear all
close all
clc
C1=0;
C2=0;
solinit = bvpinit(linspace(0,1,10),[0;0;0;0], C1, C2);
sol = bvp4c(@hode1,@hbc1, solinit);
%---------------------------------------------
function dydx = hode1(x,y,C1,C2)
dydx=[y(2); y(3); y(4); 1i*y(1)+(1+x)*C2+(1+x)*C1];
% ------------------------------------------------
function res = hbc1(ya,yb)
res = [ya(1); ya(2)-1; yb(3); yb(4); ya(3)-C1; ya(4)-C2];
clear all
close all
clc
C1=0;
C2=0;
solinit = bvpinit(linspace(0,1,10),[0;0;0;0], [C1, C2]);
sol = bvp4c(@hode1,@hbc1, solinit);
%---------------------------------------------
function dydx = hode1(x,y,params)
C1=params(1);
C2=params(2);
dydx=[y(2); y(3); y(4); 1i*y(1)+(1+x)*C2+(1+x)*C1];
% ------------------------------------------------
function res = hbc1(ya,yb,params)
C1=params(1);
C2=params(2);
res = [ya(1); ya(2)-1; yb(3); yb(4); ya(3)-C1; ya(4)-C2];
Best wishes
Torsten.
Thank you very much Torsten. Now its working. Can you give me your opinion on this statement "the differential equation which I have mentioned is a form of integro-differential equation, and with this approach I think we can solve such type of integro-differential equation".
Since there is no integral involved in the differential equation, I don't see an obvious relation to integro-differential equations. But I might be wrong.
Best wishes
Torsten.
Sorry I forgot to mention, the y'''(0) and y''(0) term in the differential equation was obtained from an integration expression, and these two terms remained because y'''(1) and y''(1) are zero because of the boundary conditions.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
참고 항목
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 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)
