A study of the one dimensional total generalised variation regularisation problem

In this paper we study the one dimensional second order total generalised variation regularisation (TGV) problem with $L^{2}$ data fitting term. We examine some properties of this model and we calculate exact solutions using simple piecewise affine functions as data terms. We investigate how these solutions behave with respect to the TGV parameters and we verify our results using numerical experiments.

1. Introduction 1.1. Context and related work. During the last years, the seek for appropriate regularisation techniques has become a major issue in the field of inverse problems and more particularly, in the area of mathematical imaging. A regulariser of good quality is one that provides reconstructed images that are close to the desired result quantitatively and are aesthetically pleasing as well. A particularly efficient regulariser of this kind has been the total generalised variation of second order, TGV 2 β,α , introduced recently in [BKP09]. For an open and bounded domain Ω ⊆ R d and positive parameters α and β the TGV 2 β,α functional reads (1.1) TGV 2 β,α (u) := sup where S d×d is the set of the d × d symmetric matrices and u ∈ L 1 (Ω). The total generalised variation-based regularisation has the ability to adapt to the regularity of the data and images restored with this method are typically piecewise smooth that is to say, not only the discontinuities but also the affine structures are preserved. This is in contrast to total variation-based reconstructed images [ROF92,CL97] which exhibit an undesirable piecewise constant structure (staircasing effect). Recall the definition of the total variation (TV) functional: (1.2) TV(u) := sup Some successful applications of total generalised variation in image reconstruction and in related tasks have been done in image denoising [BKP09,Bre12], image deblurring [BV11,Bre12], reconstruction of MRI images [KBPS11], diffusion tensor imaging [VBK13] and JPEG decompression [BH12]. In most of the tasks above the reconstructed image is obtained as a minimiser of a variational problem of the type where s = 1 or 2, T is a linear operator and f are the given corrupted data. In the task of denoising images corrupted by Gaussian noise, we have s = 2 and T is the identity operator. This is the case we are focusing on this paper. Before the introduction of the total generalised variation, total variation had been one of the most popular choices for imaging tasks. As a consequence, much work has been done in order to investigate the mathematical properties of TV regularisation. The purpose of the present paper is to do the same for TGV regularisation. So far, most emphasis has been given to the study of the exact solutions of the following family of variational problems (1.4) min where α is a positive parameter, Ω ⊆ R d is an open domain with d = 1 or 2 and s = 1 or 2. The model with s = 2 is typically used to denoise images corrupted by Gaussian noise. In [Mey01], Meyer showed that if f is a characteristic function of a circle then the solution of (1.4) is equal to the characteristic function of the same circle with a decreased height. This loss of contrast, which is more intense as the value of the parameter α increases, is a characteristic feature of the total variation regularisation. In [CCN07], Caselles, Chambolle and Novaga showed that the jump set of the solution u is contained in the jump set of the data f . In [SC03], Strong and Chan provided exact solutions of TV regularisation for simple 1D and rotationally invariant 2D data and similar results are obtained through techniques analysed by Ring in [Rin00]. In [Gra07], Grasmair  For results regarding exact solutions of the TV regularisation problem (1.4) with s = 1 we refer the reader to [CE05,DAG09,Nik02] among others.
Related work regarding the study of the analytical properties of some higher order regularisation methods can also be found in the literature. In [PS08] Pöschl and Scherzer studied exact solutions in the case where the regulariser is the total variation of an arbitrary order derivative of u. In [DMFLM09] a higher-order nonconvex model is investigated by Dal Maso et al.. Regarding exact solutions of TGV regularisation, properties of analytical solutions for the one dimensional case for the L 1 data fitting case are studied in [BKV13]. Finally in [BBBM13], Benning et al. investigate the capability of infimal convolution, second order TV and TGV regularisation to recover certain data exactly apart from a loss of contrast. We are also aware of an unpublished work of Pöschl and Scherzer [PS13] which was prepared at the same time, independently of our work and also addresses exact solutions of L 2 -TGV 2 in dimension one. Their focus is on determining how to choose the parameters such that the solutions do not coincide with the respective L 2 -TV and L 2 -TV 2 solutions.
In this paper we are studying further the one dimensional second order TGV 2 β,α regularisation problem with L 2 data fitting term. The motivation is to understand deeper how this kind of regularisation behaves, by computing exact solutions for simple data functions and to investigate how these solutions change with respect to the values of the parameters α and β.
1.2. Outline of the paper. In Section 2, we fix our notation and we recall some basic notions regarding Radon measures and functions of bounded variation. We also introduce the TGV functional along with some of its basic properties.
In Section 3, we formulate our problem, i.e., one dimensional second order TGV regularisation with L 2 data fitting term and we derive the corresponding optimality conditions in the spirit of [BKV13], using Fenchel duality.
In Section 4, we examine some of the basic properties of the exact solutions, e.g., behaviour near and away from the boundary, preservation of discontinuities and facts about the L 2 -linear regression. We also show that at least for even data, the TGV and TV regularisations coincide under some conditions.
In Section 5, which is the main section of the paper, we compute exact solutions of the TGV 2 β,α regularisation problem for three different data functions: a piecewise constant function with a single jump, a piecewise affine function with a single jump and a hat function. Emphasis is given on how the characteristic features of the solutions (discontinuities, piecewise affinity) are affected by the parameters α and β.
Finally, in Section 6, our computations are verified using numerical experiments.

