{'fraction_non_alphanumeric': 0.056900415090181095, 'fraction_numerical': 0.01711787826470264, 'mean_word_length': 3.6704408989535082, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Structure of optimal control for planetary landing with control and state constraints

This paper studies a vertical powered descent problem in the context of planetary landing, considering glide-slope and thrust pointing constraints and minimizing any final cost. In a first time, it proves the Max-Min-Max or Max-Singular-Max form of the optimal control using the Pontryagin Maximum Principle, and it extends this result to a problem formulation considering the effect of an atmosphere. It also shows that the singular structure does not appear in generic cases. In a second time, it theoretically analyzes the optimal trajectory for a more specific problem formulation to show that there can be at most one contact or boundary interval with the state constraint on each Max or Min arc.


Introduction
Interest for vertical landing problems has increased these recent years with the growing use of reusable launchers and as space exploration missions are requiring ever more landing precision. Vertical landing consists in two phases: first an entry phase, that set the vehicle in appropriate position and velocity conditions above the target to ensure landing feasibility, and then a phase of powered descent. Prior to the powered descent, the reference trajectory has to be recalculated in order to correct dispersions accumulated during the entry phase ( [1]), or handle an update of the landing site. This motion planning problem is usually treated in an optimal control framework, allowing to minimize a quantity such as fuel consumption, flight time, or landing errors to ensure soft landing.
However, solving an optimal control problem efficiently and accurately remains a challenge; moreover, analytical solutions, computed thanks to the Pontryagin Maximum Principle, are only known for simplified models with few constraints, as in [2] and [3]. This paper is concerned with the following dynamic model, expressed in an inertial frame (e x , e y , e z ), where r(t) = (x(t), y(t), z(t)) ∈ R 3 is the vehicle position, v(t) ∈ R 3 is its velocity, m(t) > 0 is its mass, q the maximal mass flow rate of the engine, T > 0 the maximal thrust and g = (0, 0, g 0 ) with g 0 the gravitational constant. The thrust is controlled by the vector u(t) ∈ R 3 , where ||u|| ≤ 1 is the engine throttle. Previous theoretical and numerical studies tend to show that the structure of the optimal control for dynamics (1) generally consists of a finite succession of arcs on which the control norm is constant. Indeed, it is shown in [4] that the optimal control of the one dimension fuel-optimal problem with a bounded control follows an Off-Bang structure, i.e. it has a period of off thrust followed by full thrust until touchdown. Then, the Bang-Off-Bang structure, called Max-Min-Max when the thrust is not allowed to go to zero, has been found to be optimal for numerous variants of the problem, such as the two-dimensional problem studied in [5], the problem with specified initial and final thrust studied in [6], or with throttle and thrust angle control in [7]. Recently, [8] and [9] showed that the Max-Min-Max structure is the solution of the one dimension problem, minimizing the final time for the first one and considering the effect of an atmosphere on the thrust for the latter. However, there lack theoretical studies relating more complex formulations of the landing problem, for instance considering realistic technical and safety constraints. Among the existing numerical methods, a noteworthy one is presented in [2,10,11], that succeeds to solve efficiently the problem including constraints on the thrust direction and the launcher position, thanks to a convexification method. The simulations carried out in these studies also reveal a Max-Min-Max form of control.
The purpose of this paper is to analyze a vertical landing problem considering relevant control and state constraints to highlight the rigidity of the solution. Indeed, we show that the structure of the control remains identical after changing the cost or adding constraints, which suggests that it is not specific to the problem formulation (we can even modify the dynamic model to take into account the effect of an atmosphere). We will study at first the problem with dynamics (1) and we will consider, in addition to the bound on the control norm, a thrust pointing constraint limiting the amplitude of the control direction as well as the launcher orientation, both for safety reasons and to model actuator limitations. Then, we also take into account a glide-slope constraint, forcing the launcher position to stay inside a cone centered on the target, to ensure that the vehicle remains at a safe altitude and to guarantee sensor operability. The cost of the optimal control problem considered is expressed as a final cost, which embraces the most common applications such as maximizing the final mass or minimizing the final time. In this framework (defined later as Problem 1), we can show that the optimal control has either a Max-Min-Max form or a Max-Singular-Max form as stated in the following theorem Theorem 1.1. Consider an optimal trajectory on [0, t f ]. Then, the control u(t) is in the Max-Min-Max or the Max-Singular-Max form, i.e. there exists This result has been presented without proof in [12]; here we will detail the complete proof of Theorem 1.1. Moreover, without the pointing constraint, we show that this result stays true when considering the effect of the atmosphere as a constant pressure. Finally, we analyze a particular case, in which the mass is assumed constant and the glide-slope constraint reduced to a positive altitude constraint, to show that in that configuration there are at most three contacts with the state constraint. Besides, the numerical results available make think that this outcome is likely to be generalized. This paper is organized as follows. In Section II, the full optimal control problem with the constraints considered is presented, and the optimality conditions given by application of PMP are detailed. In Section III, the structure of the optimal control is stated and the proof is exposed. Section IV studies a particular case of the landing problem to show that the number of contacts with the state constraint is limited. Finally, Section V provides

Formulation
The study will concern vehicles having dynamics in the form of (1). The initial mass of the vehicle will be denoted by m 0 and its empty mass by m e . The state is denoted by X = (r, v, m) ∈ R 3 × R 3 × R. It will consider the following constraints: • bounds on the control norm, • a pointing constraint, formulated as • a glide-slope constraint, .
The landing problem will minimize a final cost : where t f is the final time. Thus, the complete optimal control problem can be written Indeed it would imply that u = 0 on [t, t f ], which makes it impossible to reach z(t f ) = 0 with v z (t f ) = 0. Thus, the mass constraint m(t) > m e plays no role in the problem.
Remark 2.2. Note that the existence of optimal solutions for Problem 1 results from an adaptation of the results in [2]. Indeed, the existence if proved in [2] for the same problem formulation but without considering the pointing constraint. The proof consists in first convexifying the constraints and showing the existence of an optimal solution for the convex formulation of the problem [2, Theorem 1]. This part of the reasoning still works when we add the convexified pointing constraint. Then, it is necessary to show that optimal solutions of the convexified problem are also optimal for the non convex formulation of the problem. This is done in [2, Lemma 2] without the pointing constraint, and in [11, Lemma 1] when considering the pointing constraint.

Optimality conditions
The necessary optimality conditions provided by the application of the Pontryagin Maximum Principle to the optimal control Problem 1 are given in this section. Let us firstly specify some notations.
• The control set is U = {u ∈ R 3 : u min ≤ u ≤ u max and e z , u ≥ u cos(θ)}.
We apply the version of the maximum principle given in [13, Th. 9.5.1], which in our case writes as follows. Define the Hamiltonian of Problem 1 as where the adjoint vector P = (p r , p v , p m ) belongs to R 3 × R 3 × R and p 0 ∈ R.

Solution of the optimal control problem
Thanks to the application of the Pontryagin Maximum Principle, several results on the evolution of the control can be given. Those results will be necessary to deduce the general form of the control with respect to time. For d = 1, 2, we denote by S d the unit sphere of R d+1 . Remind also that, for , be an optimal control of Problem 1, and Moreover, set Then, Making the change of variable w = αd, with α = w and d ∈ S 2 , to find u(t) ∈ U maximizing ϕ amounts to find α and d maximizing Then, the maximum of ϕ is attained for α satisfying and for d solution of the problem It is a matter of an exercise to check that the solution d of this maximization problem satisfies the statement of the lemma (for the sake of completeness we give the proof in Appendix, in Lemma A.1). Lemma 3.1 follows by setting Thus, the norm of the control is mainly determined by the sign of the switching function Ψ and takes only the values u min and u max when Ψ is non zero (bang arcs). Therefore, we need to analyze the variations of Ψ, which we will do now. Note however that, on time intervals where Ψ is zero, we have singular arcs. In that case the norm of u is not given anymore by Lemma 3.1, a further study is necessary, see Section 3.3.
Remark 3.1. The direction d of the control is more regular than just measurable. Indeed let I ⊂ [0, t f ] be the closed set such that, for every t ∈ I, which implies that for these times d(t) is defined as a function of p v (t). This function being locally Lipschitz, the function d(·) is absolutely continuous on while it may be discontinuous on I.

Variations of Ψ
Consider an optimal trajectory on [0, t f ]. Then: Proof of Points 1. and 2. Consider an optimal trajectory on [0, t f ] with adjoint vector P = (p r , p v , p m ). Recall that the switching function Ψ is given by the fonction d(t) being defined in Lemma 3.1. Note first that, for every t ∈ [0, t f ], there holds Thus p v , d is a Lipschitz function of p v . The latter being an absolutely continuous function on [0, t f ], p v , d is absolutely continuous too, which proves Point 1. Moreover, a simple computation showṡ so we are left with the computation of the time derivative of p v , d . Let us introduce the subsets p v (t) = 0 and p vz (t) < 0}, and I = I 1 ∪I 2 . As noticed in Remark 3.1, the function d(·) is absolutely continuous, and so is differentiable a.e., on [0, t f ]\I. Hence on this subset we can compute directly the time derivative of p v , d as follows: • when the pointing constraint is not active, there holds p v , d = p v and then • when the pointing constraint is active, p v , d = sin(θ) p v + cos(θ)p vz and we obtain As a consequence, (2) holds a.e. on [0, t f ]\I. Now, since p v = 0 and p v , d = 0 on I 1 , thenṗ v = −q r = 0 and d pv,d dt = 0 a.e. on I 1 (see for instance [14,Lemma 3.10]), which implies that (2) holds a.e. on I 1 . The same argument on p v instead of p v shows that (2) holds a.e. on I 2 too, and so on I. This concludes the proof of Point 2.
In order to prove Lemma 3.3, we will show that q r (t), d(t) is locally nonincreasing, i.e., for any t 0 ∈ [0, t f ) and any t > t 0 close enough, there holds q r (t), d(t) ≤ q r (t 0 ), d(t 0 ) . We first prove two preliminary lemmas.
Proof. Recall first (see Remark 3.1), that d(·) is absolutely continuous on (t 1 , t 2 ) and that on such an interval, Thus, for a.e. t ∈ (t 1 , t 2 ), we have either In both case it is nonnegative due to Cauchy-Schwarz inequality.
, and if and only if p v (t) andṗ v (t) are collinear otherwise.
Moreover this derivative is zero if and only if p v (t) and q r are collinear when , and if and only if p v (t) and q r are collinear otherwise. Proof. On (t 1 , t 2 ), the measure µ is zero, so that q r is constant andṗ v (t) = −q r . Therefore, the sign of the derivative is given by Lemma 3.4. Then is C 1 at times such that r(t) = 0. Its derivativė is absolutely continuous and, for a.e. t, Moreover, due to Cauchy-Schwarz inequality, we have Note that r(t 0 ) = 0. Indeed, otherwise h(r(t 0 )) = 0 would imply r(t 0 ) = 0 and v z (t 0 ) = 0, as z has reached a minimum. Then, as z(t) = o(t − t 0 ) and Using (3.2) and (3.2), this implies The function d(t) being continuous (see Remark 3.1), n(t), d(t) is continuous too, and the above inequality implies that n(t 0 ), d(t 0 ) is nonnegative and then and max [t 0 ,t k ] n(t), d(t 0 ) tends toward n(t 0 ), d(t 0 ) when t k converges to t 0 , which gives the result.
Remark 3.2. The above inequality shows also that if u(t) has a limit α when t tends toward t 0 , then the limit α satisfies T α ≥ m e g 0 cos(γ). We are left with the case h[t 0 ] = 0. Recall that, for t > t 0 , we have from the maximum principle and that the function d(·) is absolutely continuous on (t 1 , t 2 ), so that, for t (s)ds. Thus, for t > t 0 close enough to t 0 we have where n(σ)µ(dσ),ḋ(s) ds, First, by Lemma 3.4 we have I 1 ≤ 0. Second, p v (t) and q r (t) are bounded near t 0 , and soḋ(t) is bounded too. Since µ is a positive measure, we obtain Third, by Lemma 3.6 and the continuity of n(t), d(t) , we obtain As a consequence, for t > t 0 close enough to t 0 , which concludes the proof.
Proof of Proposition 3.2-Point 3. Let us show that for every t 0 ∈ [0, t f ], t → q r , d is nonincreasing almost everywhere in the neighbourhood of t 0 . If (3.1) is true at t 0 , the result is given by Lemma 3.3. Otherwise, let us consider the case when p v (t 0 ) = 0 and p vz (t 0 ) < 0. The case when p v (t 0 ) = 0 can be treated in the same way. Firstly, it should be noted that 1. from q z (t) = p z (t 0 )− [0,t) µ(ds), q z is a nonincreasing function on [0, t f ]; 2. from q r (t) = p r (t 0 ) + [0,t) tan(γ) r r µ(ds), as r(t 0 ) = 0 if h(t 0 ) = 0 and q r is constant if h(t 0 ) = 0, q x and q y are monotonous in a neighbourhood of t 0 ; Recall that we denote by d the vector composed of the two first coordinates of d. Then, in a neighbourhood (t − , t + ) of t 0 , with t − ≤ t + , q r , d = q r , d + cos(θ)q z .
As q z is nonincreasing, let us show that q r , d is nonincreasing. From 2., on each interval J = (t − , t 0 ) or (t 0 , t + ), • either q r = 0 and q r , d = 0 is constant; • or q r (t) = 0 ∀t ∈ J, thus p v (t) = 0 and d = sin(θ) p v p v . In this case, We can assume, by reducing the interval J if necessary, that for every t and s in J, sign(q x (t)) = sign(q x (s)) and sign(q y (t)) = sign(q y (s)). It implies that q r (s), q r (t) ≥ 0, and then q r , d is nonincreasing on J and is of the same sign as (t 0 − t).
Combining these results, we obtain that q r , d is nonincreasing on (t − , t 0 ) ∪ (t 0 , t + ), which concludes the proof of the proposition.
Proof of Theorem 1.1. Consider an optimal trajectory on [0, t f ]. From Lemma 3.1, the norm of the control has the following expression depending on the sign of Ψ: • Assume now that Ψ crosses zero on [t 1 , t 2 ]. AsΨ(t) is zero on that interval, then Ψ(t) = 0 for all t ∈ [t 1 , t 2 ]. Moreover, as it is decreasing on [0, From this study on the sign of Ψ, we deduce the form of the control as stated in the theorem.

Results on singular trajectories
We have seen in Theorem 1.1 that optimal trajectories may contain singular arcs. The next lemmas show that such trajectories have a particular form, namely on singular arcs some adjoint vectors are collinear and the pointing constraint is active. We will show later (Lemma 4.1) that in the case γ = 0, these properties happen only if the initial conditions are in very specific positions, so that singular arcs do not appear for generic initial conditions. We did not try to prove the result for γ = 0, but it is reasonable to believe that the results still holds (no singular arc for generic initial conditions).
Lemma 3.7. Consider an optimal trajectory on [0, t f ] and an interval (t ′ pv(t) , then p v (t) and q r (t) are collinear, otherwise p v (t) and q r (t) are collinear.
, and it follows from Proposition 3.2 that q r (t), d(t) is constantly equal to zero on (t ′ 1 , t ′ 2 ). If the constraint is not active on (t ′ 1 , t ′ 2 ), the conclusion follows from Corollary 3.5. If the constraint is active at some time t ′ 0 ∈ (t ′ 1 , t ′ 2 ), then Formula (3.2) implies that both I 1 and I 2 − I 3 must be zero near t ′ 0 . The latter implies which again gives the conclusion since n(t ′ 0 ), d(t ′ 0 ) > 0 by Lemma 3.6. Proof. If the trajectory is singular, then by Lemma 3.7, q r and p v are collinear. Moreover, when the pointing constraint is not active,Ψ = 0 implies from (2) that q r , d = qr,pv pv = 0. Thus q r = 0. Now, from (2.2), which is equivalent to H(X, P, p 0 , u) = u Ψ + q r , v − p vz g 0 , the expression of the Hamiltonian becomes H(X, P, p 0 , u) = −p vz g 0 .
The transversality condition (5) and our condition on ℓ then imply that p vz ≤ 0, which contradicts the assumption that d is in the cone.

Remark 3.3.
The assumption ∂ℓ ∂t ≥ 0 means that the cost penalizes the total duration of the trajectory. It is a very natural assumption and is verified for the vast majority of the practical problems with free final time.
where σ is a parameter which is assumed to be constant and depends on the engine nozzle exit area and on the atmospheric pressure. We make the following assumption.
Assumption 1. The net thrust is always positive: T u min ≥ σ.
The optimal control problem is formulated as follows.
The main result of this section studying Problem 2 is stated in the next theorem.
The following developments will be dedicated to the proof of Theorem 3.9. The optimality conditions are similar to those for Problem 1, we only detail here the changes. We define the Hamiltonian of Problem 2 as The dynamics of the adjoint vector are Lemma 3.10. The optimal control of Problem 2 is expressed as follows and for all t such that u(t) = 0, Proof. If u(t) is an optimal control on [0, t f ], then the maximization condition of the Pontryagin Principle implies that, for almost all t ∈ [0, t f ], u(t) maximizes among the w ∈ U. Making the change of variable w = αd, with α = w , to find u(t) ∈ U maximizing ϕ amounts to find α and d maximizing under the conditions u min ≤ α ≤ u max and d ∈ S 2 . It is clear that this maximization yields to the statement of the lemma.
Lemma 3.11. Consider an optimal trajectory on [0, t f ]. Then: is a nonincreasing function on a full measurement subset of [0, t f ).
Proof. We do not detail the proof here as it is very similar to the one of Proposition 3.2-Points 1,3.
Proof of Theorem 3.9. Let study the sign of Ψ(t). Its derivative is expressed byΨ and can be written as followṡ where K and f are functions expressed by and We deduce that Using the expression of the optimal control given in Lemma 3.10 and from (3.4), we obtain that the derivative of p m is expressed by pv m(t) 2 (T u − σ); therefore, from Assumption 1,ṗ m (t) > 0 and p m is increasing. From Lemma 3.11 q r (t), pv(t) pv(t) is nonincreasing, thus we deduce that f (t) is increasing and can change of sign at most one time. Consequently, Ψ(t)e − t 0 K(s)ds can changes of sign at most two times, and in that case it is positive, then negative and then positive, and Ψ has the same property.

Specific results with pointing and altitude constraints
We are now interested in the particular case of an altitude constraint, i.e. the case where γ = 0. In that case, n = e z , so q r = p r is constant even when h(r) = 0.

Singular arcs
Despite Theorem 1.1 does not exclude the existence of singular trajectories, it seems that they do not appear in general. They seldom arise when solving landing problems numerically, and the next lemma states that they do not exist in the case of an altitude constraint (γ = 0) if the initial conditions are generic, which is defined in Lemma 4.1. The result of Lemma 4.1 has been proved under the following assumption.  Proof. Consider a trajectory containing a singular arc on an interval [t ′ 1 , t ′ 2 ]. According to Lemma 3.7, p v (t ′ 1 ) and p r are collinear. Set d = (d x , d y ), r = (x, y) and v = (v x , v y ). Since (r(t f ), v(t f )) = (0, 0), d has the same direction as p v and asv by the dynamics of the vehicle. We conclude that r(0) and v(0) are collinear. Lemma 4.1 helps to explain why singular trajectories seem to be rare and are often dismissed in the literature. Assumptions have been made here in order to give a simple proof but they could probably be extended, for example by continuity arguments. Particularly, the assumption that initial conditions are generic mainly spreads out problems in two dimensions, but it is clear that even in that case singular trajectories are not frequent, and they did not appear in numerical results of Section 5.

Number of contact points on a particular case
We study now a particular case of Problem 1 in order to show that optimal trajectories meet the state constraint only a very limited number of times. More precisely, Corollary 4.3 states that in the conditions of Lemma 4.1 there can be at most two contacts before reaching the final point. To complete the proof, we made the assumption that the mass m is constant (i.e. q = 0). Let us start with some definitions.
Given a trajectory, we say that [t c 1 , t c 2 ] is a boundary interval if h(t) = 0 for all t ∈ [t c 1 , t c 2 ], and [t c 1 , t c 2 ] is the largest interval satisfying this condition and containing t c 1 , t c 2 . When the boundary interval is reduced to a point t c (i.e. t c 1 = t c 2 = t c ), we rather say that t c is a contact point. Proof. Let us show that there is at most one contact point or boundary interval on each Max arc (including possibly the final point for the last Max arc). A similar reasoning on Min arcs will then give the conclusion. By contradiction, assume that the same Max arc contains two different boundary We can moreover assume that and there exists t b ∈ (t c 1 , t c 2 ) such thatv z (t b ) < 0. Note thatv z is an affine function of d z , the vertical component of d, so the above sign condition onv z write as Now, on (t c 1 , t c 2 ), the state constraint is inactive, therefore q r = q r (t c 1 ) is constant and Assume first that p 0 and q r are collinear, and write p 0 = ρ 0 δ and q r = ρ r δ, with ρ 0 , ρ r ∈ R and δ ∈ S 2 . Thus, We deduce thatφ As q r and p 0 are constant, we deduce thatφ is of constant sign, andḋ z also from (4.2). Thus, d z is monotonous when the pointing constraint is not active and constant when it is active: we conclude that it is not possible to verify (4.2). 1, which imply that the control is of the form Max-Min-Max (or the restriction of such a control to a subinterval), and Lemma 4.2 gives us the number of contacts. Then, the assumption of Point 1 implies that u min T does not compensate the weight of the vehicle, therefore it is not possible to have a contact on a Min arc without violating the state constraint. Finally, the assumption of Point 2 implies that u(t)T compensate the weight of the vehicle for any control direction, therefore the vertical velocity, and so the altitude, would remain positive after a contact with the state constraint. We deduce that it is not possible to have a contact aside from the final point.
Remark 4.1. The last result has been demonstrated with the assumption of a constant mass. However we believe that it stays true if the mass varies a little. Indeed, the reasoning is still correct if m(t b ) ∼ m(t c 1 ) or m(t c 2 ), therefore it is sufficient to assume that the mass varies only slightly between two contact points. Likewise, the same reasoning would work with a glideslope constraint of γ = 0, by assuming that n is constant, which means in 2 dimensions that the trajectory stays in the same half-plane x ≥ 0 or x ≤ 0.

Numerical results
This section presents some examples for a Mars powered descent problem, in two dimensions for the sake of simplicity. The simulations are carried out by using CasADi ( [15]) with python language and the IPOPT solver. They are performed under the same conditions as in [2]. The launcher parameters are T = 16573N, u min = 0.3 and u max = 0.8 and m e = 1505kg and g 0 = 3.71m/s 2 corresponds to the Mars gravitational constant. The initial state is given by r 0 = [2000, 1500]m, v 0 = [100, −75]m/s and m 0 = 1905kg. The optimal control problem considered will aim to perform a pinpoint landing by steering the vehicle to null final position and velocity.
The first set of simulations is performed in the conditions of section IV with a vehicle mass constant, i.e. with q = 0. In the usual way, we would minimize fuel consumption, as in the next example, with a cost proportional to Here, we minimize this cost to obtain the solution of an equivalent problem. It is straightforward to show that all results presented in Section III and IV remain valid under these conditions. Note that the assumption of the Point 1 of Corollary 4.3 u min < m 0 g 0 T is verified. Three simulations were performed using the conditions described above. The first executes a Mars landing if no pointing and altitude constraint is applied. Figure 3 shows that in that case, the zero altitude is crossed. In the second simulation, an altitude constraint has been added. We see that, in accordance with the results of Corollary 4.3, there are two contact points with the state constraint along the trajectory: one during the first Bang arc and the final point. However, the angle of the thrust exceeds 45 • at the end of the trajectory. Finally, in the third example, a pointing constraint of 45 • is added. There are again two contacts with the state constraints, and the pointing constraint is active during the last 16s of the trajectory, which has the effect of making the trajectory more vertical.
A second set of simulations has been performed with a varying mass, with q = 8.4294kg/s, considering a glide-slope constraint of γ = 5 • and maximizing the final mass of the vehicle: In that case, the constraints are more compelling, as we see on the green plot on Figure 4 that the thrust direction is saturated by the pointing constraint on both its inferior and its superior bounds. There is still one contact point with the state constraint, although we leave the framework of Corollary 4.3.  Case 1: c + (d) > 0. Then λ + = 0, p v + 2λd = 0, d, d = 1, and we get the following alternative. Either p v = 0 and then every d ∈ S 2 is a maximum. Or d = ǫ pv pv with ǫ = ±1, and since d maximizes f , then ǫ = 1. Case 2: c + (d) = 0. Then d z = cos θ, p v + 2λd + λ + e z = 0, d, d = 1, and we get the following alternative. Either p v = p vz e z (i.e. p v = 0) with p vz ≤ 0, and in this case, choosing λ + = −p vz we obtain that every d of the form sin(θ)δ, cos(θ) , with δ ∈ S 1 , is maximum. Or p v + λ + e z = 0 and so d = ǫ pv+λ + ez pv+λ + ez with ǫ = ±1. In that case, ǫ(p vz + λ + ) = p v + λ + e z cos(θ) and d =    ǫpv x pv+λ + ez ǫpv y pv+λ + ez ǫpv z pv+λ + ez    = cos(θ)    pv x (pv z +λ + ) pv y (pv z +λ + ) 1    .