{"id":284429,"date":"2017-04-04T16:50:02","date_gmt":"2017-04-04T12:50:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=284429"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=284429","title":{"rendered":"\u041c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \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 \u043d\u0430 SymPy \u0438 NumPy"},"content":{"rendered":"<h3>\u0417\u0430\u0434\u0430\u0447\u0430<\/h3>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 SymPy \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u043f\u0430\u043a\u0435\u0442\u043e\u043c NumPy. \u0412\u0441\u0451 \u0441\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 Python.<\/p>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \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\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u043c \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u0432\u0435\u043d\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0435\u0442\u044f\u0445[1,2]. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 [3] \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u043d\u0430 Python \u043d\u0430\u0439\u0434\u0443\u0442 \u0441\u0432\u043e\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043a\u043e\u0432.<a name=\"habracut\"><\/a><\/p>\n<h3>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0442\u043e\u043c\u043b\u044f\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u0440\u0430\u0437\u0443 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import numpy as np from sympy import * from IPython.display import * import matplotlib.pyplot as plt init_printing(use_latex=True) var('t C1 C2') u = Function(&quot;u&quot;)(t)  # \u042d\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043d\u043e \u043d\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f. m=20 #\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043c\u0430\u0441\u0441\u044b. w=10.0#\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0434\u0435\u043c\u043f\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439. c=0.3#\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0436\u0451\u0441\u0442\u043a\u043e\u0441\u0442\u0438. a=1#\u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0438\u043c\u043f\u0443\u043b\u044c\u0441 \u0441\u0438\u043b\u044b. #\u0412\u0441\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435(\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439). t#\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f. de = Eq(m*u.diff(t,t)+w*u.diff(t)+c*u,a) #-\u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439. display(de)#-\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439. des = dsolve(de,u)#\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u041a\u043e\u0448\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435. display(des)#\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439. eq1=des.rhs.subs(t,0);#\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u043d\u0443\u043b\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 t=0. display(eq1)#\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439. eq2=des.rhs.diff(t).subs(t,0)#\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u043d\u0443\u043b\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 # \u0432\u0440\u0435\u043c\u0435\u043d\u0438 t=0. display(eq2)#\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439. seq=solve([eq1,eq2],C1,C2)#\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 C1,C2. display(seq)#\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439. rez=des.rhs.subs([(C1,seq[C1]),(C2,seq[C2])])#\u0412\u0438\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \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 \u0441 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432. display(rez)#\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439. f=lambdify(t, rez, &quot;numpy&quot;)#\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b #\u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c numpy . x = np.arange(0.0,500,0.01)          plt.plot(x,f(x),color='b', linewidth=3) plt.xlabel('Time t seconds',fontsize=12) plt.ylabel('$f(t)$',fontsize=16) plt.grid(True) plt.show() <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0434\u0435\u043c\u043f\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0430\u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u0441\u0435 \u044d\u0442\u0430\u043f\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c93\/985\/6f7\/c939856f73084f898150a985e050d756.png\"\/><\/p>\n<p>  Eq(0.3*u(t) + 10.0*Derivative(u(t), t) + 20*Derivative(u(t), t, t), 1)<br \/>  Eq(u(t), C1*exp(t*(-5 \u2014 sqrt(19))\/20) + C2*exp(t*(-5 + sqrt(19))\/20) + 3.33333333333333)<br \/>  C1 + C2 + 3.33333333333333<br \/>  C1*(-1\/4 \u2014 sqrt(19)\/20) + C2*(-1\/4 + sqrt(19)\/20)<br \/>  {C1: 0.245131115588015, C2: -3.57846444892135}<br \/>  0.245131115588015*exp(t*(-5 \u2014 sqrt(19))\/20) \u2014 3.57846444892135*exp(t*(-5 + sqrt(19))\/20) + 3.33333333333333<\/p>\n<p>  \u0418\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0440\u0451\u0445 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439 \u0441 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u043c \u0434\u0435\u043c\u043f\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u0442\u0440\u0435\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0434\u0435\u043c\u043f\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import numpy as np from sympy import * from IPython.display import * import matplotlib.pyplot as plt init_printing(use_latex=True) var('t C1 C2') u = Function(&quot;u&quot;)(t)  # \u042d\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043d\u043e \u043d\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f. m=200 #\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043c\u0430\u0441\u0441\u044b. w=1.8#\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0434\u0435\u043c\u043f\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439. c=1.3#\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0436\u0451\u0441\u0442\u043a\u043e\u0441\u0442\u0438. a=1#\u0411\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0438\u043c\u043f\u0443\u043b\u044c\u0441 \u0441\u0438\u043b\u044b. #\u0412\u0441\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439). t#\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f. man=[0.8,2.12,5]#\u0421\u043f\u0438\u0441\u043e\u043a \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0435\u043c\u043f\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432). for w in man:          de = Eq(m*u.diff(t,t)+w*u.diff(t)+c*u,a) #-\u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439.          display(de)#-\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439.          des = dsolve(de,u)#\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u041a\u043e\u0448\u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435.          display(des)#\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439.          eq1=des.rhs.subs(t,0);#\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u043d\u0443\u043b\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 t=0.          display(eq1)#\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439.          eq2=des.rhs.diff(t).subs(t,0)#\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 \u043d\u0443\u043b\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 t=0.          display(eq2)#\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439.          seq=solve([eq1,eq2],C1,C2)#\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 C1,C2.          display(seq)#\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439.          rez=des.rhs.subs([(C1,seq[C1]),(C2,seq[C2])])#\u0412\u0438\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \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          #\u0441 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432.          display(rez)#\u0412\u044b\u0432\u043e\u0434 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439.          f=lambdify(t, rez, &quot;numpy&quot;)#\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c numpy .          x = np.arange(0.0,500,0.01)                   if w==man[0]:#\u0422\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435.                   plt.plot(x,f(x),color='r', linewidth=3)          elif w==man[1]:                   plt.plot(x,f(x),color='g', linewidth=3)          elif w==man[2]:                   plt.plot(x,f(x),color='b', linewidth=3)                   plt.xlabel('Time t seconds',fontsize=12)                   plt.ylabel('$f(t)$',fontsize=16)                   plt.grid(True)                   plt.show() <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0434\u0435\u043c\u043f\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u0442\u0443\u0445\u0430\u044e\u0449\u0435\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0438 \u0432\u0441\u0435 \u044d\u0442\u0430\u043f\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/cf2\/fdf\/ee6\/cf2fdfee64a94ed0a480612fe0d058d5.png\"\/><\/p>\n<p>  Eq(1.3*u(t) + 0.8*Derivative(u(t), t) + 200*Derivative(u(t), t, t), 1)<br \/>  Eq(u(t), (C1*sin(sqrt(406)*t\/250) + C2*cos(sqrt(406)*t\/250))\/exp(t)**(1\/500) + 0.769230769230769)<br \/>  C2 + 0.769230769230769<br \/>  sqrt(406)*C1\/250 \u2014 C2\/500<br \/>  {C2: -0.769230769230769, C1: -0.0190881410379025}<br \/>  (-0.0190881410379025*sin(sqrt(406)*t\/250) \u2014 0.769230769230769*cos(sqrt(406)*t\/250))\/exp(t)**(1\/500) + 0.769230769230769<\/p>\n<p>  Eq(1.3*u(t) + 2.12*Derivative(u(t), t) + 200*Derivative(u(t), t, t), 1)<br \/>  Eq(u(t), (C1*sin(sqrt(647191)*t\/10000) + C2*cos(sqrt(647191)*t\/10000))\/exp(t)**(53\/10000) + 0.769230769230769)<br \/>  C2 + 0.769230769230769<br \/>  sqrt(647191)*C1\/10000 \u2014 53*C2\/10000<br \/>  {C2: -0.769230769230769, C1: -0.0506776284001243}<br \/>  (-0.0506776284001243*sin(sqrt(647191)*t\/10000) \u2014 0.769230769230769*cos(sqrt(647191)*t\/10000))\/exp(t)**(53\/10000) + 0.769230769230769<\/p>\n<p>  Eq(1.3*u(t) + 5*Derivative(u(t), t) + 200*Derivative(u(t), t, t), 1)<br \/>  Eq(u(t), (C1*sin(sqrt(1015)*t\/400) + C2*cos(sqrt(1015)*t\/400))\/exp(t)**(1\/80) + 0.769230769230769)<br \/>  C2 + 0.769230769230769<br \/>  sqrt(1015)*C1\/400 \u2014 C2\/80<br \/>  {C2: -0.769230769230769, C1: -0.120724003956605}<br \/>  (-0.120724003956605*sin(sqrt(1015)*t\/400) \u2014 0.769230769230769*cos(sqrt(1015)*t\/400))\/exp(t)**(1\/80) + 0.769230769230769<\/p>\n<p>  \u0423\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043c\u0430\u0441\u0441\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f (\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0443\u043f\u0443\u0441\u043a\u0430\u0435\u043c).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/252\/99e\/ee2\/25299eee22ef411e9484242aaa87f280.png\"\/><\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0430\u0436\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0435\u043c\u043f\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a (\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0443\u043f\u0443\u0441\u043a\u0430\u0435\u043c).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/76f\/309\/d8e\/76f309d8e5bf4743bc652c0ad0deb33d.png\"\/><\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434<\/h3>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0435\u043e\u0440\u0438\u0438.<\/p>\n<p>  \u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0438 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \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 \u043d\u0430 SymPy \u0438 NumPy \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u043e\u0439 \u0434\u0435\u043c\u043f\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0436\u0451\u0441\u0442\u043a\u043e\u0441\u0442\u044c\u044e \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0445\u043e\u0434 \u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u0439. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e Python \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445.<\/p>\n<h3>Cc\u044b\u043b\u043a\u0438<\/h3>\n<p>  <\/p>\n<ol>\n<li><a href=\"https:\/\/www.google.com.ua\/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwiYmLXF14jTAhWG8ywKHRnUAy4QFggaMAA&amp;url=http%3A%2F%2Fdrive.ispu.ru%2Felib%2Flebedev%2F11.html&amp;usg=AFQjCNGMg9rbh801ibrgWqBxJIRfdAGjgA\">\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0432\u0435\u043d\u0430.<\/a><\/li>\n<li><a href=\"http:\/\/stu.scask.ru\/book_reg.php?id=83\">\u041a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0432\u0435\u043d\u044c\u044f (\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u0438 \u043d\u0435\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435).<\/a><\/li>\n<li><a href=\"https:\/\/habrahabr.ru\/post\/135794\/\">\u041c\u0430\u0442\u0432\u0435\u0435\u0432 \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0421\u0435\u0440\u0433\u0435\u0435\u0432\u0438\u0447 \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0430: \u043e \u0434\u0438\u0444\u0444\u0443\u0440\u0430\u0445 \u00ab\u043d\u0430 \u043f\u0430\u043b\u044c\u0446\u0430\u0445\u00bb.<\/a><\/li>\n<\/ol>\n<p> \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:\/\/habrahabr.ru\/post\/325650\/\"> https:\/\/habrahabr.ru\/post\/325650\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<h3>\u0417\u0430\u0434\u0430\u0447\u0430<\/h3>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 SymPy \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u043f\u0430\u043a\u0435\u0442\u043e\u043c NumPy. \u0412\u0441\u0451 \u0441\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 Python.<\/p>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \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\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u043c \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u0432\u0435\u043d\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0435\u0442\u044f\u0445[1,2]. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 [3] \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u043d\u0430 Python \u043d\u0430\u0439\u0434\u0443\u0442 \u0441\u0432\u043e\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043a\u043e\u0432.<\/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-284429","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/284429","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=284429"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/284429\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=284429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=284429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=284429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}