Untitled
[J
import mpmath as mp
def legendre(n, x):
return mp.legendre(n, x)
def I(n):
f = lambda t: tn legendre(n, t)
return mp.quad(f, [0, 1])
for n in range(6):
print(n, I(n))


[J
import mpmath as mp
def legendre(n, x):
return mp.legendre(n, x)
def I(n):
f = lambda t: tn legendre(n, t)
return mp.quad(f, [0, 1])
for n in range(6):
print(n, I(n))


Leave a Comment
Comments are moderated before appearing. The data you submit is processed according to the Privacy Policy of zofrantab.com.