Merge branch 'main' into 7-solve-problem-7
This commit is contained in:
commit
92bb63abb5
Binary file not shown.
@ -84,84 +84,22 @@
|
|||||||
|
|
||||||
\textit{https://github.uio.no/FYS3150-G2-2023/Project-1}
|
\textit{https://github.uio.no/FYS3150-G2-2023/Project-1}
|
||||||
|
|
||||||
\section*{Problem 1}
|
\input{problems/problem1}
|
||||||
|
|
||||||
% Do the double integral
|
\input{problems/problem2}
|
||||||
\begin{align*}
|
|
||||||
u(x) &= \int \int \frac{d^2 u}{dx^2} dx^2\\
|
|
||||||
&= \int \int -100 e^{-10x} dx^2 \\
|
|
||||||
&= \int \frac{-100 e^{-10x}}{-10} + c_1 dx \\
|
|
||||||
&= \int 10 e^{-10x} + c_1 dx \\
|
|
||||||
&= \frac{10 e^{-10x}}{-10} + c_1 x + c_2 \\
|
|
||||||
&= -e^{-10x} + c_1 x + c_2
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
Using the boundary conditions, we can find $c_1$ and $c_2$ as shown below:
|
\input{problems/problem3}
|
||||||
|
|
||||||
\begin{align*}
|
\input{problems/problem4}
|
||||||
u(0) &= 0 \\
|
|
||||||
-e^{-10 \cdot 0} + c_1 \cdot 0 + c_2 &= 0 \\
|
|
||||||
-1 + c_2 &= 0 \\
|
|
||||||
c_2 &= 1
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
\begin{align*}
|
\input{problems/problem5}
|
||||||
u(1) &= 0 \\
|
|
||||||
-e^{-10 \cdot 1} + c_1 \cdot 1 + c_2 &= 0 \\
|
|
||||||
-e^{-10} + c_1 + c_2 &= 0 \\
|
|
||||||
c_1 &= e^{-10} - c_2\\
|
|
||||||
c_1 &= e^{-10} - 1\\
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
Using the values that we found for $c_1$ and $c_2$, we get
|
\input{problems/problem6}
|
||||||
|
|
||||||
\begin{align*}
|
\input{problems/problem7}
|
||||||
u(x) &= -e^{-10x} + (e^{-10} - 1) x + 1 \\
|
|
||||||
&= 1 - (1 - e^{-10}) - e^{-10x}
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
\section*{Problem 2}
|
\input{problems/problem8}
|
||||||
|
|
||||||
% Write which .cpp/.hpp/.py (using a link?) files are relevant for this and show the plot generated.
|
\input{problems/problem9}
|
||||||
|
|
||||||
\section*{Problem 3}
|
|
||||||
|
|
||||||
% Show how it's derived and where we found the derivation.
|
|
||||||
|
|
||||||
\section*{Problem 4}
|
|
||||||
|
|
||||||
% Show that each iteration of the discretized version naturally creates a matrix equation.
|
|
||||||
|
|
||||||
\section*{Problem 5}
|
|
||||||
|
|
||||||
\subsection*{a)}
|
|
||||||
|
|
||||||
\subsection*{b)}
|
|
||||||
|
|
||||||
\section*{Problem 6}
|
|
||||||
|
|
||||||
\subsection*{a)}
|
|
||||||
|
|
||||||
% Use Gaussian elimination, and then use backwards substitution to solve the equation
|
|
||||||
|
|
||||||
\subsection*{b)}
|
|
||||||
|
|
||||||
% Figure it out
|
|
||||||
|
|
||||||
\section*{Problem 7}
|
|
||||||
|
|
||||||
% Link to relevant files on gh and possibly add some comments
|
|
||||||
|
|
||||||
\section*{Problem 8}
|
|
||||||
|
|
||||||
%link to relvant files and show plots
|
|
||||||
|
|
||||||
\section*{Problem 9}
|
|
||||||
|
|
||||||
% Show the algorithm, then calculate FLOPs, then link to relevant files
|
|
||||||
|
|
||||||
\section*{Problem 10}
|
|
||||||
|
|
||||||
% Time and show result, and link to relevant files
|
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|||||||
35
latex/problems/problem1.tex
Normal file
35
latex/problems/problem1.tex
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
\section*{Problem 1}
|
||||||
|
|
||||||
|
% Do the double integral
|
||||||
|
\begin{align*}
|
||||||
|
u(x) &= \int \int \frac{d^2 u}{dx^2} dx^2\\
|
||||||
|
&= \int \int -100 e^{-10x} dx^2 \\
|
||||||
|
&= \int \frac{-100 e^{-10x}}{-10} + c_1 dx \\
|
||||||
|
&= \int 10 e^{-10x} + c_1 dx \\
|
||||||
|
&= \frac{10 e^{-10x}}{-10} + c_1 x + c_2 \\
|
||||||
|
&= -e^{-10x} + c_1 x + c_2
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
Using the boundary conditions, we can find $c_1$ and $c_2$ as shown below:
|
||||||
|
|
||||||
|
\begin{align*}
|
||||||
|
u(0) &= 0 \\
|
||||||
|
-e^{-10 \cdot 0} + c_1 \cdot 0 + c_2 &= 0 \\
|
||||||
|
-1 + c_2 &= 0 \\
|
||||||
|
c_2 &= 1
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
\begin{align*}
|
||||||
|
u(1) &= 0 \\
|
||||||
|
-e^{-10 \cdot 1} + c_1 \cdot 1 + c_2 &= 0 \\
|
||||||
|
-e^{-10} + c_1 + c_2 &= 0 \\
|
||||||
|
c_1 &= e^{-10} - c_2\\
|
||||||
|
c_1 &= e^{-10} - 1\\
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
Using the values that we found for $c_1$ and $c_2$, we get
|
||||||
|
|
||||||
|
\begin{align*}
|
||||||
|
u(x) &= -e^{-10x} + (e^{-10} - 1) x + 1 \\
|
||||||
|
&= 1 - (1 - e^{-10}) - e^{-10x}
|
||||||
|
\end{align*}
|
||||||
3
latex/problems/problem10.tex
Normal file
3
latex/problems/problem10.tex
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
\section*{Problem 10}
|
||||||
|
|
||||||
|
% Time and show result, and link to relevant files
|
||||||
3
latex/problems/problem2.tex
Normal file
3
latex/problems/problem2.tex
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
\section*{Problem 2}
|
||||||
|
|
||||||
|
% Write which .cpp/.hpp/.py (using a link?) files are relevant for this and show the plot generated.
|
||||||
4
latex/problems/problem3.tex
Normal file
4
latex/problems/problem3.tex
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
\section*{Problem 3}
|
||||||
|
|
||||||
|
% Show how it's derived and where we found the derivation.
|
||||||
3
latex/problems/problem4.tex
Normal file
3
latex/problems/problem4.tex
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
\section*{Problem 4}
|
||||||
|
|
||||||
|
% Show that each iteration of the discretized version naturally creates a matrix equation.
|
||||||
6
latex/problems/problem5.tex
Normal file
6
latex/problems/problem5.tex
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
\section*{Problem 5}
|
||||||
|
|
||||||
|
\subsection*{a)}
|
||||||
|
|
||||||
|
\subsection*{b)}
|
||||||
9
latex/problems/problem6.tex
Normal file
9
latex/problems/problem6.tex
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
\section*{Problem 6}
|
||||||
|
|
||||||
|
\subsection*{a)}
|
||||||
|
|
||||||
|
% Use Gaussian elimination, and then use backwards substitution to solve the equation
|
||||||
|
|
||||||
|
\subsection*{b)}
|
||||||
|
|
||||||
|
% Figure it out
|
||||||
3
latex/problems/problem7.tex
Normal file
3
latex/problems/problem7.tex
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
\section*{Problem 7}
|
||||||
|
|
||||||
|
% Link to relevant files on gh and possibly add some comments
|
||||||
3
latex/problems/problem8.tex
Normal file
3
latex/problems/problem8.tex
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
\section*{Problem 8}
|
||||||
|
|
||||||
|
%link to relvant files and show plots
|
||||||
3
latex/problems/problem9.tex
Normal file
3
latex/problems/problem9.tex
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
\section*{Problem 9}
|
||||||
|
|
||||||
|
% Show the algorithm, then calculate FLOPs, then link to relevant files
|
||||||
Loading…
Reference in New Issue
Block a user