We develop a general method to study the effects of non-linear taxation in dynamic settings using variational arguments. We first derive general theoretical formulas that char- acterize the welfare effects of local tax reforms and, in particular, the optimal tax system, potentially restricted within certain classes (e.g., age-independent, linear, separable). These formulas are expressed in terms of intuitive parameters, such as the labor and capital in- come elasticities and the hazard rates of the income distributions. Second, we apply these formulas to various specific settings. In particular, we decompose the gains arising from each element of tax reform, starting from a simple baseline system, as the available tax instruments becomes more sophisticated. We further show that the design of tax systems obeys a common general principle, namely that more sophisticated tax instruments (e.g., age-dependent, non-linear, non-separable) allow the government to fine-tune the tax rates by targeting higher distortions to the segments of the population whose behavior responds relatively little to those taxes.