Excessive wavy surfaces formed by a cold- or hot-rolling process in a thin plate degrades the value of the plate significantly, which is called the flatness problem in the industry. It is a result of post-buckling due to the residual stress caused by the rolling process. Because the buckling occurs in a very long, continuous plate, a unique difficulty of the problem as a buckling problem is that the buckling length is not given but has to be found. In many previous works, the length that gives the lowest critical load of the plate for the given load profile was taken as the buckling length. In this work, it is shown that this approach is flawed, and a new approach is developed to solve the flatness problem by extending a classic post-buckling analysis method based on the energy principle. The approach determines the buckling length and amplitude without using any unfounded assumptions or hypothesis. Using simple displacement functions, approximate solutions are obtained in closed forms for the plate subjected to a linearly distributed residual stress. The new solution approach can be used to determine the condition for the maximum rolling production that does not cause the flatness problem.