Initial guessing to bvp4c MATLAB












0












$begingroup$


I am working on a 4th order non-linear variable coefficient homogeneous ODE bvp.
I am having issues getting a solution using bvp4c. This could be one of many things. Not having a solution within the boundaries I am providing, due to the non-linearity matlab cannot resolve to a solution, or the initial guesses for the functions are so far off it can't work with them.
The error I am getting is



Error using bvp4c (line 251)
Unable to solve the collocation equations -- a singular Jacobian encountered.


I was wondering if there is a better way to provide initial guesses. I would like to give a vector of points that the solution should be near. Is that possible? Any other advice?



btw, I am unable to post example an example code.










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Check the boundary conditions, I frequently got errors because some index error there making a solution impossible. If you have any physical insight into the problem, you could guess a good initial point and use the IVP solution as initialization.
    $endgroup$
    – LutzL
    Jan 15 at 16:25










  • $begingroup$
    at this link mathworks.com/help/matlab/ref/bvpinit.html it says for multiple point bvp, you can specify the point in [a,b] at which the boundary conditions apply, other than the endpoints a and b. Any idea on how to do this.?For my problem I have a y(a) = h, y'(a) = 0, y(b)=1, and y'(b) = 0.
    $endgroup$
    – tenichols
    Jan 15 at 21:21












  • $begingroup$
    You can also impose conditions on more than 2 points in the framework of bvp4c. But I do not think that you need that. Depending on what you used in the initial approximation, the negative result can mean that there is no solution close to the straight line $y(t)=(t-a)/(b-a)$, any solution has a much more winded (or is that wended?) path, or that there is no solution at all. In general you will need more insight into the rough shape of the solution, like when designing the path of a space probe, you need to know what sling-by maneuvers are to be included.
    $endgroup$
    – LutzL
    Jan 15 at 21:43










  • $begingroup$
    I have a good idea of what the solution should look like. If I was to divided the equation up into 3 sections [a b c], the a and c section will be constant but different values, at the b section the transition from a --> c will occur, I just want to know how it will occur. Any advice on how to impose conditions onto more than one point?
    $endgroup$
    – tenichols
    Jan 16 at 14:30










  • $begingroup$
    You have no control on what the solution will finally look like. But if you can expect that to be the general shape, then setting the values in yinit in that way should be sufficient. If the results do not match the expectations, debug the code and if that is ok, then debug the theory that led to these expectations.
    $endgroup$
    – LutzL
    Jan 16 at 14:38
















0












$begingroup$


I am working on a 4th order non-linear variable coefficient homogeneous ODE bvp.
I am having issues getting a solution using bvp4c. This could be one of many things. Not having a solution within the boundaries I am providing, due to the non-linearity matlab cannot resolve to a solution, or the initial guesses for the functions are so far off it can't work with them.
The error I am getting is



Error using bvp4c (line 251)
Unable to solve the collocation equations -- a singular Jacobian encountered.


I was wondering if there is a better way to provide initial guesses. I would like to give a vector of points that the solution should be near. Is that possible? Any other advice?



btw, I am unable to post example an example code.










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Check the boundary conditions, I frequently got errors because some index error there making a solution impossible. If you have any physical insight into the problem, you could guess a good initial point and use the IVP solution as initialization.
    $endgroup$
    – LutzL
    Jan 15 at 16:25










  • $begingroup$
    at this link mathworks.com/help/matlab/ref/bvpinit.html it says for multiple point bvp, you can specify the point in [a,b] at which the boundary conditions apply, other than the endpoints a and b. Any idea on how to do this.?For my problem I have a y(a) = h, y'(a) = 0, y(b)=1, and y'(b) = 0.
    $endgroup$
    – tenichols
    Jan 15 at 21:21












  • $begingroup$
    You can also impose conditions on more than 2 points in the framework of bvp4c. But I do not think that you need that. Depending on what you used in the initial approximation, the negative result can mean that there is no solution close to the straight line $y(t)=(t-a)/(b-a)$, any solution has a much more winded (or is that wended?) path, or that there is no solution at all. In general you will need more insight into the rough shape of the solution, like when designing the path of a space probe, you need to know what sling-by maneuvers are to be included.
    $endgroup$
    – LutzL
    Jan 15 at 21:43










  • $begingroup$
    I have a good idea of what the solution should look like. If I was to divided the equation up into 3 sections [a b c], the a and c section will be constant but different values, at the b section the transition from a --> c will occur, I just want to know how it will occur. Any advice on how to impose conditions onto more than one point?
    $endgroup$
    – tenichols
    Jan 16 at 14:30










  • $begingroup$
    You have no control on what the solution will finally look like. But if you can expect that to be the general shape, then setting the values in yinit in that way should be sufficient. If the results do not match the expectations, debug the code and if that is ok, then debug the theory that led to these expectations.
    $endgroup$
    – LutzL
    Jan 16 at 14:38














