简体   繁体   English

辛普森法则 Python + 绘图

[英]Simpson's rule Python + Plotting Graph

anyone could help to solve this problem,任何人都可以帮助解决这个问题,

so, i have the mathematical expression (shown in the picture below), the limit of integration for b is set in the range from 0 to 1, because the variation of b value, then the value of c(resut of integral) will be different for each b.所以,我有数学表达式(如下图所示),b 的积分极限设置在 0 到 1 的范围内,因为 b 值的变化,那么 c 的值(积分结果)将是每个b都不一样。

Plus, I am only allowed to use Simpson's rule to solve the integration.另外,我只能使用辛普森法则来解决积分问题。 And the main goal of this task is getting the graph of f(c,b)这个任务的主要目标是得到 f(c,b) 的图

enter image description here在此处输入图像描述

You apply the quadrature rule cumulatively.您累积地应用正交规则。 That is, you apply Simpson quadrature to the intervals [0,0.01], [0.01,0.02], [0.02,0.03],... with the necessary evaluations of internal points to reach the required accuracy, scaled to the interval length, and then progressively sum up the single integral values to the integrals over the intervals [0, b], b=0.01, 0.02, 0.03,...也就是说,您将辛普森正交应用于区间 [0,0.01]、[0.01,0.02]、[0.02,0.03]...,并对内部点进行必要的评估以达到所需的精度,并缩放到区间长度,然后逐步将单个积分值累加到 [0, b], b=0.01, 0.02, 0.03, ... 区间内的积分

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM