diff --git a/latex/assignment_1.pdf b/latex/assignment_1.pdf index 2af19e1..bd95441 100644 Binary files a/latex/assignment_1.pdf and b/latex/assignment_1.pdf differ diff --git a/latex/problems/problem10.tex b/latex/problems/problem10.tex index 72de7f2..fd4ccc4 100644 --- a/latex/problems/problem10.tex +++ b/latex/problems/problem10.tex @@ -1,3 +1,8 @@ \section*{Problem 10} % Time and show result, and link to relevant files +\begin{figure}[H] + \centering + \includegraphics[width=0.7\linewidth]{images/problem10.pdf} + \caption{Timing of general algorithm vs. special for step sizes $n_{steps}$} +\end{figure} \ No newline at end of file diff --git a/latex/problems/problem2.tex b/latex/problems/problem2.tex index bfad89c..9558ad0 100644 --- a/latex/problems/problem2.tex +++ b/latex/problems/problem2.tex @@ -6,6 +6,8 @@ Point generator code: https://github.uio.no/FYS3150-G2-203/Project-1/blob/main/s Plotting code: https://github.uio.no/FYS3150-G2-2023/Project-1/blob/main/src/analyticPlot.py -Here is the plot of the analytical solution for $u(x)$. - -\includegraphics[scale=.5]{analytical_solution.pdf} +\begin{figure}[H] + \centering + \includegraphics[width=0.8\linewidth]{images/analytical_solution.pdf} + \caption{Plot of the analytical solution $u(x)$.} +\end{figure} diff --git a/latex/problems/problem7.tex b/latex/problems/problem7.tex index 08ae575..6d02873 100644 --- a/latex/problems/problem7.tex +++ b/latex/problems/problem7.tex @@ -5,5 +5,10 @@ The code can be found at https://github.uio.no/FYS3150-G2-2023/Project-1/blob/coryab/final-run/src/generalAlgorithm.cpp \subsection*{b)} +Increasing the number of steps results in an approximation close to the exact solution. +\begin{figure}[H] + \centering + \includegraphics[width=0.8\linewidth]{images/problem7.pdf} + \caption{Plot showing the numeric solution of $u_{approx}$ for $n_{steps}$ and the exact solution $u_{exact}$.} +\end{figure} -\includegraphics{problem7} diff --git a/latex/problems/problem8.tex b/latex/problems/problem8.tex index 4d20743..c7344f8 100644 --- a/latex/problems/problem8.tex +++ b/latex/problems/problem8.tex @@ -1,3 +1,27 @@ \section*{Problem 8} %link to relvant files and show plots +\subsection*{a)} +Increasing number of steps result in a decrease of absolute error. +\begin{figure}[H] + \centering + \includegraphics[width=0.8\linewidth]{images/problem8_a.pdf} + \caption{Absolute error for different step sizes $n_{steps}$.} +\end{figure} + +\subsection*{b)} +Increasing number of steps also result in a decrease of absolute error. +\begin{figure}[H] + \centering + \includegraphics[width=0.8\linewidth]{images/problem8_b.pdf} + \caption{Relative error for different step sizes $n_{steps}$.} +\end{figure} + +\subsection*{c)} +Increasing number of steps result in a decrease of maximum relative error, up to a certain number of steps. At $n_{steps} \approx 10^{5}$ the maximumrelative error increase. +This can be related to loss of numerical precicion when step size is small. +\begin{figure}[H] + \centering + \includegraphics[width=0.7\linewidth]{images/problem8_c.pdf} + \caption{Maximum relative error for each step sizes $n_{steps}$.} +\end{figure} \ No newline at end of file