Bvp4c: Unable to solve the collocation equations -- a singular Jacobian encountered.

8 次查看(过去 30 天)
I am trying to solve a boundary value problem, but I keep getting the above error. I know there are similar posts to this, but I can not seem to get this to work with them, so maybe someone can look directly at my code to get an answer?
The differential equation I want to solve is (putting it in first order form and wrting as a row vector): . Here:
I included my code as well and used to pick an inital guess. This is doing a bad job of that I think however! What else could I do here? Another inital guess, another function? Any help will be appreciated!
  2 个评论
Torsten
Torsten 2022-4-6
I mean to remember that this is a transformed equation with tanh to map (-oo,oo) to [-1:1].
Could you include the original equation as well ?
Marcus Rosales
Marcus Rosales 2022-4-6
I updated the attached code, and I sure can give the original equation:
In retrospect I should have included this anyways. Mapping the intreval how I did may not be the best route... Maybe someone can see something better from here.
I simply tried settting the boundary conditions to a big number for the equation in this form, but got something oscillatory or a singular Jacobian (as well).
Also, these expressions are equivalent:
so the divergence of the jacobian is at $x=\pm 1$. Restricting my interval I was able to find solutions, but with huge residuals! Not sure if something is wrong with the code itself, or the approach.

请先登录,再进行评论。

采纳的回答

Marcus Rosales
Marcus Rosales 2022-4-10
I guess I'll answer this question since I found it out.
It turned out to work better using the EOM for α. The main issue here is as t blows up, the derivative (after converting to first order system of equations) begins to blow up making various RK-methods unstable.
We first can try fixing the b.c. at something like for l big but it turns out, here, to model the profile (amplitude) I want to. It turns out setting the upper limit to somehting just under 1 works well, then stretch the solution for by a tanh.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Boundary Value Problems 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by