How can I insert this boundary condition?
Mostrar comentarios más antiguos
Hi everyone, I have an ODE system with several variables, like this:
y1' = f (y1,y2)
y2' = g (y1,y2)
I'm solving it with bvp4c.
Is it possible to enter, in addition to the BCs related to y1 and y2, also a condition on the derivatives, for example y1'(0) = 0? Should I add one equation? How?
Thank you!
6 comentarios
J. Alex Lee
el 11 de Mayo de 2021
if you already know how to use bvp4c to put BCs on y1 and y2 themselves, you should already know how to put BCs on their derivatives...
if your question is whether you can have 3 BCs for your problem, not just 2, then you need to tell us if you have unknown parameters in your problem. if so, the bvp4c docs show you how to do that. if not, then with high probability the answer is no...
Elia Paini
el 11 de Mayo de 2021
Editada: Elia Paini
el 11 de Mayo de 2021
J. Alex Lee
el 11 de Mayo de 2021
My fault, I didn't think about the question carefully enough...assuming you mean to replace one of your BCs with a condition on y1', and not add (because that still doesn't make sense no matter what)...
Setting y1'(a) = 0 is the same as asserting f(y1(a),y2(a)) = 0, maybe you could set an unknown parameter as one of the standard boundary conditions, and add another boundary condition to specify the slope condition
function res = bcfun(ya,yb,p)
res = [ya(1)
yb(1) - p
f(ya)
];
end
I also didn't look close at the documentation or other answers, but this does seem like a pretty common need - did you start there?
Elia Paini
el 12 de Mayo de 2021
J. Alex Lee
el 12 de Mayo de 2021
i'm not following anymore...you seem to agree that you can't have 3 BCs on 2 first order equations because that's over-specified...if you add another first order equation that is coupled in, aren't you completely changing the problem?
Elia Paini
el 13 de Mayo de 2021
Respuestas (0)
Categorías
Más información sobre Trimming and Linearization 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!