Multivariable Functions
Description
In order to define a multivariable function $f(x,y)$ we must first define the second variable. The Sage cell below gives us the value of the function $f(x,y) = 2x^2 + 3y^2$ at the values $x=2$, $y=5$.
Sage Cell
Code
var('y')
f(x, y) = 2 * x^2 + 3 * y^2
f(2, 5)
Options
Half Evaluating a Function
We can lock one or more variables of a multivariable function and evaluate the function given the locked value
This also works using expressions instead of numbers:
var('y')
f(x, y) = 2 * x^2 + 3 * y^2
f(x=1)
var('y a')
f(x, y) = 2 * x^2 + 3 * y^2
f(x=a + 2)
Tags
Primary Tags:
Secondary Tags:
Related Cells
Attribute
Permalink:
Author:
Date: 06 Nov 2018 15:44
Submitted by: James A Phillips