For $u\in W^{k,p}(U)$, where $U\subseteq\mathbb{R}^n$ is open and bounded with $C^1$-boundary, we have the *celebrated Sobolev inequalities*:  

If $k < n/p$ then $u\in L^q(U)$ for $q$ satisfying $\frac{1}{q}=\frac{1}{p}-\frac{k}{n}$,  

If $k > n/p$ then $u$ lies in a particular Hölder space. 


It is also known that this *doesn't work* for the borderline case $k=n/p$ (which is related to the Sobolev conjugate $p^\*\to \infty$ as $p\to n$), although one would expect/hope for $u\in L^\infty(U)$.  

\*\*An exception as Denis mentions: it works for $(k,p)=(n,1)$ via the fundamental theorem of calculus.  

\*\*As a counterexample, the function $u(x)=\log\log(1+\frac{1}{|x|})$ with domain $U=int(\mathbb{D}^n)$ lies in $W^{1,n}$ but not in $L^\infty$ (for $n>1$). Instead, apparently the result we end up with is that the functions lie in *"the space of functions with bounded mean oscillation".*


1) **Is there an intuitive / deeper reason as to what goes wrong?**  

2) **Is there some sort of geometric reason why the Sobolev embedding theorem has to fail for $k=n/p$?** I've been told that this critical case seems to arise often in geometry/topology.



What goes wrong for the Sobolev embeddings at $k=n/p$?
I'll take a stab. In the following we consider the case $W^{1,n}$ in $\mathbb{R}^n$. My short answer is that under rescaling by factor $\lambda$, derivatives scale by $\lambda$ and volumes by $\lambda^{-n}$, so integrating derivatives to the $n$ won't change under rescaling. The following examples illustrate how this affects embeddings. 


As for no Holder continuity, look at a smooth bump function $\varphi$ supported on $B\_1$ with $|\nabla \phi| < 2$. The rescalings $\varphi(x/\epsilon)$ have arbitrarily bad modulus of continuity, but bounded $W^{1,n}$ norm, since (key point) the derivative to the $n$ (~$\epsilon^{-n}$) grows exactly like the volume of support (~$\epsilon^{n}$) decays. This says that we cannot control the modulus of continuity by the $W^{1,n}$ norm. (As expected, these functions have unbounded $W^{1,p}$ norm for $p > n$.)


As for not embedding into $L^{\infty}$, the way I would try to see how things could go wrong is take a function $\psi$ positive, supported on $B\_2$, with $\psi \equiv 1$ on $B\_1$ and $|\nabla \psi| < 2,$ and add dyadic rescalings together. Consider
$$u(x) = \sum\_{i} h\_i\psi(2^{i}x)$$
for some $h\_i$ we will choose to give bounded $W^{1,n}$ norm but unbounded height of $u$. Note that $|\nabla (h\_{i}\psi(2^{i}x))|$ grows like $h\_i2^{i}$ and they are supported on disjoint dyadic rings of volume going like $2^{-in}$. Thus, to get bounded $W^{1,n}$ norm we want
$$\sum\_{i} h\_i^{n} < C.$$
Again, the key point is that volume decays with the same power that the derivatives of rescalings to the $n$ grows.
To give unboundedness we just want
$$\sum\_{i} h\_i = \infty.$$
The canonical example of such a sequence is $h\_i = 1/i$. Ultimately this is just the same example as you gave since $\sum\_{i=1}^k 1/i$ ~ $\log(k)$ ~ $\log\log(2^k)$ is the size of $u$ at $r = 2^{-k}$, but it shows how this example naturally arises.


