1. A method, in a data processing system, for optimizing a photolithograph mask, the method comprising: receiving, by the data processing system, a given target pattern; generating, by the data processing system, an initial fictitious mask; selecting, by the data processing system, an initial value of α 2 , wherein the initial value of α 2 is used to determine a light intensity and a wafer image; determining, by the data processing system, the light intensity for each pixel in the initial fictitious mask; determining, by the data processing system, the wafer image for each pixel in the initial fictitious mask, wherein the wafer image is determined from light intensity using the following equation: S 1 ⁡ ( θ ; α 1 , t r ) = 1 1 + ⅇ - α 1 ⁢ θ + α 1 ⁢ t r wherein S 1 is a continuous first-order derivative function, wherein θ is a specific pixel, wherein the value of α 1 determines a steepness of the continuous first-order derivative function, and wherein t r is a predefined constant photo-resist (CTR) threshold value; determining, by the data processing system, whether a convergence has been achieved by comparing the wafer image generated from the initial fictitious mask to the given target pattern; responsive to a convergence of the wafer image generated from the initial fictitious mask to the given target pattern, generating, by the data processing system, a final mask to use to transfer an image to a wafer; responsive to a failure of the wafer image generated from the initial fictitious mask to converge with the given target pattern, determining, by the data processing system, a gradient for each pixel in the initial fictitious mask; updating, by the data processing system, the initial fictitious mask using the gradient thereby forming an updated fictitious mask; and repeating, by the data processing system, the steps of determining the light intensity for each pixel in the updated fictitious mask, determining the wafer image for each pixel in the updated fictitious mask, and determining whether the convergence has been achieved by comparing the wafer image generated from the updated fictitious mask to the given target pattern until the wafer image generated from the initial fictitious mask converges with the given target pattern.