\documentclass[../report/main.tex]{subfiles}

\begin{document}

% The asterix after \subsection disables section numbering
\subsection*{Problem 1 Part A}
Determine the number of refrigerators to be shipped from plants to warehouses, and then warehouses to retailers to minimize the cost.

\subsection*{Solution}
\begin{itemize}
	\item In all 1000 units will travel through the network at a minimum cost of \$17100.
	\newline
	\item Ship 150 units from plant \#1 to warehouse \#1 at a cost of \$1500.
	\item Ship 200 units from plant \#2 to warehouse \#1 at a cost of \$2200.
	\item Ship 250 units from plant \#2 to warehouse \#2 at a cost of \$2000.
	\item Ship 150 units from plant \#3 to warehouse \#2 at a cost of \$1200.
	\item Ship 100 units from plant \#3 to warehouse \#3 at a cost of \$ 900.
	\item Ship 150 units from plant \#4 to warehouse \#3 at a cost of \$1200.
	\newline
	\item Ship 100 units from warehouse \#1 to retailer \#1 at a cost of \$ 500.
	\item Ship 150 units from warehouse \#1 to retailer \#2 at a cost of \$ 900.
	\item Ship 100 units from warehouse \#1 to retailer \#3 at a cost of \$ 700.
	\item Ship 200 units from warehouse \#2 to retailer \#4 at a cost of \$1600.
	\item Ship 200 units from warehouse \#2 to retailer \#5 at a cost of \$2000.
	\item Ship 150 units from warehouse \#3 to retailer \#6 at a cost of \$1800.
	\item Ship 100 units from warehouse \#3 to retailer \#7 at a cost of \$ 600.
	\newline
	\item 150 total units will leave plant \#1 (capacity is 150).
	\item 450 total units will leave plant \#2 (capacity is 450).
	\item 250 total units will leave plant \#3 (capacity is 250).
	\item 150 total units will leave plant \#4 (capacity is 150).
	\newline
	\item 350 total units will enter warehouse \#1, 350 units will leave.
	\item 400 total units will enter warehouse \#2, 400 units will leave.
	\item 250 total units will enter warehouse \#3, 250 units will leave.
	\newline
	\item 100 total units will enter retailer \#1 (demand is 100).
	\item 150 total units will enter retailer \#2 (demand is 150).
	\item 100 total units will enter retailer \#3 (demand is 100).
	\item 200 total units will enter retailer \#4 (demand is 200).
	\item 200 total units will enter retailer \#5 (demand is 200).
	\item 150 total units will enter retailer \#6 (demand is 150).
	\item 100 total units will enter retailer \#7 (demand is 100).
\end{itemize}
\subsection*{Linear Program Formulation}
\begin{enumerate}[1.]
	\item Overall idea of problem
	\begin{itemize}
		\item Refrigerators moving from $n=4$ plants to $q=3$ warehouses to $m=7$ retailers.
		\item Not all plants deliver to all warehouses.
		\item Not all warehouses deliver to all retailers.
		\item Costs of shipping from plants to warehouses vary by pair.
		\item Costs of shipping from warehouses to retailers vary by pair.
		\item Each plant has a capacity in terms of number of refrigerators it can supply.
		\item Each retailer has a capacity in terms of number of refrigerators it demands.
	\end{itemize}
	\item What is the goal?  What are you trying to achieve?
	\begin{itemize}
		\item Determine optimal shipping routes ($n$ to $q$ and $q$ to $m$).
		\item Determine number of refrigerators moving along each route ($n$ to $q$ and $q$ to $m$).
		\item Satisfy the demand of the retailers.
		\item Minimize the cost.
	\end{itemize}
	\item Identify variables
	\begin{itemize}
		\item $cp_{ij}$ = cost of moving a refrigerator between plant i and warehouse j
		\begin{itemize}
			\item   ex. $cp_{32} = 8$ = cost of moving from plant 3 to warehouse 2
			\item   9 variables
		\end{itemize}
		\item $cw_{jk}$ = cost of moving a refrigerator between warehouse j and retailer k
		\begin{itemize}
  			\item  ex. $cp_{14} = 10$ = cost of moving from warehouse 1 to retailer 4
  			\item  12 variables
		\end{itemize}
		\item $s_i$ = capacity (supply) of each plant
		\begin{itemize}
 			\item   ex. $s_2 = 450$ = number of refrigerators that plant 2 can supply
			\item    4 variables
		\end{itemize}
		\item $d_k$ = capacity (demand) of each retailer
		\begin{itemize}
			\item    ex. $d_6 = 150$ = number of refrigerators that plant 6 demands
			\item    7 variables
		\end{itemize}
		\item $np_{ij}$ = number of refrigerators shipped from plant i to warehouse j
		\begin{itemize}
			\item    9 variables
		\end{itemize}
		\item $nw_{jk}$ = number of refrigerators shipped from warehouse j to retailer k
		\begin{itemize}
			\item    12 variables
		\end{itemize}
	\end{itemize}
	\item Identify constraints
	\begin{itemize}
		\item $s_1 \leq 150$
		\item $s_2 \leq 450$
		\item $s_3 \leq 250$
		\item $s_4 \leq 150$
		\item $d_1 \geq 100$
		\item $d_2 \geq 150$
		\item $d_3 \geq 100$
		\item $d_4 \geq 200$
		\item $d_5 \geq 200$
		\item $d_6 \geq 150$
		\item $d_7 \geq 100$
		\item $np_{11} + np_{21} + np_{31}        = nw_{11} + nw_{12} + nw_{13} + nw_{14}$
		\item $np_{12} + np_{22} + np_{32} + np_{42} =               nw_{23} + nw_{24} + nw_{25} + nw_{26}$
		\item $              np_{33} + np_{43} =                      nw_{34} + nw_{35} + nw_{36} + nw_{37}$
		\item $s_1 = np_{11} + np_{12}$
		\item $s_2 = np_{21} + np_{22}$
		\item $s_3 = np_{31} + np_{32} + np_{33}$
		\item $s_4 =        np_{42} + np_{43}$
		\item $d_1 = nw_{11}$
		\item $d_2 = nw_{12}$
		\item $d_3 = nw_{13} + nw_{23}$
		\item $d_4 = nw_{14} + nw_{24} + nw_{34}$
		\item $d_5 =        nw_{25} + nw_{35}$
		\item $d_6 =        nw_{26} + nw_{36}$
		\item $d_7 =                      nw_{37}$
		\item $np_{11} \geq 0$
		\item $np_{12} \geq 0$
		\item $np_{21} \geq 0$
		\item $np_{22} \geq 0$
		\item $np_{31} \geq 0$
		\item $np_{32} \geq 0$
		\item $np_{33} \geq 0$
		\item $np_{42} \geq 0$
		\item $np_{43} \geq 0$
		\item $nw_{11} \geq 0$
		\item $nw_{12} \geq 0$
		\item $nw_{13} \geq 0$
		\item $nw_{14} \geq 0$
		\item $nw_{23} \geq 0$
		\item $nw_{24} \geq 0$
		\item $nw_{25} \geq 0$
		\item $nw_{26} \geq 0$
		\item $nw_{34} \geq 0$
		\item $nw_{35} \geq 0$
		\item $nw_{36} \geq 0$
		\item $nw_{37} \geq 0$
	\end{itemize}
	\item Identify inputs and outputs that you can control
	\begin{itemize}
		\item $np_{ij}$
		\item $nw_{jk}$
		\item $cost$
	\end{itemize}
	\item Specify all quantities mathematically
	\begin{itemize}
		\item Many have been defined above already.  A few more will be added here.
		\item $cost = \mathop{\sum_{i=1}^{n}\sum_{j=1}^{q}}np_{ij}*cp_{ij} +  \mathop{\sum_{j=1}^{q}\sum_{k=1}^{m}}nw_{jk}*cw_{jk}$
		\item $cp_{11} = 10$
		\item $cp_{12} = 15$
		\item $cp_{21} = 11$
		\item $cp_{22} = 8$
		\item $cp_{31} = 13$
		\item $cp_{32} = 8$
		\item $cp_{33} = 9$
		\item $cp_{42} = 14$
		\item $cp_{43} = 8$
		\item $cw_{11} = 5$
		\item $cw_{12} = 6$
		\item $cw_{13} = 7$
		\item $cw_{14} = 10$
		\item $cw_{23} = 12$
		\item $cw_{24} = 8$
		\item $cw_{25} = 10$
		\item $cw_{26} = 14$
		\item $cw_{34} = 14$
		\item $cw_{35} = 12$
		\item $cw_{36} = 12$
		\item $cw_{37} = 6$
	\end{itemize}
	\item Check the model for completeness and correctness
	\begin{itemize}
	\item All variables are positive.
	\end{itemize}
