Although some properties of the simple waves have been emphasized in section \ref{sec:stress_paths}, the complexity of the equations prevents the complete characterization of the loading paths followed.
In order to get additional information about the evolution of the stress states, the systems of ODEs gathered in table \ref{tab:simpleWavesEquations} are here numerically integrated for plane stress and plane strain loadings.
Only linear isotropic hardening is considered by setting $R(p)=C p$ so that $R'=C$, with $C$ the hardening modulus.
Then, the thin-walled tube problem considered by \textsc{Clifton} \cite{Clifton} is first looked at so that the above developments can be validated.
Next, the plane stress and plane strain cases are treated.
The values of the elastic and plastic properties considered are summarized in table \ref{tab:material}.
\begin{table}[h!]
  \centering
  \input{tabular/material}
  \caption{Values of the elastic and plastic parameters.}
  \label{tab:material}
\end{table}

For the following analysis, it is convenient to introduce two quantities that account for the evolution of the speeds of plastic waves:
\begin{equation}
  \label{eq:xif_xis}
  \xi_f = \frac{c_f-c_2}{c_1-c_2}  \quad ;\quad \xi_s = \frac{c_s}{c_2}
\end{equation}
Given the intervals $c_1 \geq c_f \geq c_2$ and $c_2 \geq c_s > 0$, it is seen that $\xi_f \in \[0,1\]$ and $\xi_s \in \left]\: 0,1\right]$.

