I have the function $f(x,y,z)=frac{x^2}{2}+x y+frac{y^2}{2}+z^2$. The solution set to the equation $f(x,y,z)=0$ is the line parametrized as $(t,-t,0)$. When I use ContourPlot3D on f=0 I get an empty graph. I begin to suspect that ContourPlot3D only works for level sets that are surfaces. Is this correct?

# Tag: fxyz

## functions – Replacing $x,y$ in $f(x,y,z)$ with values from a list

I’m sure there is a simple solution to this using map or apply, but its not occurring to me.

Suppose I have a function $f(x,y,z)= x+y+z)$

And I want to evaluate $f(x,y,1)$ for ${x,y} ∈ {{1,2},{3,4}}$

What is the best way to do this?

Examples:

If I use

`f(x_,y_,z_):= x+y+z; f(#1,#2,1)&/@ {{1,2},{3,4}}`

this will give me things like `{{2+#2,3+#2}}.`

On the other hand, `Apply`

works on a single element

`f(#1,#2,1)& @@ {1,2}`

but not on a list such as `{{1,2},{3,4}}`

. On the list it gives me `{f(1,3,1),f(2,4,1)`

I am not sure how to go from the case of a single pair to a list of pairs