Using ode45 to solve system of ODEs with some initial conditions and some terminal conditions
3 views (last 30 days)
Show older comments
I have a system of ODEs
with 
, and with a mix of initial and terminal conditions on x. Specifically, for the first 8 components of x, we have the initial conditons,
, while for the last 8 components, we have terminal conditions,
. Mathematically, this should be enough to guarantee uniqueness of the solution, and I know that if you ever have only terminal or only initial conditions, ode45 handles it no problem.





The first thought would be to just separate the first 8 and last 8 components and just solve 2 system of ODEs, one with terminal conditions and the other with initial conditions, but unfortunately the equations governing both the first 8 components and the last 8 all involve all 16 components, so separating them out isn't possible.
Basically, I want to know if theres a way to corral ode45 into solving a system of ODEs such as this one, since I couldn't find a built-in way to do it when searching, or if there's some mathematical trick to where I can transform the system to only have initial conditions, or something like that.
Any help is appreciated!
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!