\subsection{The thin-walled tube problem}
\label{sec:num_thin-walled}
%% Hypothèses du problème
Consider the semi-infinite domain in the Cartesian coordinate system: $(x_1, x_2, x_3) \in [0,\infty[ \times [-h,h] \times [-e,e]$, being acted upon by a traction vector $\vect{T}^d$ at $x_1=0 $ and free surfaces $x_2=\pm h$ and $x_3=\pm e$.
Only the first two components of $\vect{T}^d$ are non-null so that the stress and strain tensors within the medium are of the form:
\begin{equation}
  \tens{\sigma} = \matrice{\sigma_{11} & \sigma_{12} & 0\\  & 0 & 0\\sym & & 0} \quad ;\quad\tens{\eps} = \matrice{\eps_{11} & \eps_{12} &0 \\  & \eps_{22}&0 \\sym & & \eps_{33}}
\end{equation}
By using the following mapping of coordinates: $(1,2,3) \mapsto (z,\theta,r)$, such a state also corresponds to that
%of the thin-walled cylinder studied by \textsc{Clifton} \cite{Clifton}.
holding in a hollow cylinder with radius and length much bigger than its thickness, submitted to combined longitudinal and torsional loads.
% Hence the name thin-walled tube problem.
As a particular plane stress case, the set of ODEs along characteristics derived in section \ref{sec:stress_paths} applies by taking into account the vanishing stress component $\sigma_{22}$:
\begin{align*}
  & \dot{\sigma}_{22}=\widetilde{C}^{ep}_{22ij} \dot{\eps}_{ij} =0 \quad i,j=\{1,2\} \\
  \Rightarrow  \quad  &\widetilde{C}^{ep}_{2222} \dot{\eps}_{22} = - \widetilde{C}^{ep}_{22ij}\dot{\eps}_{ij} \quad ij=\{11,12,21\}
\end{align*}
where $\widetilde{\Cbb}^{ep}$ is the plane stress tangent modulus already used and based on the property $\eps_{13}=\eps_{23}=0$.
Thus, inverting the above equation and introducing it in the constitutive equation, we are left with the following law:
\begin{equation}
  \label{eq:TW_tangent}
  \begin{aligned}
    & \dot{\sigma}_{ij}=\widetilde{C}^{ep}_{ijkl} \dot{\eps}_{kl} - \frac{\widetilde{C}^{ep}_{ij22}\widetilde{C}^{ep}_{22kl}}{\widetilde{C}^{ep}_{2222}}\dot{\eps}_{kl}= \widehat{C}^{ep}_{ijkl} \dot{\eps}_{kl}\\
    & \text{for }\:ij,kl=\{11,12,21\}
  \end{aligned}
  %\dot{\sigma}_{ij}=\widetilde{C}^{ep}_{ijkl} \dot{\eps}_{kl} - \frac{\widetilde{C}^{ep}_{ij22}\widetilde{C}^{ep}_{22kl}}{\widetilde{C}^{ep}_{2222}}\dot{\eps}_{kl}= \widehat{C}^{ep}_{ijkl} \dot{\eps}_{kl}\quad ij,kl=\{11,12,21\}
\end{equation}
%with $\widetilde{\Cbb}^{ep}$ is referred to as the thin-walled tube tangent modulus.
The characteristic analysis of the hyperbolic system based on this tangent modulus also leads to loading paths followed across slow and fast waves, involving however two components of stress rather than three.
For the sake of simplicity, the stress components are denoted by $\sigma_{11}=\sigma$ and $\sigma_{12}=\tau$.

Thus, the ODEs governing the evolution of stress components inside the waves of combined-stress read:
\begin{equation}
  \label{eq:tw_paths}
  d\sigma = \psi^{s,f} d\tau
\end{equation}
where the loading functions $\psi^{s,f}$ depend on the components of the acoustic tensor that corresponds to the tangent modulus \eqref{eq:TW_tangent}.
Equations \eqref{eq:tw_paths} as well as those of \textsc{Clifton} \cite{Clifton} have been numerically integrated, starting from several arbitrary points lying on the initial yield surface.
Since the loading functions are odd functions of $\sigma$ and $\tau$ \cite{Clifton}, $\tau(\sigma)$ and $\sigma(\tau)$ are even functions and hence, the loading paths exhibit symmetries with respect to $\tau$ and $\sigma$ axes.
Therefore, the study is restricted to the quarter-plane ($\sigma>0,\tau>0$).

Figure \ref{fig:fast_clifton} shows one stress path resulting from the integration of the ODE related to right-going fast waves with $\sigma$ used as a driving parameter.
The initial stress state lies on the yield surface at $\sigma=0$ and the ODE is discretized by means of the backward Euler method, the integration being performed until the stress reaches the value $\sigma=\sigma^y $.
\begin{figure}[h!]
  \centering
  \subcaptionbox{Stress path in $(\sigma,\tau)$ plane \label{subfig:tw_fast_stress}}{\input{pgfFigures/thinwalledStress_fast}} \qquad
  \subcaptionbox{Stress path in deviatoric plane\label{subfig:tw_fast_dev}}{\input{pgfFigures/thinwalledDev_fast}}
  \caption{Stress path followed in a fast simple wave for the thin-walled tube problem. Comparison between the results obtained from equations \eqref{eq:tw_paths} and these of \cite{Clifton}.}
  \label{fig:fast_clifton}
\end{figure}
The path is depicted in the stress space and in the deviatoric plane in figures \ref{subfig:tw_fast_stress} and \ref{subfig:tw_fast_dev} respectively.
The deviatoric plane projection is obtained by drawing the paths in the eigenstress space $(\sigma_1,\sigma_2,\sigma_3)$ and projecting them onto the plane perpendicular to the hydrostatic axis $\sigma_1=\sigma_2=\sigma_3$.
In this plane, the von-Mises yield surface is a circle drawn with dashed lines.
%Furthermore, the direction of the path is given by the arrows in figure \ref{sec:stress_paths}.
As observed by \textsc{Clifton}, the path inside fast waves first follows the initial yield surface up to the intersection with the $\sigma$-axis.
Then, the loading path is such that $d\tau=0$ while $\sigma$ increases as far as hyperbolicity holds, that is for $c_f > c_2 = \sqrt{\mu/\rho} $ \cite{Clifton}.
Notice that these conclusions are similar to those made in the previous section.
The ODEs derived in section \ref{sec:stress_paths} for plane stress, once adapted to the thin walled-tube problem, then yield the solution originally proposed by \textsc{Clifton}.

Adopting the same approach with $\tau$ as driving parameter, some stress paths through slow waves have been reported in figure \ref{fig:tw_slow}.
Since fast waves lead to loading paths following the initial yield surface, the orthogonality property of the loading functions implies that those of slow waves move away from it perpendicularly.
This is seen in figure \ref{subfig:tw_slow_stress}.
However, this property holds in the $(\sigma,\tau)$ plane but not in the deviatoric plane, as can be seen in figure \ref{subfig:tw_slow_dev}, since the quasi-linear form \eqref{eq:quasilinear_normal} and in turn, the ODEs, are not written in terms of $s_1,s_2,s_3$.
As a result, although the loading paths in the deviatoric plane move away from the initial yield surface, those curves are not radial.
Generally speaking, these results also show that the equations derived in the present paper are in excellent agreement with the works of \textsc{Clifton}.
\begin{figure}[h!]
  \centering
  \subcaptionbox{Stress path in $(\sigma,\tau)$ plane \label{subfig:tw_slow_stress}}{\input{pgfFigures/thinwalledStress}} \qquad
  \subcaptionbox{Stress path in deviatoric plane \label{subfig:tw_slow_dev}}{\input{pgfFigures/thinwalledDev}}
  % \caption{Stress paths followed in a slow simple wave for the thin-walled tube problem. Comparison between the results obtained from equations \eqref{eq:tw_paths} (cross markers) and those of \cite{Clifton} (solid lines).} $
  \caption{Loading paths in a slow wave for the thin-walled tube problem. Comparison between the results obtained from equations \eqref{eq:tw_paths} (cross markers) and those of \cite{Clifton} (solid lines).}
  \label{fig:tw_slow}
\end{figure}

\subsection{Plane stress}
\label{sec:num_plane_stress}
% Commentaires sur les plans de tracé: pour les invariant de sigma, en cont.plane, il est nul a cause de sigma33, en def.plane pour une onde slow, on a l'impression qu'il tend vers 0 (ce qui pourrait expliquer la singularite numerique). Pour l'onde fast on n'a pas grand chose a dire
% triaxialite: def.plane onde fast, eta -> infini donc compression pure, ce qu'on voit dans le plan du deviateur; onde slow eta -> 0 donc cisaillement pur. Pour les cont.planes onde slow: eta change brutalement quand le cisaillement max est atteint et semble tendre vers 0
We now move on to a more general plane stress case for which the stress component $\sigma_{22} $ is not zero.
Although the equations of section \ref{sec:stress_paths} have been derived for two directions of propagation, attention is paid here to $\vect{n}=\vect{e}_1$ only.
Thus, the system of ODEs considered reads (see table \ref{tab:simpleWavesEquations}):
%$
\begin{equation}
  \label{eq:plane_stress_paths}
  \begin{aligned}
    & d\sigma_{11} = \psi_1^{s,f} d\sigma_{12} \\
    & d\sigma_{22}= -\frac{\psi^{s,f}_{1}\alpha_{11}+\alpha_{12}}{\alpha_{22}}d\sigma_{12}
  \end{aligned}
\end{equation}
Since the plastic simple waves arise once the plastic threshold has been reached, elastic pressure and shear discontinuities must be considered to bring the stress state on the initial yield surface.
As written in table \ref{tab:elasticityEquations}, elastic shear waves have an influence on the shear component $\sigma_{12}$ only while elastic pressure waves carry jump discontinuities $\llbracket  \sigma_{11} \rrbracket$ and $\llbracket \sigma_{22} \rrbracket$ satisfying:
\begin{equation}
  \label{eq:CP_stress_relation}
  \llbracket  \sigma_{22} \rrbracket = \frac{\lambda}{2(\lambda+\mu)} \llbracket \sigma_{11} \rrbracket
\end{equation}
Furthermore, the yield function \eqref{eq:von-Mises_yield} can be written for plane stress as:
\begin{equation}
  \label{eq:yield_plane_stress}
  \sqrt{3\sigma_{12}^2 + (\sigma_{11}^2 + \sigma_{22}^2 - \sigma_{11}\sigma_{22})} -(\sigma^y + C\: p) = 0
\end{equation}
Then, inverting the above equation allows expressing $\sigma_{12}$ as a function of the other components on the boundary of the elastic convex:
\begin{equation}
  \label{eq:sig12_plane_stress}
  \sigma_{12} = \pm \sqrt{\frac{1}{3}} \sqrt{ (\sigma^y + C\: p)^2 - \( \sigma_{11}^2 + \sigma_{22}^2 - \sigma_{11}\sigma_{22} \)   }
\end{equation}
Thus, combining the conditions \eqref{eq:CP_stress_relation} and \eqref{eq:sig12_plane_stress}, one can define stress states lying on the initial yield surface by only setting $\sigma_{11}$.
The initial values set for $\sigma_{11}$, and hence these of $\sigma_{22}$, form in what follows a symmetrical set with respect to zero.
From such states, the ODEs \eqref{eq:plane_stress_paths} are implicitly integrated with $\sigma_{12}$ used as a driving parameter and by restricting ourselves to the semi-space $\sigma_{12}>0$ for the initial conditions.

\subsubsection{Fast waves}
\label{sec:fast-waves}

Following the above approach, the equations holding inside fast waves are first integrated until $\sigma_{12}$ vanishes.
The resulting loading paths are depicted in figure \ref{fig:CP_fast_stress} in the $(\sigma_{11},\sigma_{12})$ and $(\sigma_{22},\sigma_{12})$ planes, and in the deviatoric plane in figure \ref{fig:CP_fast_dev}.
Note that the curves are numbered so as to facilitate the mapping between the three different planes and the initial yield surface is depicted in dashed line in figure \ref{fig:CP_fast_dev}.
\begin{figure}[h!]
  \centering
  % \subcaptionbox{ Projection in the ($\sigma_{11},\sigma_{12}$) plane \label{subfig:CP_fast_stress1}}{\input{pgfFigures/CPfastWaves0_1.tex}}
  % \subcaptionbox{ Projection in the ($\sigma_{22},\sigma_{12}$) plane \label{subfig:CP_fast_stress2}}{\input{pgfFigures/CPfastWaves0_2.tex}}
  {\phantomsubcaption \label{subfig:CP_fast_stress1} }
  {\phantomsubcaption \label{subfig:CP_fast_stress2} }
  \input{pgfFigures/CPfastWaves}
  \caption{Loading paths in a fast simple wave under plane stress conditions in the stress planes $(\sigma_{11},\sigma_{12})$ and $(\sigma_{22},\sigma_{12})$.}
  \label{fig:CP_fast_stress}
\end{figure}
\begin{figure}[h!]
  \centering
  \input{pgfFigures/CPfastWaves_deviator0.tex}
  \caption{Loading path in a fast simple wave under plane stress conditions in the deviatoric plane.}
  \label{fig:CP_fast_dev}
\end{figure}
%The initial yield surface is also depicted in dashed line in figures \ref{subfig:CP_fast_stress1} and \ref{fig:CP_fast_dev}.
The evolution of the characteristic speed associated with the fast wave along the path can also be seen in the figures by means of a color gradient on the variable $\xi_f$.
Thus, for the loadings under consideration, the wave celerity is a decreasing function of the stress so that the simple wave solutions are valid.

First, the negative and positive initial values allow highlighting that $\sigma_{12}$ is an even function of $\sigma_{11}$ and $\sigma_{22}$, though it is not shown mathematically.
Indeed, a symmetry with respect to the $\sigma_{12}$-axis can be observed in both $(\sigma_{11},\sigma_{12})$ and $(\sigma_{22},\sigma_{12})$ planes.
On the other hand, the symmetry property is also seen in the deviatoric plane in figure \ref{fig:CP_fast_dev} in which positive (\textit{resp. negative}) initial values yield clockwise (\textit{resp. counterclockwise}) loading paths.
% \review{
%   Notice that this response, which is expected for neutral waves, is observed even though $\xi_f>0$.
%   It then appears that neutral waves are not the only solutions for which $\drond{f}{\tens{\sigma}}:\tens{\sigma}'=0$.
%   %
% }
In addition, as for the thin-walled tube problem, the stress curves follow the initial yield surface up to a direction of pure shear in the deviatoric plane.
% At that point, the aforementioned singular point is reached.
% It must be emphasized that the presented results are very similar to those of the thin-walled cylinder in spite of the additional stress component involved under plane stress.
At that point, the speed of elastic shear waves $c_2$ is achieved since $\xi_f=0$.
Therefore, it seems that all the loading paths followed in a fast wave aim at reaching a direction of pure shear in the deviatoric plane and cannot be extended further.

\subsubsection{Slow waves}
We now focus on the stress evolution inside slow waves.
The same procedure is followed for several starting points on the initial yield surface by increasing $\sigma_{12}$.
The loading paths thus obtained are depicted in figures \ref{fig:CP_slow_stress1} and \ref{fig:CP_slow_dev1}, for which projections in the stress space and the deviatoric plane are shown respectively.
\begin{figure}[h!]
  \centering
  {\phantomsubcaption \label{subfig:CP_slow_stress11} }
  {\phantomsubcaption \label{subfig:CP_slow_stress12} }
  \input{pgfFigures/CPslowWaves}
  \caption{Loading paths in a slow simple wave under plane stress conditions in the stress planes $(\sigma_{11},\sigma_{12})$ and $(\sigma_{22},\sigma_{12})$ for several starting points lying on the initial yield surface.}
  \label{fig:CP_slow_stress1}
\end{figure}
The evolution of $\xi_s$ along the paths in the stress space can also be seen by means of a color gradient.
Once again, the simple wave solution appears to be valid with the considered loading conditions.
Moreover, no neutral waves are considered since $\xi_s<1$.

\begin{figure}[h!]
  \centering
  \input{pgfFigures/CPslowWaves_deviator1.tex}
  \caption{Loading paths in a slow simple wave under plane stress conditions in the deviatoric plane for several starting points lying on the initial yield surface.}
  \label{fig:CP_slow_dev1}
\end{figure}

First, generally speaking, the same symmetry properties of the loading paths as for the fast waves can be seen in the figures.
Second, while the projections of the curves in the $(\sigma_{11},\sigma_{12})$ plane can be pretty well approximated with straight lines, it is not the case in the $(\sigma_{22},\sigma_{12})$ plane.
Indeed, in the latter case, the variations first mainly concern $\sigma_{22}$ and next, the slopes of the curves roughly change so that the paths are almost vertical.
On the other hand, the projections in the deviatoric plane in figure \ref{fig:CP_slow_dev1} show that the paths start turning around the initial yield surface up to some points where the direction changes.
Once the flow direction has changed, the stress state continues moving away from the initial yield surface without following a radial direction.
These solutions are much more complex than those of the thin-walled cylinder problem.

Although the slope breaks are not identified by looking at the mathematical properties of the loading function $\psi^s_1$, one can show numerically that the inflections occur for each path once the condition $\sigma_{11}=2\sigma_{22}$ is achieved.
As a matter of fact, this condition results from the vanishing partial derivative of equation \eqref{eq:sig12_plane_stress} with respect to $\sigma_{22}$:
\begin{equation}
  \label{eq:sing_CP}
  \drond{\sigma_{12}}{\sigma_{22}} =  \pm\frac{2\sigma_{22} - \sigma_{11}}{6 \sigma_{12}} =0
\end{equation}
Considering one slice $\sigma_{11}=constant$ in the stress space, the condition \eqref{eq:sing_CP} corresponds to the extremum values taken by $\sigma_{12}$ along the current yield surface.
For the von-Mises function, such slices in the  $(\sigma_{22},\sigma_{12})$ plane are ellipses whose vertices satisfy the condition \eqref{eq:sing_CP}.
\begin{figure}[h!]
  \centering
  \input{pgfFigures/yieldSurfaceSingularity}
  \caption{Loading paths through slow waves under plane stress conditions along with the \textit{maximum-shear-stress} line in the stress space.}
  \label{fig:CP_slow_sing_yield}
\end{figure}
Figure \ref{fig:CP_slow_sing_yield} shows the initial yield surface in the stress space as well as the set of points satisfying the condition \eqref{eq:sing_CP}, which is referred to as the \textit{maximum-shear-stress} line.
The loading paths studied above are also reported in the figure in such a way that it can be seen that all the integral curves aim at reaching the \textit{maximum-shear-stress} line.
It is worth noticing that the paths are not restricted to the initial yield surface in the case of slow waves so that the corresponding curves do not intersect the black line in figure \ref{fig:CP_slow_sing_yield}.
However, since the isotropic hardening has only homothetic effects on the yield surface, the \textit{maximum-shear-stress} line moves in the direction of increasing $\sigma_{12}$ with the plastic flow, and then seems to intersect the loading paths.
In order to confirm these observations, the above discussion is supplemented with other results depicted in figure \ref{fig:CP_slow_sing}.

%The previous discussion is illustrated in figure \ref{fig:CP_slow_sing}.
\begin{figure}[h!]
  \centering
  {\phantomsubcaption \label{subfig:CP_slow_singStress} }
  {\phantomsubcaption \label{subfig:CP_slow_singDev} }
  \input{pgfFigures/CPslowWavesSingularity}
  \caption{Evolution of the ratio $\frac{2\sigma_{22}}{\sigma_{11}}$ along slow wave loading paths.}
  \label{fig:CP_slow_sing}
\end{figure}
First, the ratio $\frac{2\sigma_{22}}{\sigma_{11}}$ is plotted versus the Cauchy stress component $\sigma_{22}$ along the loading paths in figure \ref{subfig:CP_slow_singStress}.
The same response as that shown in figure \ref{subfig:CP_slow_stress12} is observed, namely, a first phase during which $\sigma_{22}$ varies significantly followed by a second one characterized by a lower variation.
This is in particular obvious by looking at the paths $1$ and $6$.
The transition between the two phases occurs at $\frac{2\sigma_{22}}{\sigma_{11}}=1$.
Next, the mapping with the deviatoric plane can be made by looking at the Lode parameter defined as \cite{LodeAngle}:
\begin{equation}
  \label{eq:Lode_Angle}
  \cos (3\Theta) = 9\sqrt{\frac{2}{3}} \frac{\det \tens{s}}{\norm{\tens{s}}^3}
\end{equation}
The Lode parameter is related to the angular position in the deviatoric plane so that its variation along the loading paths gives information about the plastic flow direction.
Figure \ref{subfig:CP_slow_singDev} shows the evolution of the ratio $\frac{2\sigma_{22}}{\sigma_{11}}$ with respect to the Lode parameter.
It can be seen that the Lode parameter varies monotonically until condition \eqref{eq:sing_CP} is fulfilled.
After that point, the Lode parameter roughly changes, which explains the breaks in the slope of the curves in figure \ref{fig:CP_slow_dev1}.
Note that the inflections that can be seen at the beginning of paths $1$ and $6$ are due to the evenness of the cosine function.
The curves depicted in figure \ref{fig:CP_slow_sing} moreover highlight that once the direction of the paths roughly changes, the \textit{maximum-shear-stress} condition remains valid, in such a way that a slow wave aims at following a \textit{maximum-shear-stress} evolution.

The response emphasized before nevertheless differs for a higher hardening modulus.
Therefore, the hardening parameter is momentarily set to $C=10^{10} \rm Pa$ and the same procedure as before is carried out.
Figure \ref{fig:CP_slow_dev2} shows the loading paths resulting from the same initial setup in the deviatoric plane, and the evolution of the ratio $\frac{2\sigma_{22}}{\sigma_{11}}$ is depicted in figure \ref{fig:CP_slow_singH}.
It turns out that increasing the hardening modulus smooth the loading paths so that figure \ref{fig:CP_slow_dev2} does not exhibit the slope breaks that were seen in figure \ref{fig:CP_slow_dev1}.
\begin{figure}[h!]
  \centering
  \input{pgfFigures/CPslowWaves_deviator2.tex}
  \caption{Loading paths in a slow simple wave under plane stress conditions in the deviatoric plane for several starting points lying on the initial yield surface with an increased hardening modulus.}
  \label{fig:CP_slow_dev2}
\end{figure}
On the other hand, figure \ref{fig:CP_slow_singH} shows that as for the previous case, the Lode parameter does not vary monotonically along the loading paths.
It is however worth noticing that the evolution of the Lode parameter reverses before the \textit{maximum-shear-stress} condition is achieved.
It furthermore appears that the paths only tend to the aforementioned condition rather than reaching it.
\begin{figure}[h!]
  \centering
  {\phantomsubcaption \label{subfig:CP_slow_singStressH} }
  {\phantomsubcaption \label{subfig:CP_slow_singDevH} }
  \input{pgfFigures/CPslowWavesSingularityH}
  \caption{Evolution of the ratio $\frac{2\sigma_{22}}{\sigma_{11}}$ along slow wave loading paths with an increased hardening modulus.}
  \label{fig:CP_slow_singH}
\end{figure}

Even though the loading paths are influenced by the value of the hardening modulus, the above results show that the plane stress condition leads to solutions that are very different from those of the thin-walled tube problem for slow waves.
%In contrast with the fast wave solution under plane stress conditions, the slow wave loading paths are very different from those of the thin-walled tube problem.
However, valuable information have been provided by the numerical results presented above.

\subsection{Plane strain}
\label{sec:num_plane_strain}
Assuming that a solid initially at rest undergoes external loads leading to a plane strain case, the previous approach is now repeated.
However, the derivation of the hyperbolic system in a two-dimensional setting relies on the writing of the out-of-plane stress component as a function of plastic strain.
Hence, the integral curves associated with simple waves are integrated implicitly, along with the plastic flow.
To do so, the consistency condition of the von-Mises yield surface \eqref{eq:von-Mises_yield} is combined with the plastic flow rule \eqref{eq:plastic_strain_rate}:
\begin{equation}
  \label{eq:flow_rule}
  \tens{\dot{\eps}}^p = \frac{3}{2C}\frac{\tens{s}\otimes\tens{s}}{\norm{\tens{s}}^2} :\tens{\dot{\sigma}}
\end{equation}
Thus, the system of ODEs consists of the equations of table \ref{tab:simpleWavesEquations}:
\begin{align}
  \label{eq:plane_strain_paths}
  & d\sigma_{11} = \psi_1^{s,f} d\sigma_{12} \\
  & d\sigma_{22} = -\frac{\psi^{s,f}_{1}\alpha_{11}+\alpha_{12}}{\alpha_{22}}d\sigma_{12}
\end{align}
supplemented with the ODE related to the out-of-plane component which follows from the time derivative of equation \eqref{eq:plane_strain_stress33}:
\begin{equation}
  \label{eq:sig33_plane_strain}
  d\sigma_{33}= \nu\(d\sigma_{11}+d\sigma_{22}\) - E d\eps^p_{33}
\end{equation}

Once again, we consider that elastic pressure and shear waves precede plastic ones.
Therefore, according to the equations summarized in table \ref{tab:elasticityEquations}, the components $\sigma_{11}$ and $\sigma_{22}$ are coupled through the pressure wave under plane strain such that:
\begin{equation}
  \label{eq:plane_strain_coupled}
  \llbracket \sigma_{22} \rrbracket= \frac{\lambda}{\lambda + 2\mu} \llbracket \sigma_{11}\rrbracket
\end{equation}
In addition, one shows that specializing the yield surface to plane strain, by accounting for the expression of the out-of-plane stress \eqref{eq:plane_strain_stress33}, leads to:
\begin{equation}
  \label{eq:yield_surf_plane-strain}
  \sqrt{ 3\sigma_{12}^2 + (\sigma_{11}^2 + \sigma_{22}^2)(\nu^2-\nu+1) + \sigma_{11}\sigma_{22}(2\nu^2-2\nu-1) +E\eps^p_{33}\[(\sigma_{11} + \sigma_{22})(1-2\nu) + E\eps^p_{33}\] } -(\sigma^y + C p) = 0
\end{equation}
Thus, initial stress states lying on the initial yield surface can be set for several values of $\sigma_{11}$ and by enforcing $f(\tens{\sigma})=0$ through the choice of $\sigma_{12}$, namely:
\begin{equation}
  \label{eq:sig12_init}
  \sigma_{12}= \pm \sqrt{ \frac{(\sigma^y + Cp)^2  - (\sigma_{11}^2 + \sigma_{22}^2)(\nu^2-\nu+1) - \sigma_{11}\sigma_{22}(2\nu^2-2\nu-1) +E\eps^p_{33}\[(\sigma_{11} + \sigma_{22})(1-2\nu) + E\eps^p_{33}\]}{3} }
\end{equation}
for $p=0$ and $\eps^p_{33}=0$.
As previously, the initial values of $\sigma_{11}$ form a symmetrical set with respect to zero.
The numerical integration in then made with $\sigma_{12}$ used as a driving parameter and again by considering the semi-space $\sigma_{12}>0$ for the initial stress state.

\subsubsection{Fast waves}

The loading paths followed in a fast wave are first looked at by decreasing the shear stress component $\sigma_{12}$.
Analogously to what has been done before, figure \ref{fig:fast_path_plane_strains} shows the paths in two planes of the stress space, while the same paths are depicted in the deviatoric plane in figure \ref{fig:fastDP_dev}.
Once again, the evolution of the characteristic speed associated with fast waves is depicted in the figures by means of a color gradient, which confirms that the simple wave solution is valid.
\begin{figure}[h!]
  \centering
  {\phantomsubcaption \label{subfig:fastDP_stress1} }
  {\phantomsubcaption \label{subfig:fastDP_stress2} }

  \input{pgfFigures/DPfastWaves}
  \caption{Loading paths through a fast simple wave under plane strain conditions in the stress planes $(\sigma_{11},\sigma_{12})$ and $(\sigma_{22},\sigma_{12})$ for several starting points lying on the initial yield surface.}
  \label{fig:fast_path_plane_strains}
\end{figure}

First, the curves depicted in figure \ref{fig:fast_path_plane_strains} show the symmetry of $\sigma_{12}$ with respect to the $\sigma_{12}$-axis.
Second, as for the plane stress situation, the loading paths followed inside fast waves are smooth.
Notice however that the curves do not overlap in the $(\sigma_{11},\sigma_{12})$ plane as it was the case before.
At last, it appears that all the paths tend to the $\sigma_{11}$-axis which, as predicted by the analytical results in table \ref{tab:stress_paths_properties}, would lead to curves that follow the axis.

On the other hand, the paths projected in the deviatoric plane show once again that the von-Mises circle is traced by the integral curves.
Moreover, opposite signs for the initial values of $\sigma_{11}$ lead to curves that are symmetric with respect to the horizontal axis.
\begin{figure}[h!]
  \centering
  \input{pgfFigures/DPfastWaves_deviator0.tex}
  \caption{Loading paths through a fast simple wave under plane strain conditions in the deviatoric plane for several starting points lying on the initial yield surface.}
  \label{fig:fastDP_dev}
\end{figure}
Unlike the plane stress case, for which the fast wave loading paths reach a direction of pure shear in the deviatoric plane, the curves in figure \ref{fig:fastDP_dev} all exhibit a cusp so that the paths tend to a direction of pure tension/compression after crossing it.
Increasing the hardening modulus to $C=10^{10} \:Pa$ enables emphasizing this phenomenon, as depicted in figure \ref{fig:fastDP_devH}.
After being restricted to the initial yield surface beyond a direction of pure tension/compression, the paths all branch off towards the latter.
It then seems that once this direction is achieved, the plastic flow is radial.
\begin{figure}[h!]
  \centering
  \input{pgfFigures/DPfastWaves_deviator0H.tex}
  \caption{Loading paths through a fast simple wave under plane strain conditions in the deviatoric plane for several starting points lying on the yield surface with an increased hardening modulus.}
  \label{fig:fastDP_devH}
\end{figure}
However, since no singular behavior is seen in the stress space in figure \ref{fig:fast_path_plane_strains}, it is difficult to identify the stress states that are responsible for that response.

\subsubsection{Slow waves}

We finish this section by considering the loading paths in a slow wave under plane strain conditions.
The integration of the corresponding ODEs is performed by using $\sigma_{12}$ as a driving parameter.
% However, numerical difficulties arise owing to the characteristic speed associated with slow waves that starts increasing rather than decreasing at some points along the paths.
% In order to circumvent this issue, the last stress state leading to a decreasing celerity is used as an initial condition for a second integration driven by $\sigma_{11}$.
% The final value is set so that the variation of $\sigma_{11}$ (\textit{i.e increasing or decreasing}) undergone up to that singularity is continued.
% This strategy allows carrying on the integration further.
% Nevertheless, the same problem of increasing characteristic speed again occurs and the computation must be aborted.

First, figure \ref{fig:slow_path_plane_strains1} shows two projections of the paths in the stress space.
Analogously to plane stress problems, the curves projected in the ($\sigma_{11},\sigma_{12}$) plane can be pretty well approximated with straight lines.
Moreover, both projections emphasize some symmetry with respect to the $\sigma_{12}$-axis.
In addition, rough slope changes occur in the ($\sigma_{22},\sigma_{12}$) plane (see the paths $3$ and $4$ in figure \ref{subfig:slowDP_stress2}).
\begin{figure}[h!]
  \centering
  {\phantomsubcaption \label{subfig:slowDP_stress1} }
  {\phantomsubcaption \label{subfig:slowDP_stress2} }
  \input{pgfFigures/DPslowWaves}
  \caption{Loading paths through a slow simple wave under plane strain conditions in the stress planes ($\sigma_{11},\sigma_{12}$) and ($\sigma_{22},\sigma_{12}$)for different starting points on the initial yield surface.}
  \label{fig:slow_path_plane_strains1}
\end{figure}
Once again, these inflections are due to the reaching of the maximum shear stress $\sigma_{12}$ for a given state ($\sigma_{11},\sigma_{33}$) on the current yield surface.
Indeed, requiring that the partial derivative of equation \eqref{eq:sig12_init} with respect to $\sigma_{22}$ vanishes, one writes:
\begin{align}
  \label{eq:singularity_DP}
  & 2\sigma_{22} - \bar{\sigma}= 0\\
  & \text{with }\bar{\sigma }=\frac{\sigma_{11}(2\nu^2-2\nu-1) +E\eps^p_{33}(1-2\nu)}{\nu-\nu^2-1}
\end{align}
Figure \ref{fig:DP_slow_sing} shows the evolution of the ratio $2\sigma_{22}/\bar{\sigma}$ with respect to $\sigma_{12}$ and $\sigma_{22}$ for all the loading paths, though particular attention must be paid to the paths $3$ and $4$.
To begin with, the plotting of $2\sigma_{22}/\bar{\sigma}$ as a function of $\sigma_{12}$ in figure \ref{subfig:DPSing1} confirms the symmetry observed above since symmetrical initial values with respect to zero yield overlapping curves.
Next, it can be seen that the ratio tends to unity for the paths $3$ and $4$ while it is not the case for the others.
As soon as that value is reached, $2\sigma_{22}/\bar{\sigma}$ stop varying even though $\sigma_{12}$ continues increasing.
Looking at figure \ref{subfig:DPSing2}, in which the evolution of the ratio with respect to $\sigma_{22}$ is depicted, one sees that the limit $2\sigma_{22}/\bar{\sigma}=1$ also corresponds to an upper bound for $\sigma_{22}$.
Indeed, the curves corresponding to paths $3$ and $4$ are monotone up to the \textit{maximum-shear-stress} condition \eqref{eq:singularity_DP} is fulfilled.
After this, all the points overlap so that both $2\sigma_{22}/\bar{\sigma}$ and $\sigma_{22}$ are constant.
This discussion once again highlights the shearing nature of slow waves.
\begin{figure}[h!]
  \centering
  {\phantomsubcaption \label{subfig:DPSing1}}
  {\phantomsubcaption \label{subfig:DPSing2}}
  \input{pgfFigures/DPslowWaves_singularity.tex}
  \caption{Evolution of the ratio $\frac{2\sigma_{22}}{\bar{\sigma}}$ along the loading paths through a slow wave under plane strain conditions.}
  \label{fig:DP_slow_sing}
\end{figure}

We now focus on the projections of the loading paths in the deviatoric plane in figure \ref{fig:slowDP_dev}.
\begin{figure}[h!]
  \centering
  \subcaptionbox{Loading paths in the deviatoric plane \label{subfig:slowDP_dev}}{  \input{pgfFigures/DPslowWaves_deviator.tex}} \qquad
  \subcaptionbox{Evolution of $\frac{2\sigma_{22}}{\bar{\sigma}}$ with respect to the Lode parameter \label{subfig:DP_slow_sing2}}{\input{pgfFigures/DPslowWaves_singularity2.tex}}
  \caption{Study of the loading paths through slow simple waves under plane strain conditions: (\subref{subfig:slowDP_dev}) Loading path in the deviatoric plane; (\subref{subfig:DP_slow_sing2}) Evolution of the ratio $\frac{2\sigma_{22}}{\bar{\sigma}}$ with respect to the Lode parameter along the loading path. The legend stands for both figures.}
  \label{fig:slowDP_dev}
\end{figure}
The projections of the stress paths in the deviatoric plane in figure \ref{subfig:slowDP_dev} is supplemented with the evolution of the ratio $\frac{2\sigma_{22}}{\bar{\sigma}}$ with respect to the Lode parameter in figure \ref{subfig:DP_slow_sing2}.
%First, although one can expect much more complex results than for slow waves under plane stress, owing to the non-zero out-of-plane stress component that leads to loading paths taking values in the whole space ($\sigma_1,\sigma_2,\sigma_3$), it is not the case.
Despite the non-zero out-of-plane stress component that leads to loading paths taking values in the whole space ($\sigma_1,\sigma_2,\sigma_3$), the paths are not more complex than for plane stress.
Indeed, the paths are much simpler since they all follow the initial yield surface up to a direction of pure shear, and next follow the radial direction.
On the other hand, figure \ref{subfig:DP_slow_sing2} enables to better distinguish the curves that are superimposed in figure \ref{subfig:slowDP_dev}.
It also highlights that the slope breaks which are observed in the deviatoric plane do not correspond to the maximum shear stress condition \eqref{eq:singularity_DP}.
As a matter of fact, the loading paths $2$, $3$, $4$ and $5$ become radial for $\cos(3\Theta) \equiv 0$, which occurs before the value $\frac{2\sigma_{22}}{\bar{\sigma}}=1$ is achieved.
% \begin{figure}[h!]
%   \centering
%   \caption{Evolution of the ratio $\frac{2\sigma_{22}}{\bar{\sigma}}$ with respect to the Lode parameter $\cos(3\Theta)$.}
%   \label{fig:DP_slow_sing2}
% \end{figure}

As for the results presented for fast waves, increasing the hardening parameter to $C=10^{10} \: Pa$ allows smoothing the curves.
Furthermore, considering a higher hardening modulus enables to integrate the loading paths further without numerical issues related to a growing characteristic speed.
Thus, figure \ref{fig:slowDP_devH} shows the stress paths resulting from the integration driven by $\sigma_{12}$ as well as the evolution of condition \eqref{eq:singularity_DP} with respect to the Lode parameter.
\begin{figure}[h!]
  \centering
  \subcaptionbox{Loading paths in the deviatoric plane \label{subfig:slowDP_devH}}{  \input{pgfFigures/DPslowWaves_deviatorH.tex}}
  \subcaptionbox{Evolution of $\frac{2\sigma_{22}}{\bar{\sigma}}$ with respect to the Lode parameter \label{subfig:DP_slow_sing2H}}{\input{pgfFigures/DPslowWaves_singularity2H.tex}}
  \caption{Study of the loading paths through slow simple waves in the principal deviatoric stress space with an increased hardening modulus.}
  \label{fig:slowDP_devH}
  % \input{pgfFigures/DPslowWaves_deviatorH.tex}
  % \caption{Loading paths through slow simple waves obtained with an increased hardening modulus.}
  % \label{fig:slowDP_devH}
\end{figure}
It can then be seen in figure \ref{subfig:slowDP_devH} that the loading paths are no longer restricted to the initial yield surface but start moving away from it quasi-instantaneously.
Moreover, all the curves converge to the direction of pure shear.
The main difference with the results depicted in figure \ref{fig:slowDP_dev} arises in figure \ref{subfig:DP_slow_sing2H}.
The \textit{maximum-shear-stress} condition \eqref{eq:singularity_DP} is now satisfied at the very end of the numerical integration, once the direction of pure shear is reached in all the loading paths.
Therefore, the results of figure \ref{subfig:DP_slow_sing2} must be considered carefully depending on the value of the hardening modulus.
Similar conclusions have been also drawn for plane stress problems in section \ref{sec:num_plane_stress}.
% Indeed, it appears that the loading paths tend to the direction of pure shear rather than reaching it before the condition \eqref{eq:singularity_DP} is fulfilled.
% This response can however not be seen in the plots, which is most likely due to the resolution of the figure.

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "manuscript"
%%% End:


\subsection{Evaluation} \label{evaluation}
All the different configurations together result in 46920 different simulations that were executed. The
$Precision_{\mu}$ and $Recall_{\mu}$ of every simulation were computed and the result was written to a
CSV\footnote{https://tools.ietf.org/html/rfc4180} file. The file can be found at
GitHub\footnote{https://github.com/GordonLesti/SlidingWindowFilter-evaluator/releases/download/v1.0.1/swf-result.csv.zip}.
Row one to ten of column one to nine of that file ordered by the $F_{1}score_{\mu}$ are presented by table
\ref{tab:result}. A visible explanation of $Precision_{\mu}$, $Recall_{\mu}$ and $F_{1}score_{\mu}$ is later given in
section \ref{differentiation_according_to_gestures}.

\begin{table}[H]
    \begin{center}
        \begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} lllllllll}
            \hline
            \textbf{distance} & \textbf{scb} & \textbf{filter} & \textbf{window} & \textbf{threshold} & \textbf{precision\_$\mu$} & \textbf{recall\_$\mu$} & \textbf{f1score\_$\mu$} & \textbf{\#(nnc)}\\
            \hline
            $\eta$DTW & 36 & LNCE(300) & Mid  & HAveD & 0.8414 & 0.6579 & 0.7384 & 4214\\
            $\eta$DTW & 36 & NoFilter & Mid  & HAveD & 0.8414 & 0.6579 & 0.7384 & 4893\\
            $\eta$DTW & 28 & LNCE(300) & Mid  & HAveD & 0.812 & 0.6725 & 0.7359 & 4170\\
            $\eta$DTW & 28 & NoFilter & Mid  & HAveD & 0.8118 & 0.6719 & 0.7353 & 4841\\
            $\eta$DTW & 36 & VAR(240) & Mid  & HAveD & 0.8399 & 0.6485 & 0.7319 & 2975\\
            $\eta$DTW & 36 & VAR(260) & Mid & HAveD & 0.8399 & 0.6485 & 0.7319 & 3126\\
            $\eta$DTW & 36 & VAR(280) & Mid & HAveD & 0.8399 & 0.6485 & 0.7319 & 3330\\
            $\eta$DTW & 36 & VAR(300) & Mid & HAveD & 0.8399 & 0.6485 & 0.7319 & 3574\\
            $\eta$DTW & 36 & LNCE(220) & Mid & HAveD & 0.8399 & 0.6485 & 0.7319 & 3806\\
            $\eta$DTW & 36 & LNCE(240) & Mid & HAveD & 0.8399 & 0.6485 & 0.7319 & 3929\\
            \hline
        \end{tabular*}
    \end{center}
    \caption{The top ten simulations and their configurations measured on the $F_{1}score_{\mu}$ with rounded values.
    Column one to five are the configurations as described in section \ref{sliding_window_simulation}, column five to
    eight are the resulting performance measures as described in section \ref{performance_measure} and column nine are
    the number of calls to the Nearest Neighbour classification for every simulation.}
	\label{tab:result}
\end{table}

The produced data can be explored with different approaches. It exists a dominating subset of configurations under the
order of $F_{1}score_{\mu}$, as table \ref{tab:result} shows. Part of this dominating configuration are as follows.
\begin{itemize}
    \item \textbf{$\eta$DTW:} DTW with normalization $\eta$ and a Sakoe-Chiba band of 36\% as described in
    \ref{sakoe-chiba_band}
    \item \textbf{Mid:} window size determination as described in \ref{window_size_determination}
    \item \textbf{HAveD:} threshold determination as described in \ref{threshold_determination}
\end{itemize}
An evaluation on the average performance of a configuration appears not to be effective, since some options are depending on
each other. Hereinafter is examined how the results are changing if a simulation differs from the dominating
configuration. The influence of the filter is examined in the end. However, it should be mentioned that the
following results could have an other ranking under another performance measure as figure \ref{fig:result} shows.

\begin{figure}[H]
    \begin{center}
        \resizebox {\textwidth} {!} {
            \begin{tabular}{ccc}
                \resizebox {!} {\height} {
                    \begin{tikzpicture}[spy using outlines={circle, magnification=6, connect spies}]
                        \begin{axis}[
                            xmin=0,
                            xmax=1,
                            ymin=0,
                            ymax=1,
                            width=\axisdefaultwidth,
                            height=\axisdefaultwidth,
                            xlabel=$Precision_{\mu}$,
                            ylabel=$Recall_{\mu}$,
                            samples=100,
                            colorbar horizontal,
                            colormap/viridis high res,
                            title=$F_{\frac{1}{2}}score_{\mu}$]
                            \addplot[only marks, scatter, scatter src=explicit, mark size=1] table[x=x,y=y,meta=fscore] {../data/fig/result/f0.5score.dat};
                            \addplot[gray, domain=0.081:1] {(0.25 * 0.1 * x) / (1.25 * x - 0.1)};
                            \addplot[gray, domain=0.161:1] {(0.25 * 0.2 * x) / (1.25 * x - 0.2)};
                            \addplot[gray, domain=0.25:1] {(0.25 * 0.3 * x) / (1.25 * x - 0.3)};
                            \addplot[gray, domain=0.33:1] {(0.25 * 0.4 * x) / (1.25 * x - 0.4)};
                            \addplot[gray, domain=0.41:1] {(0.25 * 0.5 * x) / (1.25 * x - 0.5)};
                            \addplot[gray, domain=0.49:1] {(0.25 * 0.6 * x) / (1.25 * x - 0.6)};
                            \addplot[gray, domain=0.57:1] {(0.25 * 0.7 * x) / (1.25 * x - 0.7)};
                            \addplot[gray, domain=0.65:1] {(0.25 * 0.8 * x) / (1.25 * x - 0.8)};
                            \addplot[gray, domain=0.73:1] {(0.25 * 0.9 * x) / (1.25 * x - 0.9)};
                            \coordinate (spypoint) at (axis cs:0.8767619815,0.6115168539);
                            \coordinate (magnifyglass) at (axis cs:0.2,0.8);
                        \end{axis}
                        \spy [size=2cm] on (spypoint)
                            in node[fill=white] at (magnifyglass);
                    \end{tikzpicture}
                }
                &
                \resizebox {!} {\height} {
                    \begin{tikzpicture}[spy using outlines={circle, magnification=6, connect spies}]
                        \begin{axis}[
                            xmin=0,
                            xmax=1,
                            ymin=0,
                            ymax=1,
                            width=\axisdefaultwidth,
                            height=\axisdefaultwidth,
                            xlabel=$Precision_{\mu}$,
                            ylabel=$Recall_{\mu}$,
                            samples=100,
                            colorbar horizontal,
                            colormap/viridis high res,
                            title=$F_{1}score_{\mu}$]
                            \addplot[only marks, scatter, scatter src=explicit, mark size=1] table[x=x,y=y,meta=fscore] {../data/fig/result/f1score.dat};
                            \addplot[gray, domain=0.051:1] {(0.1 * x) / (2 * x - 0.1)};
                            \addplot[gray, domain=0.11:1] {(0.2 * x) / (2 * x - 0.2)};
                            \addplot[gray, domain=0.16:1] {(0.3 * x) / (2 * x - 0.3)};
                            \addplot[gray, domain=0.21:1] {(0.4 * x) / (2 * x - 0.4)};
                            \addplot[gray, domain=0.26:1] {(0.5 * x) / (2 * x - 0.5)};
                            \addplot[gray, domain=0.31:1] {(0.6 * x) / (2 * x - 0.6)};
                            \addplot[gray, domain=0.36:1] {(0.7 * x) / (2 * x - 0.7)};
                            \addplot[gray, domain=0.41:1] {(0.8 * x) / (2 * x - 0.8)};
                            \addplot[gray, domain=0.46:1] {(0.9 * x) / (2 * x - 0.9)};
                            \coordinate (spypoint) at (axis cs:0.8413867433,0.6578651685);
                            \coordinate (magnifyglass) at (axis cs:0.2,0.8);
                        \end{axis}
                        \spy [size=2cm] on (spypoint)
                            in node[fill=white] at (magnifyglass);
                    \end{tikzpicture}
                }
                &
                \resizebox {!} {\height} {
                    \begin{tikzpicture}[spy using outlines={circle, magnification=6, connect spies}]
                        \begin{axis}[
                            xmin=0,
                            xmax=1,
                            ymin=0,
                            ymax=1,
                            width=\axisdefaultwidth,
                            height=\axisdefaultwidth,
                            xlabel=$Precision_{\mu}$,
                            ylabel=$Recall_{\mu}$,
                            samples=100,
                            colorbar horizontal,
                            colormap/viridis high res,
                            title=$F_{2}score_{\mu}$]
                            \addplot[only marks, scatter, scatter src=explicit, mark size=1] table[x=x,y=y,meta=fscore] {../data/fig/result/f2score.dat};
                            \addplot[gray, domain=0.021:1] {(4 * 0.1 * x) / (5 * x - 0.1)};
                            \addplot[gray, domain=0.041:1] {(4 * 0.2 * x) / (5 * x - 0.2)};
                            \addplot[gray, domain=0.061:1] {(4 * 0.3 * x) / (5 * x - 0.3)};
                            \addplot[gray, domain=0.081:1] {(4 * 0.4 * x) / (5 * x - 0.4)};
                            \addplot[gray, domain=0.101:1] {(4 * 0.5 * x) / (5 * x - 0.5)};
                            \addplot[gray, domain=0.121:1] {(4 * 0.6 * x) / (5 * x - 0.6)};
                            \addplot[gray, domain=0.141:1] {(4 * 0.7 * x) / (5 * x - 0.7)};
                            \addplot[gray, domain=0.17:1] {(4 * 0.8 * x) / (5 * x - 0.8)};
                            \addplot[gray, domain=0.19:1] {(4 * 0.9 * x) / (5 * x - 0.9)};
                            \coordinate (spypoint) at (axis cs:0.8124893942,0.6724719101);
                            \coordinate (magnifyglass) at (axis cs:0.2,0.8);
                        \end{axis}
                        \spy [size=2cm] on (spypoint)
                            in node[fill=white] at (magnifyglass);
                    \end{tikzpicture}
                }
            \end{tabular}
        }
    \end{center}
    \caption{$Precision_{\mu}$ and $Recall_{\mu}$ of the simulations measured on the $F_{\frac{1}{2}}score_{\mu}$ for
    the left plot, $F_{1}score_{\mu}$ for the plot in the middle and $F_{2}score_{\mu}$ for the right plot. The
    magnifying glass is focusing on the best simulation measured on the underlying $F_{\beta}score_{\mu}$. The gray
    lines are illustrating the distribution of the underlying $F_{\beta}score_{\mu}$ in $\frac{1}{10}$ steps. Only every
    seventh simulation is visible on the plots.}
    \label{fig:result}
\end{figure}

\input{experiment/evaluation/influence_of_time_series_distance_measure.tex}
\input{experiment/evaluation/influence_of_window_size_determination.tex}
\input{experiment/evaluation/influence_of_threshold_determination.tex}
\input{experiment/evaluation/influence_of_sliding_window_filter.tex}
\input{experiment/evaluation/differentiation_according_to_gestures.tex}
\input{experiment/evaluation/differentiation_according_to_experimentees.tex}


\subsubsection{ImportanceRank}
\label{ImportanceRank}
The \textbf{ImportanceRank} PostProcessor is specifically used
to compute sensitivity indices and importance indices with respect to input parameters
associated with multivariate normal distributions. In addition, the user can also request the transformation
matrix and the inverse transformation matrix when the PCA reduction is used.
%
\ppType{ImportanceRank}{ImportanceRank}
%
\begin{itemize}
  \item \xmlNode{what}, \xmlDesc{comma separated string, required field},
  %
  List of quantities to be computed.
  %
  Currently the quantities available are:
  \begin{itemize}
    \item \xmlString{SensitivityIndex}: used to measure the impact of sensitivities on the model.
    \item \xmlString{ImportanceIndex}: used to measure the impact of sensitivities and input uncertainties on the model.
    \item \xmlString{PCAIndex}: the indices of principal component directions, used to measure the impact
    of principal component directions on input covariance matrix.
    \nb \xmlString{PCAIndex} can be only requested when subnode \xmlNode{latent} is defined in \xmlNode{features}.
    \item \xmlString{transformation}: the transformation matrix used to map the latent variables to the manifest variables in the original input space.
    \item \xmlString{InverseTransformation}: the inverse transformation matrix used to map the manifest variables to the latent variables in the transformed space.
    \item \xmlString{ManifestSensitivity}: the sensitivity coefficients of \xmlNode{target} with respect to \xmlNode{manifest} variables defined in \xmlNode{features}.

    \nb In order to request \xmlString{transformation} matrix or \xmlString{InverseTransformation} matrix or \xmlString{ManifestSensitivity},
    the subnodes \xmlNode{latent} and \xmlNode{manifest} under \xmlNode{features} are required (more details can be found in the following).
    %
  \end{itemize}
  %
  \nb For each computed quantity, RAVEN will define a unique variable name so that the data can be accessible by the users
  through RAVEN entities \textbf{DataObjects} and \textbf{OutStreams}. These variable names are defined as follows:
  \begin{itemize}
    \item \xmlString{SensitivityIndex}: `sensitivityIndex' + `\_' + `targetVariableName' + `\_' + `latentFeatureVariableName'
    \item \xmlString{ImportanceIndex}: `importanceIndex' + `\_' + `targetVariableName' + `\_' + `latentFeatureVariableName'
    \item \xmlString{PCAIndex}: `pcaIndex' + `\_' + `latentFeatureVariableName'
    \item \xmlString{transformation}: `transformation' + `\_' + `manifestFeatureVariableName' + `\_' + `latentFeatureVariableName'
    \item \xmlString{InverseTransformation}: `inverseTransformation' + `\_' + `latentFeatureVariableName' + `\_' + `manifestFeatureVariableName'
    \item \xmlString{ManifestSensitivity}: `manifestSensitivity' + `\_' + `targetVariableName' + `\_' + `manifestFeatureVariableName'
  \end{itemize}
  %
  If all the quantities need to be computed, the user can input in the body of \xmlNode{what} the string \xmlString{all}.
  \nb \xmlString{all} equivalent to \xmlString {SensitivityIndex, ImportanceIndex, PCAIndex}.

  Since the transformation and InverseTransformation matrix can be very large, they are not printed with option \xmlString{all}.
  In order to request the transformation matrix (or inverse transformation matrix) from this post processor,
  the user need to specify \xmlString{transformation} or \xmlString{InverseTransformation} in \xmlNode{what}. In addition,
  both  \xmlNode{manifest} and \xmlNode{latent} subnodes are required and should be defined in node \xmlNode{features}. For example, let $\mathbf{L, P}$ represent
  the transformation and inverse transformation matrices, respectively. We will define vectors $\mathbf x$ as manifest variables and vectors $\mathbf y$
  as latent variables. If a absolute covariance matrix is used in given distribution, the following equation will be used:

  $
  \mathbf{\delta x} = \mathbf L * \mathbf y
  $

  $
  \mathbf y = \mathbf P * \mathbf \delta \mathbf x
  $

  If a relative covariance matrix is used in given distribution, the following equation will be used:

  $
  \frac{\mathbf \delta \mathbf x}{\mathbf \mu} = \mathbf L * \mathbf y
  $

  $
  \mathbf y = \mathbf P * {\frac{\mathbf \delta \mathbf x}{\mathbf \mu}}
  $

  where $\mathbf{\delta x}$ denotes the changes in the input vector $\mathbf x$, and $\mathbf \mu$ denotes the mean values of the input vector $\mathbf x$.

  %
  %
  \item \xmlNode{features}, \xmlDesc{XML node, required parameter}, used to specify the information for the input variables.
  In this xml-node, the following xml sub-nodes need to be specified:
    \begin{itemize}
      \item \xmlNode{manifest},\xmlDesc{XML node, optional parameter}, used to indicate the input variables belongs to the original input space.
      It can accept the following child node:
        \begin{itemize}
          \item \xmlNode{variables},\xmlDesc{comma separated string, required field}, lists manifest variables.
          \item \xmlNode{dimensions}, \xmlDesc{comma separated integer, optional field}, lists the dimensions corresponding to the manifest variables.
          If not provided, the dimensions are determined by the order indices of given manifest variables.
        \end{itemize}
      \item \xmlNode{latent},\xmlDesc{XML node, optional parameter}, used to indicate the input variables belongs to the transformed space.
      It can accept the following child node:
        \begin{itemize}
          \item \xmlNode{variables},\xmlDesc{comma separated string, required field}, lists latent variables.
          \item \xmlNode{dimensions}, \xmlDesc{comma separated integer, optional field}, lists the dimensions corresponding to the latent variables.
          If not provided, the dimensions are determined by the order indices of given latent variables.
        \end{itemize}
      \nb At least one of the subnodes, i.e. \xmlNode{manifest} and \xmlNode{latent} needs to be specified.
    \end{itemize}
  %
  \item \xmlNode{targets}, \xmlDesc{comma separated string, required field}, lists output responses.
  %
  \item \xmlNode{mvnDistribution}, \xmlDesc{string, required field}, specifies the
  multivariate normal distribution name. The \xmlNode{MultivariateNormal} node must be present. It requires two attributes:
    \begin{itemize}
      \item \xmlAttr{class}, \xmlDesc{required string attribute}, is the main
        ``class'' the listed object is from, the only acceptable class for
        this post-processor is \xmlString{Distributions};
      \item \xmlAttr{type}, \xmlDesc{required string attribute}, is the type of distributions,
        the only acceptable type is \xmlString{MultivariateNormal}
    \end{itemize}
\end{itemize}
  %
  %
  Here is an example to show the user how to request the transformation matrix, the inverse transformation matrix, the
  manifest sensitivities and other quantities.
  %

\textbf{Example:}
\begin{lstlisting}[style=XML,morekeywords={name,subType,debug}]
<Simulation>
  ...
  <Models>
    ...
    <PostProcessor name='aUserDefinedName' subType='ImportanceRank'>
      <what>SensitivityIndex,ImportanceIndex,Transformation, InverseTransformation,ManifestSensitivity</what>
      <features>
        <manifest>
          <variables>x1,x2</variables>
          <dimensions>1,2</dimensions>
        </manifest>
        <latent>
          <variables>latent1</variables>
          <dimensions>1</dimensions>
        </latent>
      </features>
      <targets>y</targets>
      <mvnDistribution>MVN</mvnDistribution>
    </PostProcessor>
    ...
  </Models>
  ...
</Simulation>
\end{lstlisting}

The calculation results can be accessible via variables ``sensitivityIndex\_y\_latent1, importanceIndex\_y\_latent1,
manifestSensitivity\_y\_x1, manifestSensitivity\_y\_x2, transformation\_x1\_latent1, transformation\_x2\_latent1,
inverseTransformation\_latnet1\_x1, inverseTransformation\_laent1\_x2'' through RAVEN entities \textbf{DataObjects}
and \textbf{OutStreams}.


\vsssub
\subsubsection{~$S_{bs}$: Bottom scattering} \label{sec:BS1}
\vsssub

\opthead{BS1}{CREST model}{ F. Ardhuin}

\noindent
Waves propagating over a sloping bottom are partially reflected.  In the limit
of small variation in water depth $\Delta d$ with respect to the mean water
depth $d$, the reflection coefficient is proportional to the bottom spectrum
\cite{art:Kre49} and leads to a redistribution of wave energy in direction.
This process may be formulated as a source term, which leads to accurate
reflection coefficients when considering the evolution of the spectrum over
scales larger than the bottom auto-correlation length, with reasonable
accuracy up to $\Delta d / d \simeq 0.6$ \citep{art:AM07}. The source term
reads,

\begin{equation}
\cS_{\mathrm{bs}}({\bk}) =
\frac{\pi}{2}\int_{0}^{2 \pi}
 \frac{k'^2 M^2({\bk},\textbf{k}')}{\sigma \sigma' \left(k' C'_g +
{\bk}  \cdot {\bf U}  \right)}
 F^B({\bk}-\textbf{k}')
\left[N(\textbf{k}')- N(\textbf{k})\right] {\mathrm d}
\theta',\label{Sbscat}
\end{equation}

\noindent
with the coupling coefficient

\begin{equation}
M({\bk},{\bk}^\prime)\simeq M_b({\bk},{\bk}^\prime) =\frac{g {\bk}
\cdot {\bk}^\prime}{\cosh(kd)\cosh(k'd)}
\end{equation}

\noindent
where the effect of bottom-induced current and elevation changes are
neglected, as appropriate for low to moderate current velocity relative to the
intrinsic phase speed, i.e. $U/C < 0.3$. For larger Froude numbers, in
particular in near-blocking conditions, the present implementation is not
expected to be accurate.  In Eq.~(\ref{Sbscat}), $k$ and $k'$ are related by
the resonance condition, $\omega=\omega'$, i.e. $\sigma+{\bk} \cdot {\bf U}
=\sigma' + {\bk}^\prime \cdot {\bf U}$, where ${\bf U}$ is the phase advection
velocity \cite[see, e.g.,][]{tol:WISE07}.

The bottom spectrum $F^B({\bk})$ is specified in the file {\file
bottom\_spectrum.inp}. This spectrum may be determined from multi-beam
bathymetric data.  In the absence of detailed bathymetric data, the sand dune
spectrum may be parameterized based on the work of \cite{art:Hino68}.  Recent
observations generally confirm the earlier data on sand dune spectra
\citep{art:AM07}, with a non-dimensional constant spectrum for large $k$,
i.e. $F^B({\bk}) \sim k^{-4}$.

The bottom spectrum is double-sided for simplicity of calculation
and normalized such that the bottom variance (in square meters) is

\begin{equation}
<d^2> =\int_{-\infty}^{\infty} \int_{-\infty}^{\infty}
F^B(k_x,k_y)  {\mathrm d} k_x  {\mathrm d} k_y.
\end{equation}

\noindent
In the present implementation this bottom spectrum is assumed to be the same
at all grid points.

The source term is computed according to different methods depending on the
value of the current. For zero current, the interactions only involves waves
of the same frequency and the interaction is always the same and linear in
terms of the directional spectrum. In this case the interaction is expressed
as a matrix problem. Namely, the directional spectrum $F$ is a vector of {\F NTH} components,
and the source term is a vector of same size that is obtained by
the matrix multiplication $S = M F$ with $M$ a square ({\F NTH,NTH}) array. This array is
a function of the bottom spectrum and the non-dimensional depth $kd$.  This
scattering matrix is precomputed and diagonalized as a
preprocessing step for a finite number of wavenumber magnitudes
\citep{art:AH02}.  The cost of this preprocessing increases linearly with the
number of discrete wavenumbers.

For non-zero current, the interaction pattern depends on the current magnitude
and direction (magnitude only for an isotropic bottom spectrum), and a precomputation of
the scattering matrix would increase the overhead cost by at least one order of magnitude. In the
present implementation, the interaction integration with non-zero current is recomputed at every
source term call.


\subsection{Joins}

Have index common to two tables

\subsubsection{Cross join}

Keep all columns. can name [table name].[column name] to preserve any differences. including for index (could be missing for some)

Not really matched if original n length, and other m, then new is n*m length. so all combinations of matches are kept

\subsubsection{Inner join}

Drops those where no match. means data dropped in index missing

Any predicate, equi join, equality predicate

\subsubsection{Outer join}

Keep data if none matches. left outer join for one table, right outer join for other, or full outer join


\subsection{\tsolver features}

\begin{frame}
  \frametitle{\tsolver features}

\begin{itemize}

\item Incrementality: it comes for free, as we keep $\mu$ updated

\vfill\pause

\item Backtrackability: use the same trick as for BF: update
      a model $\mu'$, if satisfiable set $\mu = \mu'$, otherwise
      forget $\mu'$. When backtracking don't change $\mu$

\vfill\pause

\item Minimal \tconflicts: seen already

\vfill\pause

\item Theory Propagation:

  \begin{itemize}

    \item Bound propagation (cheap): if $x \leq c$ has been
	  asserted, then all other inactive $x \leq c'$ with
	  $c \leq c'$ are implied (similar for $\geq$)

\vfill\pause

    \item Tableau+Bound propagation: use a row
          $x_1 = a_2 x_2 + a_3 x_3 + \ldots$
	  and bounds on $x_2, x_3, \ldots$ to
	  derive bounds on $x_1$ (similar idea as to find conflicts)

  \end{itemize}

\end{itemize}

\end{frame}

\subsection{Strict inequalities}

\begin{frame}
  \frametitle{Strict inequalities}

  So far we have used bounds like $x \leq 3$, but never strict ones like $x < 3$
  \vfill\pause
  Since we are on the rationals $x < 3$ is same as $x \leq (3 - \delta)$,
  where $\delta$ is a symbolic positive parameter ($\delta > 0$)
  \vfill\pause
  We do the following: instead of using $\Rat$ numbers of form $n$, we use $\Rat_\delta$ numbers of form $(n, k)$
  to be intended as $n + k\delta$
  \vfill\pause
  Addition in $\Rat_\delta$: $(n_1, k_1) + (n_2, k_2) = (n_1+n_2, k_1+k_2)$
  \vfill\pause
  Scalar multiplication in $\Rat_\delta$: $c(n, k) = (cn, ck)$
  \vfill\pause
  Comparison in $\Rat_\delta$: $(n_1, k_1) \leq (n_2, k_2)$ iff  ($n_1 < n_2$) or ($n_1 = n_2$ and $k_1 \leq k_2$)
  \vfill\pause
  If constraints are satisfiable, it is always possible to compute a rational
  value for $\delta$ to translate $\Rat_\delta$ numbers into $\Rat$ numbers

\end{frame}

\begin{frame}
  \frametitle{Strict inequalities}

  \scriptsize

  Example: situation after receiving \\
  $x_3 < -2$, $x_4 > 0$ \\
  and after $Update(x_3,(-2,-1))$, $Update(x_4,(0,1))$

  \vfill

  \begin{columns}

  \begin{column}{.3\textwidth}
  \begin{center}
  Tableau
  \end{center}
  $$
  \begin{array}{rcl}
    x_1 & = & - x_3 + x_4  \\
    x_2 & = &   x_3 + x_4  \\
    \\
    \\
  \end{array}
  $$
  \end{column}

  \begin{column}{.4\textwidth}
  \begin{center}
  $lb$~~~~~~~Bounds~~~~~~~$ub$
  \end{center}
  $$
  \begin{array}{rcccl}
      - \infty  & \leq & x_1 & \leq & \infty \\
      - \infty  & \leq & x_2 & \leq & \infty \\
      - \infty  & \leq & x_3 & \leq & (-2,-1) \\
          (0,1) & \leq & x_4 & \leq & \infty
  \end{array}
  $$
  \end{column}

  \begin{column}{.3\textwidth}
  \begin{center}
  $\mu$
  \end{center}
  $$
  \begin{array}{rcl}
  x_1 & \mapsto &   (2,2) \\
  x_2 & \mapsto &  (-2,0) \\
  x_3 & \mapsto & (-2,-1) \\
  x_4 & \mapsto &   (0,1)
  \end{array}
  $$
  \end{column}

  \end{columns}
  \vfill
  $x_1 = - (-2,-1) + (0,1) = (2,1) + (0,1) = (2,2)$ \\
  $x_2 =   (-2,-1) + (0,1) = (-2,0)$

\end{frame}


\section{XAFS Analysis -- Data Modeling}

\subsection{Path Parameters}
\begin{frame}
\frametitle{XAFS Analysis with  {\feff} and {\larch} (and {\artemis})}
\begin{cenpage}{125mm}
To model XAFS as a Sum of Paths:

\[
\chi(k) = \sum_j {{{\Blue{S_0^2 N_j}} {\Red{f_j(k)}}  e^{-2R_j/\lambda(k)}
    e^{-2k^2{\Blue{\sigma_j^2}}}}\over{k{\Blue{R_j}}^2}}
{\sin[{2k{\Blue{R_j}} + {\Red{\delta_j(k)}}} ]}
\]

we may refine these Parameters {\RedEmph{For Each Path}}:

\begin{center}
  \begin{tabular}{lll}
    XAFS  Equation    &  {\larch}  Parameter    &  Physical  Meaning\\
    \noalign{\hrule} \noalign{\smallskip}
    $S_0^2 N_j$     & {\tt{s02}}    &  Amplitude Factor:   Both $N_j$ and $ S_0^2$ \\
    $E_0$             & {\tt{e0}}     &  Energy Shift (where $k=0$) \\
    $\Delta R$     & {\tt{deltar}}   &  Change in path length $R_j = \Delta R_j + {R_{\rm  eff}}_j$ \\
    $\sigma^2_j $  & {\tt{sigma2}} &  Mean-square-displacement in  $R_j$ \\
    \noalign{\hrule}
  \end{tabular}
\end{center}

\begin{itemize}

\item $R_{\rm eff}$ is the starting $R$ value for the {\feff} Path.

\item Other Parameters: higher order cumulants, energy broadening, \ldots

\item In principle, any parameter for any path could be refined.

\end{itemize}
\end{cenpage}

\end{frame}

\begin{frame}
\frametitle{EXAFS Analysis: Modeling the 1st Shell of FeO}

\begin{cenpage}{135mm}
    \begin{columns}
      \begin{column}{80mm}
        FeO has a rock-salt structure.
        \vmm\vmm

        To model the Fe $K$ edge EXAFS of FeO, we'll calculate the
        {\file{feffNNNN.dat}} files (with ${{\Red{f(k)}}}$ and
        ${{\Red{\delta(k)}}}$), for Fe-O based on the FeO crystal
        structure.

        \vmm

        We'll then  {\BlueEmph{refine}} the values
        {\Blue{${R}$}}, {\Blue{${N}$}},
        {\Blue{${\sigma^2}$}}, and {\Blue{${E_0}$}} so our
        model EXAFS function matches our data.
        \vspace{2mm}

      \end{column}
      \begin{column}{25mm}

         \wgraph{24mm}{molecules/feo}

         Fe-O octahedra, ${R=2.14\rm\,\AA}$.

    \end{column}
    \end{columns}

    \onslide+<2->

    \begin{columns}
      \begin{column}{65mm}

        \vspace{-3mm}
        \includegraphics[width=63mm]{figs/fits/feo_1sh_chirmag}

        \vmm
        ${|\chi(R)|}$ for FeO {\Blue{data}} and {\Red{${\rm 1^{st}}$ shell
            fit}}.

      \end{column}
      \begin{column}{35mm}\onslide+<2->
        \setlength{\baselineskip}{10pt} \vmm
        Results:   \vmm
        \begin{tabbing}[ll]\= aaaaa\= aaaaaaaaaaaaaaaa\kill
          \> ${S_0^2}$     \>= 0.7 (fixed)\\
          \> ${N}$           \>= 5.1 ${\pm}$ 0.4\\
          \> ${R}$           \>= 2.09 ${\pm}$ 0.01\AA\\
          \> ${\Delta E_0}$ \>= -1.3 ${\pm}$ 0.9 eV\\
          \> ${\sigma^2}$   \>= 0.012 ${\pm}$ 0.002
          ${\rm\,\AA^2}$.\\
          \end{tabbing}

        \vfill
    \end{column}
  \end{columns}

  \vfill
  \end{cenpage}
\end{frame}

\begin{frame}
\frametitle{Analysis Example:  1st Shell of FeO}
  \begin{cenpage}{135mm}
    \begin{tabular}{ll}
      \begin{minipage}{65mm}
        \includegraphics[width=63mm]{figs/fits/feo_1sh_chik}
      \end{minipage}
      &
      \begin{minipage}{55mm}  \setlength{\baselineskip}{10pt}

        {\Red{${1^{st}}$ shell fit in ${k}$ space.}}
        \vmm

        Yes, that is the best fit!  But only to the first shell, completely
        ignoring $R > 2 {\rm \AA} $.

        \vmm

        There is clearly another component in the XAFS besides just Fe-O.
        \vfill
      \end{minipage}
    \\
    \onslide+<2->
      \begin{minipage}{65mm}
        \vspace{-3mm}
        \includegraphics[width=63mm]{figs/fits/feo_1sh_chirre}
      \end{minipage}
      &
    \onslide+<2->
      \begin{minipage}{55mm}  \setlength{\baselineskip}{10pt}
        {\Red{${1^{st}}$ shell fit in ${R}$ space.}}
        \vspace{1mm}

        ${|\chi(R)|}$ and
        {\BlueEmph{${\rm Re[\chi(R)]}$}} for
          FeO (blue), and a ${\rm 1^{st}}$ shell fit (red).  \vspace{1mm}

        Although the fit to the magnitude is not perfect,
        the fit to ${\rm Re[\chi(R)]}$ is very good.

        \vfill
      \end{minipage}
  \end{tabular}

  \vfill
    \end{cenpage}
\end{frame}


% This LaTeX was auto-generated from MATLAB code.
% To make changes, update the MATLAB code and republish this document.

\documentclass{article}
\usepackage{graphicx}
\usepackage{color}

\sloppy
\definecolor{lightgray}{gray}{0.5}
\setlength{\parindent}{0pt}

\begin{document}

\subsection*{Contents}

\begin{itemize}
\setlength{\itemsep}{-1ex}
   \item APM 506 HOMEWORK 1 - FRANCISCO CASTILLO
   \item Problem 1
   \item Problem 2
   \item Problem 3
   \item Problem 4
   \item Problem 5
\end{itemize}

\subsection*{APM 506 HOMEWORK 1 - FRANCISCO CASTILLO}

\begin{verbatim}
clear all; close all; clc
format long
\end{verbatim}

\subsection*{Problem 1}

\begin{verbatim}
intf=zeros(1,21);
for k=-10:1:10
    f = chebfun(@(x) exp(-1i*k*x)*exp(sin(x)),[-pi,pi]);
    intf(k+11)=integral(f,-pi,pi);
end
intf'
\end{verbatim}

        \color{lightgray} \begin{verbatim}
ans =

 -0.000000001729727 - 0.000000000000001i
  0.000000000000000 - 0.000000034673039i
  0.000000625844464 - 0.000000000000001i
  0.000000000000000 + 0.000010048184493i
 -0.000141300427373 + 0.000000000000000i
 -0.000000000000000 - 0.001705653312950i
  0.017197833556866 - 0.000000000000000i
 -0.000000000000000 + 0.139288321767876i
 -0.852927764164121 - 0.000000000000001i
  0.000000000000001 - 3.550999378424362i
  7.954926521012847 + 0.000000000000000i
  0.000000000000000 + 3.550999378424362i
 -0.852927764164121 + 0.000000000000001i
 -0.000000000000000 - 0.139288321767876i
  0.017197833556866 - 0.000000000000000i
 -0.000000000000000 + 0.001705653312950i
 -0.000141300427373 - 0.000000000000000i
  0.000000000000000 - 0.000010048184493i
  0.000000625844464 + 0.000000000000001i
  0.000000000000000 + 0.000000034673039i
 -0.000000001729727 + 0.000000000000001i

\end{verbatim} \color{black}

\subsection*{Problem 2}

\begin{verbatim}
x=-1:0.005:1;
x_0=0.4;
f = chebfun(@(x) exp(x)*sin(3*x));
df = chebfun(@(x) exp(x)*(sin(3*x)+3*cos(3*x)));
ddf = chebfun(@(x) exp(x)*(6*cos(3*x)-8*sin(3*x)));

H=[0.1;0.05;0.025];
ddf_approx=zeros(3,1);
for k=1:3
    h=H(k);
    ddf_approx(k)=(15*(f(x_0-h)+f(x_0+h))-1.5*(f(x_0-2*h)+f(x_0+2*h))+(1/9)*(f(x_0-3*h)+f(x_0+3*h))-(245/9)*f(x_0))/(10*h^2);
end
% figure(1)
% figure('units','normalized','outerposition',[0 0 1 1])
figure(1)
plot(x,f(x),x,df(x),x,ddf(x),x_0,ddf(x_0),'*',x_0,ddf_approx(1),'s',x_0,ddf_approx(2),'s',x_0,ddf_approx(3),'s')
grid on
legend({'$f(x)$','$f''(x)$','$f''''(x)$'},'Interpreter','latex')
xlabel('$x$','Interpreter','latex')
set(gca,'fontsize',18)
saveas(gcf,'IMAGES/problem2_1','epsc')

P=polyfit(log(H),log(abs(ddf(x_0)-ddf_approx)),1);
h=0.01:1e-3:0.15;
figure(2)
loglog(H,abs(ddf(x_0)-ddf_approx),'*')
grid on
xlabel('$h$ (log scale)','fontsize',20,'interpreter','latex')
ylabel('Error (log scale)','fontsize',20,'interpreter','latex')
set(gca,'fontsize',14)
hold on
loglog(h,exp(P(1)*log(h)+P(2)))
grid on
axis([2e-2 1.2e-1 1e-12 1e-2])
saveas(gcf,'IMAGES/problem2_2','epsc')
P
\end{verbatim}

        \color{lightgray} \begin{verbatim}
P =

   5.990378959014029   3.227778361027343

\end{verbatim} \color{black}

\includegraphics [width=4in]{HW1_01.eps}

\includegraphics [width=4in]{HW1_02.eps}

\subsection*{Problem 3}

\begin{verbatim}
clear all
close all
format long
x_0=pi/3;
f = @(x) tan(x);
fp = @(x) (1/cos(x))^2;
H=logspace(-1,-14,100);
for k = 1:length(H)
    h = H(k);
    df1(k) = (f(x_0+h)-f(x_0))/h;
    df2(k) = (f(x_0+h)-f(x_0-h))/(2*h);
    df4(k) = (-5/60*f(x_0+2*h)+2/3*f(x_0+h)-2/3*f(x_0-h)+5/60*f(x_0-2*h))/h;
    df6(k) = 0.1*(15*(f(x_0+h)-f(x_0-h))/(2*h)-6*(f(x_0+2*h)-f(x_0-2*h))/(4*h)+(f(x_0+3*h)-f(x_0-3*h))/(6*h));
end
figure('units','normalized','outerposition',[0 0 1 1])
loglog(H,abs(df1-fp(x_0)),'*',H,abs(df2-fp(x_0)),'*',H,abs(df4-fp(x_0)),'*',H,abs(df6-fp(x_0)),'*',H,H/2,'--',H,H.^(2)/6,'--',H,H.^(4)/30,'--',H,H.^6/140,'--')
set(gca,'fontsize',14)
grid on
xlabel('$h$ (log scale)','fontsize',20,'interpreter','latex')
ylabel('Error (log scale)','fontsize',20,'interpreter','latex')
saveas(gcf,'IMAGES/problem3','epsc')
h1=H(find(abs(df1-fp(x_0))==min(abs(df1-fp(x_0)))))
h1_op=eps^(1/2)
h2=H(find(abs(df2-fp(x_0))==min(abs(df2-fp(x_0)))))
h2_op=(2*eps)^(1/(2+1))
h4=H(find(abs(df4-fp(x_0))==min(abs(df4-fp(x_0)))))
h4_op=(4*eps)^(1/(4+1))
h6=H(find(abs(df6-fp(x_0))==min(abs(df6-fp(x_0)))))
h6_op=(6*eps)^(1/(6+1))
\end{verbatim}

        \color{lightgray} \begin{verbatim}
h1 =

     4.430621457583887e-09

h1_op =

     1.490116119384766e-08

h2 =

     2.535364493970111e-06

h2_op =

     7.629394531250005e-06

h4 =

     2.364489412645407e-04

h4_op =

     9.765624999999997e-04

h6 =

     3.853528593710536e-05

h6_op =

   0.007497934451474

\end{verbatim} \color{black}

\includegraphics [width=4in]{HW1_03.eps}

\subsection*{Problem 4}

\begin{verbatim}
close all
clear all
clc
% Part a
N = 1:100;
err = 0*N;
ff = @(x) abs(x).^3;
f = chebfun(ff,'splitting','on');
for k = 1:length(N)
    n = N(k);
    g = chebfun(ff,n);
    err(k) = norm(f-g,inf);
end
figure
loglog(N,err,'*',N,N.^-1,'--',N,N.^-3,'--')
set(gca,'fontsize',14)
grid on
xlabel('$N$ (log scale)','fontsize',20,'interpreter','latex')
ylabel('Error (log scale)','fontsize',20,'interpreter','latex')
saveas(gcf,'IMAGES/problem4a','epsc')
% Part b
ff = @(x) exp(-1/sin(2*x^2));
f = chebfun(ff,'splitting','on');
for k = 1:length(N)
    n = N(k);
    g = chebfun(ff,n);
    err(k) = norm(f-g,inf);
end
figure
semilogy(N,err,'*',N,N.^-1,'--',N,N.^-3,'--')
set(gca,'fontsize',14)
grid on
xlabel('$N$','fontsize',20,'interpreter','latex')
ylabel('Error (log scale)','fontsize',20,'interpreter','latex')
saveas(gcf,'IMAGES/problem4b','epsc')

% Part c
ff = @(x) 1/sin(1+x^2);
f = chebfun(ff,'splitting','on');
for k = 1:length(N)
    n = N(k);
    g = chebfun(ff,n);
    err(k) = norm(f-g,inf);
end
figure
semilogy(N,err,'*',N,N.^-1,'--',N,N.^-3,'--')
set(gca,'fontsize',14)
grid on
xlabel('$N$ ','fontsize',20,'interpreter','latex')
ylabel('Error (log scale)','fontsize',20,'interpreter','latex')
saveas(gcf,'IMAGES/problem4c','epsc')

% Part d
ff = @(x) sinh(x)^2;
f = chebfun(ff,'splitting','on');
for k = 1:length(N)
    n = N(k);
    g = chebfun(ff,n);
    err(k) = norm(f-g,inf);
end
figure
semilogy(N,err,'*',N,N.^-1,'--',N,N.^-3,'--')
set(gca,'fontsize',14)
grid on
xlabel('$N$ (log scale)','fontsize',20,'interpreter','latex')
ylabel('Error (log scale)','fontsize',20,'interpreter','latex')
saveas(gcf,'IMAGES/problem4d','epsc')
\end{verbatim}

\includegraphics [width=4in]{HW1_04.eps}

\includegraphics [width=4in]{HW1_05.eps}

\includegraphics [width=4in]{HW1_06.eps}

\includegraphics [width=4in]{HW1_07.eps}

\subsection*{Problem 5}

\begin{verbatim}
close all
clear all
clc
ff = @(x) 1./(1+25*x.^2);
N = 1:100;
err = 0*N;
xx = linspace(-1,1,1000)';
for k = 1:length(N)
    x = linspace(-1,1,N(k))';
    W = baryWeights(x);
    y = ff(x);
    yy = bary(xx,y,x,W);
    err(k) = norm(ff(xx)-yy,inf);
end
figure
semilogy(N,err,'*',N,N.^-1,'--',N,N.^-3,'--')
set(gca,'fontsize',14)
grid on
xlabel('$N$','fontsize',20,'interpreter','latex')
ylabel('Error (log scale)','fontsize',20,'interpreter','latex')
saveas(gcf,'IMAGES/problem5_1','epsc')

figure
plot(xx,ff(xx))
hold on
plot(xx,yy,'r--')
xlabel('$x$','fontsize',20,'interpreter','latex')
ylabel('$f(x),p(x)$','fontsize',20,'interpreter','latex')
legend({'$f(x)$','$p(x)$'},'Interpreter','latex','Location','north','fontsize',16)
axis([-1 1 -2 2])
grid on
saveas(gcf,'IMAGES/problem5_2','epsc')
\end{verbatim}

\includegraphics [width=4in]{HW1_08.eps}

\includegraphics [width=4in]{HW1_09.eps}

\end{document}