Text this: Duality for Nonconvex Approximation and Optimization