\end{enumerate}
\subsection*{ Matlab Code}
\lstinputlisting{../problem_one/partA.m}
\end{document}


%%========================================================
%% Chapter 4.1: Existence and Continuity of Jost Solutions
%%========================================================

\documentclass[../dissertation.tex]{subfiles}

\begin{document}
\section{Existence and Continuity of Jost Solutions}\label{sec4:Exist}

\begin{prop}[Existence and Uniqueness of Jost Solutions]\label{prop4:exist}
	There is a $c_0 > 0$ so that for real valued measurable functions $u \in X$
	with $\| u \|_X < c_0$ and any $\lambda \in \mathbb R$, integral equations
	\eqref{eq4:JostIE} are uniquely solvable in $\inn{\dotarg} L^\infty(\mathbb R)$.
	If $\lambda \ne 0$ these solutions are essentially bounded
	(\textit{i.e.} $L^\infty$).
\end{prop}
\begin{proof}
	Consider the operators $T_{\star,\lambda, u}$ ($\star = L \text{, or } R$)
	given by
	\[
		\big(T_{\star,\lambda, u} f\big)(x)
			:= \int_{\mathbb R} G_\star^+(x-x'; \lambda) \, u(x') f(x') \, \mathrm{d}x'.
	\]
	Unless necessary to avoid confusion, we write $T_\star$ instead of
	$T_{\star,\lambda,u}$. The integral equations \eqref{eq4:JostIE} can be
	written in terms of $T_\star$ as
	\begin{subequations}
		\label{eq4:JostIET}
		\begin{align}
			\label{eq4:JostIETM}
			\begin{pmatrix}
				1 \\ e^{ix\lambda}
			\end{pmatrix}
			&=
				(I - T_L)
				\begin{pmatrix}
					M_1^+ \\
					M_e^+
				\end{pmatrix} \\
			\label{eq4:JostIETN}
			\begin{pmatrix}
				1 \\ e^{ix\lambda}
			\end{pmatrix}
			&=
				(I - T_R)
				\begin{pmatrix}
					N_1^+ \\
					N_e^+
				\end{pmatrix}
		\end{align}
	\end{subequations}

	As such, our task is to invert the operators $(I - T_\star)$ on the
	appropriate spaces, which we do \text{via} Neumann series. Indeed,
	Proposition \ref{prop2:Tbnd} implies that we may choose $c_0>0$ independently
	of $\lambda \in \mathbb R$ so that
	\begin{align}\label{eq4:Tbnd}
		\| T_\star \|_{\inn{\dotarg} L^\infty \toitself} < \frac{1}{2}
	\end{align}
	whenever $\| u\|_X < c_0$. Since the Jost solutions are the same as the
	solutions to \eqref{eq4:JostIET}, estimate \eqref{eq4:Tbnd} allows us to
	conclude that the Jost solutions exist and are unique for
	$u \in B_X(0, c_0) := \{ u\in X ~:~ \|u\|_X < c_0 \}$.

	Further, an analogous argument involving Proposition \ref{prop2:Tbndl}
	also allows us to conclude that the Jost solutions are essentially
	bounded for each fixed real $\lambda \ne 0$.
\end{proof}

\begin{lma}[Continuity in $u$]\label{lma4:cont}
	Let $c_0 > 0$ be the same as in Proposition \ref{prop4:exist}. Denote by
	$M_1(x; \lambda, u), \ldots, N_e(x; \lambda, u)$ the Jost solutions
	$M_1, \ldots, N_e$ corresponding to the potential $u$. Then the maps
	\begin{align*}
		u &\mapsto M_1^+(\dotarg; \lambda, u ), &
		u &\mapsto M_e^+(\dotarg; \lambda, u ), \\
		u &\mapsto N_1^+(\dotarg; \lambda, u ), &
		u &\mapsto N_e^+(\dotarg; \lambda, u ),
	\end{align*}
	from the open ball $B_X(0, c_0)$ into $\inn{\dotarg} L^\infty(\mathbb R)$ are
	Lipschitz continuous with Lipschitz constant uniform in
	$\lambda \in \mathbb R$.
\end{lma}
\begin{proof}
	We prove the Lipschitz continuity for the map $u \mapsto M_1^+$ and note
	that analogous arguments are sufficient to prove continuity for the
	remaining maps.

	By the second resolvent formula,
	\begin{align}\label{eq3:resolv}
		M_1^+(x; \lambda, u_1) - M_1^+(x; \lambda, u_2)
			&= \left[
					(1-T_{L, \lambda, u_1})^{-1} -  (1-T_{L,\lambda, u_2})^{-1}
				\right] 1 \\
			&= (1-T_{L, \lambda, u_1})^{-1} G_L^+(\dotarg; \lambda) *
				\big[(u_1 - u_2) \, M_1(\dotarg; \lambda, u_2) \big]
				\nonumber
	\end{align}
	Thus, we see from \eqref{eq3:Tbndxbrac} that
	\begin{align}
		&\big\|
			M_1^+(x; \lambda, u_1) - M_1^+(x; \lambda, u_2)
		\big\|_{\inn{\dotarg} L^\infty}
				\nonumber\\
		&\qquad\leq
			\big\|
				\left(1 - T_{L,\lambda,u_1}\right)^{-1}
			\big\|_{\inn{\dotarg} L^\infty\toitself}
			\left\|T_{L, \lambda,u_1-u_2}\right\|_{\inn{\dotarg} L^\infty\toitself}
			\|M_1(\dotarg; \lambda, u_2) \| \nonumber\\
		&\qquad\lesssim \|u_1 - u_2\|_X,
	\end{align}
	as
	\begin{align*}
		\big\|
			\left(1 - T_{L,\lambda,u_1}\right)^{-1}
		\big\|_{\inn{\dotarg} L^\infty\toitself}
			\leq \sum_{n\geq 0} \frac{1}{2^n} = 2
	\end{align*}
	by Neumann series expansion. For $\lambda \ne 0$, the estimate
	\begin{align*}
		\big\|M_1^+(x; \lambda, u_1) - M_1^+(x; \lambda, u_2)\big\|_{L^\infty}
			\lesssim \|u_1 - u_2\|_X
	\end{align*}
	also follows from \eqref{eq3:resolv}.
\end{proof}

\begin{prop}\label{prop4:uMcont}
	Let $c_0 > 0$ be the same as in Proposition \ref{prop4:exist}. Then
	the maps
	\begin{align*}
		u &\mapsto u\, M_1^+(\dotarg; \lambda, u ), &
		u &\mapsto u\, M_e^+(\dotarg; \lambda, u ), \\
		u &\mapsto u\, N_1^+(\dotarg; \lambda, u ), &
		u &\mapsto u\, N_e^+(\dotarg; \lambda, u ),
	\end{align*}
	from the open ball $B_X(0, c_0)$ into $L^{1,1}(\mathbb R)$ are
	Lipschitz continuous with Lipschitz constant uniform in
	$\lambda \in \mathbb R$.
\end{prop}
\begin{proof}
	As usual, we prove Proposition \ref{prop4:uMcont} for the map $u\mapsto u\, M_1^+$
	and note similar arguments prove that the remaining maps are Lipschitz.

	First note that $u\, M_1^+ \in L^{1,1}(\mathbb R)$ as
	\[
		\|u\, M_1^+\|_{L^{1,1}}
			= \big\|
					\left(\inn{\dotarg}^{-1} M_1^+\right) (\inn{\dotarg}^2 u)
				\big\|_{L^1}
			\leq \|M_1^+\|_{\inn{\dotarg}L^\infty} \|u\|_X.
	\]
	Choose any $u_1$, $u_2 \in B_X(0, c_0)$.
	Since the map
	$B_X(0, c_0) \ni u \mapsto M_1^+ \in \inn{\dotarg} L^\infty(\mathbb R)$
	is Lipschitz (uniformly in $\lambda$) by Lemma \ref{lma4:cont},
	\[
		\big\| M_1^+( \dotarg; \lambda, u_1) \big\|_{\inn{\dotarg}L^\infty}
			=
				\big\|
					M_1^+( \dotarg; \lambda, u_1) - 0
				\big\|_{\inn{\dotarg}L^\infty}
			\lesssim \|u_1 - 0\|_{X}
			< c_0
	\]
	where the implied constant is the Lipschitz constant for the map
	$u \mapsto M_1^+$. We then have
	\begin{align*}
		&\big\|
			u_1\, M_1(\cdot; \lambda, u_1) - u_2\, M_1(\cdot; \lambda, u_2)
		\big\|_{L^{1,1}} \\
		&\qquad=
			\int_{\mathbb R}
				\inn{x}
				\big|
					u_1(x) \, M_1^+( x; \lambda, u_1)
						- u_2(x) \, M_1^+( x; \lambda, u_1)
				\big|
			\, \mathrm{d}x \\
		&\qquad\quad+
			\int_{\mathbb R}
				\inn{x}
				\big|
					u_2(x) \, M_1^+( x; \lambda, u_1)
						- u_2(x) \,  M_1^+( x; \lambda, u_2)
				\big|
			\, \mathrm{d}x \\
		&\qquad\leq \int_{\mathbb R}
				\left(\inn{x}^{-1}\big|M_1^+( x; \lambda, u_1)\big|\right)
				\big( \inn{x}^2
				\big|
					u_1(x) - u_2(x)
				\big|
				\big)
			\, \mathrm{d}x \\
		&\qquad\quad+
			\int_{\mathbb R}
				\left(
					\inn{x}^{-1}
					\big|
						 M_1^+( x; \lambda, u_1)
							-  M_1^+( x; \lambda, u_2)
					\big|
				\right)
				\big( \inn{x}^2 u_2(x) \big)
			\, \mathrm{d}x \\
		&\qquad\leq
			\|M_1^+( \dotarg; \lambda, u_1) \|_{\inn{\dotarg} L^\infty}
			\left\|(u_1 - u_2)\inn{\dotarg}^2\right\|_{L^1} \\
		&\qquad\quad
			+ \left\|u_2\inn{\dotarg}^2\right\|_{L^1}
				\|
					M_1^+( \dotarg; \lambda, u_1)
					- M_1^+( \dotarg; \lambda, u_2)
				\|_{\inn{\dotarg} L^\infty} \\
		&\qquad\lesssim  \| u_1 - u_2 \|_X,
	\end{align*}
	where the implied constant is independent of $\lambda$ and $u$.
\end{proof}

\begin{rmk}
	Note that since $L^{1,1}(\mathbb R) \su L^1(\mathbb R)$, Proposition
	\ref{prop4:uMcont} also implies that the maps involved are also Lipschitz
	continuous, when considered as maps from $B_X(0, c_0)$ into $L^1(\mathbb R)$.
\end{rmk}

\begin{lma}\label{lma4:Mlamcont}
	For fixed $x\in \mathbb R$, the Jost solution boundary value $M_1^+$ is continuous
	in $\lambda$.
\end{lma}
\begin{proof}
	Define
	\[
		M_h:= M_1^+(\dotarg; \lambda +h) - M_1^+(\dotarg; \lambda),
 	\]
 	and denote by $T_\lambda$ the convolution operator given by
 	\[
 		T_\lambda f := G_L^+(\dotarg; \lambda) * (u\, f).
 	\]
 	To show $M_1^+$ is continuous in $\lambda$, it suffices to show
 	$\|M_h\|_{\inn{x}L_x^\infty} \to 0$ as $h \to 0$.
 	Recalling that $M(\lambda) = 1+ T_\lambda M(\lambda)$, we see that
 	\begin{align*}
 		M_h
 			&= T_{\lambda+h}M(\lambda+h) - T_{\lambda} M(\lambda) \\
 			&= \big(T_{\lambda+h} - T_\lambda\big) M(\lambda+h)
 				- T_\lambda M_h
 	\end{align*}
 	which implies that
 	\begin{align}
 		M_h
 			=
 				\big(1-T_{\lambda}\big)^{-1}
 				\big(T_{\lambda+h} - T_\lambda\big) M(\lambda+h),
 	\end{align}
 	as $I - T_\lambda$ is invertible on $\inn{\dotarg}L^\infty(\mathbb R)$.
 	Since
 	\[
 		\left\|
 			\big(T_{\lambda+h} - T_\lambda\big)M(\lambda+h)
 		\right\|_{\inn{x}L_x^\infty}
 			\leq \|T_{\lambda+h} - T_\lambda\|_{\inn{x}L_x^\infty\toitself}
 					\|M(\lambda+h)\|_{\inn{x}L_x^\infty},
 	\]
 	the $\lambda$-continuity of $T_\lambda$ follows from the continuity of
 	$\big(I - T_\lambda\big)^{-1}$ and Lemma \ref{prop2:Tlamcont}.
\end{proof}

\end{document}


\chapter{Methodology} \label{methodology}
\epigraphhead[30]{\epigraph{%
\textit{"As for almost every other application of mathematics to practical affairs, therefore, the analytical and numerical approaches are here complimentary rather than alternative."}}%
{\textsc{Derek F. Lawden (1919 - 2008)}}%
}

\section{Cases in study} \label{cases}

For this study we have considered a variety of low-thrust guidance laws that are available in the literature. Due to the scarcity of mathematically tractable examples in the field, we have focused our attention in the ideal case of fixed-acceleration maneuvers, which effectively take the variation of mass of the spacecraft out of consideration \cite{battin1999introduction}. Thanks to this assumption, the required time of flight for each maneuver will be:
% * <dmorante@ing.uc3m.es> 2017-02-28T21:54:20.980Z:
%
% > fixed-thrust maneuvers
% yo diría mejor constant acceleration (Esa aceleración puede contar con los efectos del thrust (que no tiene por qué ser constante, más perturbaciones))
%
% ^ <juanlu001@gmail.com> 2017-02-28T22:06:50.102Z:
%
% cierto, está mal escrito porque en realidad lo que es constante es la aceleración, no la fuerza
%
% ^ <juanlu001@gmail.com> 2017-02-28T22:07:27.365Z.

\[
t_f = \frac{\Delta V_{\text{total}}}{f}
\]

where $f$ is the specific thrust, or equivalently the magnitude of the perturbing acceleration.
% * <dmorante@ing.uc3m.es> 2017-02-28T21:51:47.430Z:
%
% > where $f$ is the specific thrust, or equivalently the magnitude of the perturbing acceleration.
% Habría que hacer una derivación más formal de esta ecuación
%
% ^.

On the other hand, and again to adhere ourselves to straightforward analytical solutions, we have selected those references that make no assumptions about the natural orbital perturbations and do not take into account real world phenomena like eclipses. However, \cite{kechichian1997reformulation} notes that it is useful to develop suboptimal solutions that are as realistic as possible while retaining the analytic nature, so we might consider them for a future work.

Lastly, for the implementation and discussion of results we chose the guidance laws that had accompanying numerical validation cases we could find in the literature. This is our final selection of guidance laws for low-thrust trajectories:

\begin{itemize}

\item Optimal transfer between circular coplanar orbits $a_0 \rightarrow a_f$ \cite{edelbaum1961propulsion,burt1967space}

\item Optimal transfer between circular inclined orbits $(a_0, i_0) \rightarrow (a_f, i_f), e = 0$ \cite{edelbaum1961propulsion,kechichian1997reformulation}

\item Quasi-optimal eccentricity-only change $e_0 \rightarrow e_f$ \cite{pollard1997simplified}

\item Simultaneous eccentricity and inclination change $(e_0, i_0) \rightarrow (e_f, i_f), a_0 = a_f$ \cite{pollard2000simplified}

\item Argument of periapsis adjustment $\omega_0 \rightarrow \omega_f$ \cite{pollard1998evaluation}

\end{itemize}

The assumptions for developing each of these guidance laws is explained in the corresponding section of this chapter.

\section{Equations of motion} \label{sec:motion}

To validate the analytical solutions provided by the guidance laws in study, we have compared the results of the computations with a numerical integration of the equations of motion. To accomplish that, we have performed a reduction of order on equation~\ref{eq:twobody}:
% * <dmorante@ing.uc3m.es> 2017-02-28T21:57:09.237Z:
%
% > To validate the analytical solutions provided by the guidance laws in study, we have compared the results of the computations with a numerical integration of the equations of motion. To accomplish that, we have performed a reduction of order on equation
% Habría que introducir formalmente que son x,y,z,vx,vy....
%
% ^ <juanlu001@gmail.com> 2017-02-28T22:08:32.533Z:
%
% ¿No se ve que son las componentes cartesianas de $\vec{r}$ y $\vec{v}$?
%
% ^.

\[
\vec{u} \longleftarrow \begin{pmatrix} \vec{r} \\ \vec{v} \end{pmatrix} = \begin{pmatrix} x \\ y \\ z \\ v_x \\ v_y \\ v_z \end{pmatrix}
\]

to arrive to a system of equations of the form:

\begin{equation}
\deriv{\vec{u}}{t} = \begin{pmatrix} \dot{\vec{r}} \\ \dot{\vec{v}} \end{pmatrix} = \begin{pmatrix} v_x \\ v_y \\ v_z \\ -\mu \frac{x}{r^3} + a_{dx} \\ -\mu \frac{y}{r^3} + a_{dy} \\ -\mu \frac{y}{r^3} + a_{dz} \end{pmatrix} = \vec{f}(t, \vec{u}, \mu, \vec{a}_d)
\end{equation}

where $\vec{a}_d = \vec{a}_d(t, \vec{u}, \mu)$ is the guidance law in study. In all the cases we have considered there is no explicit dependence with time, its presence being an implementation detail.

To finally integrate the equations of motion we have used a Runge-Kutta method of order 8(5,3) available in SciPy as \verb|dop853|\footnote{This method is also recommended for Orekit, see \url{https://www.orekit.org/site-orekit-8.0/apidocs/org/orekit/propagation/numerical/NumericalPropagator.html}}. This method is based on an 8(6) method by Dormand and Prince modified to use a 5th order error estimator with 3rd order correction \cite{hairer1993solving}. It is highly efficient, requiring fewer function evaluations for the same relative tolerance than other popular integrators, and provides a cheap numerical approximation of the solution between the integration points that can be used for plotting and event detection (dense output, see again \cite{hairer1993solving} for details)\footnote{Nonetheless, the dense output is not exposed to SciPy, see \url{https://github.com/scipy/scipy/blob/v0.18.1/scipy/integrate/dop.pyf}.}. Unless noted otherwise, we chose a maximum relative tolerance of $10^{-10}$.

The validation of each guidance law is always done in two steps: first the analytical results of the corresponding paper for time of flight $t_f$ and cost $\Delta V$ are confirmed, and then an integration of the equations of motion for a time $t_f$ is perform and the final orbital elements are compared to the expected ones.

\section{Planar maneuvers} \label{sec:metplanar}

Let us first focus on the planar maneuvers, those that only affect the semimajor axis $a$, eccentricity $e$ and argument of periapsis $\omega$ of the orbit. While some of them can be obtained as particular cases of more complicated guidance laws studied in \ref{sec:metnonplanar}, for the sake of simplicity and clarity of exposition we decided to consider them separately.
% * <dmorante@ing.uc3m.es> 2017-02-28T22:01:02.430Z:
%
% > planar maneuvers
% la fuerza de perturbación está contenida en el plano orbital( Estaría bien introducir en algún momento el plano orbital de manera formal)
%
% ^ <juanlu001@gmail.com> 2017-02-28T22:12:58.648Z:
%
% en la introducción cuando hablo del problema perturbado puedo introducir la órbita osculante
%
% ^.

\subsection{Semimajor axis change} \label{sec:metsma}

In this section we discuss several strategies to perform a transfer between two coplanar, near-circular orbits, and we select the tangential one among the other solutions for practical considerations.
% * <dmorante@ing.uc3m.es> 2017-02-28T22:02:57.465Z:
%
% >  for practical considerations
% ???? No me queda claro por qué esta es la razón. ¿Por qué es la forma más óptima?
%
% ^ <dmorante@ing.uc3m.es> 2017-02-28T22:07:44.009Z.

Burt studied the secular changes in the classical orbital elements originated by several thrust programs assuming that the perturbing forces are "sensibly constant over one orbital period" and also "small enough to produce a negligible variation" of each element during that period \cite{burt1967space}. For the semimajor axis in particular, and using results previously obtained by King-Hele, he considers two guidance laws: applying thrust in a direction that is within the orbital plane and perpendicular to the radius vector ($f_{\ta}$) and along the direction of the velocity ($f_T$). The increment of semimajor axis $a$ for each of them is:

\begin{align*}
\left. \secular{\deriv{a}{t}} \right|_{f_{\ta}} & = \frac{2 a^{3/2}}{\mu^{1/2}} \left( 1 - e_0^2 \left( \frac{a_0}{a} \right)^{3/2} \right)^{1/2} f_{\ta} \\
%
\left. \secular{\deriv{a}{t}} \right|_{f_T} & = \frac{2 a^{3/2}}{\mu^{1/2}} \left( 1 - \frac{1}{4} e_0^2 \frac{a_0}{a} + \bigO{e_0^4} \right) f_T
\end{align*}

While the indirect variation of eccentricity is:

\begin{align*}
\left. \frac{e}{e_0} \right|_{f_{\ta}} & = \left( \frac{a_0}{a} \right)^{3/4} \\
%
\left. \frac{e}{e_0} \right|_{f_T} & = \left( \frac{a_0}{a} \right)^{1/2} \left( 1 + \frac{3}{16} e_0^2 \left( 1 - \frac{a_0}{a} \right) + \bigO{e_0^4} \right) \\
\end{align*}

For $a_f < 4 a_0$ the secular increase in semimajor axis is greater for $f_T$, whereas for $a_f > 4 a_0$ the increase is greater for $f_{\ta}$ (see figure~\ref{fig:burtdiff} and \cite{burt1967space}). On the other hand, we notice that if we enlarge the orbit in both cases the eccentricity gets lower, and vice-versa. For eccentric orbits and large increases of semimajor axis, the reduction of eccentricity can be significant. For this reason, for $e > 0.843$ Burt suggests alternative strategies that only affect one orbital element.

\begin{figure}%[h]
  \centering
  \resizebox{0.8\textwidth}{!}
  {
  \input{figures/burt_difference.pgf}
  }
  \caption{Difference of $\frac{da}{dt}$ between tangential ($f_T$) and perpendicular ($f_2$) thrust.}
  \label{fig:burtdiff}
\end{figure}

In the absence of numerical example to validate these strategies, we opted to focus on the near-circular case, where the eccentricity will remain essentially the same when enlarging the orbit and the difference between tangential and perpendicular is negligible. This is the starting point of Edelbaum's original analysis, where he already noticed that the tangential program is not necessarily optimal, in agreement with the results of Burt. Quoting \cite{edelbaum1961propulsion}:
% * <dmorante@ing.uc3m.es> 2017-02-28T22:06:54.089Z:
%
% >  where the change in eccentricity is only beneficial
% WHY?
%
% ^ <juanlu001@gmail.com> 2017-02-28T22:10:37.585Z:
%
% aclarado
%
% ^ <juanlu001@gmail.com> 2017-02-28T22:10:56.080Z.

\begin{displayquote}
It is demonstrated in (17) [Lawden 1958, AN] that the optimum thrust direction for escape with low thrust is halfway between the tangent to the orbit and the normal to the radius vector. This result is also largely applicable to transfer between circular orbits. For the purposes of this report, the difference between this program and tangential thrust can be considered negligible.
\end{displayquote}

Kéchichian later reformulated Edelbaum's theory by changing the independent variable, arriving to an algorithm that is much easier to implement in a computer program \cite{kechichian1997reformulation}. The problem of coplanar circle-to-circle transfer is actually a particular case of the more general problem studied by these authors, which is explained in \ref{sec:metedelbaum}.

The required $\Delta V$ will be:

\[
\Delta V = \left| V_0 - V_f \right| = \left| \circvel{a_0} - \circvel{a_f} \right|
\]

and the required time of flight $t_f = \Delta V / f$ as explained at the beginning of the chapter. As we were unable to find satisfactory validation examples for this otherwise simple case, it will be treated jointly with the combined semimajor axis and inclination transfer.

\subsection{Eccentricity change} \label{sec:metecc}

Although Edelbaum already presented an optimal strategy for small changes of eccentricity, \cite{pollard1997simplified} suggests an alternative approach: consider four simplified, in-plane steering laws and compute the change of the orbital elements for each of them. The original control law from Edelbaum is $\tan{\alpha_{\text{opt}} = 1/2} \tan{\ta}$, where $\alpha$ is the angle between the velocity vector and the projection of the thrust onto the orbital plane, or pitch angle\footnote{Notice that this guidance law no longer fits into the assumptions used by Burt, since the components of the thrust are no longer constant over one orbital period.}. The required velocity increment would be \cite{edelbaum1961propulsion}:

\[
\Delta V_{\text{opt}} = \frac{\pi}{4 \operatorname{E} (3/4)} \circvel{a} \Delta e \simeq 0.649 \circvel{a} \Delta e
\]

where $\operatorname{E}$ is the complete elliptic integral of the second kind. Fortunately, the optimal steering law is very close to a fixed inertial direction in space, and hence applying thrust along a fixed direction perpendicular to the semimajor axis of the ellipse yields a required velocity increment only 3 \% higher \cite{pollard1997simplified}:

\[
\Delta V = \frac{2}{3} \circvel{a} \left| \arcsin{e_0} - \arcsin{e_f} \right| \simeq 0.667 \circvel{a} \Delta e
\]

The last approximate relation only holds for small eccentricities. The secular change of eccentricity in this case is:

\[
\left| \secular{\deriv{e}{t}} \right| = \frac{3}{2} f \sqrt{\frac{a}{\mu}} \sqrt{1 - e^2}
\]

Pollard also considered the possibility of discontinuous thrust, but we will not study it in this work.

\begin{figure}%[h]
  \centering
  \includegraphics[width=0.5\textwidth]{figures/fixed-perpendicular.png}
  \caption{Steering law perpendicular to the semimajor axis.}
  \label{fig:perpendicular}
\end{figure}

Using a geometrical reasoning, it is straightforward to see that the condition for applying thrust in a direction that is orthogonal to the semimajor axis of the orbit is $f_r = f \sin{\ta}$ and $f_{\ta} = f \cos{\ta}$. However, this approach can lead to numerical instabilities when the eccentricity is low and the semimajor axis itself is ill-defined. In our implementation we opted for fixing the thrust direction $\vec{a}_d = f \vec{\hat{p}}$ at the beginning of the integration: %using the initial position vector when $e < 0.001$.

\[ \vec{\hat{p}} = \begin{cases}
\vec{e} / e   & \text{if } e > 0.001 \\
\vec{r}_0 / r & \text{otherwise}
\end{cases}
\]

where $\vec{e}$ is the eccentricity vector.

To validate this guidance law we have employed an example found in \cite{ruggiero2011low} consisting in the disposal of a Sun-synchronous orbit by increasing its eccentricity, described in table~\ref{tab:sso}. Notice that some values are not explicitly written in the paper and we had to infer them from the results.

\begin{table}
\centering
\begin{tabular}{|l|l|}
\hline
\textbf{Attractor}            & Earth \\ \hline
\textbf{Specific thrust}            & $2.4 \cdot 10^{-7}$ km/s\textsuperscript{2}      \\ \hline
\textbf{Altitude}                   & $900$ km                                   \\ \hline
\textbf{Initial eccentricity $e_0$} & $0$                                        \\ \hline
\textbf{Final eccentricity $e_f$}   & $0.1245$ (reverse-engineered from results) \\ \hline
\textbf{Time of flight $t_f$}   & $29.697$ days (reverse-engineered from results) \\ \hline
\textbf{Cost $\Delta V$}   & $0.6158$ km/s \\ \hline
\end{tabular}
\caption{Disposal of a Sun-synchronous orbit from \cite{ruggiero2011low}.}
\label{tab:sso}
\end{table}

On the other hand, although it is not mentioned in the original paper, a change of sign is needed depending on the sign of $e_f - e_0$, so we tested the reverse case as well using the same data.

\subsection{Argument of periapsis adjustment}

According to \cite{pollard1998evaluation}, we can adjust the argument of periapsis $\omega$ while holding the semimajor axis $a$ and the eccentricity $e$ constant by applying thrust along a direction that is parallel to the semimajor axis of the orbit. The resulting secular rate of change of $\omega$ is:

\[
\secular{\deriv{\omega}{t}} = \mp \frac{3}{2} f \sqrt{\frac{a}{\mu}} \frac{\sqrt{1 - e^2}}{e} + \dot{\omega}
\]

where again we are not considering the possibility of discontinuous thrust and $\dot{\omega}$ is the natural apsidal rotation due to a the oblateness of the attractor. For the case of the Earth, this would be \cite{vallado2001fundamentals}:

\[
\dot{\omega} = \frac{3 n R_{\Earth}^2 J_2}{4 a^2 (1 - e^2)^2} (4 - 5 \sin^2 i)
\]

where $n$ is the mean motion and $J_2 = 1.08262668 \cdot 10^{-3}$ is the second degree harmonic. The required $\Delta V$ considering the apsidal rotation is:

\begin{equation}
\Delta V = \frac{\Delta \omega}{\frac{3}{2} \sign{(\Delta \omega)} \sqrt{\frac{a}{\mu}} \frac{\sqrt{1 - e^2}}{e} + \frac{\dot{\omega}}{f}}
\label{eq:dvargp}
\end{equation}

To validate this steering law we have taken another example from \cite{ruggiero2011low}, in this case the periapsis correction of a standard Soyuz geostationary transfer orbit (GTO) summarized in table~\ref{tab:gto}. The shape of the orbit has been taken from the Soyuz Users Manual, issue 2 revision 0.

The example of Ruggiero does not take into account the natural apsidal rotation, and so the question opens whether this is a sensible choice or not. Looking at the denominator of equation~\ref{eq:dvargp}, we are therefore interested in comparing $\dot{\omega} / f$ with the rest. Dimensional analysis yields:

\[
\frac{\frac{\dot{\omega}}{f}}{\frac{3}{2} \sign (\Delta \omega) \sqrt{\frac{a}{\mu}} \frac{\sqrt{1 - e^2}}{e}} \sim %
\frac{\frac{\dot{\omega}}{f}}{\frac{1}{V}} \sim %
V \frac{\dot{\omega}}{f} \sim %
\frac{\mu R_{\Earth}^2 J_2}{a^4 f} \approx \frac{1}{5}
\]

Notice that in this case $\sqrt{1 - e^2} \sim e$. The natural apsidal rotation is by no means negligible with respect to the action of the thrust, but we will accept not taking it into account in the absence of better numerical validation examples.

\begin{table}
\centering
\begin{tabular}{|l|l|}
\hline
\textbf{Attractor}            & Earth \\ \hline
\textbf{Specific thrust}            & $2.4 \cdot 10^{-7}$ km/s\textsuperscript{2}      \\ \hline
\textbf{Altitude of apoapsis $r_a - R_{\Earth}$} & $35950$ km \\ \hline
\textbf{Altitude of periapsis $r_p - R_{\Earth}$} & $250$ km \\ \hline
\textbf{Initial argument of periapsis $\omega_0$} & $178$ deg \\ \hline
\textbf{Argument of periapsis change $\Delta \omega_0$} & $5$ deg \\ \hline
\textbf{Time of flight $t_f$} & $12$ days (approximate) \\ \hline
\textbf{Cost $\Delta V$} & $0.2489$ km/s \\ \hline
\end{tabular}
\caption{Periapsis correction of a standard Soyuz geostationary transfer orbit from \cite{ruggiero2011low}.}
\label{tab:gto}
\end{table}

\section{Non planar maneuvers} \label{sec:metnonplanar}

We now study maneuvers that affect the orbital elements which define the plane of the orbit as well as the rest, specifically the inclination $i$. Although there are some guidance laws to modify $\Omega$ available in the literature (see \cite{kechichian2010analytic,pollard1997simplified}), we have not considered them in this work because, on the one hand, the $(a_0, \Omega_0) \rightarrow (a_f, \Omega_0), e = 0$ proposed by Kéchichian can be treated in the same way as the $(a_0, i_0) \rightarrow (a_f, i_0), e = 0$ studied in section~\ref{sec:metedelbaum} and, on the other hand, Pollard suggests that taking advantage of the natural nodal regression and its dependence on altitude is preferred.

The advantage of using combined maneuvers is evident when we consider the required increment of velocity for an inclination change of a circular orbit using an impulsive maneuver \cite{vallado2001fundamentals}:

\[
\Delta V = 2 V_0 \sin \frac{\Delta i}{2}
\]

For moderate values of $\Delta i$, the required $\Delta V$ can be of the same order of the velocity itself, which is usually in the range of tenths of kilometers per second for low Earth orbits. It is therefore an extremely expensive maneuver that is better performed at large distances of the attractor, where the velocity decreases. In the following sections we will therefore study two steering programs that combine a change in inclination with another orbital element.

\subsection{Combined semimajor axis and inclination change} \label{sec:metedelbaum}

Among other results, and as previously mentioned, \cite{edelbaum1961propulsion} presented an extremely interesting guidance law for a combined change of semimajor axis and inclination, which was later reformulated in \cite{kechichian1997reformulation} to simplify the algorithms involved and potential software implementations. We comment here the most salient part of the derivation.

The thrust is applied along the tangential and out of plane components, resulting $f_T = f \cos{\beta}$ and $f_h = f \sin{\beta}$ where $\beta$, called the thrust yaw angle, will be the control parameter. If $\beta$ is held constant during each revolution (hence piecewise constant) and we switch the sign at the orbital antinodes, the only orbital elements that will experiment secular variation will be $a$ and $i$. Averaging out the orbital position $\ta$ transforms $\beta$ in a continuous function of time, resulting in the following equations of motion:

\begin{align*}
\secular{\deriv{i}{t}} & = \frac{2 f \sin{\beta}}{\pi V} \\
\secular{\deriv{V}{t}} & = -f \cos{\beta}
\end{align*}

Here Kéchichian departs from Edelbaum and casts these equations as a minimum time transfer problem between initial and final $i$ and $V$. After applying techniques from the calculus of variations, he arrives to the control law

\[
\tan{\beta(t)} = \frac{V_0 \sin{\beta_0}}{V_0 \cos{\beta_0} - f \cdot t}
\]

in terms of time $t$ and the parameters of the problem, where

\[
\tan{\beta_0} = \frac{\sin{ \left( \frac{\pi}{2} \Delta i \right)}}{\frac{V_0}{V} - \cos{ \left( \frac{\pi}{2} \Delta i \right)}}
\]

Both quantities can be easily computed without ambiguity by using appropriate \verb|arctan2| routines. The time history of both the velocity and the relative inclination are also known:

\[
V = \sqrt{ V_0^2 - 2 V_0 f \cdot t \cos{\beta_0} + f^2 t^2 }
\]
\[
i - i_0 = \frac{2}{\pi} \left( \arctan{\left( \frac{f \cdot t - V_0 \cos{\beta_0}}{V_0 \sin{\beta_0}}\right)} + \frac{\pi}{2} - \beta_0 \right)
\]

As will be seen graphically in the next chapter, the orbit smoothly gets larger to reduce the velocity and perform most of the inclination change far away from the attractor and then shrinks back to the required final semimajor axis. We note that for $\Delta i = 2~\text{rad} = 114.59~\text{deg}$ both $\beta_0$ and $\beta$ become zero: this represents the limit case when the spacecraft reaches infinity and then the inclination change is performed at no cost. In this case, continuous thrust is no longer advantageous and a bitangent impulsive maneuver is preferred.

To validate this guidance law we used two LEO to GEO examples explained in great detail in \cite{kechichian1997reformulation} and summarized in table~\ref{tab:leogeo}.

\begin{table}[b]
\centering
\begin{tabular}{|l|l|}
\hline
\textbf{Attractor} & Earth \\ \hline
\textbf{Specific thrust} & $3.5 \cdot 10^{-7}$ km/s\textsuperscript{2} \\ \hline
\textbf{Initial semimajor axis $a_0$} & $7\,000$ km \\ \hline
\textbf{Final semimajor axis $a_f$} & $42\,166$ km \\ \hline
\textbf{Initial inclination $i_0$} & $28.5$ deg and $90$ deg \\ \hline
\textbf{Final inclination $i_f$} & $0$ deg \\ \hline
\textbf{Time of flight $t_f$} & $191.26295$ days and $335$ days \\ \hline
\textbf{Cost $\Delta V$} & $5.78378$ km/s and $10.13$ km/s \\ \hline
\end{tabular}
\caption{LEO to GEO transfers from \cite{kechichian1997reformulation}.}
\label{tab:leogeo}
\end{table}

\subsection{Combined eccentricity and inclination change}

Following previous works in the topic, \cite{pollard2000simplified} presented several continuous thrust strategies, in particular a control law for a combined eccentricity and inclination change. Instead of deriving an optimal steering program, Pollard studies how applying an in-plane acceleration perpendicular to the semimajor axis of the orbit with the intent of changing the eccentricity affects in turn the inclination, and adjusts the yaw angle so the final eccentricity and inclination requirements are met at the same time. In this case, the secular variation of eccentricity will be

\begin{table}[b]
\centering
\begin{tabular}{|l|c|c|c|c|c|}
\hline
                                    & Case 1   & Case 2   & Case 3   & Case 4        & Case 5        \\ \hline
\textbf{Attractor}                  & \multicolumn{5}{c|}{Earth}                                     \\ \hline
\textbf{Specific thrust}            & \multicolumn{5}{c|}{$2.4 \cdot 10^{-7}$ km/s2}                 \\ \hline
\textbf{Semimajor axis $a$}         & \multicolumn{5}{c|}{$42\,164$ km}                              \\ \hline
\textbf{Initial eccentricity $e_0$} & $0.1$    & $0.2$    & $0.4$    & $0.6$         & $0.8$         \\ \hline
%\textbf{Final eccentricity $e_f$}   & \multicolumn{5}{c|}{$0$}                                       \\ \hline
%\textbf{Initial inclination $i_0$}  & \multicolumn{5}{c|}{$0$ deg}                                   \\ \hline
\textbf{Final inclination $i_f$}    & \multicolumn{3}{c|}{$20$ deg}  & \multicolumn{2}{c|}{$16$ deg} \\ \hline
\textbf{Yaw angle $\beta$ (deg)}    & $83.043$ & $76.087$ & $61.522$ & $40$          & $16.304$      \\ \hline
\textbf{Cost $\Delta V$ (km/s)}     & $1.6789$ & $1.6890$ & $1.7592$ & $1.7241$      & $1.9799$      \\ \hline
\end{tabular}
\caption{Cases extracted from \cite{pollard2000simplified}.}
\label{tab:geoinc}
\end{table}

\[
\left| \secular{\deriv{e}{t}} \right| = \frac{3}{2} f \cos{\left| \beta \right|} \sqrt{\frac{a}{\mu}} \sqrt{1 - e^2}
\]

where $\beta$ is again the yaw angle. Notice that setting $\beta = 0$ recovers the case studied in section~\ref{sec:metecc}. Under the assumption that the sign of the yaw angle reverses at minor axis crossings, the secular rate of change of the inclination will be

\[
\left| \secular{\deriv{i}{t}} \right| = \frac{f \sin{\left| \beta \right|}}{\pi} \sqrt{\frac{a}{\mu}} \left| \cos{\omega} \right| \frac{2 (1 + e^2)}{\sqrt{1 - e^2}}
\]

Note that the inclination change will be more efficient when $\left| \cos{\omega} \right|$ approaches 1, that is, $\omega \approx 0~\text{deg}$ or $\omega \approx 180~\text{deg}$. Dividing these two rates of change and integrating assuming $\omega$ constant yields the control law \cite{pollard2000simplified}:

\[
\tan{\left| \beta \right|} = \left| \frac{3 \pi (i_f - i_0)}{4 \cos{\omega} \left( \log{\left(\frac{e_f + 1}{e_0 + 1} \frac{e_0 - 1}{e_f - 1}\right)} - e_f + e_0 \right)} \right|
\]

The required $\Delta V$ for this case will be:

\[
\Delta V = \frac{2}{3} \circvel{a} \frac{\left| \arcsin{e_0} - \arcsin{e_f} \right|}{\cos{\left| \beta \right|}}
\]

Since no numerical validation cases are explicitly given for this guidance law, we have extracted five data points from the plots of the original paper using an online software\footnote{\url{http://arohatgi.info/WebPlotDigitizer/app/}}. All five have been used for the analytical validation and only one (and its reverse) for the numerical validation. The cases are summarized in table~\ref{tab:geoinc}.


\input{./econtexRoot}\documentclass[../RiskyContrib.tex]{subfiles}
\input{\econtexRoot/\ApndxDir/onlyinsubfile.tex}\begin{document}

\section{First order conditions and value-function derivatives}

The computational solution of the model uses the stage-problems'
first-order conditions extensively. This appendix writes the
first-order conditions and the value-function derivatives that
appear in them explicitly.

\subsubsection{Consumption stage, $\Cns$}

The first order condition for an interior solution ($c < \tilde{m}$)
of the consumption stage problem (Equation \ref{eq:bellman_cns}) is
\begin{equation*}
\begin{split}
u'(c_t) = p_{t+1} &\beta R \delta_{t+1} E_t \left[ \tilde{\Gamma}_{t+1}^{-\rho} \pd{v^{\Reb}_{t+1}}{\tilde{m}_{t+1}}\right] +\\
\left(1-p_{t+1}\right) &\beta R \delta_{t+1} E_t\left[\tilde{\Gamma}_{t+1}^{-\rho} \pd{v^{\Cns}_{t+1}}{\tilde{m}_{t+1}} \right]
\end{split}
\end{equation*}

The derivatives of the stage value function are
\begin{equation}
\begin{split}
\pd{v^{\Cns}_{t}\left(m_{t},
n_{t}, \Contr_{t+1}\right)}{\tilde{m}_t} = u'(c_t)
\end{split}
\end{equation}

\begin{equation}
\begin{split}
\pd{v^{\Cns}_{t}\left(m_{t},
n_{t}, \Contr_{t+1}\right)}{\tilde{n}_t} = p_{t+1} &\beta \delta_{t+1} E_t \left[ \tilde{R}_{t+1}\tilde{\Gamma}_{t+1}^{-\rho} \pd{v^{\Reb}_{t+1}}{\tilde{m}_{t+1}}\right] +\\
\left(1-p_{t+1}\right) &\beta \delta_{t+1} E_t\left[\tilde{R}_{t+1} \tilde{\Gamma}_{t+1}^{-\rho} \pd{v^{\Cns}_{t+1}}{\tilde{m}_{t+1}} \right]
\end{split}
\end{equation}

\begin{equation}
\begin{split}
\pd{v^{\Cns}_{t+1}\left(m_{t},
n_{t}, \Contr_{t+1}\right)}{\Contr_{t+1}} = p_{t+1} &\beta \delta_{t+1} E_t \left[\tilde{\Gamma}_{t+1}^{1-\rho} \theta_{t+1} \left(\pd{v^{\Reb}_{t+1}}{\tilde{n}_{t+1}} - \pd{v^{\Reb}_{t+1}}{\tilde{m}_{t+1}}\right)\right] +\\
\left(1-p_{t+1}\right) &\beta \delta_{t+1} E_t\left[\tilde{\Gamma}_{t+1}^{1-\rho} \theta_{t+1} \left( \pd{v^{\Cns}_{t+1}}{\tilde{n}_{t+1}} - \pd{v^{\Cns}_{t+1}}{\tilde{m}_{t+1}} \right) + \tilde{\Gamma}_{t+1}^{1-\rho} \pd{v^{\Cns}_{t+1}}{\Contr_{t+2}}\right]
\end{split}
\end{equation}

\subsubsection{Income contribution share stage, $\Sha$}

The first order condition for an interior solution ($\Contr\in(0,1)$) of the
income contribution share stage (Equation \ref{eq:bellman_sha}) is
\begin{equation}
0 = \pd{v_t^{\Cns}}{\Contr_{t+1}},
\end{equation}
and the derivatives of the stage value function are
\begin{equation*}
\pd{v^{\Sha}_t(\tilde{m}_t, \tilde{n}_t)}{\tilde{m}_t} = \pd{v^{\Cns}_t}{\tilde{m}_t},
\qquad
\pd{v^{\Sha}_t(\tilde{m}_t, \tilde{n}_t)}{\tilde{n}_t} = \pd{v^{\Cns}_t}{\tilde{n}_t}
\end{equation*}

\subsubsection{Rebalancing stage, $\Reb$}

The first order condition for a solution of the type
$d\in\left[\left(-n,0\right)\cup\left(0,m\right)\right]$the rebalancing stage
problem (Equation \ref{eq:bellman_reb}) is
\begin{equation}
\left(1-1_{[d_t\leq0]}\tau\right)\pd{v_t^{\Sha}}{\tilde{m}} = \pd{v_t^{\Sha}}{\tilde{n}},
\end{equation}
and a necessary condition for a solution of the type $d=0$ is
\begin{equation}
\left(1-\tau\right)\pd{v_t^{\Sha}}{\tilde{m}} \leq \pd{v_t^{\Sha}}{\tilde{n}} \leq \pd{v_t^{\Sha}}{\tilde{m}}
\end{equation}

The derivatives of the stage value function are
\begin{equation}
\pd{v_t^{\Reb}(m_t,n_t)}{m_t} = \max \left\{ \pd{v_t^{\Sha}}{\tilde{m}}, \pd{v_t^{\Sha}}{\tilde{n}}  \right\}
\end{equation}
\begin{equation}
\pd{v_t^{\Reb}(m_t,n_t)}{n_t} = \max \left\{ (1-\tau) \pd{v_t^{\Sha}}{\tilde{m}}, \pd{v_t^{\Sha}}{\tilde{n}}  \right\}
\end{equation}

\end{document}