0












0








0





$begingroup$


I am working on a 4th order non-linear variable coefficient homogeneous ODE bvp.
I am having issues getting a solution using bvp4c. This could be one of many things. Not having a solution within the boundaries I am providing, due to the non-linearity matlab cannot resolve to a solution, or the initial guesses for the functions are so far off it can't work with them.
The error I am getting is



Error using bvp4c (line 251)
Unable to solve the collocation equations -- a singular Jacobian encountered.


I was wondering if there is a better way to provide initial guesses. I would like to give a vector of points that the solution should be near. Is that possible? Any other advice?



btw, I am unable to post example an example code.










share|cite|improve this question









$endgroup$




I am working on a 4th order non-linear variable coefficient homogeneous ODE bvp.
I am having issues getting a solution using bvp4c. This could be one of many things. Not having a solution within the boundaries I am providing, due to the non-linearity matlab cannot resolve to a solution, or the initial guesses for the functions are so far off it can't work with them.
The error I am getting is



Error using bvp4c (line 251)
Unable to solve the collocation equations -- a singular Jacobian encountered.


I was wondering if there is a better way to provide initial guesses. I would like to give a vector of points that the solution should be near. Is that possible? Any other advice?



btw, I am unable to post example an example code.







ordinary-differential-equations numerical-methods matlab nonlinear-system boundary-value-problem






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 15 at 16:19









tenicholstenichols

83




83








  • 1




    $begingroup$
    Check the boundary conditions, I frequently got errors because some index error there making a solution impossible. If you have any physical insight into the problem, you could guess a good initial point and use the IVP solution as initialization.
    $endgroup$
    – LutzL
    Jan 15 at 16:25










  • $begingroup$
    at this link mathworks.com/help/matlab/ref/bvpinit.html it says for multiple point bvp, you can specify the point in [a,b] at which the boundary conditions apply, other than the endpoints a and b. Any idea on how to do this.?For my problem I have a y(a) = h, y'(a) = 0, y(b)=1, and y'(b) = 0.
    $endgroup$
    – tenichols
    Jan 15 at 21:21












  • $begingroup$
    You can also impose conditions on more than 2 points in the framework of bvp4c. But I do not think that you need that. Depending on what you used in the initial approximation, the negative result can mean that there is no solution close to the straight line $y(t)=(t-a)/(b-a)$, any solution has a much more winded (or is that wended?) path, or that there is no solution at all. In general you will need more insight into the rough shape of the solution, like when designing the path of a space probe, you need to know what sling-by maneuvers are to be included.
    $endgroup$
    – LutzL
    Jan 15 at 21:43










  • $begingroup$
    I have a good idea of what the solution should look like. If I was to divided the equation up into 3 sections [a b c], the a and c section will be constant but different values, at the b section the transition from a --> c will occur, I just want to know how it will occur. Any advice on how to impose conditions onto more than one point?
    $endgroup$
    – tenichols
    Jan 16 at 14:30










  • $begingroup$
    You have no control on what the solution will finally look like. But if you can expect that to be the general shape, then setting the values in yinit in that way should be sufficient. If the results do not match the expectations, debug the code and if that is ok, then debug the theory that led to these expectations.
    $endgroup$
    – LutzL
    Jan 16 at 14:38














  • 1




    $begingroup$
    Check the boundary conditions, I frequently got errors because some index error there making a solution impossible. If you have any physical insight into the problem, you could guess a good initial point and use the IVP solution as initialization.
    $endgroup$
    – LutzL
    Jan 15 at 16:25










  • $begingroup$
    at this link mathworks.com/help/matlab/ref/bvpinit.html it says for multiple point bvp, you can specify the point in [a,b] at which the boundary conditions apply, other than the endpoints a and b. Any idea on how to do this.?For my problem I have a y(a) = h, y'(a) = 0, y(b)=1, and y'(b) = 0.
    $endgroup$
    – tenichols
    Jan 15 at 21:21












  • $begingroup$
    You can also impose conditions on more than 2 points in the framework of bvp4c. But I do not think that you need that. Depending on what you used in the initial approximation, the negative result can mean that there is no solution close to the straight line $y(t)=(t-a)/(b-a)$, any solution has a much more winded (or is that wended?) path, or that there is no solution at all. In general you will need more insight into the rough shape of the solution, like when designing the path of a space probe, you need to know what sling-by maneuvers are to be included.
    $endgroup$
    – LutzL
    Jan 15 at 21:43










  • $begingroup$
    I have a good idea of what the solution should look like. If I was to divided the equation up into 3 sections [a b c], the a and c section will be constant but different values, at the b section the transition from a --> c will occur, I just want to know how it will occur. Any advice on how to impose conditions onto more than one point?
    $endgroup$
    – tenichols
    Jan 16 at 14:30










  • $begingroup$
    You have no control on what the solution will finally look like. But if you can expect that to be the general shape, then setting the values in yinit in that way should be sufficient. If the results do not match the expectations, debug the code and if that is ok, then debug the theory that led to these expectations.
    $endgroup$
    – LutzL
    Jan 16 at 14:38








