Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from scipy.integrate import quad
- from math import pow, cos, sqrt
- def func(x):
- return (pow(x, 3) * cos(x/2) + 1/2) * sqrt(4 - x * x)
- ans, err = quad(func, -2, 2)
- print("ans:" + str(ans).replace('.','')[:10])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement