2
I have the triple integral of the figure. I used the documentation of the scipy
to solve her.
Now I want to exchange the values of the upper limits of x, y and z, which in this problem are the values 2, 3 and 2 for arrays.
Type where 2(x) I want a numpy array [2,3,4,5]
, where the value is 3 (y) I want the np.array [5,6,7,8]
and where 2(z) I want the np.array [0,1,2,3]
.
How do I make this replacement?
Below follows my code:
from scipy import integrate
f = lambda z, y, x: (12*x)*(y**2)*(z**3)
a = integrate.tplquad(f, -1, 2, lambda x: 0, lambda x: 3,
lambda x, y: 0, lambda x, y: 2)
b = np.array([2,3,4,5])
c = np.array([5,6,7,8])
d = np.array([0,1,2,3])
g = integrate.tplquad(f, -1, b, lambda x: 0, lambda x: c,
lambda x, y: 0, lambda x, y: d)
nquad serves? https://docs.scipy.org/doc/scipy-1.2.1/reference/generated/scipy.integrate.nquad.html#scipy.integrate.nquad
– Isis Binder