1




1




$begingroup$
Check the boundary conditions, I frequently got errors because some index error there making a solution impossible. If you have any physical insight into the problem, you could guess a good initial point and use the IVP solution as initialization.
$endgroup$
– LutzL
Jan 15 at 16:25




$begingroup$
Check the boundary conditions, I frequently got errors because some index error there making a solution impossible. If you have any physical insight into the problem, you could guess a good initial point and use the IVP solution as initialization.
$endgroup$
– LutzL
Jan 15 at 16:25












$begingroup$
at this link mathworks.com/help/matlab/ref/bvpinit.html it says for multiple point bvp, you can specify the point in [a,b] at which the boundary conditions apply, other than the endpoints a and b. Any idea on how to do this.?For my problem I have a y(a) = h, y'(a) = 0, y(b)=1, and y'(b) = 0.
$endgroup$
– tenichols
Jan 15 at 21:21






$begingroup$
at this link mathworks.com/help/matlab/ref/bvpinit.html it says for multiple point bvp, you can specify the point in [a,b] at which the boundary conditions apply, other than the endpoints a and b. Any idea on how to do this.?For my problem I have a y(a) = h, y'(a) = 0, y(b)=1, and y'(b) = 0.
$endgroup$
– tenichols
Jan 15 at 21:21














$begingroup$
You can also impose conditions on more than 2 points in the framework of bvp4c. But I do not think that you need that. Depending on what you used in the initial approximation, the negative result can mean that there is no solution close to the straight line $y(t)=(t-a)/(b-a)$, any solution has a much more winded (or is that wended?) path, or that there is no solution at all. In general you will need more insight into the rough shape of the solution, like when designing the path of a space probe, you need to know what sling-by maneuvers are to be included.
$endgroup$
– LutzL
Jan 15 at 21:43




$begingroup$
You can also impose conditions on more than 2 points in the framework of bvp4c. But I do not think that you need that. Depending on what you used in the initial approximation, the negative result can mean that there is no solution close to the straight line $y(t)=(t-a)/(b-a)$, any solution has a much more winded (or is that wended?) path, or that there is no solution at all. In general you will need more insight into the rough shape of the solution, like when designing the path of a space probe, you need to know what sling-by maneuvers are to be included.
$endgroup$
– LutzL
Jan 15 at 21:43












$begingroup$
I have a good idea of what the solution should look like. If I was to divided the equation up into 3 sections [a b c], the a and c section will be constant but different values, at the b section the transition from a --> c will occur, I just want to know how it will occur. Any advice on how to impose conditions onto more than one point?
$endgroup$
– tenichols
Jan 16 at 14:30




$begingroup$
I have a good idea of what the solution should look like. If I was to divided the equation up into 3 sections [a b c], the a and c section will be constant but different values, at the b section the transition from a --> c will occur, I just want to know how it will occur. Any advice on how to impose conditions onto more than one point?
$endgroup$
– tenichols
Jan 16 at 14:30












$begingroup$
You have no control on what the solution will finally look like. But if you can expect that to be the general shape, then setting the values in yinit in that way should be sufficient. If the results do not match the expectations, debug the code and if that is ok, then debug the theory that led to these expectations.
$endgroup$
– LutzL
Jan 16 at 14:38




$begingroup$
You have no control on what the solution will finally look like. But if you can expect that to be the general shape, then setting the values in yinit in that way should be sufficient. If the results do not match the expectations, debug the code and if that is ok, then debug the theory that led to these expectations.
$endgroup$
– LutzL
Jan 16 at 14:38










0






active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3074602%2finitial-guessing-to-bvp4c-matlab%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3074602%2finitial-guessing-to-bvp4c-matlab%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith