An analytical method for calculating nonlinear envelopes in beam expanders is presented. It is illustrated by implementation in a matrix transport code and accompanied with various considerations on expander line design and transverse beam tail confinement effects.