热门

最新

红包

立Flag

投票

同城

我的

发布
foools
Foools
4 年前
truefoools

centos 报错 “Job for iptables.service failed because the control process exited with error code.”的解决办法
https://www.cnblogs.com/chosenone/p/9442371.html

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
复合梯形求二重积分import mathdef fun(x,y): return math.exp(x*y)#复合梯形def ty(a,b,c,d,n,m): h=(a+b)/n k=(c+d)/m xi =x0= a xn=b yj = y0=c ym=d fx0y0=fun(x0,y0) fxny0=fun(xn,y0) fx0ym=fun(x0,ym) fxnym=fun(xn,ym) fx0y0=fun(x0,y0) fxiy0=fun(xn,y0) fx0yj=fun(x0,ym) fxiym=fun(x0,ym) fxnyj=fun(xn,y0) for i in range (1,n): xi=xi+h fxiy0=fxiy0+fun(xi,y0) for i in range (1,n): xi=xi+h fxiym=fxiym+fun(xi,ym) for j in range (1,m): yj=yj+k fx0yj=fx0yj+fun(x0,yj) for j in range(1, m): yj = yj + k fxnyj = fxnyj + fun(xn, yj) #根据公式进行计算 result=(h*k)*(1/2*(fxiy0+fx0yj+fxiym+fxnyj)+1/4*(fxnym+fxny0+fx0ym+fx0y0)) return resultprint(ty(0,1,0,1,10,10))
立即登录