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)
  1. Here A,B,C and D are constants.
  2. y'''(0) are the dependent variable 3rd order derivative at x=0.
  3. Like wise y''(0) is the 2nd oder derivative of y at x=0
  4. BCs y(0)=0, y'(0)=1, y''(1)=0 and y'''(1)=0

 Réponse acceptée

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 commentaires

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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by