For an orthogonal integral transform with complete dataset, any two components are linearly independent; however, when some data points are missing, there is going to be leakage from one component to another, which is referred to as the "leakage in integral transforms" in this work. A special case of this kind of leakage is the EB-leakage in detection of the cosmological gravitational waves (CGW). We first give the general solutions for all integral transforms, prove that they are the best solutions, and then apply them to the case of EB-leakage and detection of the CGW. In the upcoming decade, all cosmic microwave background (CMB) experiments are ground based, so they provide only partial sky coverage. Within this context, the EB-leakage becomes inevitable. We show how to use the general solutions to achieve the minimal error bars of the EB-leakage, and use it to find out the maximal ability to detect the CGW through CMB. The results show that 1% sky coverage (f sky = 1%) is enough for a 5σ-detection of r ≥ 10 −2 , but is barely enough for r = 10 −3 . If the target is to detect r ∼ 10 −4 or 10 −5 , then f sky ≥ 10% or higher is strongly recommended to enable a 5σ-detection and to reserve some room for other errors.