摘要: from scipy.integrate import odeint import numpy as np import pylab as plt mu = 1/82.45; lamda= 1-mu dz = lambda z, t: [z[1], 2*z[3]+z[0]-lamda*(z[0]+m 阅读全文
posted @ 2024-11-12 14:35 等我刷把宗师 阅读(2) 评论(0) 推荐(0) 编辑
摘要: from scipy.integrate import odeint import numpy as np import sympy as sp import pylab as plt df = lambda f, x: [f[1], 2*f[1]-f[0]+np.exp(x)] x1 = np.l 阅读全文
posted @ 2024-11-12 14:34 等我刷把宗师 阅读(0) 评论(0) 推荐(0) 编辑
摘要: from scipy.integrate import odeint import numpy as np import pylab as plt df = lambda f,t,w: [w/np.sqrt((10+20*np.cos(t)-f[0])**2+(20+ 15*np.sin(t)-f[ 阅读全文
posted @ 2024-11-12 14:33 等我刷把宗师 阅读(0) 评论(0) 推荐(0) 编辑
摘要: from scipy.integrate import odeint import numpy as np import pylab as plt np.random.seed(2) #为了进行一致性比较,每次运行取相同随机数 sigma=10; rho=28; beta=8/3; g=lambda 阅读全文
posted @ 2024-11-12 14:31 等我刷把宗师 阅读(1) 评论(0) 推荐(0) 编辑
摘要: from scipy.integrate import odeint import numpy as np import pylab as plt yx = lambda y,x: [y[1], np.sqrt(1+y[1]**2)/5/(1-x)] x0 = np.arange(0, 1, 0.0 阅读全文
posted @ 2024-11-12 14:28 等我刷把宗师 阅读(1) 评论(0) 推荐(0) 编辑
摘要: from scipy.integrate import odeint import numpy as np import pylab as plt import sympy as sp dy = lambda y, x: -2*y+2*x**2+2*x #自变量在后面 xx = np.linspac 阅读全文
posted @ 2024-11-12 14:27 等我刷把宗师 阅读(1) 评论(0) 推荐(0) 编辑
摘要: import sympy as sp sp.var('t') sp.var('x1:4', cls=sp.Function) #定义3个符号函数 x = sp.Matrix([x1(t), x2(t), x3(t)]) #列向量 A = sp.Matrix([[3,-1,1],[2,0,-1],[1 阅读全文
posted @ 2024-11-12 14:25 等我刷把宗师 阅读(1) 评论(0) 推荐(0) 编辑
摘要: import sympy as sp sp.var('t'); y=sp.Function('y') u=sp.exp(-t)*sp.cos(t) eq=y(t).diff(t,4)+10*y(t).diff(t,3)+35*y(t).diff(t,2)+\ 50*y(t).diff(t)+24*y 阅读全文
posted @ 2024-11-12 14:24 等我刷把宗师 阅读(1) 评论(0) 推荐(0) 编辑
摘要: import sympy as sp sp.var('x'); y=sp.Function('y') eq=y(x).diff(x,2)-2*y(x).diff(x)+y(x)-sp.exp(x) con={y(0): 1, y(x).diff(x).subs(x,0): -1} s=sp.dsol 阅读全文
posted @ 2024-11-12 14:23 等我刷把宗师 阅读(5) 评论(0) 推荐(0) 编辑
摘要: import sympy as sp sp.var('x'); y=sp.Function('y') eq=y(x).diff(x)+2*y(x)-2*x**2-2*x s=sp.dsolve(eq, ics={y(0):1}) s=sp.simplify(s); print(s) 阅读全文
posted @ 2024-11-12 14:21 等我刷把宗师 阅读(3) 评论(0) 推荐(0) 编辑
摘要: import numpy as np import pandas as pd import sympy as sp sp.init_printing(use_latex=True) from scipy.integrate import odeint import matplotlib.pyplot 阅读全文
posted @ 2024-11-12 13:35 等我刷把宗师 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import numpy as np import pandas as pd import sympy as sp sp.init_printing(use_latex=True) from scipy.integrate import odeint import matplotlib.pyplot 阅读全文
posted @ 2024-11-12 13:34 等我刷把宗师 阅读(3) 评论(0) 推荐(0) 编辑