Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Short Sectioned Assignment
- % LaTeX Template
- % Version 1.0 (5/5/12)
- %
- % This template has been downloaded from:
- % http://www.LaTeXTemplates.com
- %
- % Original author:
- % Frits Wenneker (http://www.howtotex.com)
- %
- % License:
- % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %----------------------------------------------------------------------------------------
- % PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
- %----------------------------------------------------------------------------------------
- \documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper and 11pt font size
- \usepackage{amssymb}
- \usepackage{siunitx}
- \usepackage[utf8]{inputenc}
- \usepackage{graphicx}
- \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
- \usepackage{fourier} % Use the Adobe Utopia font for the document - comment this line to return to the LaTeX default
- \usepackage[english]{babel} % English language/hyphenation
- \usepackage{amsmath,amsfonts,amsthm} % Math packages
- \usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
- \usepackage{sectsty} % Allows customizing section commands
- \allsectionsfont{\centering \normalfont\scshape} % Make all sections centered, the default font and small caps
- \usepackage{fancyhdr} % Custom headers and footers
- \pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers
- \fancyhead{} % No page header - if you want one, create it in the same way as the footers below
- \fancyfoot[L]{} % Empty left footer
- \fancyfoot[C]{} % Empty center footer
- \fancyfoot[R]{\thepage} % Page numbering for right footer
- \renewcommand{\headrulewidth}{0pt} % Remove header underlines
- \renewcommand{\footrulewidth}{0pt} % Remove footer underlines
- \setlength{\headheight}{13.6pt} % Customize the height of the header
- \numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
- \numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
- \numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
- \setlength\parindent{0pt} % Removes all indentation from paragraphs - comment this line for an assignment with lots of text
- %%%% ADDING CODE PACKAGE
- \usepackage{listings}
- \usepackage{color}
- \definecolor{dkgreen}{rgb}{0,0.6,0}
- \definecolor{gray}{rgb}{0.5,0.5,0.5}
- \definecolor{mauve}{rgb}{0.58,0,0.82}
- \lstset{frame=tb,
- language=Python,
- aboveskip=3mm,
- belowskip=3mm,
- showstringspaces=false,
- columns=flexible,
- basicstyle={\small\ttfamily},
- numbers=none,
- numberstyle=\tiny\color{gray},
- keywordstyle=\color{blue},
- commentstyle=\color{dkgreen},
- stringstyle=\color{mauve},
- breaklines=true,
- breakatwhitespace=true,
- tabsize=3
- }
- %----------------------------------------------------------------------------------------
- % TITLE SECTION
- %----------------------------------------------------------------------------------------
- \newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height
- \title{
- \normalfont \normalsize
- \textsc{Lund University} \\ [25pt] % Your university, school and/or department name(s)
- \horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule
- \huge Exercise 2: NUMA12 \\ % The assignment title
- \horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
- }
- \author{Magnus Hansson (911130-3856), Christoffer Olsson (931108-0171)
- \\and Andreas Goumas (881130-3976)} % Your name
- \date{\normalsize\today} % Today's date or a custom date
- \begin{document}
- \maketitle % Print the title
- %----------------------------------------------------------------------------------------
- % PROBLEM 1
- %----------------------------------------------------------------------------------------
- \section*{Task 1}
- \subsection*{Question}
- \subsection*{Answer}
- %\begin{center}
- % \includegraphics[width=8cm,height=4cm]{nonconvex.png}
- %\end{center}
- %----------------------------------------------------------------------------------------
- % PROBLEM 2
- %----------------------------------------------------------------------------------------
- \section*{Task 2}
- \subsection*{Question}
- \subsection*{Answer}
- \subsection*{Chebyshev Discussion}
- We have noticed that there seems to be two similar, but different, ways of calculating the Chebyshev points. Powell (1981), equation (4.27), on page 39 states:
- \begin{equation*}
- x_i = \cos \lbrace \frac{[2(n-i)+1] \pi}{2(n + 1)} \rbrace , \ \ \ \ \ i = 0, 1, ..., n
- \end{equation*}
- Looking at this equation the only way, e.g., to get $\cos (\pi) = -1$, is to let $n$ approach $\infty$. Otherwise, the denominator will always be larger than the numerator, hence you will get values close to $1$ and $-1$, but never those exact values. That is, you will never include the end points, if you do not have an infinite number of points.
- \\
- If we instead turn to Trefethen (2013) and chapter 2, we have another way to attack the problem. Here we notice, that according to Euler's identity we have:
- \begin{equation*}
- z = e^{i x} = \cos (x) + i sin(x)
- \end{equation*}
- Now we let $x$ be a vector in the interval $(0, \pi)$ and we extract the real part of $z$ to get our Chebyshev points. Using this method we will always include the end points, $-1$ and $1$, in contrast to the other method (Powell 1981).
- \\
- What is confusing is that in table (4.5), "The norms of some interpolation operators", where Powell compares equally spaced points with Chebyshev points, the result for $n=2$ is $1.25$ for both equally spaced points and Chebyshev points. The equally spaced points are $(-1, 1)$ (as we have confirmed), but equation (4.27) does not yield those points! Equation (4.27) yields approximately the points $(-0.75, 0.75)$ and hence the norm $1.41$. This is different from table (4.5) and it seems Powell is doing something he is not telling us about. We are currently trying to compare the two different methods and discussing advantages and disadvantages, and will rise the question during our next lecture.
- %----------------------------------------------------------------------------------------
- % PROBLEM 3
- %----------------------------------------------------------------------------------------
- \section*{Task 3}
- \subsection*{Question}
- \subsection*{Answer}
- %----------------------------------------------------------------------------------------
- % PROBLEM 4
- %----------------------------------------------------------------------------------------
- \section*{Task 4}
- \subsection*{Question}
- \subsection*{Answer}
- %----------------------------------------------------------------------------------------
- % PROBLEM 5
- %----------------------------------------------------------------------------------------
- \section*{Task 5}
- \subsection*{Question}
- \subsection*{Answer}
- %----------------------------------------------------------------------------------------
- % PROBLEM 6
- %----------------------------------------------------------------------------------------
- \section*{Task 6}
- \subsection*{Question}
- \subsection*{Answer}
- \section*{Feedback}
- Please send the feedback to hansson.carl.magnus@gmail.com, olschr2@gmail.com\\
- and goumas.andreas@hotmail.com.
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement