Probably not a homework question, but let's see if we can grind out what you are saying.
Now, I am not 100% clear on what it is that you are asking, but let me convey some useful information that may help. Please feel free to clarify your question if I have mis-interpreted it.
First of all, we usually make certain assumptions about smoothness criteria when we do mathematical optimization. Usually it just makes life easier because we may then apply calculus, but in other circumstances it may arise because of a physical principle. In fact, in some cases where the physical requirements do not require a notion of smoothness, we may be able to approximate optimal non-smooth solutions with smooth ones.
For example, one might ask why there isn't a discontinuous curve that minimizes the hanging rope's potential energy. We throw away any such solutions since we want the rope to be a single piece. Alternatively, what if a continuous non-differentiable solution existed (say the rope has a kink in it). The smooth theory would hopefully be able to find arbitrarily precise smooth solutions (by rounding out the kink in a small way), and we might then find the non-differentiable solution as a "limit" of the smooth ones.
Now there are situations which arise in certain theories of optimization which may relate to what you are asking. If we delve into the theory of optimal control theory (a generalization of variational calculus), a seminal and fundamental result in this field is the Pontryagin (maximum/minimum) principle. This principle stipulates a collection of necessary conditions for optimality of trajectories under Hamiltonian evolution. Under certain circumstances however, it is possible for "singular trajectories" to arise. Such trajectories occur when Pontryagin's principle "breaks down" and cannot supply enough information to us about how the optimal trajectories are actually behaving.
In such instances, the "mathematical solution" does not agree with singular, true solution. However, in theory, it is still possible to characterize all singular trajectories as well, though this is an INCREDIBLY hard area of research.