NM262 (2017) Numerical Methods / Numeriese Metodes Universiteit Stellenbosch University Applied MathematicsToegepaste Wiskunde

## Lecturer:Dosent:

Prof JAC Weideman,
A315, weideman@sun.ac.za

## Coordinator:Koordineerder:

Dr Nick Hale,
A410, nickhale@sun.ac.za

## Important notices:Belangrike kennisgewings:

• Assignment 5 is available here. Due 10 October 16:00. Opdrag 5 is hier beskikbaar. Inhandig 10 Oktober 16:00.
• It has come to our attention that the links from the lecture notes to the videos on SUNLearn have changed, so clicking on the video icon on the pages do not work anymore. We are looking into fixing the problem. Meanwhile, you can go directly to SUNLearn and view the videos there. Ons het gesien die skakels van die lesingnotas na die SUNLearn videos het verander, so deur te kliek op die video ikoon op die bladsye werk nie meer nie. Ons sal die probleem probeer regstel. In die tussentyd kan jy direk na SUNLearn gaan en die videos daar besigtig.
• Solutions to A1 and some common mistakes can be found here (updated 11 Sept).
A histogram of test scores can be found here.
Oplossings tot A1 en algemene foute kan hier gekry word (ogedateer 11 Sept).
'n Histogram van toetspunte kan hier gekry word.
• Vacation challenge: Show how the multiple choice problem from the test can be answered by hand calculation (no computer). Vakansie uitdaging: Wys hoe die multikeuse probleem van die toets met handberekening beantwoord kan word (geen rekenaar).

## Assignments:Werkopdragte:

You should use this template. Gebruik hierdie templaat.

Assignments should be submitted in both of the following formats: Opdragte moet ingehandig word in beide die volgende formate:

