Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.37 KB | None | 0 0
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % Short Sectioned Assignment
  3. % LaTeX Template
  4. % Version 1.0 (5/5/12)
  5. %
  6. % This template has been downloaded from:
  7. % http://www.LaTeXTemplates.com
  8. %
  9. % Original author:
  10. % Frits Wenneker (http://www.howtotex.com)
  11. %
  12. % License:
  13. % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
  14. %
  15. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  16.  
  17. %----------------------------------------------------------------------------------------
  18. % PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
  19. %----------------------------------------------------------------------------------------
  20.  
  21. \documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper and 11pt font size
  22.  
  23. \usepackage{amssymb}
  24. \usepackage{siunitx}
  25. \usepackage[utf8]{inputenc}
  26. \usepackage{graphicx}
  27.  
  28. \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
  29. \usepackage{fourier} % Use the Adobe Utopia font for the document - comment this line to return to the LaTeX default
  30. \usepackage[english]{babel} % English language/hyphenation
  31. \usepackage{amsmath,amsfonts,amsthm} % Math packages
  32.  
  33. \usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
  34.  
  35. \usepackage{sectsty} % Allows customizing section commands
  36. \allsectionsfont{\centering \normalfont\scshape} % Make all sections centered, the default font and small caps
  37.  
  38. \usepackage{fancyhdr} % Custom headers and footers
  39. \pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers
  40. \fancyhead{} % No page header - if you want one, create it in the same way as the footers below
  41. \fancyfoot[L]{} % Empty left footer
  42. \fancyfoot[C]{} % Empty center footer
  43. \fancyfoot[R]{\thepage} % Page numbering for right footer
  44. \renewcommand{\headrulewidth}{0pt} % Remove header underlines
  45. \renewcommand{\footrulewidth}{0pt} % Remove footer underlines
  46. \setlength{\headheight}{13.6pt} % Customize the height of the header
  47.  
  48. \numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
  49. \numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
  50. \numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
  51.  
  52. \setlength\parindent{0pt} % Removes all indentation from paragraphs - comment this line for an assignment with lots of text
  53.  
  54.  
  55. %%%% ADDING CODE PACKAGE
  56.  
  57. \usepackage{listings}
  58. \usepackage{color}
  59.  
  60. \definecolor{dkgreen}{rgb}{0,0.6,0}
  61. \definecolor{gray}{rgb}{0.5,0.5,0.5}
  62. \definecolor{mauve}{rgb}{0.58,0,0.82}
  63.  
  64. \lstset{frame=tb,
  65. language=Python,
  66. aboveskip=3mm,
  67. belowskip=3mm,
  68. showstringspaces=false,
  69. columns=flexible,
  70. basicstyle={\small\ttfamily},
  71. numbers=none,
  72. numberstyle=\tiny\color{gray},
  73. keywordstyle=\color{blue},
  74. commentstyle=\color{dkgreen},
  75. stringstyle=\color{mauve},
  76. breaklines=true,
  77. breakatwhitespace=true,
  78. tabsize=3
  79. }
  80.  
  81.  
  82. %----------------------------------------------------------------------------------------
  83. % TITLE SECTION
  84. %----------------------------------------------------------------------------------------
  85.  
  86. \newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height
  87.  
  88. \title{
  89. \normalfont \normalsize
  90. \textsc{Lund University} \\ [25pt] % Your university, school and/or department name(s)
  91. \horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule
  92. \huge Exercise 2: NUMA12 \\ % The assignment title
  93. \horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
  94. }
  95.  
  96. \author{Magnus Hansson (911130-3856), Christoffer Olsson (931108-0171)
  97. \\and Andreas Goumas (881130-3976)} % Your name
  98.  
  99. \date{\normalsize\today} % Today's date or a custom date
  100.  
  101. \begin{document}
  102.  
  103. \maketitle % Print the title
  104.  
  105. %----------------------------------------------------------------------------------------
  106. % PROBLEM 1
  107. %----------------------------------------------------------------------------------------
  108. \section*{Task 1}
  109. \subsection*{Question}
  110.  
  111.  
  112. \subsection*{Answer}
  113.  
  114.  
  115.  
  116.  
  117. %\begin{center}
  118. % \includegraphics[width=8cm,height=4cm]{nonconvex.png}
  119. %\end{center}
  120.  
  121.  
  122. %----------------------------------------------------------------------------------------
  123. % PROBLEM 2
  124. %----------------------------------------------------------------------------------------
  125. \section*{Task 2}
  126. \subsection*{Question}
  127.  
  128.  
  129. \subsection*{Answer}
  130.  
  131. \subsection*{Chebyshev Discussion}
  132. 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:
  133.  
  134. \begin{equation*}
  135. x_i = \cos \lbrace \frac{[2(n-i)+1] \pi}{2(n + 1)} \rbrace , \ \ \ \ \ i = 0, 1, ..., n
  136. \end{equation*}
  137.  
  138. 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.
  139. \\
  140.  
  141. 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:
  142.  
  143. \begin{equation*}
  144. z = e^{i x} = \cos (x) + i sin(x)
  145. \end{equation*}
  146.  
  147. 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).
  148. \\
  149.  
  150. 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.
  151.  
  152. %----------------------------------------------------------------------------------------
  153. % PROBLEM 3
  154. %----------------------------------------------------------------------------------------
  155. \section*{Task 3}
  156. \subsection*{Question}
  157.  
  158.  
  159. \subsection*{Answer}
  160.  
  161.  
  162.  
  163.  
  164. %----------------------------------------------------------------------------------------
  165. % PROBLEM 4
  166. %----------------------------------------------------------------------------------------
  167. \section*{Task 4}
  168. \subsection*{Question}
  169.  
  170.  
  171. \subsection*{Answer}
  172.  
  173.  
  174.  
  175.  
  176. %----------------------------------------------------------------------------------------
  177. % PROBLEM 5
  178. %----------------------------------------------------------------------------------------
  179. \section*{Task 5}
  180. \subsection*{Question}
  181.  
  182.  
  183. \subsection*{Answer}
  184.  
  185.  
  186.  
  187. %----------------------------------------------------------------------------------------
  188. % PROBLEM 6
  189. %----------------------------------------------------------------------------------------
  190. \section*{Task 6}
  191. \subsection*{Question}
  192.  
  193.  
  194. \subsection*{Answer}
  195.  
  196. \section*{Feedback}
  197.  
  198. Please send the feedback to hansson.carl.magnus@gmail.com, olschr2@gmail.com\\
  199. and goumas.andreas@hotmail.com.
  200.  
  201. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement