Implement problem 5 and a bit more
This commit is contained in:
parent
1ab0a1a490
commit
46d3a78767
BIN
latex/assignment_1.pdf
Normal file
BIN
latex/assignment_1.pdf
Normal file
Binary file not shown.
@ -80,7 +80,7 @@
|
|||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\title{Project 1} % self-explanatory
|
\title{Project 1} % self-explanatory
|
||||||
\author{Cory Balaton \& Janita Willumsen} % self-explanatory
|
\author{Cory Alexander Balaton \& Janita Ovidie Sandtrøen Willumsen} % self-explanatory
|
||||||
\date{\today} % self-explanatory
|
\date{\today} % self-explanatory
|
||||||
\noaffiliation % ignore this, but keep it.
|
\noaffiliation % ignore this, but keep it.
|
||||||
|
|
||||||
@ -107,4 +107,6 @@
|
|||||||
|
|
||||||
\input{problems/problem9}
|
\input{problems/problem9}
|
||||||
|
|
||||||
|
\input{problems/problem10}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|||||||
@ -40,5 +40,5 @@ Using the values that we found for $c_1$ and $c_2$, we get
|
|||||||
|
|
||||||
\begin{align*}
|
\begin{align*}
|
||||||
u(x) &= -e^{-10x} + (e^{-10} - 1) x + 1 \\
|
u(x) &= -e^{-10x} + (e^{-10} - 1) x + 1 \\
|
||||||
&= 1 - (1 - e^{-10}) - e^{-10x}
|
&= 1 - (1 - e^{-10})x - e^{-10x}
|
||||||
\end{align*}
|
\end{align*}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
\section*{Problem 5}
|
\section*{Problem 5}
|
||||||
|
|
||||||
\subsection*{a)}
|
\subsection*{a \& b)}
|
||||||
|
|
||||||
\subsection*{b)}
|
$n = m - 2$ since when solving for $\vec{v}$, we are finding the solutions for all the points that are in between the boundaries and not the boundaries themselves. $\vec{v}^*$ on the other hand includes the boundary points.
|
||||||
|
|||||||
@ -14,12 +14,12 @@ Following Thomas algorithm for gaussian elimination, we first perform a forward
|
|||||||
\begin{algorithm}[H]
|
\begin{algorithm}[H]
|
||||||
\caption{Foreward sweep}\label{algo:foreward}
|
\caption{Foreward sweep}\label{algo:foreward}
|
||||||
\begin{algorithmic}
|
\begin{algorithmic}
|
||||||
\State Create new vector \vec{\hat{b}} of length n.
|
\State Create new vector $\vec{\hat{b}}$ of length n.
|
||||||
\State \hat{b}[0] &= b[0] \Comment{Handle first element in main diagonal outside loop}
|
\State $\hat{b}[0] = b[0]$ \Comment{Handle first element in main diagonal outside loop}
|
||||||
\For{$i = 1, ..., n-1$}
|
\For{$i = 1, ..., n-1$}
|
||||||
\State d = \frac{a[i-1]}{b[i-1]}
|
\State $d = \frac{a[i-1]}{b[i-1]}$
|
||||||
\State b -= d*(*sup_diag)(i-1);
|
\State $b -= d*(*sup_diag)(i-1);$
|
||||||
(*g_vec)(i) -= d*(*g_vec)(i-1);
|
$(*g_vec)(i) -= d*(*g_vec)(i-1);$
|
||||||
\EndFor
|
\EndFor
|
||||||
\While{Some condition}
|
\While{Some condition}
|
||||||
\State Do something more here
|
\State Do something more here
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user