The characteristics of complex optical systems required by modern accelerators result from the optimisation of a many variable function, usually of c2 type. The search for the minimum of the function is very sensitive to the initial values of the variables. The route towards a safe determination of the initial conditions using subsets of independent variables and thin lens approximation will be described with on line demonstration. The method will then be applied
to the focusing of large emittance pion and muon beams in solenoids and quadrupoles as contemplated for future neutrino factories.