{"id":288054,"date":"2018-08-16T14:21:55","date_gmt":"2018-08-16T10:21:55","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=288054"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=288054","title":{"rendered":"\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/418139\/\" class=\"post__text post__text-html js-mediator-article\">\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435:<\/h3>\n<p>  \u041f\u0440\u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u044f\u0434\u0430 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u0445\u043d\u0438\u043a\u0435, \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0435, \u0445\u0438\u043c\u0438\u0438, \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438, \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0435, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c\u0438 \u0438 \u043d\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u043c\u0438, \u0447\u0430\u0441\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435 \u2014 \u041a\u0443\u0442\u0442\u044b [1]. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f Python, \u0442\u043e \u0432 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u0445 \u043f\u043e \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 [2,3], \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0420\u0443\u043d\u0433\u0435 \u2014 \u041a\u0443\u0442\u0442\u044b \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u0430\u043b\u043e, \u0430 \u043f\u043e \u0435\u0433\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u2014 \u043c\u0435\u0442\u043e\u0434\u0443 \u0420\u0443\u043d\u0433\u0435-\u041a\u0443\u0442\u0442\u0430-\u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442.<\/p>\n<p>  \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443, \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432 Python \u0438\u043c\u0435\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e odeint \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f scipy.integrate. \u0412\u0442\u043e\u0440\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f ode \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0439 \u043f\u044f\u0442\u0438\u0440\u0430\u043d\u0433\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435-\u041a\u0443\u0442\u0442\u0430-\u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430, \u043d\u043e, \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.<\/p>\n<p>  \u0426\u0435\u043b\u044c\u044e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0434 Python \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0420\u0443\u043d\u0433\u0435-\u041a\u0443\u0442\u0442\u0430-\u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430. \u0412 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u0440\u0430\u0435\u0432\u044b\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 (\u0421\u0414\u0423).<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041a\u0440\u0430\u0442\u043a\u0438\u0435 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c \u0434\u043b\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0421\u0414\u0423<\/h3>\n<p>  <b>\u0417\u0430\u0434\u0430\u0447\u0430 \u041a\u043e\u0448\u0438<\/b><\/p>\n<p>  \u0414\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f n \u2013 \u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u0437\u0430\u0434\u0430\u0447\u0430 \u041a\u043e\u0448\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0435\u0439 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0443:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lt\/b1\/2t\/ltb12ttbaok7cykpov2wr1ll2d8.png\"><\/p>\n<p>  \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wu\/hv\/h6\/wuhvh6vc6lvhbtjv9cpdt2ngwpk.png\"><\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0421\u0414\u0423<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/of\/ae\/6d\/ofae6da97foimjlsgplerdbgmw4.png\"> (1)<\/p>\n<p>  \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5h\/yr\/dx\/5hyrdxv0rgrvdlb_wfqcx-xu8yc.png\"><\/p>\n<p>  <b>\u041c\u043e\u0434\u0443\u043b\u044c scipy.integrate <\/b><\/p>\n<p>  \u041c\u043e\u0434\u0443\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 ode() \u0438 odeint(), \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 (\u041e\u0414\u0423) \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 (\u0437\u0430\u0434\u0430\u0447\u0430 \u041a\u043e\u0448\u0438). \u0424\u0443\u043d\u043a\u0446\u0438\u044f ode() \u0431\u043e\u043b\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430\u044f, \u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f odeint() (ODE integrator) \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p>  <b>\u0424\u0443\u043d\u043a\u0446\u0438\u044f odeint()<\/b><\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f odeint() \u0438\u043c\u0435\u0435\u0442 \u0442\u0440\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u043c\u043d\u043e\u0433\u043e \u043e\u043f\u0446\u0438\u0439. \u041e\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 odeint(func, y0, t[,args=(), &#8230;]) \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 func \u2013 \u044d\u0442\u043e \u0438\u043c\u044f Python \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a y=[y1,y2,&#8230;,yn], \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2013 \u0438\u043c\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. <\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f func \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 n \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/px\/uq\/ut\/pxuqutrevt661xvfc3wxjldgvem.png\">\u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 t. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f func(y,t) \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (1).<\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 y0 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 odeint() \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c (\u0438\u043b\u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u043c) \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/el\/kx\/j9\/elkxj9mf1tffldehq2mqdvbl0mi.png\"> \u043f\u0440\u0438 t=t0. <\/p>\n<p>  \u0422\u0440\u0435\u0442\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a t0.<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f odeint() \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 len(t) x len(y0). \u0424\u0443\u043d\u043a\u0446\u0438\u044f odeint() \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043e\u043f\u0446\u0438\u0439, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u043e\u0439. \u041e\u043f\u0446\u0438\u0438 rtol (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c) \u0438 atol (\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c) \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 ei \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f yi \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qq\/3a\/pp\/qq3appk_s2ck4bvifmd7mozxqyi.png\"><\/p>\n<p>  \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0438\u043b\u0438 \u0441\u043a\u0430\u043b\u044f\u0440\u0430\u043c\u0438. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ha\/lb\/jo\/halbjokez-c-a9ur0xeyp8pifew.png\"><\/p>\n<p>  <b>\u0424\u0443\u043d\u043a\u0446\u0438\u044f ode() <\/b><\/p>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f scipy.integrate, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f ode(). \u041e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u041e\u0414\u0423 (\u0442\u0438\u043f scipy.integrate._ode.ode). \u0418\u043c\u0435\u044f \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u044b. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 odeint(), \u0444\u0443\u043d\u043a\u0446\u0438\u044f ode(func) \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0432\u0438\u0434\u0430 (1) \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0430\u0432\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0430\u0432\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 func(t,y) \u043f\u0435\u0440\u0432\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0430 \u0432\u0442\u043e\u0440\u044b\u043c \u2013 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0441\u043a\u043e\u043c\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 ODE, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0437\u0430\u0434\u0430\u0447\u0443 \u041a\u043e\u0448\u0438.<\/p>\n<p>  <b>\u041c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430<\/b><\/p>\n<p>  \u041f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043e\u043d\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0433\u043b\u0430\u0434\u043a\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041f\u0440\u0438 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u041a\u043e\u0448\u0438<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/z6\/sc\/ag\/z6scagau6_z8yjjazels3cibdlc.png\"> (2)<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cf\/hp\/p4\/cfhpp4rxk8vhqnexgl3bgsaapeg.png\"> (3)<\/p>\n<p>  \u043f\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0432 \u0442\u043e\u0447\u043a\u0435 t =0 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u0438\u0437 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f (3) \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 t. \u041f\u0440\u0438 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 (2),(3) \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u0443\u044e, \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b, \u0441\u0435\u0442\u043a\u0443 \u043f\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 t \u0441 \u0448\u0430\u0433\u043e\u043c \u0442 &gt; 0.<\/p>\n<p>  \u041f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 (2), (3) \u0432 \u0442\u043e\u0447\u043a\u0435 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/j-\/lc\/cf\/j-lccfwyp5vjoipcxlykp3dgbik.png\"> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8s\/g0\/sj\/8sg0sjhebyokeq5wuc7a8if2bqm.png\">. \u041c\u0435\u0442\u043e\u0434 \u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u0447\u043a\u0435 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/b-\/x8\/0p\/b-x80p4onflflxhl2lk1vadl3sg.png\"> \u0435\u0441\u043b\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ia\/vi\/8k\/iavi8k482dcl150a2yxsd0gq-d0.png\"> \u043f\u0440\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6b\/sp\/hq\/6bsphqn74wsy9wdcniq4nibexfg.png\">. \u041c\u0435\u0442\u043e\u0434 \u0438\u043c\u0435\u0435\u0442 \u0440-\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u0435\u0441\u043b\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jv\/xz\/j1\/jvxzj1hz0rgs3key_wcinzror84.png\">, \u0440 &gt; 0 \u043f\u0440\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/6b\/sp\/hq\/6bsphqn74wsy9wdcniq4nibexfg.png\">. \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0430\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 (2),(3) \u0435\u0441\u0442\u044c<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ao\/-x\/nx\/ao-xnxhl01dfeg2znuupnwjqci8.png\"> (4)<\/p>\n<p>  \u041f\u0440\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wn\/xq\/qq\/wnxqqqiwt6jm375mk9jf2v0c_zs.png\"> \u0438\u043c\u0435\u0435\u043c \u044f\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u0443\u0435\u0442 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 (2) \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c. \u0421\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-t\/sm\/4h\/-tsm4hzq9-agctksj5eahivdimq.png\"> \u0432 (4) \u0438\u043c\u0435\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u0438. \u042d\u0442\u0430 \u0441\u0445\u0435\u043c\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u043a\u043b\u0430\u0441\u0441\u0443 \u043d\u0435\u044f\u0432\u043d\u044b\u0445 \u2014 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u043e\u0432\u043e\u043c \u0441\u043b\u043e\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443. <\/p>\n<p>  \u042f\u0432\u043d\u044b\u0435 \u0441\u0445\u0435\u043c\u044b \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u044c, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u044f\u0441\u044c \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0435\u0434\u0438\u043a\u0442\u043e\u0440-\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043e\u0440. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u0435\u0434\u0438\u043a\u0442\u043e\u0440\u0430 (\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u044f\u0432\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yw\/lf\/an\/ywlfancnmqu4smvvqozydtuw6qw.png\"> (5)<\/p>\n<p>  \u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043e\u0440\u0430 (\u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f) \u2014 \u0441\u0445\u0435\u043c\u0430<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vk\/kx\/sg\/vkkxsg0mkht41hmefqo3krhkohw.png\"><\/p>\n<p>  \u0412 \u043e\u0434\u043d\u043e\u0448\u0430\u0433\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430 \u0438\u0434\u0435\u0438 \u043f\u0440\u0435\u0434\u0438\u043a\u0442\u043e\u0440\u0430-\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043e\u0440\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u043e. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ou\/dj\/vf\/oudjvfblha8fbsfvflq3qucylb0.png\"> (6),<\/p>\n<p>  \u0433\u0434\u0435<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/of\/gn\/qh\/ofgnqhxv2vlykcughxkzvvnzfm0.png\"><\/p>\n<p>  \u0424\u043e\u0440\u043c\u0443\u043b\u0430 (6) \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 s \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 f \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f s-\u0441\u0442\u0430\u0434\u0438\u0439\u043d\u043e\u0439. \u0415\u0441\u043b\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5b\/3e\/om\/5b3eomem0-kklkzcgc2_hy5ibyu.png\"> \u043f\u0440\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ya\/jx\/d7\/yajxd73qu-icfbj3_qte0sxoamk.png\"> \u0438\u043c\u0435\u0435\u043c \u044f\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430. \u0415\u0441\u043b\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5b\/3e\/om\/5b3eomem0-kklkzcgc2_hy5ibyu.png\"> \u043f\u0440\u0438 j&gt;1 \u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sp\/y9\/l3\/spy9l3eri4ug3bf4ec31kcqgjca.png\"> \u0442\u043e <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/m7\/lj\/ar\/m7ljarovrnbr8ntzgbeekovygko.png\"> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u044f\u0432\u043d\u043e \u0438\u0437 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/md\/2l\/xs\/md2lxstmkruwswxkb4hwqk3ejrm.png\"> (7)<\/p>\n<p>  \u041e \u0442\u0430\u043a\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043a\u0430\u043a \u043e \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u043e-\u043d\u0435\u044f\u0432\u043d\u043e\u043c. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yo\/ud\/im\/youdimr4t898rol5a4naafrjbrk.png\"> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 (\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0411\u0443\u0442\u0447\u0435\u0440\u0430)<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qc\/es\/cx\/qcescxh_lpjsra_3jqxghis4hz0.png\"> <\/p>\n<p>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044f\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/b_\/xb\/6b\/b_xb6bte_wppykllazhykapnppu.png\"> (8)<\/p>\n<p>  <b>\u041c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430\u2014 \u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430<\/b><\/p>\n<p>  \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0447\u0451\u0442\u043d\u044b\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/m7\/lj\/ar\/m7ljarovrnbr8ntzgbeekovygko.png\"> \u043c\u0435\u0442\u043e\u0434\u0430<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/y6\/v7\/yk\/y6v7yk2b6dabo8cfcz86kcbys2o.png\"> (9)<\/p>\n<p>  \u0421 \u0443\u0447\u0451\u0442\u043e\u043c(9) \u043e\u0431\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8w\/dk\/av\/8wdkavmydgbm1e94gfcjnm_kavm.png\"> (10)<\/p>\n<p>  \u042d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u044f\u0442\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0435\u0433\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a Python.<\/p>\n<h4>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0439 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ws\/sh\/r4\/wsshr4edsklounxpocg4hd_mf70.png\"> \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0431\u0435\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 def odein(),def oden() \u043c\u043e\u0434\u0443\u043b\u044f scipy.integrate \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a Python \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430 \u0438 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430\u2014 \u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430<\/h4>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">from numpy import* import matplotlib.pyplot as plt from scipy.integrate import * def odein():                   #dy1\/dt=y2          #dy2\/dt=y1**2+1:          def f(y,t):                    return y**2+1          t =arange(0,1,0.01)          y0 =0.0          y=odeint(f, y0,t)          y = array(y).flatten()          return y,t def oden():          f = lambda t, y: y**2+1          ODE=ode(f)          ODE.set_integrator('dopri5')          ODE.set_initial_value(0, 0)          t=arange(0,1,0.01)          z=[]          t=arange(0,1,0.01)          for i in arange(0,1,0.01):                   ODE.integrate(i)                   q=ODE.y                   z.append(q[0])          return z,t          def rungeKutta(f, to, yo, tEnd, tau):          def increment(f, t, y, tau):                   if z==1:                            k0 =tau* f(t,y)                            k1 =tau* f(t+tau\/2.,y+k0\/2.)                            k2 =tau* f(t+tau\/2.,y+k1\/2.)                            k3 =tau* f(t+tau, y + k2)                            return (k0 + 2.*k1 + 2.*k2 + k3) \/ 6.                   elif z==0:                            k1=tau*f(t,y)                            k2=tau*f(t+(1\/4)*tau,y+(1\/4)*k1)                            k3 =tau *f(t+(3\/8)*tau,y+(3\/32)*k1+(9\/32)*k2)                            k4=tau*f(t+(12\/13)*tau,y+(1932\/2197)*k1-(7200\/2197)*k2+(7296\/2197)*k3)                            k5=tau*f(t+tau,y+(439\/216)*k1-8*k2+(3680\/513)*k3 -(845\/4104)*k4)                            k6=tau*f(t+(1\/2)*tau,y-(8\/27)*k1+2*k2-(3544\/2565)*k3 +(1859\/4104)*k4-(11\/40)*k5)                            return (16\/135)*k1+(6656\/12825)*k3+(28561\/56430)*k4-(9\/50)*k5+(2\/55)*k6              t = []          y= []          t.append(to)          y.append(yo)          while to &lt; tEnd:                   tau = min(tau, tEnd - to)                   yo = yo + increment(f, to, yo, tau)                   to = to + tau                   t.append(to)                   y.append(yo)                   return array(t), array(y) def f(t, y):          f = zeros([1])          f[0] = y[0]**2+1              return f to = 0. tEnd = 1 yo = array([0.]) tau = 0.01 z=1 t, yn = rungeKutta(f, to, yo, tEnd, tau) y1n=[i[0] for i in yn] plt.figure() plt.title(\"\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f(\u0442.\u0440.- u(t)=tan(t)) \u0414\u0423\\n\\ du\/dt=u**2+1 c u(0)=0 \u043f\u0440\u0438 t&gt;0\") plt.plot(t,abs(array(y1n)-array(tan(t))),label='\u041c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430 \\n\\ \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 - \u0440\u0430\u0441\u0447\u0451\u0442 \u043f\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443') plt.xlabel('\u0412\u0440\u0435\u043c\u044f') plt.ylabel('\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c.') plt.legend(loc='best') plt.grid(True) z=0 t, ym = rungeKutta(f, to, yo, tEnd, tau) y1m=[i[0] for i in ym] plt.figure() plt.title(\"\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f(\u0442.\u0440.- u(t)=tan(t)) \u0414\u0423\\n\\ du\/dt=u**2+1 c u(0)=0 \u043f\u0440\u0438 t&gt;0\") plt.plot(t,abs(array(y1m)-array(tan(t))),label='\u041c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430\u2014 \u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430 \\n\\ \u043f\u044f\u0442\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 - \u0440\u0430\u0441\u0447\u0451\u0442 \u043f\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443') plt.xlabel('\u0412\u0440\u0435\u043c\u044f') plt.ylabel('\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c.') plt.legend(loc='best') plt.grid(True) plt.figure() plt.title(\"\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0442.\u0440.- u(t)=tan(t)) \u0414\u0423\\n\\ du\/dt=u**2+1 c u(0)=0 \u043f\u0440\u0438 t&gt;0\") y,t=odein() plt.plot(t,abs(array(tan(t))-array(y)),label='\u0424\u0443\u043d\u043a\u0446\u0438\u044f odein') plt.xlabel('\u0412\u0440\u0435\u043c\u044f') plt.ylabel('\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c.') plt.legend(loc='best') plt.grid(True) plt.figure() plt.title(\"\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0442.\u0440.- u(t)=tan(t)) \u0414\u0423\\n\\ du\/dt=u**2+1 c u(0)=0 \u043f\u0440\u0438 t&gt;0\") z,t=oden() plt.plot(t,abs(tan(t)-z),label='\u0424\u0443\u043d\u043a\u0446\u0438\u044f ode \u043c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430\u2014 \u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430 \\n\\ \u043f\u044f\u0442\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430') plt.xlabel('\u0412\u0440\u0435\u043c\u044f') plt.ylabel('\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c.') plt.legend(loc='best') plt.grid(True) plt.show()<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rb\/l6\/-2\/rbl6-2ookhhbihd9xnftqqknrc4.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/od\/pn\/mp\/odpnmp3qsgjttpzjikbu4ry34bk.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nt\/vw\/dv\/ntvwdvd0hnwbgnfdgoox71in9pk.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-a\/gl\/os\/-agloshtg1bvovezwdjex4ri2ac.png\"><\/p>\n<p>  <b>\u0412\u044b\u0432\u043e\u0434:<\/b><\/p>\n<p>  \u0410\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a Python \u043c\u0435\u0442\u043e\u0434\u044b \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430 \u0438 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430\u2014 \u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430 \u0438\u043c\u0435\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0443\u044e, \u0447\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 odeint, \u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0443\u044e, \u0447\u0435\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 edu. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<h4>\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0421\u0414\u0423 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 ode \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c dopri5 (\u043c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435 \u2013 \u041a\u0443\u0442\u0442\u044b 5 \u043f\u043e\u0440\u044f\u0434\u043a\u0430) \u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a Python \u043c\u0435\u0442\u043e\u0434\u0430 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430\u2014 \u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430<\/h4>\n<p>  \u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0432 [2]. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a, \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438\u0437 [2].<\/p>\n<p>  \u0420\u0435\u0448\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u041a\u043e\u0448\u0438, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u043b\u0430, \u0431\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e v0 \u043f\u043e\u0434 \u0443\u0433\u043b\u043e\u043c \u03b1 \u043a \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0443 \u0432 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0447\u0442\u043e \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0434\u0443\u0445\u0430 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0443 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438. \u0412 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2a\/9w\/f5\/2a9wf5a2_ckuhlu2mypbya1euow.png\"><\/p>\n<p>  \u0433\u0434\u0435 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zi\/gy\/z5\/zigyz50cgbqvfeos6rozby0xais.png\"> \u2013 \u0440\u0430\u0434\u0438\u0443\u0441 \u0432\u0435\u043a\u0442\u043e\u0440 \u0434\u0432\u0438\u0436\u0443\u0449\u0435\u0433\u043e\u0441\u044f \u0442\u0435\u043b\u0430, <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/v_\/7w\/rm\/v_7wrmvexfdj_3j7kfyobvy0omi.png\">\u2013 \u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0442\u0435\u043b\u0430, <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_-\/jq\/rq\/_-jqrqt-dvbznpe_4l8htdsfybw.png\">\u2013 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u044f, \u0432\u0435\u043a\u0442\u043e\u0440 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/px\/au\/zt\/pxauztg_p8ldqkk3vuuzxgkzzhe.png\"> \u0441\u0438\u043b\u044b \u0432\u0435\u0441\u0430 \u0442\u0435\u043b\u0430 \u043c\u0430\u0441\u0441\u044b m, g \u2013 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0430\u0434\u0435\u043d\u0438\u044f. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ux\/fy\/xy\/uxfyxyowu7xnhy-fvigwoeh436m.png\"><\/p>\n<p>  \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u043e\u0433\u0434\u0430 \u0442\u0435\u043b\u043e \u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0430 \u0437\u0435\u043c\u043b\u044e. \u0415\u0441\u043b\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ud\/6h\/hh\/ud6hhhzd7lyf71noe8hpdlyrexi.png\">, \u0442\u043e \u0432 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439: <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jh\/dd\/rr\/jhddrrguuy07d9hw9x5gvcylo2u.png\"><\/p>\n<p>  \u041a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f: <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tr\/de\/l-\/trdel-vxwgw3oy1ryv0k1nafch0.png\"> (h \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u044b\u0441\u043e\u0442\u0430), <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-g\/zd\/ft\/-gzdft1d38m6x4f6vryof4jlwuu.png\">. \u041f\u043e\u043b\u043e\u0436\u0438\u043c <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/l0\/1r\/cm\/l01rcm17euagfjzj8gcet4xfhge.png\">. \u0422\u043e\u0433\u0434\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u041e\u0414\u0423 1 \u2013 \u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nh\/zg\/r5\/nhzgr5att8_fao3l-majsjgcm7k.png\"><\/p>\n<p>  \u0414\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u043c <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2s\/20\/ov\/2s20ovmvcahufaxyhihjev7rm8g.png\">. \u041e\u043f\u0443\u0441\u043a\u0430\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443, \u0434\u0443\u043c\u0430\u044e, \u0431\u0443\u0434\u0435\u0442 \u044f\u0441\u0435\u043d \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0435\u0451 \u0440\u0430\u0431\u043e\u0442\u044b. \u0412 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043e\u0442\u0441\u0447\u0451\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import numpy as np import matplotlib.pyplot as plt import time start = time.time() from scipy.integrate import ode ts = [ ] ys = [ ] FlightTime, Distance, Height =0,0,0 y4old=0 def fout(t, y):# \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0448\u0430\u0433\u0430           global FlightTime, Distance, Height,y4old          ts.append(t)          ys.append(list(y.copy()))          y1, y2, y3, y4 = y          if y4*y4old&lt;=0:  # \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430 \u0442\u043e\u0447\u043a\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430                   Height=y3          if y4&lt;0 and y3&lt;=0.0: # \u0442\u0435\u043b\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438                   FlightTime=t                   Distance=y1                   return -1          y4old=y4 # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0430\u0432\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u041e\u0414\u0423 def f(t, y, k):  #  \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 k          g=9.81          y1, y2, y3, y4 = y          return [y2,-k*y2*np.sqrt(y2**2+y4**2), y4,-k*y4*np.sqrt(y2**2+y4**2)-g]  tmax=1.41         # \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 alph=np.pi\/4           # \u0443\u0433\u043e\u043b \u0431\u0440\u043e\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u043b\u0430 v0=10.0                # \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c K=[0.1,0.2,0.3,0.5] # \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u044f y0,t0=[0, v0*np.cos(alph), 0, v0*np.sin(alph)], 0 # \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f  ODE=ode(f) ODE.set_integrator('dopri5', max_step=0.01) ODE.set_solout(fout) fig, ax = plt.subplots() fig.set_facecolor('white') for k in K:   # \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u044f          ts, ys = [ ],[ ]          ODE.set_initial_value(y0, t0) # \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439          ODE.set_f_params(k)  # \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 k     # \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e f(t,y,k) \u043f\u0440\u0430\u0432\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u041e\u0414\u0423          ODE.integrate(tmax)      # \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u041e\u0414\u0423          print('Flight time = %.4f Distance = %.4f Height =%.4f '% (FlightTime,Distance,Height))          Y=np.array(ys)          plt.plot(Y[:,0],Y[:,2],linewidth=3,label='k=%.1f'% k) stop = time.time() plt.title(\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u041e\u0414\u0423 \\n \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438 ode \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c  dopri5  \") print (\"\u0412\u0440\u0435\u043c\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: %f\"%(stop-start)) plt.grid(True) plt.xlim(0,8) plt.ylim(-0.1,2) plt.legend(loc='best')     plt.show()<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<p>  Flight time = 1.2316 Distance = 5.9829 Height =1.8542 <br \/>  Flight time = 1.1016 Distance = 4.3830 Height =1.5088 <br \/>  Flight time = 1.0197 Distance = 3.5265 Height =1.2912 <br \/>  Flight time = 0.9068 Distance = 2.5842 Height =1.0240 <br \/>  \u0412\u0440\u0435\u043c\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: 0.454787<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/z5\/u5\/xc\/z5u5xc04tbd-_2idovqqosevlwi.png\"><\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Python \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0421\u0414\u0423 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043c\u043d\u043e\u044e \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0430 \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/p>\n<p>  <code>def increment(f, t, y, tau<br \/>   k1=tau*f(t,y)<br \/>   k2=tau*f(t+(1\/4)*tau,y+(1\/4)*k1)<br \/>   k3 =tau *f(t+(3\/8)*tau,y+(3\/32)*k1+(9\/32)*k2)<br \/>   k4=tau*f(t+(12\/13)*tau,y+(1932\/2197)*k1-(7200\/2197)*k2+(7296\/2197)*k3)<br \/>   k5=tau*f(t+tau,y+(439\/216)*k1-8*k2+(3680\/513)*k3 -(845\/4104)*k4)<br \/>   k6=tau*f(t+(1\/2)*tau,y-(8\/27)*k1+2*k2-(3544\/2565)*k3 +(1859\/4104)*k4-(11\/40)*k5)<br \/>   return (16\/135)*k1+(6656\/12825)*k3+(28561\/56430)*k4-(9\/50)*k5+(2\/55)*k6<\/code><\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f increment(f, t, y, tau) \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u044f\u0442\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0435:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">from numpy import* import matplotlib.pyplot as plt import time start = time.time() def rungeKutta(f, to, yo, tEnd, tau):          def increment(f, t, y, tau):# \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0451\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430\u2014\u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430.                   k1=tau*f(t,y)                   k2=tau*f(t+(1\/4)*tau,y+(1\/4)*k1)                   k3 =tau *f(t+(3\/8)*tau,y+(3\/32)*k1+(9\/32)*k2)                   k4=tau*f(t+(12\/13)*tau,y+(1932\/2197)*k1-(7200\/2197)*k2+(7296\/2197)*k3)                   k5=tau*f(t+tau,y+(439\/216)*k1-8*k2+(3680\/513)*k3 -(845\/4104)*k4)                   k6=tau*f(t+(1\/2)*tau,y-(8\/27)*k1+2*k2-(3544\/2565)*k3 +(1859\/4104)*k4-(11\/40)*k5)                   return (16\/135)*k1+(6656\/12825)*k3+(28561\/56430)*k4-(9\/50)*k5+(2\/55)*k6               t = []#\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 t          y= []#\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 y          t.append(to)#\u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a t \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f to          y.append(yo)#\u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a y \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f yo          while to &lt; tEnd:#\u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u044b t,y                   tau = min(tau, tEnd - to)#\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0448\u0430\u0433\u0430 tau                   yo = yo + increment(f, to, yo, tau) # \u0440\u0430\u0441\u0447\u0451\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0442\u043e\u0447\u043a\u0435 t0,y0 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u041a\u043e\u0448\u0438                   to = to + tau # \u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438                   t.append(to) # \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 t                   y.append(yo) # \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 y                 return array(t), array(y) def f(t, y): # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0430\u0432\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u041e\u0414\u0423                 f = zeros([4])          f[0]=y[1]                  f[1]=-k*y[1]*sqrt(y[1]**2+y[3]**2)               f[2]=y[3]          f[3]=-k*y[3]*sqrt(y[1]**2+y[3]**2) -g          if y[3]&lt;0 and y[2]&lt;=0.0: # \u0442\u0435\u043b\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438                   return -1          return f to = 0# \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0442\u0441\u0447\u0451\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 tEnd = 1.41# \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0442\u0441\u0447\u0451\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 alph=pi\/4# \u0443\u0433\u043e\u043b \u0431\u0440\u043e\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u043b\u0430 v0=10.0 # \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c K=[0.1,0.2,0.3,0.5]# \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u044b g=9.81  yo = array([0.,v0*cos(alph),0.,v0*sin(alph)]) # \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f   tau =0.01# \u0448\u0430\u0433 for i in K:  # \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u044b          k=i          t, y = rungeKutta(f, to, yo, tEnd, tau)          y1=array([i[0] for i in y]) # \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 y           y3=array([i[2] for i in y])          # \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u044b \"\u043a\" \u0438 \u0440\u0430\u0441\u0447\u0451\u0442 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f s,h,t           plt.plot(y1,y3,linewidth=2,label='k=%.1f  h=%.3f  s=%.2f  t=%s' % (k,max(y3),max(y1),round(t[list(y1).index(max(y1))],3))) stop = time.time() plt.title(\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u041e\u0414\u0423 \\n \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043b\u044f Python\\n \u043c\u0435\u0442\u043e\u0434\u0430 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430\u2014\u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430 \") print (\"\u0412\u0440\u0435\u043c\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: %f\"%(stop-start)) plt.xlabel('\u0412\u044b\u0441\u043e\u0442\u0430 h') plt.ylabel('\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 s') plt.legend(loc='best')          plt.xlim(0,8) plt.ylim(-0.1,2)          plt.grid(True)   plt.show()<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<p>  \u0412\u0440\u0435\u043c\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: 0.259927<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_i\/c1\/ta\/_ic1ta5623kjqb1qazfpt3ut1ns.png\"><\/p>\n<p>  <b>\u0412\u044b\u0432\u043e\u0434<\/b><\/p>\n<p>  \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432 \u0434\u0432\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u0447\u0435\u043c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 ode, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e ode \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0440\u0430\u0435\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u043e\u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u043a\u0440\u0430\u0435\u0432\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438<\/h3>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043a\u0440\u0430\u0435\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u043e\u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u0440\u0430\u0435\u0432\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/i4\/x0\/jt\/i4x0jtfxfy57053vvu31tpyyvo4.png\"> (11)<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 (11) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c:<\/p>\n<p>  1. \u0420\u0435\u0448\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u043d\u0435\u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b (11) \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0w\/b-\/qj\/0wb-qjfvaodszu5xyov9mqgddmi.png\"><br \/>  \u0412\u0432\u0435\u0434\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u041a\u043e\u0448\u0438: <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/h1\/am\/zo\/h1amzogvuzkyz3a6wpp95gd9rua.png\"><\/p>\n<p>  2. \u0420\u0435\u0448\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b (11) \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ia\/d6\/yn\/iad6ynerbilksk3kcjwudksg4ta.png\"><br \/>  \u0412\u0432\u0435\u0434\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u041a\u043e\u0448\u0438: <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3t\/ib\/ze\/3tibzeyvnv-bsodoaivbfnycscc.png\"><\/p>\n<p>  3. \u0420\u0435\u0448\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u044b\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b (11) \u0441 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rl\/vd\/pc\/rlvdpcnayrhhfasr9s4jpjpffja.png\"><\/p>\n<p>  \u0412\u0432\u0435\u0434\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u041a\u043e\u0448\u0438: <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pq\/dl\/os\/pqdlosn5xi7yxhoeg0yafuybtdy.png\"><\/p>\n<p>  4. \u041e\u0431\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0440\u0430\u0435\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 (11) \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0437\u0430\u0434\u0430\u0447 \u041a\u043e\u0448\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8n\/_t\/17\/8n_t1751ck0jmg6oiv3cgaluskm.png\"><br \/>  \u0433\u0434\u0435 p2, p3 \u2014 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. <\/p>\n<p>  5. \u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 p2, p3, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u0440\u0430\u0435\u0432\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0434\u0432\u0443\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 (11), \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u0438 x = b. \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044f, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 p2, p3:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0_\/xe\/_p\/0_xe_pgiynf0ufquqah-k7llh18.png\"> (12)<br \/>  \u0420\u0435\u0448\u0430\u044f (12), \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f p2, p3.<\/p>\n<p>  \u041f\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0430 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430\u2014\u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443: <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"> # \u041c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u0441\u0442\u0440\u0435\u043b\u043a\u0438 from numpy  import* import matplotlib.pyplot as plt import matplotlib.font_manager as fm,os import matplotlib.patches as mpatches import matplotlib.lines as mlines from scipy.integrate import odeint from scipy import linalg import time start = time.time() c1 = 1.0 c2 = 0.8 c3 = 0.5 a =0.0 b = 1.0 nn =100 initial_state_0 =array( [a, c1, 0.0, 0.0]) initial_state_I =array( [a, 0.0, 1.0, 0.0]) initial_state_II =array( [a, 0.0, 0.0, 1.0]) to = a tEnd =b N = int(nn) tau=(b-a)\/N def rungeKutta(f, to, yo, tEnd, tau):          def increment(f, t, y, tau):                   k1=tau*f(t,y)                   k2=tau*f(t+(1\/4)*tau,y+(1\/4)*k1)                   k3 =tau *f(t+(3\/8)*tau,y+(3\/32)*k1+(9\/32)*k2)                   k4=tau*f(t+(12\/13)*tau,y+(1932\/2197)*k1-(7200\/2197)*k2+(7296\/2197)*k3)                   k5=tau*f(t+tau,y+(439\/216)*k1-8*k2+(3680\/513)*k3 -(845\/4104)*k4)                   k6=tau*f(t+(1\/2)*tau,y-(8\/27)*k1+2*k2-(3544\/2565)*k3 +(1859\/4104)*k4-(11\/40)*k5)                   return (16\/135)*k1+(6656\/12825)*k3+(28561\/56430)*k4-(9\/50)*k5+(2\/55)*k6            t = []          y= []          t.append(to)          y.append(yo)          while to &lt; tEnd:                   tau = min(tau, tEnd - to)                   yo = yo + increment(f, to, yo, tau)                   to = to + tau                   t.append(to)                   y.append(yo)                   return array(t), array(y) def f(t, y):          global theta          f = zeros([4])          f[0] = 1          f[1] = -y [1]-y[2] +theta* sin(y[0])          f[2] = -y[2]+y[3]          f[3] = -y[2]          return f # \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u041d\u0415\u041e\u0414\u041d\u041e\u0420\u041e\u0414\u041d\u041e\u0419 \u0441\u0438\u0441\u0442\u0435\u043c\u044b -- theta = 1 theta = 1.0 yo =initial_state_0 t, y = rungeKutta(f, to, yo, tEnd, tau) y2=[i[2] for i in y] y3=[i[3] for i in y] # \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439  # Y20 = Y2(b), Y30 = Y3(b) Y20 = y2[N-1] Y30 = y3[N-1] # \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u041e\u0414\u041d\u041e\u0420\u041e\u0414\u041d\u041e\u0419 \u0441\u0438\u0441\u0442\u0435\u043c\u044b -- theta = 0, \u0437\u0430\u0434\u0430\u0447\u0430 I theta = 0.0 yo= initial_state_I t, y = rungeKutta(f, to, yo, tEnd, tau) y2=[i[2] for i in y] y3=[i[3] for i in y] # \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439  # Y21= Y2(b), Y31 = Y3(b) Y21= y2[N-1] Y31 = y3[N-1] # \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u041e\u0414\u041d\u041e\u0420\u041e\u0414\u041d\u041e\u0419 \u0441\u0438\u0441\u0442\u0435\u043c\u044b -- theta = 0, \u0437\u0430\u0434\u0430\u0447\u0430 II theta = 0.0 yo =initial_state_II t, y = rungeKutta(f, to, yo, tEnd, tau) y2=[i[2] for i in y] y3=[i[3] for i in y] # \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439  # Y211= Y2(b), Y311 = Y3(b) Y211= y2[N-1] Y311 = y3[N-1] # \u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 # \u0410\u041b\u0413\u0415\u0411\u0420\u0410\u0418\u0427\u0415\u0421\u041a\u0418\u0425 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u043d\u0438\u044f p2, p3 b1 = c2 - Y20 b2 = c3 - Y30 A = array([[Y21, Y211], [Y31, Y311]]) bb = array([[b1], [b2]])  # \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b p2, p3 = linalg.solve(A, bb) # \u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0440\u0430\u0435\u0432\u043e\u0439 # \u041d\u0415\u041e\u0414\u041d\u041e\u0420\u041e\u0414\u041d\u041e\u0419 \u0437\u0430\u0434\u0430\u0447\u0438, theta = 1 theta = 1.0 yo = array([a, c1, p2, p3]) t, y = rungeKutta(f, to, yo, tEnd, tau) y0=[i[0] for i in y] y1=[i[1] for i in y] y2=[i[2] for i in y] y3=[i[3] for i in y] # \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 print('y0[0]=', y0[0]) print('y1[0]=', y1[0]) print('y2[0]=', y2[0]) print('y3[0]=', y3[0]) print('y0[N-1]=', y0[N-1]) print('y1[N-1]=', y1[N-1]) print('y2[N-1]=', y2[N-1]) print('y3[N-1]=', y3[N-1]) j = N xx = y0[:j] yy1 = y1[:j] yy2 = y2[:j] yy3 = y3[:j] stop = time.time() print (\"\u0412\u0440\u0435\u043c\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: %f\"%(stop-start)) plt.subplot(2, 1, 1) plt.plot([a], [c1], 'ro') plt.plot([b], [c2], 'go') plt.plot([b], [c3], 'bo') plt.plot(xx, yy1, color='r') #\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.plot(xx, yy2, color='g') #\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.plot(xx, yy3, color='b') #\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 plt.xlabel(r'$x$') #\u041c\u0435\u0442\u043a\u0430 \u043f\u043e \u043e\u0441\u0438 x \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 TeX plt.ylabel(r'$y_k(x)$') #\u041c\u0435\u0442\u043a\u0430 \u043f\u043e \u043e\u0441\u0438 y \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 TeX plt.title(r'\u041c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u0441\u0442\u0440\u0435\u043b\u043a\u0438 ', color='blue') plt.grid(True) #\u0421\u0435\u0442\u043a\u0430 patch_y1 = mpatches.Patch(color='red',                           label='$y_1$') patch_y2 = mpatches.Patch(color='green',                           label='$y_2$') patch_y3 = mpatches.Patch(color='blue',                            label='$y_3$') plt.legend(handles=[patch_y1, patch_y2, patch_y3]) ymin, ymax = plt.ylim() xmin, xmax = plt.xlim() plt.subplot(2, 1, 2) font = {'family': 'serif',         'color': 'blue',         'weight': 'normal',         'size': 12,         } plt.text(0.2, 0.8, r'$\\frac{dy_1}{dx}= - y_1 - y_2 + \\sin(x),$',          fontdict=font) plt.text(0.2, 0.6,r'$\\frac{dy_2}{dx}= - y_1 + y_3,$',          fontdict=font) plt.text(0.2, 0.4, r'$\\frac{dy_3}{dx}= - y_2 - y_2,$',          fontdict=font) plt.text(0.2, 0.2, r'$y_1(a)=c_1, '          r'\\quad y_2(b)=c_2, \\quad y_3(b)=c_3.$',          fontdict=font) plt.subplots_adjust(left=0.15) plt.show() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<p>  y0[0]= 0.0<br \/>  y1[0]= 1.0<br \/>  y2[0]= 0.7156448588231397<br \/>  y3[0]= 1.324566562303714<br \/>  y0[N-1]= 0.9900000000000007<br \/>  y1[N-1]= 0.1747719838716767<br \/>  y2[N-1]= 0.8<br \/>  y3[N-1]= 0.5000000000000001<br \/>  \u0412\u0440\u0435\u043c\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: 0.070878<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kj\/g1\/0c\/kjg10co-rqc-pwbedzo56s4b3wy.png\"><\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434<\/h3>\n<p>  \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0430\u044f \u043c\u043d\u043e\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0432 [3] \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c\u044e, \u0447\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 odeint \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430 Python \u043c\u0435\u0442\u043e\u0434\u0430 \u0420\u0443\u043d\u0433\u0435\u2014\u041a\u0443\u0442\u0442\u0430\u2014\u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430.<\/p>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438:<\/p>\n<p>  1. <a href=\"http:\/\/www.science-education.ru\/ru\/article\/view?id=5196\">\u0427\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439.<\/a><\/p>\n<p>  2. <a href=\"http:\/\/geometry.karazin.ua\/resources\/documents\/20161211134615_988a1d6a.pdf\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u043d\u0430\u0443\u0447\u043d\u044b\u0439 Python.<\/a><\/p>\n<p>  3. \u041d.\u041c. \u041f\u043e\u043b\u044f\u043a\u043e\u0432\u0430, \u0415.\u0412. \u0428\u0438\u0440\u044f\u0435\u0432\u0430 Python 3. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u0440\u0438\u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u043a\u0440\u0430\u0435\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043b\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439). \u0420\u043e\u0441\u0442\u043e\u0432-\u043d\u0430-\u0414\u043e\u043d\u0443 2017.<\/p><\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/418139\/\"> https:\/\/habr.com\/post\/418139\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/418139\/\" class=\"post__text post__text-html js-mediator-article\">\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435:<\/h3>\n<p>  \u041f\u0440\u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u044f\u0434\u0430 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u0435\u0445\u043d\u0438\u043a\u0435, \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0435, \u0445\u0438\u043c\u0438\u0438, \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438, \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0435, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c\u0438 \u0438 \u043d\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u043c\u0438, \u0447\u0430\u0441\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435 \u2014 \u041a\u0443\u0442\u0442\u044b [1]. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f Python, \u0442\u043e \u0432 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u0445 \u043f\u043e \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 [2,3], \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0420\u0443\u043d\u0433\u0435 \u2014 \u041a\u0443\u0442\u0442\u044b \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u0430\u043b\u043e, \u0430 \u043f\u043e \u0435\u0433\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u2014 \u043c\u0435\u0442\u043e\u0434\u0443 \u0420\u0443\u043d\u0433\u0435-\u041a\u0443\u0442\u0442\u0430-\u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442.<\/p>\n<p>  \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443, \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432 Python \u0438\u043c\u0435\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e odeint \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f scipy.integrate. \u0412\u0442\u043e\u0440\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f ode \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0439 \u043f\u044f\u0442\u0438\u0440\u0430\u043d\u0433\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0420\u0443\u043d\u0433\u0435-\u041a\u0443\u0442\u0442\u0430-\u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430, \u043d\u043e, \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.<\/p>\n<p>  \u0426\u0435\u043b\u044c\u044e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0434 Python \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0420\u0443\u043d\u0433\u0435-\u041a\u0443\u0442\u0442\u0430-\u0424\u0435\u043b\u044c\u0431\u0435\u0440\u0433\u0430. \u0412 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u0440\u0430\u0435\u0432\u044b\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 (\u0421\u0414\u0423).  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-288054","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/288054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=288054"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/288054\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=288054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=288054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=288054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}