Universiteit Stellenbosch University
Applied MathematicsToegepaste Wiskunde


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


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

Important notices:Belangrike kennisgewings:

  • Test A3 is scheduled for 5 December at 14:00 in S207. It will cover all work of the semester. Toets 3 is vir 5 Desember om 14:00 in S207 geskeduleer. Dit sal handel oor al die werk van die semester.


Your document must be prepared in MATLAB's Live Script format. Use this template. Jou dokument moet in MATLAB se Live Script format formaat voorberei word. Gebruik hierdie templaat.

Make sure the assignment number is shown at the top, as well as your surname, firstname and student number. Maak seker die nommer van die opdrag verskyn bo-aan, sowel as jou van, naam en studentenommer.

You should hand in two identical PDFs of your assignment (in LIVE EDITOR > Save > Export to PDF): Jy moet twee identiese PDFs van jou opdrag inhandig (in LIVE EDITOR > Save > Export to PDF) :

  • One printed copy in the locked box across from A307/A308. Een gedrukte kopie in die toesluit kas oorkant A307/A308.
  • One electronic copy here: Een elektroniese kopie 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. Plagiarism will not be tolerated.
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. Plagiaat sal nie geduld word nie.

Hints for the current assignment will be given in the blue box below. Common mistakes are listed in the green box. Wenke vir die huidige opdrag word in die blou boksie hieronder gegee. Algemene foute word in die groen blokkie gelys.

Assignment Opdrag Due date Sperdatum Solution Oplossing
assign1.pdf 2018/08/03 assign1solns.mlx & assign1solns.pdf assign1solns_2018.mp4 (video)
assign2.pdf 2018/08/17 assign2solns.mlx & assign2solns.pdf
assign3.pdf 2018/08/31 assign3solns.mlx & assign3solns.pdf
assign4.pdf 2018/09/28 assign4solns.mlx & assign4solns.pdf
assign5.pdf 2018/10/12 assign5solns.mlx & assign5solns.pdf
assign6.pdf gauss.m 2018/10/26 assign6solns.mlx & assign6solns.pdf

Hints for Assignment 6Wenke vir Opdrag 6:

  • Problem 1(a): trapz takes vectors as input, not a function. Probleem 1(a): trapz neem vektore as toevoer, nie 'n funksie nie.
  • Problem 1(c): integral takes a function as input, not vectors. Therefore you have to convert the given data to an anonymous function by the use of spline. Probleem 1(c): integral neem 'n funksie as toevoer, nie vektore nie. Dus moet jy 'n anonieme funksie skep uit die gegewe data deur die gebruik van spline.
  • Problem 2(c): A 5-point Simpson rule means 4 intervals. Probleem 2(c): 'n 5-punt Simpson reel beteken 4 intervalle.
  • Problem 2(c): To use the Gauss rule, first transform the interval [0,2] to [-1,1]; see Lecture 19. Probleem 2(c): Om die Gauss reel te gebruik, transformeer eers die interval [0,2] na [-1,1]; kyk Lesing 19.
  • Problem 3: The integrand, 4-x, is a function of only one variable. However, integral2 requires the anonymous function to be defined for two variables x and y (even if y does not appear in the formula). Probleem 3: Die integrand, 4-x, is 'n funksie van slegs een veranderlike. integral 2 wil egter he dat die funksie in terme van twee veranderlikes, x en y, gedefinieer word (selfs al verskyn y nie in die formule nie)
  • Problem 4: to compute the error, use the exact solution given on p.5 of Lecture 20. Probleem 4: om die fout te bereken, gebruik die eksakte oplossing gegee op p.5 van Lesing 20.
  • Problem 6: g should have a positive value in this problem. (Make sure you understand why a negative value is wrong.) Probleem 6: g moet 'n positiewe waarde he in hierdie probleem. (Maak seker jy verstaan hoekom 'n negatiewe waarde verkeerd is.)

Common mistakes in assignments:Algemene Foute in Opdragte:

  • Use the template. Gebruik die templaat.
  • Do not use spaces in file or directory (folder) names. Moenie spasies gebruik in jou legger of 'folder' ('directory') name nie.
  • Make sure the assignment number is shown at the top of your Live script, as well as your surname, firstname and student number. Maak seker die nommer van die opdrag verskyn bo-aan jou Live script, sowel as jou van, naam en studentenommer.
  • The PDF you submit should show the output of each question. In other words, run the entire Live script (Run All) before exporting to PDF. The markers need to see the output, not just the code lines. Die PDF wat jy inhandig moet die afvoer van elke vraag vertoon. Maw, voer die hele Live script uit (Run All) voordat jy die PDF skep. Die merkers wil die afvoer sien, nie net die lyne kode nie.

Information Sheet and Outcomes:Inligtingstuk and Uitkomste:

  • Information Sheet can be found here (afr) and here (eng). Inligtingstuk kan hier (afr) en hier (eng) gevind word.
  • Outcomes can be found here (afr) and here (eng). Uitkomste kan hier (afr) en hier (eng) gevind word.

Lecture timetable:Lesingrooster:

  • TuesdayDinsdag 08:00: K302 (Eng)
  • TuesdayDinsdag 09:00: K302 (Afr)
  • WednesdayWoensdag 09:00: A107 (Afr)
  • WednesdayWoensdag 10:00: A107 (Eng)


  • 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.
  • Lab etiquette: Before asking for help please try to find answers
    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.

Assessment dates:Datums vir assessering:

A1: 06 September A2: 20 November A3: 05 December
The official document on flexible assessment can be found on SUNLearn. Look for this. Die amptelike dokument oor buigsame assessering kan op SUNLearn gevind word. Soek hierna.

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 (24, 25, 26 Jul): Introduction to MATLAB Inleiding tot MATLAB, Appendix A1-A6
  • Week 2 (31 Jul, 1 Aug): Introduction continued Inleiding vervolg, Appendix A5, A7-A8, A11
  • Week 3 (07 Aug, 08 Aug): Solving nonlinear equations Die oplossing van nie-lineere vergelykings, 3.1-3.6
  • Week 4 (14, 15 Aug): Solving nonlinear equations Die oplossing van nie-lineere vergelykings, 3.8-3.10
  • Week 5 (21, 22 Aug): Linear equations 4.1-4.2, 4.5-4.6, 4.8-4.9 Lineere vergelykings 4.1-4.2, 4.5-4.6, 4.8-4.9,
  • Week 6 (28, 29 Aug): Linear equations 4.10-4.11, 5.1-5.2, 5.7 Lineere vergelykings 4.10-4.11, 5.1-5.2, 5.7,
  • Week 7 (18, 19 Sept): Curve fitting and interpolation Krommepasssing en interpolasie, 6.1-6.5
  • Week 8 (25, 26 Sept): Spline interpolation, numerical differentiation Krommepasssing en interpolasie, 6.6, 8.1-8.2, 8.4-8.5, 8.10
  • Week 9 (2, 3 Oct): Numerical integration Numeriese integrasie, 9.1, 9.3-9.7
  • Week 10 (9, 10 Oct): ODEs: Initial-value Problems GDVs: Aanvangswaardeprobleme, 10.1, 10.2.1, 10.2.3, 10.3, 10.4, 10.5, 10.8, 10.9, 10.10
  • Week 11 (16, 17 Oct): ODEs: Boundary-value Problems DVs: Randwaardeprobleme, 11.1, 11.3
  • Week 12 (23, 24 Oct): No new lecture notes, we shall finish lecture 23 and wrap-up. Geen nuwe lesingnotas, ons sal lesing 23 afhandel en opsom.

Useful links:Nuttige skakels: