Project-1/latex/assignment_1.tex

174 lines
5.3 KiB
TeX

\documentclass[english,notitlepage]{revtex4-1} % defines the basic parameters of the document
%For preview: skriv i terminal: latexmk -pdf -pvc filnavn
% if you want a single-column, remove reprint
% allows special characters (including æøå)
\usepackage[utf8]{inputenc}
%\usepackage[english]{babel}
%% note that you may need to download some of these packages manually, it depends on your setup.
%% I recommend downloading TeXMaker, because it includes a large library of the most common packages.
\usepackage{physics,amssymb} % mathematical symbols (physics imports amsmath)
\include{amsmath}
\usepackage{graphicx} % include graphics such as plots
\usepackage{xcolor} % set colors
\usepackage{hyperref} % automagic cross-referencing (this is GODLIKE)
\usepackage{listings} % display code
\usepackage{subfigure} % imports a lot of cool and useful figure commands
\usepackage{float}
%\usepackage[section]{placeins}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\usepackage{subfigure}
\usepackage{tikz}
\usetikzlibrary{quantikz}
% defines the color of hyperref objects
% Blending two colors: blue!80!black = 80% blue and 20% black
\hypersetup{ % this is just my personal choice, feel free to change things
colorlinks,
linkcolor={red!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black}}
%% Defines the style of the programming listing
%% This is actually my personal template, go ahead and change stuff if you want
%% USEFUL LINKS:
%%
%% UiO LaTeX guides: https://www.mn.uio.no/ifi/tjenester/it/hjelp/latex/
%% mathematics: https://en.wikibooks.org/wiki/LaTeX/Mathematics
%% PHYSICS ! https://mirror.hmc.edu/ctan/macros/latex/contrib/physics/physics.pdf
%% the basics of Tikz: https://en.wikibooks.org/wiki/LaTeX/PGF/Tikz
%% all the colors!: https://en.wikibooks.org/wiki/LaTeX/Colors
%% how to draw tables: https://en.wikibooks.org/wiki/LaTeX/Tables
%% code listing styles: https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings
%% \includegraphics https://en.wikibooks.org/wiki/LaTeX/Importing_Graphics
%% learn more about figures https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
%% automagic bibliography: https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management (this one is kinda difficult the first time)
%% REVTeX Guide: http://www.physics.csbsju.edu/370/papers/Journal_Style_Manuals/auguide4-1.pdf
%%
%% (this document is of class "revtex4-1", the REVTeX Guide explains how the class works)
%% CREATING THE .pdf FILE USING LINUX IN THE TERMINAL
%%
%% [terminal]$ pdflatex template.tex
%%
%% Run the command twice, always.
%% If you want to use \footnote, you need to run these commands (IN THIS SPECIFIC ORDER)
%%
%% [terminal]$ pdflatex template.tex
%% [terminal]$ bibtex template
%% [terminal]$ pdflatex template.tex
%% [terminal]$ pdflatex template.tex
%%
%% Don't ask me why, I don't know.
\begin{document}
\title{Project 1} % self-explanatory
\author{Cory Balaton \& Janita Willumsen} % self-explanatory
\date{\today} % self-explanatory
\noaffiliation % ignore this, but keep it.
\maketitle
\textit{https://github.uio.no/FYS3150-G2-2023/Project-1}
\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*}
\section*{Problem 2}
% Write which .cpp/.hpp/.py (using a link?) files are relevant for this and show the plot generated.
\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)}
% Phrase it better
$n = m - 2$, since $\textbf{A}$ is used to solve for all of the points in
between the end-points $0$ and $1$. For the complete solution, we need to add
$u(0)$ and $u(1)$.
\subsection*{b)}
When solving for $\vec{v}$, we find the approximate solutions for $u(x)$
that are in between the end-points, but not the end-points themselves.
\section*{Problem 6}
\subsection*{a)}
% Use Gaussian elimination, and then use backwards substitution to solve the equation
\subsection*{b)}
% Figure it out
% Linelevant files on gh and possibly add some comments
\section*{Problem 8}
%link to relvant files and show plots
\section*{Problem 9}
% Shon*{Proalgorithm, then calculate FLOPs, then link to relevant files
\section*{Problem 10}
% Time and show result, and link to relevant files
\end{document}