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 中查找有关 Calculus 的更多信息
另请参阅
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 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)
