Finding discontinuities of piecewise-smooth functions A.G. Ramm Mathematics Department, Kansas State University, Manhattan, KS 66506-2602, USA ramm@math.ksu.edu Abstract Formulas for stable differentiation of piecewise-smooth functions are given. The data are noisy values of these functions. The locations of discontinuity points the sizes of the jumps across these points are not assumed known, but found stably from the noisy data. 1 Introduction Let f be a piecewise-c 2 ([0, 1]) function, 0 < x 1 < x 2 < < x J, 1 j J, are discontinuity points of f. We do not assume their locations x j their number J known a priori. We assume that the limits f(x j ± 0) exist, sup f (m) (x) M m, m = 0, 1, 2. (1.1) x x j,1 j J Assume that f δ is given, f f δ := sup x xj,1 j J f(x) f δ (x) δ, where f δ L (0, 1) are the noisy data. The problem is: given {f δ, δ}, where δ (0, δ 0 ) δ 0 > 0 is a small number, estimate stably f, find the locations of discontinuity points x j of f their number J, estimate the jumps p j := f(x j + 0) f(x j 0) of f across x j, 1 j J. A stable estimate R δ f δ of f is an estimate satisfying the relation lim δ 0 R δ f δ f = 0. There is a large literature on stable differentiation of noisy smooth functions (e.g., see references in [3]), but the problem stated above was not solved for piecewise-smooth functions by the method given below. A statistical estimation of the location of discontinuity Math subject classification: 65D35; 65D05 key words: inequalities, stable differentiation, noisy data, discontinuities, jumps, signal processing, edge detection.
points from noisy discrete data is given in [1]. In [5], [7], [2], various approaches to finding discontinuities of functions from the measured values of these functions are developed. The following formula was proposed originally (in 1968, see [4], [3]) for stable estimation of f (x), assuming f C 2 ([0, 1]), M 2 0, given noisy data f δ : R δ f δ := f ( ) 1 δ(x + h(δ)) f δ (x h(δ)) 2δ 2, h(δ) :=, h(δ) x 1 h(δ), (1.2) 2h(δ) M 2 R δ f δ f 2M 2 δ := ε(δ), (1.3) where the norm in (1.3) is L (0, 1) norm. Numerical efficiency stability of the stable differentiation method proposed in [4] has been demonstrated in [6]. Moreover, (cf [3]), inf T sup T f δ f ε(δ), (1.4) f K(M 2,δ) where T : L (0, 1) L (0, 1) runs through the set of all bounded operators, K(M 2, δ) := {f : f M 2, f f δ δ}. Therefore estimate (1.2) is the best possible estimate of f, given noisy data f δ, assuming f K(M 2, δ). In [3] this result was generalized to the case f K(M a, δ), f (a) M a, 1 < a 2, f (x) f (x ) x x a 1 where f (a) := f + f +sup x,x, 1 < a 2, f (a) is the fractional-order derivative of f. The aim of this paper is to extend the above results to the case of piecewise-smooth functions. In Section 2 the results are formulated, proofs are given. In Section 3 the case of continuous piecewise-smooth functions is treated. 2 Formulation of the result Theorem 1. Formula (1.2) gives stable estimate of f on the set S δ := [h(δ), 1 h(δ)] \ J j=1 (x j h(δ), x j + h(δ)), (1.3) holds with the norm taken on the set S δ. Assuming M 2 > 0 computing the quantities f j := f δ(jh+h) f δ (jh h), where h := h(δ) := ( ) 1 2δ 2 M 2, 1 j < [ 1 ], for sufficiently small δ, one finds the location of h ] is the integer discontinuity points of f with accuracy 2h, their number J. Here [ 1 h smaller than 1 closest to 1. The discontinuity points of f are located on the intervals h h (jh h, jh + h) such that f j 1 for sufficiently small δ, where ε(δ) is defined in (1.3). The size p j of the jump of f across the discontinuity point x j is estimated by the formula p j f δ (jh + h) f δ (jh h), the error of this estimate is O( δ). Let us assume that min j p j := p h(δ), where means much greater than. Then x j is located on the j-th interval [jh h, jh + h], h := h(δ), such that f j := f δ (jh + h) f δ (jh h) 2h 1, (2.1) 2 2h
so that x j is localized with the accuracy 2h(δ). More precisely, f j f(jh+h) f(jh h) δ, 2h h δ = 0.5ε(δ), where ε(δ) is defined in (1.3). One has h f(jh+h) f(jh h) p j f(jh+h) f(x j +0) f(jh h) f(x j 0) p j 2M 1 h. Thus, f j p j 2h M 1 0.5ε(δ) = c 1 p j δ c 2 1, where c 1 := M 2 2 2, c 2 := M 1 + 0.5ε(δ). The jump p j is estimated by the formula: the error estimate of this formula can be given: p j [f δ (jh + h) f δ (jh h)], (2.2) p j [f δ (jh + h) f δ (jh h)] 2δ + 2M 1 h = 2δ + 2M 1 2δ M 2 = O( δ). (2.3) Thus, the error of the calculation of p j by the formula p j f δ (jh + h) f δ (jh h) is O(δ 1 2 ) as δ 0. Proof of Theorem 1. If x S δ, then, using Taylor s formula, one gets: (R δ f δ )(x) f (x) δ h + M 2h 2. (2.4) Here we assume that M 2 > 0 the interval (x h(δ), x + h(δ)) S δ, i.e., this interval does not contain discontinuity points of f. If, for all sufficiently small h, not necessarily for h = h(δ), inequality (2.4) fails, i.e., if (R δ f δ )(x) f (x) > δ + M 2h for all sufficiently h 2 small h > 0, then the interval (x h, x + h) contains a point x j S δ, i.e., a point of discontinuity of f or f. This observation can be used for locating the position of an isolated discontinuity point x j of f with any desired accuracy provided that the size p j of the jump of f across x j is greater than kδ, where k > 2 is a constant, p j > kδ, that h can be taken as small as desirable. Indeed, if x j (x h, x + h), then we have p j 2δ 2hM 1 f δ (x + h) f δ (x h) p j + 2δ + 2hM 1. The above estimate follows from the relation f δ (x+h) f δ (x h) = f(x+h) f(x j +0)+p j +f(x j 0) f(x h)±2δ = p j ±(2δ+2hM 1 ). Here p ± b, where b > 0, denotes a quantity such that p b p ± b p + b. Thus, if h is sufficiently small p j > kδ, where k > 2, then the inequality (k 2)δ 2hM 1 f δ (x + h) f δ (x h) 3
can be checked, therefore the inclusion x j (x h, x + h) can be checked. Since h > 0 is arbitrarily small in this argument, it follows that the location of the discontinuity point x j of f is established with arbitrary accuracy. A discussion of the case when a discontinuity point x j belongs to the interval (x h(δ), x + h(δ)) will be given below. Minimizing the right-h side of (2.4) with respect to h yields formula (1.2) for the minimizer h = h(δ) defined in (1.2), estimate (1.3) for the minimum of the right-h side of (2.4). If p h(δ), (2.1) holds, then the discontinuity points are located with the accuracy 2h(δ), as we prove now. Consider the case when a discontinuity point x j of f belongs to the interval (jh h, jh + h), where h = h(δ). Then estimate (2.2) can be obtained as follows. For jh h x j jh + h, one has f(x j + 0) f(x j 0) f δ (jh + h) + f δ (jh h) 2δ+ + f(x j + 0) f(jh + h) + f(x j 0) f(jh h) 2δ + 2hM 1, h = h(δ). This yields formulas (2.2) (2.3). Computing the quantities f j for 1 j < [ 1 ], h finding the intervals on which (2.1) holds for sufficiently small δ, one finds the location of discontinuity points of f with accuracy 2h, the number J of these points. For a small fixed δ > 0 the above method allows one to recover the discontinuity points of f at which f j p j δ M 2h h 1 1. This is the inequality (2.1). If h = h(δ), then δ = 0.5ε(δ) = O( δ), 2hf h j p j = O( δ) as δ 0 provided that M 2 > 0. Theorem 1 is proved. Remark 1: Similar results can be derived if f (a) L (S δ ) := f (a) Sδ M a, 1 < a 2. [ ] 1 In this case h = h(δ) = c a δ 1 2 a a, where c a = M a(a 1), R δ f δ is defined in (1.2), the error of the estimate is: R δ f δ f Sδ ( ) a 1 am 1 2 a a δ a 1 a. a 1 The proof is similar to that given in Section 3. It is proved in [3] that for C a -functions given with noise it is possible to construct stable differentiation formulas if a > 1 it is impossible to construct such formulas if a 1. The obtained formulas are useful in applications. One can also use L p -norm on S δ in the estimate f (a) Sδ M a (cf. [3]). Remark 2: The case when M 2 = 0 requires a special discussion. In this case the last term on the right-h side of formula (2.4) vanishes the minimization with respect to h becomes void: it requires that h be as large as possible, but one cannot take h arbitrarily large because estimate (2.4) is valid only on the interval (x h, x + h) which does not contain discontinuity points of f, these points are unknown. If M 2 = 0, then f is a piecewise-linear function. The discontinuity points of a piecewise-linear function 4
can be found if the sizes p j of the jumps of f across these points satisfy the inequality p j >> 2δ +2M 1 h for some choice of h. For instance, if h = δ M 1, then 2δ +2M 1 h = 4δ. So, if p j >> 4δ, then the location of discontinuity points of f can be found in the case when M 2 = 0. These points are located on the intervals for which f δ (jh+h) f δ (jh h) >> 4δ, where h = δ M 1. The size p j of the jump of f across a discontinuity point x j can be estimated by formula (2.2) with h = δ M 1, one assumes that x j (jh h, jh + h) is the only discontinuity point on this interval. The error of the formula (2.2) is estimated as in the proof of Theorem 1. This error is not more than 2δ + 2M 1 h = 4δ for the above choice of h = δ M 1. One can estimate the derivative of f at the point of smoothness of f assuming M 2 = 0 provided that this derivative is not too small. If M 2 = 0, then f = a j x + b j on every interval j between the discontinuity points x j, where a j b j are some constants. If (jh h, jh+h) j, f j := f δ(jh+h) f δ (jh h), then f 2h j a j δ tδ. Choose h = h M 1, where t > 0 is a parameter, M 1 = max j a j. Then the relative error of the approximate formula a j f j for the derivative f = a j on j equals to f j a j a j M 1 t a j. Thus, if, e.g., a j M 1 t = 20, then the relative error of the above approximate formula is not 2 more than 0.1. 3 Continuous piecewise-smooth functions Suppose now that ξ (mh h, mh + h), where m > 0 is an integer, ξ is a point at which f is continuous but f (ξ) does not exist. Thus, the jump of f across ξ is zero, but ξ is not a point of smoothness of f. How does one locate the point ξ? The algorithm we propose consists of the following. We assume that M 2 > 0 on S δ. Calculate the numbers f j := f δ(jh+h) f δ (jh h) f 2h j+1 f j, j = 1, 2,..., h = h(δ) = 2δ M 2. Inequality (1.3) implies f j ε(δ) f (jh) f j + ε(δ), where ε(δ) is defined in (1.3). Therefore, if f j > ε(δ), then sign f j = sign f (jh). One has: J 2δ h f j+1 f j J + 2δ where δ h = 0.5ε(δ) J := h, f(jh + 2h) f(jh) f(jh + h) + f(jh h). 2h Using Taylor s formula, one derives the estimate: 0.5[J 1 ε(δ)] J 0.5[J 1 + ε(δ)], (3.1) where J 1 := f (jh + h) f (jh). 5
If the interval (jh h, jh + 2h) belongs to S δ, then In this case J ε(δ), so J 1 = f (jh + h) f (jh) M 2 h = ε(δ). f j+1 f j 2ε(δ) if (jh h, jh + 2h) S δ. (3.2) Conclusion: If f j+1 f j > 2ε(δ), then the interval (jh h, jh + 2h) does not belong to S δ, that is, there is a point ξ (jh h, jh + 2h) at which the function f is not twice continuously differentiable with f M 2. Since we assume that either at a point ξ the function is twice differentiable, or at this point f does not exist, it follows that if f j+1 f j > 2ε(δ), then there is a point ξ (jh h, jh + 2h) at which f does not exist. If f j f j+1 < 0, (3.3) min( f j+1, f j ) > ε(δ), (3.4) then (3.3) implies f (jh)f (jh + h) < 0, so the interval (jh, jh + h) contains a critical point ξ of f, or a point ξ at which f does not exist. To determine which one of these two cases holds, let us use the right inequality (3.1). If ξ is a critical point of f ξ (jh, jh + h) S δ, then J 1 ε(δ), in this case the right inequality (3.1) yields f j+1 f j 2ε(δ). (3.5) Conclusion: If (3.3)-(3.5) hold, then ξ is a critical point. If (3.3) (3.4) hold f j+1 f j > 2ε(δ) then ξ is a point of discontinuity of f. If ξ is a point of discontinuity of f, we would like to estimate the jump Using Taylor s formula one gets P := f (ξ + 0) f (ξ 0). f j+1 f j = P 2 ± 2.5ε(δ). (3.6) The expression A = B ± b, b > 0, means that B b A B + b. Therefore, We have proved the following theorem: P = 2(f j+1 f j ) ± 5ε(δ). (3.7) Theorem 2. If ξ (jh h, jh + 2h) is a point of continuity of f f j+1 f j > 2ε(δ), then ξ is a point of discontinuity of f. If (3.3) (3.4) hold, f j+1 f j 2ε(δ), then ξ is a critical point of f. If (3.3) (3.4) hold f j+1 f j > 2ε(δ), then ξ (jh, jh + h) is a point of discontinuity of f. The jump P of f across ξ is estimated by formula (3.7). 6
4 Finding nonsmoothness points of piecewise-linear functions Assume that f is a piecewise-linear function on the interval [0, 1] 0 < x 1 <...x J < 1 is its nonsmoothness points, i.e, the discontinuity points of f or these of f. Assume that f δ is known at a grid mh, m = 0, 1, 2,..., M, h = 1, f M δ,m = f δ (mh), f(mh) f δ,m δ m, f m = f(mh). If mh is a discontinuity point, mh = x j, then we define its value as f(x j 0) or f(x j + 0), depending on which of these two numbers satisfy the inequalty f(mh) f δ,m δ. The problem is: Given f δ,m m, estimate the location of the discontinuity points x j, their number J, find out which of these points are points of discontinuity of f which are points of discontinuity of f but points of continuity of f, estimate the sizes of the jumps p j = f(x j + 0) f(x j 0) the sizes of the jumps q j = f (x j + 0) f (x j 0) at the continuity points of f which are discontinuity points of f. Let us solve this problem. Consider the quantities where G m := f δ,m+1 2f δ,m + f δ,m 1 2h 2 := g m + w m, g m := f m+1 2f m + f m 1 2h 2, w m := f δ,m+1 f m+1 2(f δ,m f m ) + f δ,m 1 f m 2h 2. We have Therefore, if min j x j+1 x j > 2h w m 4δ 2h 2 = 2δ h 2, g m = 0 if x j (mh h, mh + h) j. G m > 2δ h 2, (4.1) then the interval (mh h, mh+h) must contain a discontinuity point of f. This condition is sufficient for the interval (mh h, mh+h) to contain a discontinuity point of f, but not a necessary one: if the condition min j x j+1 x j > 2h is dropped, because then it may happen that the interval (mh h, mh + h) contains more than one discontinuity points without changing g m or G m, so that one cannot detect these points by the above method. We have proved the following result. Theorem 3. Condition (4.1) is a sufficient condition for the interval (mh h, mh+h) to contain a nonsmoothness point of f. If one knows a priori that x j+1 x j > 2h then condition (4.1) is a necessary sufficient condition for the interval (mh h, mh + h) to contain exactly one point of nonsmoothness of f. 7
Let us estimate the size of the jump p j. Let us assume that (4.1) holds, x j+1 x j > 2h x j (mh h, mh). The case when x j (mh, mh + h) is treated similarly. Let f(x) = a j x + b j when mh < x < x j, f(x) = a j+1 x + b j+1 when x j < x < (m + 1)h, where a j, b j are constants. One has Thus g m = (a j+1 a j )(mh h) (b j+1 b j ) 2h 2, p j = (a j+1 a j )x j + b j+1 b j. g m = (a j+1 a j )x j (b j+1 b j ) (a j+1 a j )(mh h x j ) 2h 2 = p j 2h ± a j+1 a j x j (mh h), 2 2h 2 where the symbol a ± b means a b a ± b a + b. The quantity a j+1 a j = q j, x j (mh h) h if mh h < x j < mh. Thus, G m = p ( j 2h ± qj h 2 2h + 2δ ), 2 h 2 provided that p j > 0. If then If p j = 0 then x j = b j b j+1 a j+1 a j, G m = p ( j 1 ± q ) jh + 4δ, 2h 2 p j q j h + 4δ p j << 1 p j > 0, p j 2h 2 G m. G m = q j(x j mh + h) 2h 2 because x j > mh h by the assumption. Thus, q j 2h G m, q j > 0. ± 2δ h 2, If min j x j+1 x j > 2h, then the number of the nonsmoothness points of f can be determined as the number of intervals on which (4.1) holds. 8
References [1] A. I. Katsevich, A. G. Ramm, Nonparametric estimation of the singularities of a signal from noisy measurements, Proc. AMS, 120, N8, (1994), 1121-1134. [2] A. I. Katsevich, A. G. Ramm, Multidimensional algorithm for finding discontinuities of functions from noisy data. Math. Comp. Modelling, 18, N1, (1993), 89-108. [3] A. G. Ramm, Inverse problems, Springer, New York, 2005. [4] A. G. Ramm, On numerical differentiation, Mathematics, Izvestija VUZOV, 11, (1968), 131-135. [5] A. G. Ramm, A. I. Katsevich, The Radon Transform Local Tomography, CRC Press, Boca Raton, 1996. [6] A. G. Ramm, A. Smirnova, On stable numerical differentiation, Math. of Comput., 70, (2001), 1131-1153. [7] A. G. Ramm, A.Zaslavsky, Reconstructing singularities of a function given its Radon transform, Math. Comp.Modelling, 18, N1, (1993), 109-138. 9