\\\\( \nonumber \newcommand{\bevisslut}{$\blacksquare$} \newenvironment{matr}[1]{\hspace{-.8mm}\begin{bmatrix}\hspace{-1mm}\begin{array}{#1}}{\end{array}\hspace{-1mm}\end{bmatrix}\hspace{-.8mm}} \newcommand{\transp}{\hspace{-.6mm}^{\top}} \newcommand{\maengde}[2]{\left\lbrace \hspace{-1mm} \begin{array}{c|c} #1 & #2 \end{array} \hspace{-1mm} \right\rbrace} \newenvironment{eqnalign}[1]{\begin{equation}\begin{array}{#1}}{\end{array}\end{equation}} \newcommand{\eqnl}{} \newcommand{\matind}[3]{{_\mathrm{#1}\mathbf{#2}_\mathrm{#3}}} \newcommand{\vekind}[2]{{_\mathrm{#1}\mathbf{#2}}} \newcommand{\jac}[2]{{\mathrm{Jacobi}_\mathbf{#1} (#2)}} \newcommand{\diver}[2]{{\mathrm{div}\mathbf{#1} (#2)}} \newcommand{\rot}[1]{{\mathbf{rot}\mathbf{(#1)}}} \newcommand{\am}{\mathrm{am}} \newcommand{\gm}{\mathrm{gm}} \newcommand{\E}{\mathrm{E}} \newcommand{\Span}{\mathrm{span}} \newcommand{\mU}{\mathbf{U}} \newcommand{\mA}{\mathbf{A}} \newcommand{\mB}{\mathbf{B}} \newcommand{\mC}{\mathbf{C}} \newcommand{\mD}{\mathbf{D}} \newcommand{\mE}{\mathbf{E}} \newcommand{\mF}{\mathbf{F}} \newcommand{\mK}{\mathbf{K}} \newcommand{\mI}{\mathbf{I}} \newcommand{\mM}{\mathbf{M}} \newcommand{\mN}{\mathbf{N}} \newcommand{\mQ}{\mathbf{Q}} \newcommand{\mT}{\mathbf{T}} \newcommand{\mV}{\mathbf{V}} \newcommand{\mW}{\mathbf{W}} \newcommand{\mX}{\mathbf{X}} \newcommand{\ma}{\mathbf{a}} \newcommand{\mb}{\mathbf{b}} \newcommand{\mc}{\mathbf{c}} \newcommand{\md}{\mathbf{d}} \newcommand{\me}{\mathbf{e}} \newcommand{\mn}{\mathbf{n}} \newcommand{\mr}{\mathbf{r}} \newcommand{\mv}{\mathbf{v}} \newcommand{\mw}{\mathbf{w}} \newcommand{\mx}{\mathbf{x}} \newcommand{\mxb}{\mathbf{x_{bet}}} \newcommand{\my}{\mathbf{y}} \newcommand{\mz}{\mathbf{z}} \newcommand{\reel}{\mathbb{R}} \newcommand{\mL}{\bm{\Lambda}} \newcommand{\mnul}{\mathbf{0}} \newcommand{\trap}[1]{\mathrm{trap}(#1)} \newcommand{\Det}{\operatorname{Det}} \newcommand{\adj}{\operatorname{adj}} \newcommand{\Ar}{\operatorname{Areal}} \newcommand{\Vol}{\operatorname{Vol}} \newcommand{\Rum}{\operatorname{Rum}} \newcommand{\diag}{\operatorname{\bf{diag}}} \newcommand{\bidiag}{\operatorname{\bf{bidiag}}} \newcommand{\spanVec}[1]{\mathrm{span}{#1}} \newcommand{\Div}{\operatorname{Div}} \newcommand{\Rot}{\operatorname{\mathbf{Rot}}} \newcommand{\Jac}{\operatorname{Jacobi}} \newcommand{\Tan}{\operatorname{Tan}} \newcommand{\Ort}{\operatorname{Ort}} \newcommand{\Flux}{\operatorname{Flux}} \newcommand{\Cmass}{\operatorname{Cm}} \newcommand{\Imom}{\operatorname{Im}} \newcommand{\Pmom}{\operatorname{Pm}} \newcommand{\IS}{\operatorname{I}} \newcommand{\IIS}{\operatorname{II}} \newcommand{\IIIS}{\operatorname{III}} \newcommand{\Le}{\operatorname{L}} \newcommand{\app}{\operatorname{app}} \newcommand{\M}{\operatorname{M}} \newcommand{\re}{\mathrm{Re}} \newcommand{\im}{\mathrm{Im}} \newcommand{\compl}{\mathbb{C}} \newcommand{\e}{\mathrm{e}} \\\\)

Exercise 1: Approximating Polynomials. By Hand

A

For each of the following functions, find the approximating polynomials of the first and second degree expanded from the point $x_0=0\,.$

  1. $f(x)=\e^x\,,\,\,x\in \Bbb R\,$

  2. $f(x)=\cos (x)\,,\,\,x\in \Bbb R\,$

  3. $f(x)=\e^{\sin( x)}\,,\,\,x\in \Bbb R\,$

B

The function

$$\,\displaystyle{f(x)=\frac 1 x\,,\,\,x>0}\,$$

can of course not be expanded as a Taylor polynomial about the expansion point $x_0=0\,.$ So instead, determine the approximating polynomial of the first and second degree of $\,f\,$ with expansion point $x_0=1\,.$

Exercise 2: Introduction to Maple

The mathematics software Maple by Maplesoft is one among several mathematical tools in use in education and research at DTU. This exercise constitutes a short introduction to the most important aspects, including a guide to have you adjust the software settings appropriately. If you are familiar with Maple already, then you can skim this exercise and quickly move ahead to the next ones. If you are not familiar with Maple, then it is important that you spend some time to get acquainted with the software which will be used extensively in our course from here on.

Where Do I Get Maple?

Download the installation files to your computer from this site. Log in with your DTU ID, find the most recent version of Maple, and choose a fitting installation file for your operating system. During installation you will need the license key (“Activation key Stand alone”).

Configuration of Maple

When you begin using Maple there are two options you must consider:

  1. Do I wish to work in worksheet mode or in document mode, and
  2. do I wish to write command lines using 1D notation (“MapleNotation”) as programmer’s style or 2D notation (“2D-Math Notation”) with formatting.

Lectures and demos in this course mainly use 1D notation and worksheet mode, which has a programmer’s feel and a more clear separation of command lines from text lines. You can achieve this same setup by following the steps below (you are free to use any configuration of your choice, but expect teachers and examples to refer to the 1D notation setup) (note, there can be slight differences between the Windows and Mac versions of Maple regarding how menu points are labelled):

  • In the Maple menu, go to “Tools$\rightarrow$Options$\rightarrow$Interface$\rightarrow$Default format for new worksheets” and choose “Worksheet”. Then click “Apply Globally”.
  • Then go to “Tools$\rightarrow$Options$\rightarrow$Display$\rightarrow$Input display” and choose “Maple Notation”. Then click “Apply Globally”.
  • Restart Maple. You are now ready!

Möbius Quizzes Run on a Maple Engine

When you enter answers into Möbius for the Weekly Tests and Theme exercises you must use 1D notation (“MapleNotation”). You therefor must make yourself skilled in this syntax regardless of your choice of configuration above. In highshools that use the Maple software, “2D-Math Notation” is often used rather than “MapleNotation”, in particular because that allows for easier use of the left-side pallettes with formatting possibilities for the input. At DTU we prefer the raw text code of “MapleNotation”, which is considered more scientific and with easier error-check and which avoids formatting issues and hidden characters. This choice of notation fits to that of a typical programming language.

Mini-tutorial on Maple

  • Start Maple.

  • As your very first step, and a command you should always start out with in any new Maple sheet, write (next to the > symbol) restart and press Enter. Maple executes the command when pressing Enter. This command initializes (empties) the memory of the sheet.

  • Now try the following calculation on a new line: 2 + 2.

In general, Maple accepts an input and provides an output. You write input in the form of commands or calculations on a command line (indicated with >), and Maple provides an output in the form of a solution, rewritten expression or similar. The output is by default centered and in blue such that output can clearly be distinguished from input. You can suppress (hide) an output by typing a colon : after the input - the input will still be evaluated by Maple, e.g. if you assign a value to a symbol, but no output is shown. You can write several different calculations on the same line by separating them with a semicolon ; - in older versions of Maple, any line had to be ended with a ;, even if there was nothing to separate.

  • Maple can of course be used as a simple calculator, but its more interesting qualities lie in its ability to execute symbolic operations. For example, on a math line try to differentiate $\sin(x)$ with respect to $x$ with the command diff(sin(x) , x).

Here you are using the command diff. Two parameters or arguments, sin(x) and x, are given to the command, separated by a comma ,. Note that you can add extra spaces if you wish between these parts of a command line to help with the overview. Some arguments are required, such as these two (if you omit them, then you’ll receive an error message), others are optional.

  • One of Maple’s biggest strengths is plotting. The simplest plotting command is plot. You can plot the function $\sin(x)$ in the interval between 0 and 5 with the command plot(sin(x), x=0..5). Note how the syntax for an interval is two consecutive punctuation marks. You can achieve equal unit sizes on the axes by adding the argument scaling=constrained and you can change colour with color=red, resulting in a command line that looks like this: plot(sin(x), x=0..5, scaling=constrained,color=red).

  • There is a plentitude of optional arguments and possibilities to adjust and professionalise your plots. To look for more such options and to investigate the possibilites further, we recommend that you make use of Maple’s help function often by leading the problematic command name with a questions mark on an empty command line: ?plot. This will open Maple’s help window - scroll down to see plenty of examples of the command in use, or consider the list of possible arguments and other details to find the options you are looking for.

Here is one more example of a plot, here with more arguments added. Have a guess at the output and the effect of each argument before running the command. plot([sin(x),x^2],x=0..5,y=-2..2,color=[red,blue],scaling=constrained);. (The ^ character creates exponents.)

Writing text in Maple

Every time you press Enter, the current line will be executed and you will jump to the next line ready to type new mathematical input to be executed. Now and then you will instead need to write non-executable text lines to describe your executable lines.

  • Jump to an empty line and use the shortkey combination Ctrl+t (on Mac typically Cmnd+t) to convert that line to a text line. Now write some text. Press Ctrl+m (on an empty text line) to convert back to an executable math line.

Note how an executable math line in 1D notation is initiated with a > symbol whereas a non-executable text line is not.

  • While writing text on a text line, press F5 to switch to mathematical formatting. You can now write non-executable mathematical expressions with 2D formatting. In this non-executable 2D environment, try typing 1/2 to see the 2D formatting appearing, and try typing Pi and then press Esc to create a pi symbol. Press F5 (maybe a few times) to return to regular text.

Maple is not a very rich text editor. When you write reports and assignments, then you can use Maple to write the whole thing in, but we rather recommend an actual text editor instead, such as Word, Latex, Writer or the like. Maple is your strong mathematical engine and plotting tool whose graphs you can copy/paste into your actual text editor, and whose sheets you can export as .pdf and add as appendices to your assignments. Maple is, though, a handy all-round tool for smaller hand-ins and you may use it for your exams in 01006 where time does not allow for exporting and merging appendices. Throughout the course try to work both with Maple’s text features and math features to get used to when the software is and isn’t smart to use.

Learn Maple along the way or seek external ressources

You have now scratched at the very basics of Maple. Your Maple skills will improve gradually while doing the rest of the exercises. In the following exercise, you will try to redo Exercise 1 in Maple.

If you find Maple very difficult, then we’d recommend a clear separation. Try solving an exercise by hand first, and then redo the exercise in Maple while setting it up nicely in a sheet. That will separate your learning of the material from your learning of Maple. Once in a while DTU or the IDA association offers free courses on Maple (not associated with our course or course administration) and you might also be able to find further external ressources.

Exercise 3: Illustrations of Taylor Approximations

A

Plot some of the four functions from Exercise 1 together with their approximating polynomials of the first and second degree.

Exercise 4: Investigations of Approximating Polynomials

A

Use Maple to determine the 9th-degree approximating polynomial $P_9(x)$ with expansion point $x_0=0$ of the function $\sin(x)$. Plot $\sin( x)$ and $P_9(x)$ in the same coordinate system. How far out to the sides can you get the approximating polynomial to follow the function? (Experiment with the degree of the polynomial.)

From here on you may choose to solve exercises either by hand or using Maple if not specified. Be careful not to skip out on the conceptual understanding of a method by thoughtless use of Maple commands - you are in charge of your own learning. As a rule of thumb, any topic that you work with for the first time should be done by hand or as a mix of manual work and Maple (simulated manually) as far as possible and timewise reasonable.

Exercise 5: Estimation of Errors by Approximation

A function $\,f:\Bbb R\rightarrow \Bbb R\,$ is given by

$$f(x)=\sqrt{2x-1}.$$
A

State the domain $\mathrm D(f)\,$ of $\,f\,.$

B

Determine the approximating polynomial $\,P_3(x)\,$ of degree 3 of $\,f\,$ expanded from point $\,x_0=1\,.$

C

Justify that the remainder function $\,R_3(x)\,$ that corresponds to $\,P_3(x)\,$ can be expressed by

$$ R_3(x)=-\frac 58\cdot \frac 1{(2\xi-1)^{7/2}}\cdot (x-1)^4 $$

for a $\,\xi\,$ between $\,1\,$ and $\,x\,.$ Show by estimation of the remainder function that the absolute value of the error you incur by using $\,\displaystyle{P_3\left(\frac 32\right)}\,$ instead of $\,\displaystyle{f\left(\frac 32\right)}\,$ is less than or equal to $\,\displaystyle{\frac 5{2^7}}\,.$

Exercise 6: Introduction to complex Numbers with Maple

Download and work through the Maple demo about complex numbers (see the agenda for today). In the demo the relevant Maple commands for this exercise are presented.

In this exercise you should use Maple to solve the problems. You have in previous weeks solved similar exercises using paper and pencil. Reflect on those answers while solving the problems below with Maple - remember that you sometimes have to elaborate on the output that Maple provides for it to be a complete answer.

A

What is $i^2$, $i^3$, $(-i)^4$ og $(-i)^{-5}\,?$

B

Determine the real part and the imaginary part of

$$\frac{-2+3i}i$$

and write the result on rectangular form.

C

Given $w=1-i\,$,

  1. determine $|\,w\,|$ and $\mathrm{Arg}(w)\,$
  2. determine $|\,\e^w\,|$ and $\mathrm{Arg}(\e^w)\,$

D

Write the following complex numbers on rectangular form:

$$\e^{i\frac{\pi}{2}}\quad \text{and}\quad 3\e^{1+\pi i}$$

E

Compute the solutions to the equation

$$z^2+(2+2i)z-2i=0\,.$$

F

Compute for every $\,t\in \reel\,$ the derivatives of the following functions:

$$ \begin{aligned} f_{1}(t) &= t^{2} + i \, \sin(t) \newline f_{2}(t) &= 1+it^5\newline f_{3}(t) &= t^5-i\newline f_{4}(t) &= 3\, \e^{it}\newline f_{5}(t) &= i\, \e^{2t+3it} \end{aligned} $$

Exercise 7: Approximation of Complex Functions of a Real Variable

Approximating polynomials of complex functions of a real variable are stated using the same formula as real functions of a real variable. In the following we will consider the function

$$f(x)=2\cos(x)+i\,\sin(2x)\,,\,\,x\in \Bbb R\,.$$
A

Determine the approximating polynomial $\,P_3\,$ of at most degree three of $\,f\,$ expanded from point $\,x_0=0\,.$

B

Determine the approximating polynomial $\,Q_3\,$ of the third degree of $\,f\,$ expanded from point $\,x_1=\frac{\pi}2\,.$ (If you feel comfortable with the manual method, then train your use of Maple’s mtaylor command. Remember that the degree has to be typed as one higher.)

C

The number $1$ is closer to $\,x_1=\frac{\pi}2\,$ than to $\,x_0=0\,.$ Why is it still most likely a smarter choice to use $\,P_3\,$ than $\,Q_3\,$ if you need an approximated value of $\,f(1)\,?$

Exercise 8: Taylor’s Limit Formula. By Hand

This exercise gives a method for the computation of the limit value of a fraction for which both the numerator and the denominator go towards zero.

A

State for the function $\ln(1+x)$ Taylor’s limit formula (Theorem 4.8) with the expansion point $x_{0}=0$ of degrees 1, 2 and 3.

B

Which of the results from a) cannot be used to find the limit value:

$$\lim_{x\rightarrow 0}\frac{\ln(1+x)-x}{x^2}\,?$$

What is the above limit value?

C

Advanced: Now compute using Taylor’s limit formula the following limit value:

$$\lim_{x\rightarrow 0}\frac{x(\e^x+1)-2(\e^x-1)}{x^3}.$$

D

The answer to question b) is different if one uses the (more precise) first formula at equation (4-25) in Theorem 4.7 for the remainder term, instead of the epsilon function. Show that, using this one can can find the required limit using just the first-degree approximation with the remainder term.