例2.46 分别计算a=2,b=1;a=2,b=10时,I(a,b)的值
点击查看代码
from scipy.integrate import quad
def fun42(x, a, b):
return a*x**2+b*x
I1 = quad(fun42, 0, 1, args=(2, 1))
I2 = quad(fun42, 0, 1, args=(2, 10))
print(I1); print(I2)
print("学号:2023310143004")
from scipy.integrate import quad
def fun42(x, a, b):
return a*x**2+b*x
I1 = quad(fun42, 0, 1, args=(2, 1))
I2 = quad(fun42, 0, 1, args=(2, 10))
print(I1); print(I2)
print("学号:2023310143004")