multipoint boundary value problem

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
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
Amin Hosseinkhani el 2 de Jul. de 2015
Thank you very much for your answer Torsten. I agree that your proposed strategy, in principle, should work. However, in my problem the ODE is nonlinear such that I have terms like cos(y(x)) and sin (y(x)). Therefore, I cannot integrate with respect to x. Do you have suggestions over this?
Torsten
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
Amin Hosseinkhani el 3 de Jul. de 2015
Thank you indeed Torsten. Your comment was really helpful for me. There is still something which I am confused about: The function which I am trying to find is actually a complex function. So, I am splitting the problem into real and imaginary part (but because of the nonlinearity of the equation, I cannot split into two separate and independent equations.) Now, by adding one parameter, d, to the equation, I can impose one extra boundary condition; however, I need to impose two: one is Real(z(-1)) and the other is Imag(z(-1)). Can you please let me know if you have a comment over this?
Torsten
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
Amin Hosseinkhani el 3 de Jul. de 2015
Editada: Amin Hosseinkhani el 3 de Jul. de 2015
Thank you for your comment. Your guess is right. "d" for the real part is also correct for the Imaginary part. the problem is for one "d", I need to indicate two boundary values, one for real part and one for imaginary part. But I only can impose one boundary condition in the program. I need a way such that I can impose boundary value for both real and imaginary part of z(-1) in the code.
-----------------
(Added later) I think I could figure out how to impose two boundary condition with a single "d". I'll post the results if it worked and will delete this part.
Torsten
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
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
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.

Iniciar sesión para comentar.

Preguntada:

el 2 de Jul. de 2015

Comentada:

el 3 de Jul. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by