Existence of smooth coordinate charts such that composition map is smooth The following problem is problem 2.1 from John Lee's Introduction to Smooth Manifolds:
Define $ f: R \to R $ by $ f(x) = 1 $ if $ x \geq 0 $ and $ f(x) = 0 $ if $ x < 0 $. Show that for every $ x \in R $, there are smooth coordinate charts $ (U, \varphi) $ containing $ x $ and $ (V, \psi) $ containing $ f(x) $ such that $ \psi \circ f \circ \varphi^{-1} $ is smooth as a map from $ \varphi(U \cap f^{-1}(V)) $ to $ \psi(V) $, but $ f $ is not smooth.
That $ f $ is not smooth I think is pretty clear, since using the smooth atlas containing the chart $ (R, Id) $, the map $ f \circ Id^{-1} = f $ is clearly not smooth.
However, I have a problem with the first part of the question. I think the charts $ (U, \varphi) $ and $ (V, \psi) $ should be quite simple, something like open subsets $ (x - 1/2, x+ 1/2) $ with linear maps, but I don't know how to make it work. Any help is appreciated. 

Only $x=0$ poses a problem. Here is what you can do at $x=0$:   
Take $U=\mathbb R, \phi=Id:\mathbb R\to \mathbb R$ and $V=(0,\infty), \psi=Id:(0,\infty) \to (0,\infty)$.
Then $U \cap f^{-1}(V)=[0,\infty)$ and $ \varphi(U \cap f^{-1}(V)) $ to $ \psi(V) $ is the  map  $$[0,\infty) \to (0,\infty): r\mapsto 1$$ which is smooth, as required.
This solves the problem but the fact that $U \cap f^{-1}(V)$ and $ \varphi(U \cap f^{-1}(V)) $ are closed instead of open confirms that something fishy is going on, namely of course that $f$ is not even continuous.  
A personal point of view
This problem is a quite interesting and counterintuitive  caveat, confirming the excellence of Lee's book.
