How to construct a smooth function with infinite saddle points? As we know, the two dimension function $f(x, y) = x^2 - y^2$ has a saddle point $(0, 0)$. Based on this function, could we design a smooth function such that every piece looks like $f(x, y) = x^2 - y^2$ ? I try to use the piecewise function, however, it could lead to the nonsmoothness of the connection between two functions.
 A: You know $x^2-y^2$ has a saddle point at $x=0,y=0$. This will still hold true if you replace $x^2$ with any function that is sufficiently like $x^2$ near the origin. If we put a periodic function, e.g. $f(x,y) = \sin(x)^2 - y^2$, then $f$ will 'look like' $x^2-y^2$ at every $x=2k\pi$ and $y=0$ ($k\in\mathbb Z$), and each one of these points will be saddle:

You could also replace $y$ with $\sin y$ and get this egg-carton surface:

both of these have countably infinitely many saddles.
A: Consider a bump function $\psi(x,y)$ which is always vanishing outside of $D=\{(x,y) \mid x^2+y^2 \lt 1\}$ and constant equal to one on $d=\{(x,y) \mid x^2+y^2 \le 1/2\}$.
Then take
$$\phi(x,y)=\sum_{n=1}^\infty f(x-n,y)\psi(nx-n^2,y)$$
You can prove that you have a saddle point at each point of coordinates $(n,0)$ where $n \in \mathbb N$ as the partial derivatives of $\phi$ at any order at $(n,0)$ are the ones of $f$.
A: simply make it periodic by taking
$$g(x,y)=\sin^2(x)-\sin^2(y)$$
A: This is a good question. Let's take some time to think about what a saddle point means graphically.
Note 1: $f(x,y) = x^2 - y^2 = (x-y)(x+y)$. This function is zero along the lines $x+y = 0$ and $x-y=0$, and has a saddle point at their intersection. These two curves divide the plane into four regions, and $f$ alternates between being positive and negative as we rotate through these regions (positive and negative are blue and red respectively):
Saddle points all look like this locally.1 If $f(a,b) = 0$, to also have $(a,b)$ is a saddle point of $f(x,y)$ is equivalent to saying that $f(x,y)$ is zero along two curves which intersect at $(a,b)$, and that $f$ alternates between being positive and negative in the four regions that these curves (locally) divide the plane into.
Note 2: If we want to build a smooth function with a saddle point at $(a,b)$, we can take two functions $g(x,y)$ and $h(x,y)$ which are change sign along two different curves that intersect at $(a,b)$ and multiply them together to get $f(x,y) = g(x,y)h(x,y)$. Then $f(x,y)$ will have a saddle point where the curves intersect, at $(a,b)$. Graphically:
So, for example, $f(x,y) = x(x+y-1)$ has a saddle point at $(0,1)$, since $x$ changes sign along the line $x=0$ and $x+y-1$ changes sign along the line $y=1-x$, and these two lines intersect at $(0,1)$. We can get a little more complicated. For example, $
f(x,y) = (x^2 - y)(y - 1)
$
has two saddle points, the two points where the curves $x^2-y = 0$ and $y-1=0$ intersect.
Hint: Can you think of a function which changes sign infinitely many times? Or alternatively, can you think of two curves that intersect each other infinitely many times?
For example: If $g(x,y)$ changes sign along infinitely many lines of the form $x=c$, then $f(x,y) = y g(x,y)$ will have a saddle point at every point of the form $(c,0)$.

1: Though it isn't the intersection of the $0$-level curves for a general saddle-point.
A: If you just mean infinitely many saddle points, one can construct an example based on the function $f(x,y)=x^2-y^2$ that has saddle points everywhere on the integer lattice, i.e., whenever $(x,y)\in\mathbb{Z}^2$. Define $f:[0,1]^2\to\mathbb{R}$ by $f(x,y)=x^2-y^2$.
It is not difficult to see that $(x,y)\mapsto f(x-k,y-\ell)$ has a saddle point precisely at $(k,\ell)$.
Now consider a smooth function $\phi:[0,1]\to\mathbb{R}$ satisfying the properties: $\phi(x)=0$ on $[0,\frac{1}{6}]$ and on $[\frac{5}{6},1]$ and $\phi(x)=1$ on $[\frac{2}{6},\frac{4}{6}]$. You can do this in various ways, using some standard mollifiers or just spline interpolation. All you need is that the derivatives around the points $\frac{j}{6}$ are all $0$. Now define $\psi:[0,1]^2\to\mathbb{R}$ by $\psi(x,y)=\phi(x)\phi(y)$.
Finally define the function $F:\mathbb{R}^2\to\mathbb{R}$, $F(x,y)=\sum_{k,\ell\in\mathbb{Z}} \psi(x-k,y-\ell)f(x-k,y-\ell)$. This will be smooth and have saddle points at all integer pair inputs.
