Smooth Pac-Man Curve? Idle curiosity and a basic understanding of the last example here led me to this polar curve: $$r(\theta) = \exp\left(10\frac{|2\theta|-1-||2\theta|-1|}{|2\theta|}\right)\qquad\theta\in(-\pi,\pi]$$ which Wolfram Alpha shows to look like this:

The curve is not defined at $\theta=0$, but we can augment with $r(0)=0$. If we do, then despite appearances, the curve is smooth at $\theta=0$. It is also smooth at the back where two arcs meet. However it is not differentiable at the mouth corners.
Again out of idle curiosity, can someone propose a polar equation that produces a smooth-everywhere Pac-Man on $(-\pi.\pi]$? No piece-wise definitions please, but absolute value is OK.
 A: Look at it in normal $(x,y)$ coordinates: what you're looking for here is a smooth approximation to a square wave (that's only $0$ for 1/4 of a period). In that light, this:
$$r=\frac1{(e^{100(\theta-3\pi/4)}+1)(e^{-100(\theta+3\pi/4)}+1)}\ \ \  \theta\in[-\pi,\pi]$$
Gives a pretty good approximation. Increasing the $100$ will make it arbitrarily good. Unfortunately it's not smooth at the inner corner of the mouth (though again this gets closer and closer as you increase $100$). This could be remedied by multiplying with a function that is essentially $1$ for almost all of $[-\pi,\pi]$ and quickly dips down to hit zero horizontally at the ends of the interval. I'm having trouble coming up with an example that isn't horrifying.
A: OK, I found something, through a series of compositions:
Choose a large $n$ (used to approximately straighten out the mouth "lines"), and a parameter $c$ for the mouth width ($c=2$ works well).
$$r(\theta)=\left(f(c\theta)+r(c\theta)\right)^n$$
$$f(x)=1-\exp\left(\frac{1}{q(x)^2-1}\right)$$
$$q(x)=p(x)-\frac12\left(g(x+1)+g(x-1)\right)$$
$$p(x)=\frac{|x+1|-|x-1|}{2}$$
$$g(x)=\frac{|x|}{x}$$
$$r(x)=\frac{e^{-1}}{2}\left(g(x-1)-g(x+1)+2\right)$$
All together that's
$$r(\theta)=\left(1-\exp\left(\frac{1}{\left(\frac{|c\theta+1|-|c\theta-1|}{2}-\frac12\left(\frac{|c\theta+1|}{c\theta+1}+\frac{|c\theta-1|}{c\theta-1}\right)\right)^2-1}\right)+\frac{e^{-1}}{2}\left(\frac{|c\theta-1|}{c\theta-1}-\frac{|c\theta+1|}{c\theta+1}+2\right)\right)^n$$
Here is a GeoGebra shot of this in action. There are discrepancies between the formulas in the screenshot and those above, since I tried a little to simplify things above. The radial function is also plotted using Cartesian coordinates. I'm fairly certain that this is everywhere-smooth, once  you plug the two holes at the lips.

A: Not a very good one: $r(\theta) = e^{-\dfrac{1}{20 \theta^2}}$

