Lecture 1 - Brunel University

Overview (MA2730,2812,2815)
lecture 1
Overview (MA2730,2812,2815)
lecture 1
Contents of the teaching and assessment blocks
MA2730: Analysis I
Lecture slides for MA2730 Analysis I
Analysis — taming infinity
Maclaurin and Taylor series.
Sequences.
Simon Shaw
people.brunel.ac.uk/~icsrsss
[email protected]
Improper Integrals.
Series.
Convergence.
College of Engineering, Design and Physical Sciences
bicom & Materials and Manufacturing Research Institute
Brunel University
LATEX 2ε assignment in December.
Question(s) in January class test.
Question(s) in end of year exam.
Web Page:
http://people.brunel.ac.uk/~icsrsss/teaching/ma2730
October 26, 2015
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
lecture 1
Overview (MA2730,2812,2815)
Lecture 1
Lecture 1
MA2730 - LATEX: topics for Lecture 1
Study and Assessment Components
Lecture 1
Study Block: MA2870, Analysis I and LATEX
3 LATEX lectures in weeks 7, 9, 11.
Starting a document, basic content, processing and viewing.
1 ‘writing maths’ lecture in week 12.
Page formatting, document types, sectioning.
5 labs during weeks 8 — 12.
In line and displayed Mathematics. Numbering, cross
referencing.
Assessment Block: MA2812, Multivariable Mathematics
LATEX assignment (30% by volume) on analysis
Lists. Bibliographies, referencing.
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
lecture 1
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Overview (MA2730,2812,2815)
Lecture 1
Lecture 1
What is LATEX?
What LATEX isn’t
lecture 1
It is a typesetting system based on TEX (techhh).
TEX: designed by Donald Knuth for high quality maths.
It is free (but you can pay for it).
A wysiwig word processor like word.
It is a mark up language.
A ‘cut and paste’ environment.
It is based on macros.
An easy environment for the novice.
It is extensively documented.
It can be hard to use at times — persevere!
It produces very high quality PDF output.
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Overview (MA2730,2812,2815)
Lecture 1
Lecture 1
These Lectures
Let’s get started
lecture 1
You can only really learn LATEX by doing it.
Right click on your desktop and make a new folder called latex.
In these lectures I will show you how to accomplish all of the most
important tasks in LATEX.
Go into this folder and make another called lab1.
Later you can make other folders called. . . ‘lab2’, ‘lab3’ and
‘lab4’.
In this way I will create a document each week which you will then
obtain and build upon in your lab sessions.
Go into the folder called ‘lab1’.
It will be hard at first, but perseverance will pay off.
This folder hierarchy is just a suggestion. LATEX wont mind if you
do it differently.
For MA2812 you will obtain an assignment which will involve an
element of LATEX document preparation.
Shaw
MA2730, Analysis I, 2015-16
bicom, mathematics, CEDPS, IMM, CI, Brunel
Shaw
MA2730, Analysis I, 2015-16
bicom, mathematics, CEDPS, IMM, CI, Brunel
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
Open this LATEX file with WinEdt1 .
Type in the following:
\documentclass[12pt]{article}
\begin{document}
Hello, \LaTeX\ is in the house!
\end{document}
Inside the folder lab1 we are going to make a new LATEX source file
called lab1.tex.
You’ll be able to save your own version of this file into this folder
from BBL once we have finished this session and I have uploaded it.
Now click the LATEX toolbar item to compile this source code.
Then click the nearby dvi icon to view the document on screen,
and click the dvi-pdf icon to get a PDF version of your document.
1
This editor costs money, but there are free alternatives if you want LATEX
on your own computer.
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Overview (MA2730,2812,2815)
Lecture 1
Lecture 1
Here’s the WinEdt toolbar
Here’s the WinEdt toolbar
lecture 1
This is version 5.5 — newer versions may look different.
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Overview (MA2730,2812,2815)
Lecture 1
Lecture 1
Click LATEX to compile your source code
Click dvi ֒→ pdf to generate PDF
Shaw
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
lecture 1
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Overview (MA2730,2812,2815)
Lecture 1
Lecture 1
Click the Adobe Acrobat icon to view the PDF
Let’s discuss
lecture 1
\documentclass[12pt]{article}
\begin{document}
Hello, \LaTeX\ is in the house!
\end{document}
The backslash is used to start a command or macro.
We have initialised a document of type article. There are
others, but this is most useful.
We have set the font size at 12 point. The other possibilities
are 11 point (pretty good) or 10 point (too small).
Our document content occurs between \begin{document}
and \end{document}
Shaw
MA2730, Analysis I, 2015-16
bicom, mathematics, CEDPS, IMM, CI, Brunel
Shaw
MA2730, Analysis I, 2015-16
bicom, mathematics, CEDPS, IMM, CI, Brunel
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
Adding structure
Again, we see that the backslash is used extensively to start
commands.
\documentclass[12pt]{article}
% some useful packages - well learn more about this
\usepackage{latexsym,amssymb,amsmath,amsfonts}
\begin{document}
\title{\LaTeX\ Lab 1: this is where the title goes}
\author{Simon Shaw} \date{\today}
\maketitle % this command tells latex to create the title.
% a percentage starts a comment.
% Everything to the right is ignored.
We used the \title{...} and \author{...} macros to set
up the document’s name and author.
We used the \date{...} macro with the argument \today
to insert the correct date.
We inserted comments into the source file by entering text
after the % character. The comment lasts until the end of the
line.
We used the \section{...} macros to create a section and
give it a title. And we gave that section a label with the
\label{...} command.
\section{Introduction to lab 1}\label{sec:intro-lab1}
We now have a \LaTeXe\ document with a title, an author and
date. We also have our first section with this paragraph.
We created two paragraphs simply by separating our test with
a blank line.
And a new paragraph --- \textbf{created with a blank line!}
\end{document}
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Lecture 1
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
Mathematics
It is time to look at creating some maths — that’s really why
LATEX was invented. Let’s add this to our lab source file.
Any questions or comments?
\section{Starting with maths}\label{sec:start-maths}
Some famous trigonometric identities relating
$\sin\theta$, $\cos\theta$ and $\tan\theta$ are,
\[
\sin^2\theta + \cos^2\theta = 1,
\qquad
\tan^2\theta + 1 = \sec^2\theta
\quad\mbox{and}\quad
1 + \cot^2\theta = \csc^2\theta.
\]
Let’s move away from this presentation for a while now and work
directly with the LATEX document.
By the way, it’s actually LATEX 2ε . There’s also a LATEX3, but it
isn’t used widely (yet?).
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Lecture 1
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
Lots of things to learn there. . .
If we don’t want an equation number then \[ and \] work just
fine. Otherwise we need to use the equation environment like this:
The first identity in \eqref{eq:basic-trig-ids} below
\begin{equation}
\sin^2\theta + \cos^2\theta = 1,
\qquad \tan^2\theta + 1 = \sec^2\theta
\quad\mbox{and}\quad 1 + \cot^2\theta = \csc^2\theta.
\label{eq:basic-trig-ids} \end{equation}
follows by taking $A=\theta$ and $B=\theta$
in the addition formula
\begin{equation}
\cos(A-B) = \cos(A)\cos(B) + \sin(A)\sin(B)
\label{eq:cosA-B}\end{equation}
Other versions of \eqref{eq:cosA-B} lead to other identities.
We can see that we placed maths in the text between dollar
signs: So sin θ was produced by typing \sin\theta.
Displayed math was created between \[ and \]
We used \qquad to get a long space and \quad to get a short
one.
We wrote text in the display with \mbox{and}.
But we didn’t get an equation number!
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Lecture 1
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
LATEX preamble
Now we’re really getting somewhere. . .
We can create a document with a title, author and date.
It is possible to insert a good deal of so-called preamble in between
the \documentclass{...} and \begin{document} commands.
For example, control the page size, and its position on the paper.
We can structure it into sections and subsections.
We can use the \label{...} macro to give our sections
names and reference those names with the \ref{...} macro
to get the section number.
% these are useful page formatting commands
\setlength{\textwidth}{16.0cm}
% set the width of the text
\setlength{\textheight}{25.0cm}
% set the height of the text
\setlength{\topmargin}{-1.0cm}
% text to top of paper
\setlength{\oddsidemargin}{-0.5cm} % left margin on odd pages
\setlength{\evensidemargin}{0cm}
% left margin on even pages
\setlength{\parskip}{1ex}
% space between paragraphs
\setlength{\parindent}{0em}
% indentation for paragraphs
\renewcommand{\baselinestretch}{1.2}% set the inter-line spacing
\overfullrule=1cm
% 1cm wide bar if line too long
We can use $...$ to place small amounts of maths in line
with our prose.
We can use \[ and \] to display equations without numbers
or use the equation environment with \begin and \end to
get numbered displays.
We can use the \label{...} macro to give our equations
names and reference those names with the \eqref{...}
macro to get the equation number.
Shaw
MA2730, Analysis I, 2015-16
bicom, mathematics, CEDPS, IMM, CI, Brunel
(You’ll need the twoside option to \documentclass for
odd/even paged output.)
Shaw
MA2730, Analysis I, 2015-16
bicom, mathematics, CEDPS, IMM, CI, Brunel
Overview (MA2730,2812,2815)
lecture 1
Overview (MA2730,2812,2815)
Lecture 1
Lecture 1
LATEX packages
Lists
The success of LATEX is due in no small measure to the number of
extras and add-in’s that exist.
We’ll spend a great deal more time on using LATEX to typeset high
quality maths over the next two weeks.
These are loaded in as packages. For example:
Today though we are going to finish up with two more essential
ingredients for written documents.
% some useful packages - we’ll learn more about this
\usepackage{latexsym,amssymb,amsmath,amsfonts}
Lists, and bibliographies.
We’ll start with bibliographies.
These load in packages that give us access to a much wider range
of mathematical symbols than standard LATEX provides. more on
that next week.
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
lecture 1
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Lecture 1
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
Bibliographies
It is extremely important to always cite your sources. For this you
need to be able to create a bibliography. Paste the following in to
your file immediately before the \end{document} at the end of
the file
Now include the following line somewhere near the beginning.
Also, although aimed at \LaTeXe\ users,
the book \cite{NJHigham} contains a lot of helpful tips on how
to write mathematical text. The original \LaTeX\ book,
\cite{LamportLaTeXbook}, was written by Leslie Lamport.
\begin{thebibliography}{999}
\bibitem{NJHigham} Nicholas J.~Higham.
\textit{Handbook of writing for the mathematical sciences}.
SIAM, 1998.
Run LATEX twice and you will have a bibliography at the end of the
document, and correct referencing to the items in that
bibliography in the text!
\bibitem{LamportLaTeXbook} Leslie Lamport.
\textit{\LaTeX~User’s Guide \& Reference Manual}.
Addison-Wesley Publishing Company, 1986.
\end{thebibliography}
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Overview (MA2730,2812,2815)
Lecture 1
Lecture 1
Kopka and Daly
LATEX resources
I learned most of my LATEX from a classic book:
But you don’t need to buy a book. . .
There is a huge amount of information on LATEX out there on the
web. For example:
\bibitem{KopkaDaly}
Helmut Kopka and Patrick W.~Daly.
\textit{A Guide to \LaTeXe.
Document preparation for beginners and advanced users}.
Addison Wesley, 1995", second edition.
http://latex-project.org/guides/
http://en.wikibooks.org/wiki/LaTeX
https://tobi.oetiker.ch/lshort/lshort.pdf
https://www.writelatex.com/blog/7-free-online-introduction-to-latex-course-part-1#
http://www.artofproblemsolving.com/Wiki/index.php/LaTeX:Symbols
http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html
But there is a new edition of this, and many many other books
available now.
That’s not a attractive list. Let’s see how to do better. . .
We’ll use a \newpage command to start our next section on a new
page.
Add that bibitem to your file and you can reference the book in
your text with the \cite{KopkaDaly} command
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
lecture 1
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Lecture 1
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
The following LATEX mark-up will produce a bullet pointed list.
To get a numbered list, try the following:
The good things about studying maths are:
\begin{itemize}
\item Doing lots of maths.
The bad things about studying maths are:
\begin{enumerate}
\item Not doing enough maths in the evenings and weekends.
\item Getting lots of coursework.
\item Not getting enough coursework.
\item Sitting lots of exams.
\item Too few exams.
\item \ldots\ Can you see how to create a bulleted list?
\item \ldots\ Can you see how to create a numbered list?
\end{enumerate}
\end{itemize}
Shaw
MA2730, Analysis I, 2015-16
bicom, mathematics, CEDPS, IMM, CI, Brunel
Shaw
MA2730, Analysis I, 2015-16
bicom, mathematics, CEDPS, IMM, CI, Brunel
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
Overview (MA2730,2812,2815)
lecture 1
Lecture 1
Lists within lists. . .
Last, a descriptive list:
The ugly aspects of a maths degree are:
\begin{description}
\item[Short lectures.] It would be much better if we could
start maths at 7:30am and continue learning it until 9pm,
seven days a week.
You can even put lists inside of lists. . .
You can even put lists inside of lists\ldots
\begin{description}
\item[Calculus:] One easy and one hard thing:
\begin{enumerate}
\item Differentiation \item Integration
\end{enumerate}
\item[Algebra:] One good thing and one excellent thing!
\begin{itemize}
\item Complex numbers \item Gauss-Jordan elimination
\end{itemize}
\end{description}
\item[Thin textbooks.] Each book should be at least
one thousand pages long.
\item[OK?] \ldots\ Can you see how to create a descriptive list?
\end{description}
Note that blank lines have no effect in these list environments.
They just make the source file more readable.
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
Overview (MA2730,2812,2815)
Shaw
bicom, mathematics, CEDPS, IMM, CI, Brunel
MA2730, Analysis I, 2015-16
lecture 1
Lecture 1
Overview (MA2730,2812,2815)
lecture 1
End of Lecture
Next Week. . .
Computational and
αpplie∂ Mathematics
Lots of mathematics!
And
Some FoNt Select
Shaw
MA2730, Analysis I, 2015-16
Lab session
In the first lab session you will create a LATEX document that sets
out the things you like most about studying maths, and the things
you like least.
You’ll also practice producing mathematical copy by creating some
Maclaurin series.
ds.
ion comman
bicom, mathematics, CEDPS, IMM, CI, Brunel
Shaw
MA2730, Analysis I, 2015-16
bicom, mathematics, CEDPS, IMM, CI, Brunel