Preliminaries
In this section we recall some definitions and results that we are going to use and we also fix our notation.
2.1. Radon measures and functions of bounded variation. We denote with M(Ω) the space of real valued finite Radon measures. If µ is a Radon measure then |µ| denotes its total variation measure. From the Radon-Nikodým theorem we have that there exists a |µ|-integrable function, denoted with sgn(µ) such that µ = sgn(µ)|µ| and has the property that sgn(µ) = 1, |µ|-a.e.. The one dimensional Lebesgue measure is denoted with L.
Recall that for an open Ω ⊆ R d we say that a function u ∈ L 1 (Ω) is of bounded variation if its distributional derivative can be represented by a finite Radon measure Du, i.e., Equivalently, u is a function of bounded variation if it has finite total variation TV(u), where and in that case TV(u) is equal to |Du|(Ω) which is the total variation measure of Du evaluated in Ω, see for example [AFP00]. The space of functions of bounded variation is denoted with BV(Ω) which is a Banach space under the norm u BV(Ω) := u L 1 (Ω) + |Du|(Ω). The distributional derivative Du of a BV function can be decomposed into the absolutely continuous D a u and the singular part D s u with respect to L, i.e., Du = D a u + D s u with D a u = u ′ L. Here u ′ denotes the density function of D α u with respect to L. We say that a sequence of BV functions (u n ) n∈N converges to u weakly * in BV(Ω) if it converges in L 1 and the sequence of measures (Du n ) n∈N converges to Du weakly * in the sense of Radon measures, i.e., lim n→∞´Ω v dDu n =´Ω v dDu for all v ∈ C 0 (Ω). If Ω has Lipschitz boundary then every sequence which is bounded with respect to · BV(Ω) has a weakly * converging subsequence, see [AFP00].
For the rest of the paper Ω will be a bounded open interval of the real line, i.e., Ω = (a, b).
In the one dimensional case the notion of the precise representative is a useful one. For a function u ∈ BV(a, b) the pointwise variation of u in (a, b) is defined as There exist representativesũ of u that have the property and those are called good representatives of u. There exists a unique c ∈ R such that the functions are good representatives where u l and u r are left and right continuous respectively. We define the functions which are also good representatives of u. The jump set of u, J u , is defined as the set of atoms of u, i.e., J u = {x ∈ (a, b) : Du({x}) = 0}. We refer again the reader to [AFP00].
Another useful concept is the one of the Radon norm · M . For a distribution T in Ω we define We have that T is represented by a finite Radon measure, say µ, if and only if T M is finite and in that case it is equal to |µ|(Ω). If T is represented by an integrable function u then u M = u L 1 (Ω) . If u ∈ BV(Ω) then Du M = |Du|(Ω).
2.2. Convex analysis. If X, X * are two vector spaces placed in duality and F is a real convex function defined on X, then F * denotes the convex conjugate of F : If A ⊆ X then I A denotes the indicator function of A: 2.3. Basic facts about TGV. In the arbitrary dimension, the second order total generalised variation functional is defined as where S d×d is the set of the d × d symmetric matrices and u ∈ L 1 (Ω), see [BKP09]. This is a proper, convex, rotationally invariant functional, lower semicontinuous on each L p (Ω), 1 ≤ p < ∞. In [BV11], an equivalent formulation was proved: where BD(Ω) is the space of functions of bounded deformation [Tem85]. In the one dimensional case the two formulations read In [BV11], it was also proved that there exist positive constants c < C that depend only at the size of the domain such that for every u with finite total generalised variation we have