• In hardcopy (published using MATLAB's publish function from the toolbar [video]).
Hand-in in the locked box across from A307/A308.
In harde kopie ('published' met MATLAB se publish funksie van die nutsbalk [video]).
Inhandig in die toesluit boks oorkant A307/A308.
• In electronic copy (a single m-file) here: In elektroniese vorm ('n enkele m-leer) hier:

Assignments submitted in only one format may not be marked! The markers will mark the hard copy. The electronic copy will be used for plagiarism checks and as a backup in case your hard copy gets misplaced. Opdragte wat net in een van die formate ingehandig word mag dalk nie gemerk word nie. Die nasieners merk die gedrukte stuk. Die elektroniese kopie word gebruik vir plagiaattoetse en rugsteun as jou gedrukte stuk dalk vermis raak.

Hints for the current assignment will be given in the blue box below. Wenke vir die huidige opdrag word in die blou boksie hieronder gegee.

Assignment Opdrag Due date Sperdatum Solution Oplossing
assign1.pdf 28/07/2017 assign1sols.m & assign1sols.pdf & assign1sols.mp4 (video)
assign2.pdf 11/08/2017 assign2sols.m & assign2sols.pdf & assign2sols.mp4 (video)
assign3.pdf 25/08/2017 assign3sols.pdf (no .m, no video)
assign4.pdf 22/09/2017

## Common mistakes in assignments:Algemene Foute in Opdragte:

• Use the template. (It is best to download using Google Chrome as Internet Explorer messes up the line breaks.) Gebruik die templaat. (Dit is beter om Google Chrome te gebruik aangesien Inernet Explorer die lynbreke opmors.)
• You should use `%%`   to break up the questions in the script. (The space afterwards is important!)
If you don't do this all results will appear at the end of publish and you will have missing figures.
Jy moet `%%`   gebruik om die vrae in jou teksleer te skei. (Die spasie agterna is belangrik!)
As jy dit nie doen nie sal al die resultate aan die einde van jou 'publish' dokument verskyn en figure sal afwesig wees.
• Do not use spaces in file or directory (folder) names. Moenie spasies gebruik in jou legger of 'folder' ('directory') name nie.
• File names should not start with numeric characters, only alphabetic. Jou teksleer se naam moenie met numeriese karakters begin nie, slegs alfabeties.
• Do not copy the output lines `ans = ...` from the command line to the publish script. Moenie die afvoerlyne `ans = ...` vanaf die bevelskyn kopieer na die 'publish' dokument nie.
• Turn off subplot when you are finished with it by typing `subplot(1,1,1)`. Sit subplot af as jy klaar is daarmee deur `subplot(1,1,1)` te tik.
• Be sure to hand in hardcopy of the published version of your assignment, not the m-file.
The m-file does not show the answers and figures, hence we cannot mark it.
Maak seker dat jy die hardekopie van die 'publish' dokument inhandig, nie die m-leer nie.
Die m-leer wys nie die antwoorde en figure nie, en kan dus nie gemerk word nie.
• The hardcopy document you hand in should show results (output). Just showing us your code is not good enough, we need to see its output. Missing output could be a misplaced semi-colon (;) that suppresses the output, or a Publish that failed. (In the latter case, we recommend that you watch the Publish video.) Output will not appear if there were coding mistakes (errors) in earlier problems. Die hardekopie dokument wat jy inhandig moet resultate (afvoer) wys. Om net jou kode te wys is nie goed genoeg nie, ons moet die afvoer sien. Afvoer wat vermis word kan moontlik toegeskryf word aan 'n oorbodige kommapunt (;) wat die afvoer onderdruk, of 'n 'Publish' wat gefaal het. (In lg geval raai ons jou aan om die video oor 'Publish' te kyk.) Afvoer sal ook nie verskyn as daar kodeerfoute in vorige vrae was nie.
• Do not save your published file in HTML format and then try to print it. The figures will be missing (they are saved in a different folder). Instead, print immedately upon Publishing. If you wish to save the published version of your assignment, convert to PDF first. Moenie probeer om jou gepubliseerde dokument in HTML formaat te stoor en dan later te druk nie. Die figure gaan weg wees (hulle word apart gestoor). Druk eerder sodra jy gepubliseer het. As jy die gepubliseerde weergawe van jou opdrag wil stoor, doen dit eerder in PDF formaat.
• Seriously. DO NOT USE SPACES in file and/or directory (folder) names. Ernstig nou, MOENIE SPASIES GEBRUIK in jou teksleer of 'folder' name nie.

## Information Sheet and Outcomes:Inligtingstuk en Uitkomste:

• Can be found here (afr) and here (eng). Kan hier (afr) en hier (eng) gevind word.

## Lecture timetable:Lesingrooster:

• TuesdayDinsdag 08:00: K302 (Eng)
• TuesdayDinsdag 09:00: K302 (Afr)
• WednesdayWoensdag 09:00: E352/353 (Afr)
• WednesdayWoensdag 10:00: E352/353 (Eng)

## Tutorials:Tutoriale:

• ThursdayDonderdag 12:00: S207A, S207B, S203
• If you don't need help with your assignment
you are under no obligation to attend the practical.
As jy nie hulp met jou opdrag nodig het nie is jy
onder geen verpligting om die prakties by te woon nie.
first in the blue box above, then on the lecture slides or videos.
Lab maniere: Voordat jy vir hulp vra, probeer eers antwoorde kry
in die blou boksie bo, dan op die lesingnotas of die videos.

## Flexible Assessment dates:Datums vir buigsame assessering:

A1: 31 August, A2: 14 November, A3: 30 November

The official document on flexible assessment can be found here. General stipulations here. Die amptelike dokument oor buigsame assessering kan hier gevind word. Algemene regulasies hier.

## Lecture notes:Lesingnotas:

The fact that the lecture slides are available here should not be taken as invitation to skip class.
Not everything covered in class appear on these slides.
Die feit dat die klasnotas hier beskikbaar is moenie gesien word as aanmoediging om klas te bank nie.
Nie alles wat in die klas behandel is verskyn op hierdie notas nie.

• Week 1 (18, 19, 20 Jul): Introduction to MATLAB Inleiding tot MATLAB, Appendix A1-A6
• Week 2 (24, 25 Jul): Introduction continued Inleiding vervolg, Appendix A7-A8, A11
• Week 3 (01 Aug, 02 Aug): Solving nonlinear equations Die oplossing van nie-lineere vergelykings, 3.1-3.6
• Week 4 (08 Aug): Solving nonlinear equations Die oplossing van nie-lineere vergelykings, 3.8-3.9
• Week 5 (15, 16 Aug): Solving nonlinear equations 3.10; Linear equations 4.1-4.2 Die oplossing van nie-lineere vergelykings 3.10; Lineere vergelykings 4.1-4.2,
• Week 6 (22, 23 Aug): Solving linear equations Die oplossing van lineere vergelykings, 4.1-4.3, 4.5, 4.8-4.9
• Week 7 (28 Aug-1 Sept): Test A1 on Thursday 31 August; no lectures Toets A1 op Donderdag 31 Augustus; geen lesings nie
• Week 8 (4-8 Sept): Vacation week; no lectures Vakansieweek; geen lesings nie
• Week 9 (12, 13 Sept): Solving linear equations Die oplossing van lineêre vergelykings, 4.10-4.11, 5.1-5.2, 5.7
• Week 10 (19, 20 Sept): Curve fitting and interpolation Krommepasssing en interpolasie, 6.1-6.5
• Week 11 (26, 27 Sept): Spline interpolation, numerical differentiation Krommepasssing en interpolasie, 6.6, 8.1-8.2, 8.4-8.5, 8.10