multipoint boundary value problem
Mostrar comentarios más antiguos
Dear All,
I would appreciate a lot if anyone can make comment on the following problem.
I have a second order differential equation y''=f(x,y,y') which is defined in the area [-d, d]. I know that the first derivative of the function much vanish at the boundaries: y'(-d)=y'(d)=0. In addition, I know if and only if d is equal to or larger than a critical value L, the value of the function at the boundaries is known. (y(-d) and y(d) are known variables in this case) The problem is to find y in the whole area and find the critical value L. The following is my idea about dealing with this the problem, but I don't know how to implement it:
I want to take an initial value for d and assume that this value is sufficiently large. Afterwards, I want to solve the "second order" problem with "3 constraint" i.e. y'(-d)=0, y(-d) is known and y'(d)=0. After the problem was solved, I want to compare the obtained value for y(d) and the known value, if there were agree, that means d was indeed sufficiently large, and if not, I increase d and repeat the procedure until the obtained value of y(d) matches with the known value.
Here the problem is indeed initial value problem in a sense that I know initial value of the function and its derivative at the beginning, but I also want to put a constraint on the first derivative for the endpoint which it looks like to me that cannot be done by ODE45. And I am not sure how to do it using BVP4C.
I look forward to any suggestion.
Respuestas (1)
Torsten
el 2 de Jul. de 2015
0 votos
Define a transformed function z by
y(x)=z(x/d)
and rewrite your ODE in terms of z.
Then integrate your ODE in the unknown function z within the fixed limits [-1:1] with the boundary conditions z'(-1)=z'(1)=0, z(-1)=your known value for y(-d).
The solution setup is analogous to the example
Compute Fourth Eigenvalue of Mathieu's Equation
under
In your case, the interval length d takes the role of the unknown parameter lambda of the example.
Best wishes
Torsten.
8 comentarios
Amin Hosseinkhani
el 2 de Jul. de 2015
Torsten
el 2 de Jul. de 2015
With integrate I mean: Use bvp4c to solve the ODE in z.
To rewrite your equation in z, just replace y by z, y' by z'/d and y'' by z''/d^2 in your equation y''=f(x,y,y').
Best wishes
Torsten.
Amin Hosseinkhani
el 3 de Jul. de 2015
Torsten
el 3 de Jul. de 2015
I don't know enough about the underlying physical problem. My guess is that real and imaginary part of the solution are related such that the "d" for the real part will automatically be correct for the imaginary part, too. Consequently, you only had to solve for d for the real part. But this is only a guess ...
Best wishes
Torsten.
Amin Hosseinkhani
el 3 de Jul. de 2015
Editada: Amin Hosseinkhani
el 3 de Jul. de 2015
Torsten
el 3 de Jul. de 2015
Why not only solving for the real part with boundary conditions
Re(z'(-1))=Re(z'(1))=0 and Re(z(-1))=your known value for Re(y(-d)) ?
A subsequent calulation for the imaginary part with boundary conditions Im(z'(-1))=Im(z'(1))=0 and the d from the first step should yield the correct imaginary solution.
Best wishes
Torsten.
Torsten
el 3 de Jul. de 2015
Ah, I see - you can not explicitly separate the ODE in real and imaginary part.
Then you should solve the complete ODE with boundary conditions
Re(z'(-1))=Re(z'(1))=Im(z(-1))=Im(z(1))=0,Re(z(-1))=your known value for Re(y(-d)).
In this case,
number of boundary conditions = number of equations + number of unknown parameters
is satisfied.
Best wishes
Torsten.
Torsten
el 3 de Jul. de 2015
Sorry, should read
Re(z'(-1))=Re(z'(1))=Im(z'(-1))=Im(z'(1))=0,Re(z(-1))=your known value for Re(y(-d)).
Best wishes
Torsten.
Categorías
Más información sobre Numeric Solvers en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!