Formulation of the problem and optimality conditions
The problem we are interested to study is the one dimensional second order TGV minimisation problem with L 2 data fitting term, i.e, (3.1) min for positive parameters α, β and f ∈ L 2 (Ω). Using the alternative formulation of TGV, (2.2), we can see that problem (3.1) is equivalent to Let us note here that a solution (u, w) for (P) exists, see [BV11]. Uniqueness is guaranteed for u but not for w. In fact w is a solution to an L 1 -TV minimisation problem: In order to study exact solutions of the problem (P) we essentially follow [BKV13] where the corresponding L 1 -data fitting term case is examined. We identify the predual problem of (P) and derive the optimality conditions using Fenchel-Rockafellar duality.
Consider the following problem We shall prove that (P ′ ) is the predual problem of (P). Firstly, we show that (P ′ ) has a solution indeed.
Thus the supremum in (P ′ ) is finite and we denote it with sup P ′ . Consider now a maximising sequence (v n ) n∈N such thatˆΩ Then there exists a positive constant M such that We will show that the sequence v ′′ n L 2 (Ω) n∈N is bounded as well. Suppose not, then lim sup n´Ω (v ′′ n ) 2 dx = ∞. Thus, passing to a subsequence if necessary we havê which is a contradiction from (3.2). Hence, we have that the sequence (v n ) n∈N is bounded in H 2 0 (Ω) and from the reflexivity of that space we get the existence of a subsequence (v n k ) k∈N and a function v ∈ H 2 0 (Ω) such that v n k → v weakly. Since K is weakly closed we have that v ∈ K. Moreover the functional to maximise is weakly upper semicontinuous since´Ω f (·) ′′ dx is continuous in H 2 0 (Ω) and − 1 2 · 2 L 2 (Ω) is weakly upper semicontinuous. Thus which means that v is a solution to (P ′ ). This solution is unique as the maximising functional is strictly concave, defined on a convex domain.
It is easy to check that with these definitions the problem (P ′ ) is equivalent to The dual problem of (3.6) is see for example [ET76]. Moreover, X, Y are Banach spaces, F 1 , F 2 are proper lower semicontinuous functions and the following condition holds: Then, see [AB86], we have that no duality gap occurs, i.e., The fact that condition (3.8) holds follows from the corresponding theorem in [BKV13] where the same condition was proved for the same X, Y , F 1 , Λ and for a F 2 with a smaller domain. The next step is to identify the dual problem (3.7) with the problem (P).
Proposition 3.2. The problem is equivalent to (P) in the sense that (w, u) solve (3.9) if and only if (w, u) ∈ BV(Ω) 2 and they solve (P).
Proof. The proof follows closely the proof of the corresponding theorem in [BKV13]. Firstly, we look at F * 1 .
Using density arguments, one can check that We also have for every (w, u) ∈ Y * and (v, ω) ∈ X, Combining (3.10) and (3.11) we have that for every (w, u) ∈ Y * (3.12) Since w ∈ H 1 0 (Ω) * and u ∈ L 2 (Ω), they can be considered as distributions and thus (3.12) can be written (3.13) Since we are considering the minimisation problem (3.9), both terms in (3.13) should be finite and thus Dw is a Radon measure, w an L 1 function (thus a BV function) and Du a Radon measure, i.e., u is a BV function as well. Thus if (w, u) is a pair of minimisers of (3.9) we have that (w, u) ∈ BV(Ω) 2 and Finally we have We are now ready to derive the optimality conditions that link the solutions of the problems (P) and (P ′ ). We need the following definition and lemma from [BKV13]: Definition 3.3. Let µ ∈ M(Ω). We define the set-valued sign, Sgn(µ) as The following proposition characterises minimisers of the problem (P).

Now the second condition is equivalent to
We note here that the corresponding optimality conditions for the In the L 2 -TV case with regularising parameter α, the optimality conditions read where v ∈ H 1 0 (Ω), see [Rin00].

Properties of the solutions
Before we proceed to computations of exact solutions for simple data functions, we firstly show some properties of the one dimensional L 2 -TGV 2 β,α regularisation. Recall that Ω is an open interval (a, b). The following two propositions were proved in [BKV13] for the one dimensional L 1 -TGV 2 β,α model and they hold here as well. Their proofs are minor adjustments of the corresponding proofs for the L 1 case and we omit them.
Proposition 4.1. Let f ∈ BV(Ω) and suppose that u, w ∈ BV(Ω) solve (P). Suppose that u < f on an open interval I ⊆ (a, b). Then the following hold: (i) (Du − w)⌊I = 0, that is to say u ′ = w on I and |D s u|(I) = 0.
The following proposition tells us that the jump set of the solution u is contained in the jump set of the data f .

8
The following proposition says that at least away from the boundary the solution u can be bounded pointwise by the data f . Proposition 4.3 (Behaviour away from the boundary). Let u be the solution to the problem P with data f and let (c, d) ⊆ {x ∈ (a, b) : f (x) < u(x)} with the property that it is maximal and a < c < d < b. Then Analogue results hold for u < f .
. We show (4.2) and (4.3) can be shown in similar fashion.
Suppose that u(c) > f (c) (we work similarly for the case u(c) < f (c)). In that case we claim that there exists δ > 0 such that for every x ∈ (c − δ, c] we have u(x) > f (x) which would be a contradiction from the maximality of (c, d). Indeed, if the claim is not true there exists a sequence (x n ) n∈N , with x n < c, such that x n → c and u(x n ) ≤ f (x n ) for every n. Since both u and f are continuous on c that would mean that u(c) ≤ f (c).
In order to prove (4.4), notice first that Proposition 4.1 implies that u is continuous and convex at (c, d), thus u = u there. From convexity we have for every λ ∈ [0, 1] Finally we have that f (x) < u(x) for all x ∈ (c, d). From the existence of the side limits we have that u can be extended continuously to [c, d] and thus Combining (4.5) and (4.6) we get (4.4).
Let us note here that the above pointwise estimates hold only away from the boundary of Ω. As we will see in the following sections, there are examples where u < inf f and u > sup f in the boundary. In the following proposition we investigate further the structure of the solution u near the boundary. Proof. (i) We know from Proposition 4.1 that u will be continuous and concave on (a, c). We claim that Dw = 0 and thus w is constant there, and thus again from the fact that u ′ = w we get that u is linear. Indeed we have that the function v is strictly convex on (a, c) with v(a) = v ′ (a) = 0. This means that v is strictly increasing on (a, c).
(ii) Because of the fact that u = f a.e. in (a, c), we have that v is an affine function there and since v ∈ H 2 0 (a, b) we have that v = 0 in (a, c). Condition (C β ) forces w to be a constant and condition C α forces Du = w and thus u is an affine function in (a, c) say with derivative equal to λ 1 . Since u < f in (c, d) we have that u is also an affine function there say with derivative equal to λ 2 . Moreover u must be continuous in c because otherwise from condition (C α ) we would have that |v ′ (c)| = α and v ′ would be discontinuous at c. Also, we have that λ 1 = λ 2 . This is because of the fact that w⌊(a, c) = λ 1 , w⌊(c, d) = λ 2 and if λ 1 = λ 2 , from condition (C β ) we would have that |v(c)| = β and thus v would be discontinuous at c. Note finally that u cannot have a gradient change in (c, d) because then v would have local minimum in (c, d) which is again impossible.
The second part of Proposition 4.4 tells us that the case where u = f near the boundary can possibly happen only if f is linear there. 4.1. L 2 -linear regression. We continue with some results concerning the L 2 -linear regression of the data f . In [BKV13], it was proved that in the one dimensional L 1 −TGV 2 β,α case there exist thresholds α * > 0, β * > 0 such that if α ≥ α * and β > β * then the solution u of (P) is the There, the values of α * and β * are independent of the function f and depend only on the size of the domain Ω. Here we show that these thresholds exist for the L 2 case as well, but they depend on the function f .
For a function f ∈ BV(Ω), we define f ⋆ to be the L 2 -linear regression, i.e., We have the following proposition: we have that the solution u of (P) is given by f ⋆ .
Proof. We first show that if u is an affine function and solves (P), then u = f ⋆ . Since u is affine we have that D 2 u = 0, thus the optimum w in (P) is w = Du. Then, we obviously have i.e, u = f ⋆ . For the second part, since Df ⋆ − w = 0 and Dw = 0, in order for the solution to be equal to f ⋆ it suffices to find a function v ∈ H 2 0 (Ω), such that (4.10) v Thus, in order to have this kind of solution, it suffices to choose α and β as in (4.8)-(4.9).
The next proposition tells us that the solution to the L 2 -TGV 2 β,α problem, has the same L 2 -linear regression with the data function.
Proposition 4.6. Let u f,β,α be the solution to L 2 -TGV 2 β,α minimisation problem with data f . Then Proof. Without loss of generality we can assume that Ω = (a, b) is an interval of the form (0, L). We have Then the proof is finished by simply observing that for a function g we have

