我希望解决系统y' = y + u'u' = y' + u看起来solve_ivp要求我求解导数并用原始函数来表达它,但我不知道在这种情况下如何做。我不想找到显式结果,我想知道如何让solve_ivp合作,如果可能的话,这样我就可以用它来解决同类的更难的问题,这些问题是不容易处理的。
arknldoa1#
Your equations imply y + u = 0, so you can do a bit algebra to get y' = y/2. You don't need a numerical solver for that; the solution is
y(t) = y0*exp(t/2)
Then
u(t) = -y0*exp(t/2)
1条答案
按热度按时间arknldoa1#
Your equations imply y + u = 0, so you can do a bit algebra to get y' = y/2. You don't need a numerical solver for that; the solution is
Then