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.
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
(-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
Accepted Answer
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 Comments
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".
Torsten
on 12 Apr 2017
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.
More Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)