|
|
|
@ -86,7 +86,7 @@
|
|
|
|
|
\end{Huge}
|
|
|
|
|
\bigskip\vfill
|
|
|
|
|
\begin{tabular}{ll}
|
|
|
|
|
\textbf{Studente:} & Francesco Minnocci\\
|
|
|
|
|
\textbf{Studente:} & Francesco Minnocci \\
|
|
|
|
|
\textbf{Matricola:} & 600455
|
|
|
|
|
\end{tabular}
|
|
|
|
|
\end{center}
|
|
|
|
@ -143,12 +143,12 @@ To do so, we derive the expression \eqref{eq:h2} with respect to $t$, and get th
|
|
|
|
|
$$ \frac{\partial H}{\partial z}\frac{\mathrm{d} z}{\mathrm{d} t}+\frac{\partial H}{\partial t}=0 ,$$
|
|
|
|
|
where $\frac{\partial H}{\partial z}$ is the Jacobian matrix of $H$ with respect to $z$:
|
|
|
|
|
$$
|
|
|
|
|
\frac{\partial H}{\partial z}=
|
|
|
|
|
\begin{pmatrix}
|
|
|
|
|
\frac{\partial H_1}{\partial z_1} & \cdots & \frac{\partial H_1}{\partial z_n}\\
|
|
|
|
|
\vdots & \ddots & \vdots\\
|
|
|
|
|
\frac{\partial H}{\partial z}=
|
|
|
|
|
\begin{pmatrix}
|
|
|
|
|
\frac{\partial H_1}{\partial z_1} & \cdots & \frac{\partial H_1}{\partial z_n} \\
|
|
|
|
|
\vdots & \ddots & \vdots \\
|
|
|
|
|
\frac{\partial H_n}{\partial z_1} & \cdots & \frac{\partial H_n}{\partial z_n}
|
|
|
|
|
\end{pmatrix} .
|
|
|
|
|
\end{pmatrix} .
|
|
|
|
|
$$
|
|
|
|
|
This can be rewritten as
|
|
|
|
|
\begin{equation}\label{eq:dav} \dot{z}=-\frac{\partial H}{\partial z}^{-1}\frac{\partial H}{\partial t} .\end{equation}
|
|
|
|
@ -186,8 +186,8 @@ Recall that Euler's method consists in approximating the solution of the initial
|
|
|
|
|
\begin{equation*}
|
|
|
|
|
\left\{
|
|
|
|
|
\begin{aligned}
|
|
|
|
|
&\dot{z}=f(z,t)\\
|
|
|
|
|
&z(t_0)=z_0
|
|
|
|
|
& \dot{z}=f(z,t) \\
|
|
|
|
|
& z(t_0)=z_0
|
|
|
|
|
\end{aligned}
|
|
|
|
|
\right.
|
|
|
|
|
\end{equation*}
|
|
|
|
@ -258,29 +258,29 @@ Below are the plots of four different 2x2 systems for the single- (laptop) and m
|
|
|
|
|
Single-threaded & & Multithreaded \\
|
|
|
|
|
\includegraphics[width=0.45\textwidth,valign=c]{../plots/solutions1.png} &
|
|
|
|
|
$\left\{\begin{aligned}
|
|
|
|
|
&x^3 + 5x^2 - y - 1 \\
|
|
|
|
|
&2x^2 - y - 1 \\
|
|
|
|
|
& x^3 + 5x^2 - y - 1 \\
|
|
|
|
|
& 2x^2 - y - 1 \\
|
|
|
|
|
\end{aligned}\right.$ &
|
|
|
|
|
\includegraphics[width=0.45\textwidth,valign=c]{../plots/solutions1_6.png} \\
|
|
|
|
|
\vspace{0.5cm} \\
|
|
|
|
|
\includegraphics[width=0.45\textwidth,valign=c]{../plots/solutions2.png} &
|
|
|
|
|
$\left\{\begin{aligned}
|
|
|
|
|
&x^2 + 2y \\
|
|
|
|
|
&y - 3x^3 \\
|
|
|
|
|
& x^2 + 2y \\
|
|
|
|
|
& y - 3x^3 \\
|
|
|
|
|
\end{aligned}\right.$ &
|
|
|
|
|
\includegraphics[width=0.45\textwidth,valign=c]{../plots/solutions2_6.png} \\
|
|
|
|
|
\vspace{0.5cm} \\
|
|
|
|
|
\includegraphics[width=0.45\textwidth,valign=c]{../plots/solutions3.png} &
|
|
|
|
|
$\left\{\begin{aligned}
|
|
|
|
|
&x^2 + y^2 - 4 \\
|
|
|
|
|
&xy - 1 \\
|
|
|
|
|
& x^2 + y^2 - 4 \\
|
|
|
|
|
& xy - 1 \\
|
|
|
|
|
\end{aligned}\right.$ &
|
|
|
|
|
\includegraphics[width=0.45\textwidth,valign=c]{../plots/solutions3_6.png} \\
|
|
|
|
|
\vspace{0.5cm} \\
|
|
|
|
|
\includegraphics[width=0.45\textwidth,valign=c]{../plots/solutions4.png} &
|
|
|
|
|
$\left\{\begin{aligned}
|
|
|
|
|
&x^2 + y^2 - 2 \\
|
|
|
|
|
&xy - 1 \\
|
|
|
|
|
& x^2 + y^2 - 2 \\
|
|
|
|
|
& xy - 1 \\
|
|
|
|
|
\end{aligned}\right.$ &
|
|
|
|
|
\includegraphics[width=0.45\textwidth,valign=c]{../plots/solutions4_6.png} \\
|
|
|
|
|
\end{tabular}
|
|
|
|
@ -336,6 +336,13 @@ systems.
|
|
|
|
|
|
|
|
|
|
\section{Appendix B: Implementation}
|
|
|
|
|
\subsection{Julia code}
|
|
|
|
|
|
|
|
|
|
The code is also available at the following GitHub repository:
|
|
|
|
|
|
|
|
|
|
\begin{center}
|
|
|
|
|
\fbox{\url{https://github.com/bachoseven/homotopy-continuation}}
|
|
|
|
|
\end{center}
|
|
|
|
|
|
|
|
|
|
\label{sec:listing}\jlinputlisting[caption={solve.jl}]{../solve.jl}
|
|
|
|
|
\jlinputlisting[caption={start-system.jl}]{../start-system.jl}
|
|
|
|
|
\jlinputlisting[caption={homotopy.jl}]{../homotopy.jl}
|
|
|
|
|