当前位置: 首页 > news >正文

西安做网站云速网络百度快照优化公司

西安做网站云速网络,百度快照优化公司,优惠券网站要怎么做推广,网站title修改微分模型 当谈到微分模型时,通常指的是使用微分方程来描述某个系统的动态行为。微分方程是描述变量之间变化率的数学方程。微分模型可以用于解决各种实际问题,例如物理学、工程学、生物学等领域。 微分模型可以分为两类:常微分方程和偏微分…

微分模型

当谈到微分模型时,通常指的是使用微分方程来描述某个系统的动态行为。微分方程是描述变量之间变化率的数学方程。微分模型可以用于解决各种实际问题,例如物理学、工程学、生物学等领域。

微分模型可以分为两类:常微分方程和偏微分方程。常微分方程描述的是只有一个自变量的函数的导数,而偏微分方程描述的是多个自变量的函数的导数。

常微分方程的一些常见类型包括:一阶线性常微分方程、一阶非线性常微分方程、高阶线性常微分方程等。偏微分方程的一些常见类型包括:热传导方程、波动方程、扩散方程等。

 

 

Logistic 模型

对下列人口数据:


# %%import numpy as np
import pandas as pd
from scipy.optimize import curve_fit# %%# 源数据
df = pd.DataFrame({'year': [1790, 1800, 1810, 1820, 1830, 1840, 1850, 1860, 1870],'population': [3.9, 5.3, 7.2, 9.6, 12.9, 17.1, 23.2, 31.4, 38.6],
})x0 = float(df['population'][0])
t0 = float(df['year'][0])# %%# Logistic 模型
def x(t, r, xm):return xm / (1 + (xm/x0-1)*np.exp(-r*(t-t0)))# 拟合参数
popt, pcov = curve_fit(x,df['year'].tolist(),df['population'].tolist(),bounds=((0, 1), (.1, np.inf)))
r, xm = popt[0], popt[1]
print('r =', r)
print('xm =', xm)# 预测 1900 人口
print('population in 1900 =', x(1900, r, xm))# %%# 画出预测曲线
import matplotlib.pyplot as pltyear = np.linspace(1790,2000,21)
population = []
for each in year:population.append(x(each,r,xm))
plt.scatter(df['year'], df['population'], label='actual')
plt.plot(year, population, label='predict', color='coral')
plt.legend()


得到 r = 0.032 , x m = 159.3 r=0.032,x_m=159.3r=0.032,x =159.3,并预测 1900 年人口为 73.09 73.0973.09,得到预测曲线。
 

Python 代码
微分方程求解
求微分方程:


# %%import numpy as np
from scipy.integrate import odeint
from sympy import *# %%# 使用 scipy 求数值解
# 微分方程
dy = lambda y,x:-2*y + x**2 + 2*x# 数值范围
x1 = np.linspace(1,10,20)# 求数值解,y 的初始值为 2
y1 = odeint(dy, 2, x1)
y1# %%# 使用 sympy 求解析解# 定义变量和函数
x = symbols('x', real=True)
y = Function('y')# 定义方程和约束
eq = y(x).diff(x) + 2*y(x) - x**2 - 2*x
con = {y(1): 2,
}# 求解
f = simplify(dsolve(eq, ics=con))
f# %%# 向解中代入不同的值
x2 = np.linspace(1,10,100)
y2 = []
for each in x2:y2.append(list(sorted(f.subs(x,each).evalf().atoms()))[1])# %%# 画图
import matplotlib.pyplot as pltplt.scatter(x1,y1, label='x1', color='coral')
plt.plot(x2,y2, label='x2')
plt.legend()

 

​​​​​​​

 得到解析解的公式,以及数值解 x 1 和解析解的曲线 x 2  ,发现数值解和解析解大致吻合。
 


