I know that a formula for an ellipse in terms of elementary functions doesn't exist. But I seem to have found an intuitive false-proof that the circumference of an ellipse with axes $a$ and $b$ equals $\pi(a + b)$, a generalization of $C = 2\pi r$. I'm not sure where exactly the mistake in my proof is.
Proof: We will prove the circumference of an ellipse is $\pi(a + b)$ by considering a smaller one inside it. The edge of the smaller one is “parallel” to that of the bigger one, i.e. the distance between a point on the edge of the inner ellipse and the corresponding point on the outer ellipse is always the same. Then we will divide the difference in the areas of the ellipses, i.e. the area between their edges, by that constant distance. This approaches the circumference as the size of the smaller ellipse approaches the size of the bigger one.
Letting $a, b$ be the axes of the outer ellipse and $ah, bh'$ be the axes of the inner ellipse where $0 < h, h' < 1$, we have $a - ah = b - bh'$. Solving for $h'$, we get $h' = 1 + \frac{a}{b}(h - 1)$. Thus the axes of the inner ellipse are $ah$ and $b(1 + \frac{a}{b}(h - 1)) = b + a(h - 1)$. Since the area of an ellipse is $\pi a b$ for axes $a$ and $b$, we can now write the circumference of the ellipse as a limit:
$$C = \lim_{h \to 1}\frac{\pi a b - \pi(ah)\big(b + a(h - 1)\big)}{a-ah}$$ $$= \pi\lim_{h \to 1}\frac{b - h\big(b + a(h - 1)\big)}{1-h}$$ $$= \pi\lim_{h \to 1}\frac{b(1 - h) + ah(1 - h)}{1-h}$$ $$= \pi\lim_{h \to 1}\frac{b(1 - h) + ah(1 - h)}{1-h}$$ $$= \pi\lim_{h \to 1}\big(b + ah\big)$$ $$ = \pi(a + b)$$ Q.E.D.
The inner curve "parallel" to the ellipse is not an ellipse. It differs from an ellipse just enough to lead to the wrong circumference when you calculate its area as if it were an ellipse. The difference will be smaller the less eccentric the ellipse.
Your formula is very clearly wrong with high eccentricity, when $a$ is much smaller than $b$. In that case the circumference of the ellipse will be close to $2b$.