I am trying to solve a nonlinear and discontinuous fourth order BVP using the solve_bvp function of SciPy. My equation is $y^{(4)}=cf(y)$, where $f(y)$ is a nonlinear function. This equation is solved in the domain $x\in(0,1)$, and $f(y)=0$ when $x>0.5$.
Given the nature of the equation, it is proving out to be difficult to solve using MATLAB or Python. MATLAB gives results which are way off, so I went to python, and scipy is actually able to give results which are expected, albeit with a warning that maximum nodes exceeded. The sol.status is 1 and residuals high near the discontinuity point $x=0.5$. My question is, does the fact that there is a warning completely rubbishes any solution that I get, howsoever 'expected' it may be?
Asked
Active
Viewed 42 times
0
whpowell96
- 2,444
- 7
- 19
Mechanician
- 33
- 5
max_nodesto something higher than the default value or you can find a better initial guess of the solution. The high-order collocation method used in solve_bvp expects that the ODE is sufficiently smooth so that the error estimation is meaningful. This is invalid in a small or big way if the lower order-derivatives have jumps. // Did you mean it like you wrote, that $f(y)$ also depends explicitly and directly on $x$, or is $f(y)=0$ for $y>0.5$? – Lutz Lehmann Jul 09 '23 at 05:28