| 1 | initial version |
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')
| 2 | No.2 Revision |
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')
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.