4.2.
Even and odd functions. Before we proceed to the computation of exact solutions for some simple examples, we firstly point out some facts concerning odd and even data. For this section, we assume that Ω is an interval of the type (−L, L).
Proposition 4.7. Let f ∈ BV(−L, L) be an odd (even) function. Then the solution v ∈ H 2 0 (−L, L) to the problem (P ′ ) is also odd (even).
Proof. We prove the odd case, the even case is proved analogously.
Proposition 4.8. Let f ∈ BV(−L, L) be an odd (even) function. Then the problem (P) has a solution u that is also odd (even).
Proof. Again we only prove the odd case as the even case can be proved in a similar fashion. Setf (x) = −f (−x),û the solution of (P) with data functionf and setũ(x) = −u(−x). One can notice easily that Finally, the following theorem tells us that at least for the case of even data functions f , if the ratio β/α of the TGV 2 β,α parameters is large enough then TGV regularisation is equivalent to TV regularisation with parameter α. We need firstly the following Lemma:  Proof. We can assume that c > 0. It suffices to show that (4.14)( Since u is even we have that u ′ is even and thus up to null sets we have Then we estimatê   then the solution to the L 2 -TGV 2 β,α regularisation problem is the same with the solution to the following TV regularisation problem: Proof. Recall that for every u ∈ W 1,1 (Ω) the following Poincaré type inequality holds, where u Ω = 1 L(Ω)´Ω u dx, see for example [AFP00]. Using density arguments, we can prove that the same inequality holds for BV with the same constant, i.e., for every u ∈ BV(Ω) Since f is even, from Proposition 4.8 we have that the solution of (4.17) min is an even function as well. Thus, the problem (4.17) is equivalent to Similarly we can prove that the outcome of TV regularisation for even data, is even as well. Thus, it suffices to prove that for an even function u, we have TGV 2 β,α (u) = α TV(u) := α Du M , provided (4.15) holds. We calculate successively: In Figure 1 we verify numerically the above result. Both TGV and TV minimisation problems are solved with the Chambolle-Pock primal dual method [CP11] as it is described in [Bre12].

Computation of exact solutions
In this section we compute exact solutions for the TGV 2 β,α regularisation problem for several data functions f . In particular we calculate exact solutions for simple piecewise constant, piecewise affine and hat functions. We are focusing on the relation between the structure of solutions and the parameters α and β.
5.1. Piecewise constant function with a single jump. For convenience in the calculation, for this section, Ω will be an interval of the form (0, 2L). We define f to be a piecewise function with a single jump, i.e., for some h > 0, see Figure 2.
In order to compute exact solutions for f our strategy is as follows: Firstly, we investigate what are the possible types of solutions, describing them in a qualitative way and secondly we calculate them explicitly. Since after a simple translation f is an even function and TGV 2 β,α is translation invariant [BKP09], from Proposition 4.8 we have that the solution u will be symmetric with respect to the point (L, h/2). That is to say Thus, we only need to describe the solution in (0, L). The following theorem states which kinds of solutions are allowed to occur.
Theorem 5.1. Let u be the solution to the L 2 -TGV 2 β,α regularisation problem for the piecewise constant function defined in (5.1). Then u can only have the following form on (0, L): • There exists 0 < x 1 < L such that u is strictly negative and affine in (0, L) consisting of at most two affine parts of increasing gradient in (x 1 , x 2 ) and (x 2 , L) respectively withx 1 < x 2 < L. Moreover, in the casex 1 = x 1 , u has the same gradient in (0, x 1 ) and (x 1 , x 2 ).
Note. In fact, as we will see later,x 1 must be equal to x 1 , i.e., the allowed solutions will be strictly negative in (0, x 1 ) and strictly positive in (x 1 , L). However this is not obvious by simply interpreting the optimality conditions C f , C α and C β (which is how Theorem 5.1 is proved) but it is a result of subsequent calculations.
Proof of Theorem 5.1. Let us note firstly that from Propositions 4.2 and 4.3 we have that u is continuous on (0, L) with u − (L) ≥ 0. Also, from Proposition 4.4 we have that if u < 0 on a set of the form (0, x 1 ) then u must be affine there. Moreover Proposition 4.1 implies that there is not an interval (c, d) ⊆ (0, L) such that u < 0 (u > 0) on (c, d) with u + (c) = u − (d) = 0. Indeed, for the negative case, there would be a point x ∈ (c, d) such that u is affine on (c, x) and (x, d) with strictly negative and strictly positive gradient respectively on these intervals. But then u ′ would be strictly increasing in an interval where u < f a contradiction. We work similarly for the positive case. We conclude that u can be strictly negative only in an interval of the type (0, c), 0 ≤ c ≤ L and strictly positive only in an interval of the type (d, L), 0 ≤ d ≤ L possibly consisting of two affine parts of increasing gradient. In particular u would be increasing in (0, L). The proof will be complete if we prove that the following situations cannot happen: (iv) u < 0 in (0, x 1 ), 0 < x 1 < L and u = 0 in x 1 , L.
For (ii) suppose that there exists 0 < x 1 < L such that u = 0 in (0, x 1 ) and u > 0 in (x 1 , L). Then v will be an affine function in (0, x 1 ) (condition (C f )) but since v ∈ H 2 0 (0, 2L) we have that v = 0 in (0, x 1 ). Moreover Du = 0 and thus w = 0 a.e. in (0, x 1 ) because otherwise from condition (C α ) we would have that |v ′ | = α on a set of positive measure in (0, x 1 ). Now, since u > 0 in (x 1 , L) (assume w.l.o.g. that u is affine there) from 14 Proposition 4.1 we have that w = Du = c > 0 something that forces w to have a jump discontinuity at x 1 and thus from (C β ) we get that v(x 1 ) = β > 0. However, this contradicts to the continuity of v.
For (iii) suppose that u = 0 in (0, L). Then by symmetry we would have that u = h in (L, 2L). Thus, from condition (C f ) again, v will be affine in those intervals and again from its boundary conditions and its continuity we get that v = 0 on (0, L). But since u has a jump discontinuity at x = L, according to condition (C α ) we must have v ′ = −α, a contradiction.
For (iv) suppose that there exists 0 < x 1 < L such that u < 0 in (0, x 1 ) and u = 0 in (x 1 , L). Then v would be strictly convex and thus have a strictly increasing derivative in (0, x 1 ). Since v ′+ (0) = 0 we have that v ′ (x 1 ) > 0. Moreover, v would be affine in (x 1 , L) with positive gradient equal to v ′ (x 1 ), something that forces v(L) > 0. However, as after a simple translation f is an odd function, and according to Proposition 4.7 the same will be true for the continuous function v, then we must have v(L) = 0. The case (v) is proved in a similar way.
Finally, for the last statement of the proposition, suppose that u < 0 in (0, x 1 ), u > 0 in (x 1 , L) and the derivative of u has a jump discontinuity at x 1 . Since Du = w, in (0, x 1 ) and (x 1 , L) we have that w will have a jump discontinuity at x 1 and condition (C β ) imposes that |v(x 1 )| = β. The case v(x 1 ) = −β is impossible as v is strictly increasing in (0, x 1 ) and also if v(x 1 ) = β, from the fact that v ′ (x 1 ) > 0 and v ′ is continuous as x 1 we have that v is increasing in (x 1 , x 1 + δ) for some δ > 0, thus v(x 1 + δ) > β, contradicting (C β ).
Notice how we take advantage of the symmetries of u and v in order to prove Theorem 5.1. It remains to rule out the possibility that x 1 <x 1 . In particular, we have to show that the four following situations cannot occur 1 : where 0 < x 1 <x 1 < L. In the following we will only show that for (N-0-P1-J), the proof of the rest three cases is done similarly.
Proof. Suppose that u < 0 in (0, x 1 ), u = 0 in (x 1 ,x 1 ) and u > 0 and affine in (x 1 , L) with 0 < x 1 <x 1 < L. Then we claim that in that case, u ′ is constant, say equal to c > 0, in (0, x 1 ) ∪ (x 1 , L), w = c in (0, L) and v is affine in (x 1 ,x 1 ) with gradient equal to α there. Indeed, let c be the value of the derivative of u in (0, x 1 ). We know already from Proposition 4.1 that w = u ′ there. Now, if w = c on a set of positive measure in (x 1 ,x 1 ), that will mean that Dw = 0 somewhere in (x 1 ,x 1 ) and thus from (C β ), v must be ±β somewhere in (x 1 ,x 1 ). But this is not possible since v is strictly convex in (0, x 1 ), v ′+ (0) = 0, affine in (x 1 ,x 1 ) and thus v is strictly increasing in (0,x 1 ). Moreover, w = v ′ = c in (x 1 , L) because otherwise w would have a jump discontinuity onx 1 , something that forces v(x 1 ) = β but this cannot happen since v ′ (x 1 ) > 0. Finally, since Also note that since u has a jump discontinuity at x = L, condition (C α ) forces v ′ (L) = −α and from the symmetry of v we must have v(L) = 0.
For convenience we set Since u is an affine function on (0, x 1 ) we have that v 1 is a cubic function that satisfies the conditions Thus v 1 will have the form Since v 2 is an affine function on (x 1 , x 2 ) with gradient α and v is continuous at x 1 , we have that v 2 will be of the form Since u is a strictly positive affine function on (x 1 , L) (with the same gradient as in (0, x 1 )), we have that v 3 must be a cubic function v 3 (x) = a 3 x 3 + b 3 x 2 + c 3 x + d 3 , x ∈ (x 1 , L), that satisfies the following conditions at x =x 1 = ℓ 1 + ℓ 2 : and also the following conditions at x = L = ℓ 1 + ℓ 2 + ℓ 3 : What is left is to find the relationship among ℓ 1 , ℓ 2 and ℓ 3 . Condition (5.8) gives where 0 < x 1 < L.
In Figure 3 we provide a qualitative description on how these four allowed solutions look like, along with the corresponding variables w and v. Notice that the solution of the type N-P1-C will be in fact the L 2 -linear regression of f . Our next step is to identify the combinations of the parameters α and β that lead to each type of solution. More specifically in that case: i.e., u has a jump discontinuity of size h − 8α/L at x = L.   Finally, condition (5.18) can be written as The last two inequalities form the conditions in (5.12). Using the fact that u = −v ′′ in (0, L) and taking advantage of the symmetry of u, we have (5.13).
We now proceed to the study of the case N-P2-J. As we will see, it is computationally inaccessible to find the exact conditions on α and β that result to this kind of solution but we are able to provide some sufficient conditions that are not far away from being necessary as well.
Proposition 5.4 (N-P2-J). If α and β satisfy the conditions then the solution u of the problem (P) with the data function f defined in (5.1) is of the type N-P2-J, see Figure 3(b). More specifically, there exist points 0 < x 1 < x 2 < 0 with such that u < 0 and u > 0 in (0, x 1 ) and (x 1 , L) respectively with u ′ having a positive jump at x 2 .
In view of (5.38) we have that ℓ 2 = L 2 − 2γL if and only if γ = 4L/9. Since φ is strictly increasing, one can check that (5.37) is equivalent to the very simple expression Notice that in that case (5.33) is also satisfied. Finally, the last condition that has to be satisfied is (5.29). Using (5.34) and (5.35) it can be checked that it is equivalent to Ideally, one would like to obtain an explicit expression for ℓ 2 from (5.38) and obtain an inequality involving α and β using (5.40). However, this is practically impossible as one would have to solve a cubic equation for ℓ 2 . This is why we are giving some estimates instead. One can check that from (5.38) and (5.39) we can derive that (5.41) 3 4 γ < ℓ 2 < γ.
We have that the expression (4ℓ 2 − 2γ)/ℓ 2 2 in (5.40) is a strictly increasing function of ℓ 2 provided that ℓ 2 < γ which is true in our case. Thus, in order to satisfy (5.40) a sufficient (but not necessary) condition is Remark. Let us also point out the following fact: Suppose that α * and β * are such, so that conditions (5.21) hold, i.e., the solution is of the type N-P2-J. Then there exists a 0 < c < β * such that for every β ≤ c the condition (5.40) is violated, so we do not have this type of solution. Indeed from (5.40) and (5.41) we have that 16 Thus keeping α fixed and choosing β such that we cannot have the solution of the type N-P2-J any more.
We now turn our attention to the solution of the type N-P1-C. As we mentioned earlier, in that case u is an affine function and thus also the L 2 -linear regression of f . In Theorem 4.5 we gave some thresholds for α and β in the general case but we can be more explicit in this specific example. Moreover, in that case u will be the L 2 -linear regression of f and equal to Proof. Again we can check that the solution will be of the type N-P1-C if and only if we can find a function v defined on [0, L] such that the following conditions hold: v is a cubic polynomial, (condition (C f ), continuity at L & symmetry), (5.48) We can easily check that conditions (5.45)-(5.48) give Moreover, the maximum values of |v| and |v ′ | are hL 2 54 and hL 8 respectively. Thus, conditions (5.49)-(5.50) will be satisfied if and only if (5.43) holds.
Finally, we investigate under which combinations of α and β we have solutions of the type N-P2-C. As in the case N-P2-J, it is computationally inaccessible to provide exact conditions, thus we provide again some sufficient but not necessary conditions. Proposition 5.6 (N-P2-C). If α and β satisfy the conditions then the solution u of the problem (P) with the data function f defined in (5.1) is of the type N-P2-C, see Figure 3(d), and u ′ has a positive jump at a point x 2 where 2L 3 < x 2 < L. Proof. As in the N-P2-J case, u will be a solution of the type N-P2-C if and only if we can find ℓ 1 > 0, ℓ 2 > 0 with ℓ 1 + ℓ 2 = L and two functions defined on [0, ℓ 1 ] and [ℓ 1 , ℓ 1 + ℓ 2 ] respectively, such that the following conditions are satisfied: v 1 , v 2 are cubic polynomials, Supposing that v 2 is of the form v 2 (x) = a 3 (x − ℓ 1 ) 3 + a 2 (x − ℓ 1 ) 2 + a 1 (x − ℓ 1 ) + a 0 , x ∈ [ℓ 1 , ℓ 1 + ℓ 2 ], 20 conditions (5.56), (5.58), (5.59) give One can check that conditions (5.56) and (5.59) impose v ′ 2 to be decreasing , so in order to satisfy (5.60) and (5.61) it suffices to impose |v ′ 2 (ℓ 1 + ℓ 2 )| ≤ α, which, with the help of (5.64) and (5.66), is equivalent to Moreover combining (5.65), (5.66) and the fact that ℓ 1 + ℓ 2 = L, we can get a relationship between ℓ 1 and ℓ 1 and an equation for ℓ 2 : It is easy to see that the equation (5.69) has a unique solution in (0, L) but one has to solve a quartic in order to express it explicitly. Thus, as in the case N-P2-J we give some estimates. Observe firstly that using It remains to identify some sufficient conditions for (5.67). Observe that under (5.71) we have φ(2L/3) < 0 and φ(L > 0), which means that (5.72) 2L 3 < ℓ 1 < L and 0 < ℓ 2 < L 3 .
Using (5.72), we find that a sufficient (but not necessary) condition for (5.67) is We can easily verify that under (5.73) the condition (5.63) is satisfied as well.
We now summarise how the solutions of the problem (P) with the data function f are affected by the different choices of the parameters α and β. In Figure 4 we have partitioned the set {α > 0, β > 0} into different areas that correspond to the four different possible solutions. These areas are: (1) Blue colour: α < hL 8 , β ≥ 4L 27 α , (necessary and sufficient condition), N-P1-J, see Figure 3 (3) (1) (2) Figure 4. Illustration of the four different types of solutions of (P) for the piecewise constant function f that result for different combinations of the parameters α and β.
Notice that according to Proposition 5.6 our initial sufficient conditions for the solution of the type N-P2-C to happen were β < hL 2 54 and β ≤ 4L 9 α − L 2 h 27 . However, according to the Remark after Proposition 5.4 when condition β ≤ 32 27h α 2 holds then the solution of the type N-P2-J cannot happen and since the conditions for N-P1-C and N-P2-C are necessary and sufficient we conclude that when β ≤ 32 27h α 2 holds (together with α ≤ hL 8 ) then the solution of the type N-P2-C occur. Notice that see Figure 4. As we mentioned, due to computational issues it is difficult to derive necessary and sufficient conditions for the solutions of the type N-P2-J and N-P2-C. However, the estimates we have provided are not far away from being sharp as the unknown grey area in Figure 4, {β > 32 27h α 2 , β < 36 27h α 2 , β < 4L 27 α} is relatively small.

5.2.
Piecewise affine function with a single jump. In this section we are choosing the data function to be a simple piecewise affine function g, see Figure 5. However, as we will see, we do not have to perform the previous computations to identify solutions for (P) as the solutions have a close connection with the ones that correspond to the piecewise constant function f .
Proposition 5.7. Let f and g be the following functions on (0, 2L): Then u f is a solution to the minimisation problem P with data function f if and only if u g is a solution with data function g, where u g (x) = u f (x) + λ(x − L).

Proof.
Suppose that u f is a solution of (P) with data f , for some combination of the parameters α and β and let v f , w f to be the corresponding dual variables. We will show that u g ( Figure 5. The piecewise affine function g. It has a jump discontinuity at x = L and the gradient in the affine parts is equal to λ.  solution for data g for the same combination of α and β and vice versa. The optimality conditions (C f ), Observing that we have g( thus (C f ), (C α ), (C β ) hold for u g , v g and w g . Similarly, we show that if u g is a solution for data g then In Figure 6 we show all such possible solutions. These solutions correspond to the same combinations of α and β that are shown in Figure 4. One can observe here the capability of TGV to preserve piecewise affine structures. This is in contrast to TV regularisation which promotes piecewise constant reconstructions. f , we conclude that the only possible types of solutions u are the following: u is constant on (0, x 1 ), equal to h on (x 1 , x 2 ) and constant on ( u is affine on (0, x 1 ), equal to h on (x 1 , x 2 ), and affine on ( In Figure 8 we show how these four types of solutions look like along with the corresponding variables w and v. Notice that the solution of the type C is the L 2 -linear regression. Also, the solution of the type C-E-C corresponds to the TV-like solutions predicted by Theorem 4.10. In the following, we investigate which combinations of the parameters α and β correspond to each solution. Unlike the case with the piecewise constant function f , we are able to give necessary and sufficient conditions for every case. Proposition 5.8. Let h be the hat function defined in (5.74). Then the solution u of the problem (P) can be of the following type:

24
(1) The solution u is of the type C-E-C, Figure 8( In that case The solution u is of the type A-E-A, Figure 8( In that case (3) The solution u is of the type C, Figure 8(c), if and only if (5.77) β ≥ λL 3 12 and α ≥ λL 2 8 .
In that case (4) The solution u is of the type A, Figure 8( In that case Proof. (1) Since we are looking at solutions of the type C-E-C, we must find 0 < x 1 < x 2 < L such that u = t for a constant t on (0, x 1 ), u = h on (x 1 , x 2 ) and u = −t − λ(x 2 − x 1 ) on (x 2 , L). As far as the variable w is concerned, we have that w = Du = 0 on (0, x 1 ) ∪ (x 2 , L). However since u = f on (x 1 , x 2 ), we have that v is affine in that interval, thus it cannot have an extremum there. Thus, condition (C β ) forces w = 0 on (x 1 , x 2 ) as well and (C α ) forces v ′ = α there. We conclude that the solution u will be of the type C-E-C if and only if we can find 0 < x 1 < x 2 < L and a function v with the following properties: v and v ′ are continuous, v is a cubic polynomial on (0, x 1 ) and (x 2 , L), (condition (C f )), After some computations we find that Finally one catch check that (5.85) holds and since v is increasing on (0, L), in order to satisfy (5.84), it suffices to have v(L) ≤ β something that translates to λ .
(2) The proof follows essentially the proof of (1). Here we are looking for solutions of the type u = −µx − t instead of u = t on (0, x 1 ). In addition to the conditions (5.79)-(5.85) for v here we also have because w makes a positive jump at x = L, see also Figure 8(b). Again after some computations we find Since we are looking into cases where 0 < µ < λ we must have 2α λ−µ > 2α λ and using (5.87) this translates to Finally, it is easily checked that in order to impose x 1 < x 2 , we must have (5.89) β > 2Lα 3 .
(3) In this case, we are looking for solutions of the type u = −t, t > 0. The function v will be a cubic polynomial that satisfy the conditions: and we easily compute We can also check that the conditions |v| ≤ β, |v ′ | ≤ α are equivalent to respectively.
(4) The proof is similar to (3). We are looking for a solution of the type u(x) = −µx − t, x ∈ (0, L), 0 < µ < λ and t > 0. As before, the function v will be a cubic polynomial satisfying the conditions: Finally, we check easily that |v| ≤ β holds and |v ′ | ≤ α is equivalent to (2) (0, 0) Figure 9. Illustration of the four different types of solutions of (P) for the hat function h that result for different combinations of the parameters α and β.
As we did for the case of function f we summarise how the solutions of the problem (P) with the data function h are affected by α and β. In Figure 9 we have partitioned again the set {α > 0, β > 0} into different areas that correspond to the four different possible solutions. We note again that in contrast to the cases of the functions f and g, here we provide necessary and sufficient conditions for all the four different types of solutions. The corresponding areas are: (1) Blue colour: α < λL 2 8 , β ≥ αL − 2α 3 2α λ , C-E-C, see Figure 8 (4) Orange colour: β < λL 3 12 , β ≤ 2Lα

Numerical experiments
In this final section, we compare our theoretical results with numerical ones obtained by solving the discrete version of (P) with the primal-dual algorithm of Chambolle-Pock, [CP11]. A description of the algorithm for TGV minimisation can be found in [Bre12]. We also compute some numerical results with the presence of Gaussian noise that show that TGV regularisation is quite robust in the presence of noise. Let us note here that even though some sensitivity analysis can be done [BV11], it is not an easy task to prove that the corresponding solutions of (P) with clean and corrupted data have the same structure provided the noise is sufficiently small. Some relevant work has been done in [BB12] in terms of ground states of regularisation functionals.
In Figure 10, we plot the exact and the numerical solutions of (P) using the function f as a data function. We chose the parameters α and β so that we have the solution of the type N-P1-J. We observe that for clean data, the exact and the numerical solutions coincide, see Figure 10(a). Moreover, even with the presence of noise, the numerical solution is not far away from the corresponding solution without the noise, Figure 10(b).
We observe similar results in Figures 11 and 12 where we chose the parameters so that we have the solution of the type N-P2-J and N-P1-C respectively.
In Figure 13 we use the hat function h as a data function. Again, without the presence of noise, the exact solution agrees with the numerical one, Figure 13(a). However, when noise is added, even though the numerical solution is close to the one that corresponds to the clean data, some staircasing is observed, Figure  13(b). This is not surprising as with these combinations of α and β, TGV behaves like TV as it was shown in Theorem 4.10.
In Figure 14 the parameters are chosen so that the solution of the type A-E-A occurs. In the clean data case we have agreement between the exact and the numerical solution, Figure 14(a), but in the noisy case a kind of "affine" staircasing effect appears in the area where the exact solution equals with the data, see detail of Figure 14(b).
Finally, in Figure 15, the parameters are chosen so the solution of the type A occurs. The numerical solution agrees with the exact one and deviates from it slightly in the presence of noise.

Conclusion
We studied exact solutions to the one dimensional L 2 -TGV 2 β,α problem for simple piecewise constant, piecewise affine and hat functions as data terms. We used Fenchel-Rockafellar duality to derive the optimality conditions of the corresponding minimisation problem and we computed the exact solutions using these conditions. The relationship between the values of the parameters α, β and the structure of solutions was investigated. We performed numerical experiments in which the exact solutions agree with the numerical ones and having only a slight deviation when noise is added.   As far as further research is concerned, the analysis of the exact solutions of the corresponding 2D model should be the first priority as well as a more rigorous study of the problem under the presence of noise.