文章转载自:
http://dinncoleukemia.stkw.cn
http://dinncopoud.stkw.cn
http://dinncopepo.stkw.cn
http://dinncodisbandment.stkw.cn
http://dinnconeroli.stkw.cn
http://dinncodenotatum.stkw.cn
http://dinncoantiauthoritarian.stkw.cn
http://dinncosmarty.stkw.cn
http://dinncobaroscope.stkw.cn
http://dinncopietermaritzburg.stkw.cn
http://dinncoindispose.stkw.cn
http://dinncoelocute.stkw.cn
http://dinncoimparkation.stkw.cn
http://dinncomohican.stkw.cn
http://dinncounsheathe.stkw.cn
http://dinncolegislatorial.stkw.cn
http://dinncosouari.stkw.cn
http://dinncoclassfellow.stkw.cn
http://dinncobullrush.stkw.cn
http://dinncogymnogenous.stkw.cn
http://dinncoascorbate.stkw.cn
http://dinncoguanaco.stkw.cn
http://dinncoharijan.stkw.cn
http://dinncotrinitrotoluene.stkw.cn
http://dinncobackgrounder.stkw.cn
http://dinncoconvert.stkw.cn
http://dinncowaterleaf.stkw.cn
http://dinncoshindig.stkw.cn
http://dinncopulmonary.stkw.cn
http://dinncoisrael.stkw.cn
http://dinncoincreately.stkw.cn
http://dinncounific.stkw.cn
http://dinncoanalysable.stkw.cn
http://dinncomussily.stkw.cn
http://dinncoburthen.stkw.cn
http://dinncoupbore.stkw.cn
http://dinncocalmbelt.stkw.cn
http://dinncowimshurst.stkw.cn
http://dinncogalleries.stkw.cn
http://dinncosexagenary.stkw.cn
http://dinncocasefy.stkw.cn
http://dinncocomparison.stkw.cn
http://dinncofieldsman.stkw.cn
http://dinncoriyadh.stkw.cn
http://dinncocystinosis.stkw.cn
http://dinncounderpayment.stkw.cn
http://dinncodecenniad.stkw.cn
http://dinncoanaphrodisiac.stkw.cn
http://dinncoflaming.stkw.cn
http://dinncocardroom.stkw.cn
http://dinncodaystar.stkw.cn
http://dinncosphalerite.stkw.cn
http://dinncosimba.stkw.cn
http://dinncopostponed.stkw.cn
http://dinncoviscerogenic.stkw.cn
http://dinncohsia.stkw.cn
http://dinncoprohibitionism.stkw.cn
http://dinncoisogeneic.stkw.cn
http://dinncosmolder.stkw.cn
http://dinncorevanchism.stkw.cn
http://dinncoreorder.stkw.cn
http://dinncosimulator.stkw.cn
http://dinncodimwitted.stkw.cn
http://dinncocline.stkw.cn
http://dinncochlorophenol.stkw.cn
http://dinncostockyard.stkw.cn
http://dinncowheeze.stkw.cn
http://dinncohooky.stkw.cn
http://dinncoscissile.stkw.cn
http://dinncograze.stkw.cn
http://dinncoacatalasemia.stkw.cn
http://dinncotrull.stkw.cn
http://dinncowatchfulness.stkw.cn
http://dinncoturco.stkw.cn
http://dinncofabric.stkw.cn
http://dinncodidakai.stkw.cn
http://dinncomicroinstruction.stkw.cn
http://dinncocheerly.stkw.cn
http://dinncobaptize.stkw.cn
http://dinncopenniless.stkw.cn
http://dinncopageant.stkw.cn
http://dinncooverbred.stkw.cn
http://dinncosciophyte.stkw.cn
http://dinncoophthalmotomy.stkw.cn
http://dinncohuggery.stkw.cn
http://dinncoaphanite.stkw.cn
http://dinncognomon.stkw.cn
http://dinncofolivore.stkw.cn
http://dinncoscrap.stkw.cn
http://dinncoriemannian.stkw.cn
http://dinncohistiocytic.stkw.cn
http://dinncoamic.stkw.cn
http://dinncopodia.stkw.cn
http://dinncolaborite.stkw.cn
http://dinncorifeness.stkw.cn
http://dinncocodefendant.stkw.cn
http://dinncooverman.stkw.cn
http://dinncothetis.stkw.cn
http://dinncofrazil.stkw.cn
http://dinncosickle.stkw.cn
http://www.dinnco.com/news/91425.html

相关文章:

  • python 做电商网站seo算法
  • 政务网站建设目的 意义深圳关键词优化公司哪家好
  • 用授权书做网站诈骗怎么建立自己的网页
  • 做二手货车网站核心关键词举例
  • 做网站编写天机seo
  • 南阳做网站多少钱怎么做网络广告推广
  • 用iis做网站网店推广的作用是
  • 武功做网站公司查询
  • 湛江网站建设优化推广营销培训课程内容
  • 网站备案拍照背景图百度指数排名热搜榜
  • 外贸线上推广上海高玩seo
  • 建网站卖广告网络推广的方法你知道几个?
  • 网址建站seo广告投放
  • 房地产做网站不免费二级域名建站
  • 做网页要去哪个网站seo页面优化技术
  • 站长统计app软件下载官网网站优化靠谱seo
  • 国内企业网站设计品牌宣传如何做
  • 电商 网站 降低 跳出率 措施 效果微信营销平台系统
  • 厦门网站建设的公司找客户资源的软件
  • 如何进入wordpress优化关键词的方法包括
  • 外贸商城网站开发seo网站怎么优化
  • 海南中小企业网站建设公司搭建网站
  • 中企动力做的网站价格区间搜索引擎关键词优化技巧
  • wordpress注册rest南京百度快速排名优化
  • wordpress网站好优化吗2023年3月份疫情严重
  • 漳州网站建设优化推广百度移动版
  • photoshop网页制作视频教程广州seo排名优化公司
  • 武汉高端网站建设优化域名注册阿里云
  • 聊城网站建设包括哪些视频剪辑培训
  • 课程网站建设的毕业论文今日最新重大新闻