Ask Your Question

Revision history [back]

The simplest thing is to define the integral as a Python function (you don't even need to declare a and b as symbolic variables):

def f(a, b):
    return numerical_integral(x+a+b, 0, 1)[0]
plot3d(f, (0,1), (0,1), 
       axes_labels=('a', 'b', 'f'), viewer='threejs')

Another option is to use Python's lambda function:

plot3d(lambda a,b: numerical_integral(x+a+b, 0, 1)[0], (0,1), (0,1), 
       axes_labels=('a', 'b', 'f'), viewer='threejs')

The simplest thing is to define the integral as a Python function (you don't even need to declare a and b as symbolic variables):

def f(a, b):
    return numerical_integral(x+a+b, 0, 1)[0]
plot3d(f, (0,1), (0,1), 
       axes_labels=('a', 'b', 'f'), viewer='threejs')

Another option is to use Python's lambda function:function (again no need to declare a and b as symbolic variables in this case):

plot3d(lambda a,b: numerical_integral(x+a+b, 0, 1)[0], (0,1), (0,1), 
       axes_labels=('a', 'b', 'f'), viewer='threejs')