$e^{-\frac{1}{x}}e^{-\frac{1}{1-x}}$ in 3D

190 Views Asked by At

I have the function $f(x) = e^{-\frac{1}{x}}e^{-\frac{1}{1-x}}$, which produces this graphic:

What should $f(x,y)$ be to look like a 'hill', i.e. $f(x)$ spinned about vertical axis?

1

There are 1 best solutions below

2
On BEST ANSWER

You can just take $g(x,y)=f(x)f(y)$, i.e. $$g(x,y)=e^{-\frac{1}{x}}e^{-\frac{1}{1-x}}e^{-\frac{1}{y}}e^{-\frac{1}{1-y}},$$ which produces the following graph (using MATLAB): enter image description here

Another choice that also leads to a 'hill-like' shape, would be to use $$g(x,y)=e^{-a\left((\frac{1}{2}-x)^2+(\frac{1}{2}-y)^2\right)},$$ i.e. a Gaussian kernel centered at $(\frac{1}{2},\frac{1}{2})$:

This one has $a=25$ :)