For an optimal control problem, I need to solve a differential equation in which (a) the system is formulated according to a function and (b) initial/terminal conditions are discontinuous.
Here is an example of the code I would like to implement
fo[{u_, v_}] := If[u > v, {3 u - v^2, u^2}, {3 u - v^2, v^2}]
system = {{u'[t], v'[t]} == fo[{u[t], v[t]}], u[0] == 3, v[10] == 4}
NDSolve[system, {u[t],v[t]}, {t, 0, 0.3}]
Of course, there are more dimensions and function is more complicated. I have no idea if this is possible, and if so on how to proceed. Any suggestion is welcome.
Comments
Post a Comment