How can I insert this boundary condition?
이전 댓글 표시
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
J. Alex Lee
2021년 5월 11일
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
2021년 5월 11일
편집: Elia Paini
2021년 5월 11일
J. Alex Lee
2021년 5월 11일
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
2021년 5월 12일
J. Alex Lee
2021년 5월 12일
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
2021년 5월 13일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!