Skip to content

Latest commit

 

History

History

Homework

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Numerical Analysis Class: Homeworks

Undergraduate numerical analysis, first semester, APPM 4650. University of Colorado Boulder

Most of the homework assignments are here, but homework solutions are on Canvas

  • HW 0 is optional (suggested due-date: Fri, Aug 28)
  • HW 1 on Ch 1 is due Friday Sept 4 2020 at 5 PM on Gradescope [topic: conditioning, stability and floating point]
  • HW 2 on Ch 2 is due Friday Sept 11 2020 at 5 PM on Gradescope [topic: bisection and fixed-point iterations]
  • HW 3 on Ch 2 is due Friday Sept 18 2020 at 5 PM on Gradescope [topic: Newton's method]
  • HW 4 on Ch 3 is due Monday Oct 5 2020 at midnight PM on Gradescope [topic: splines]
  • HW 5 on Ch 4 is due Saturday Oct 10 2020 at midnight PM on Gradescope [topic: finite differences]
  • HW 6 on Ch 4 is due Saturday Oct 17 2020 at midnight PM on Gradescope [topic: numerical integration]
  • HW 7 on Ch 4 is due Saturday Oct 24 2020 at midnight PM on Gradescope [topic: advanced numerical integration]
  • HW 8 on Ch 5 is due Saturday Nov 7 2020 at midnight PM on Gradescope [topic: ODEs and IVPs]
  • HW 9 on Ch 5 is due Saturday Nov 14 2020 at midnight PM on Gradescope [topic: ODEs and IVPs, RK]
  • HW 10 on Ch 5 is due Saturday Nov 21 2020 at midnight PM on Gradescope [topic: ODEs and IVPs, multi-step, stability]
  • HW 11 on Ch 5 is due Saturday Dec 5 2020 at midnight PM on Gradescope [topic: absolute stability, Gaussian Elimination]

FAQ

General

Gradescope has a submission guide that recommends software for your phone to take pictures of written homework and convert it to a PDF (your final submission to Gradescope must be a PDF).

Note: the links in the PDFs will not work if you view the PDF on github, but if you open the PDF in its own tab, or download it, all the links should work.

Collaboration: Collaboration with your fellow students is OK and in fact recommended, although direct copying is not allowed. Please write down the names of the students that you worked with.

Internet: The internet is allowed for basic tasks (e.g., looking up definitions on wikipedia) but it is not permissible to search for proofs or to post requests for help on forums such as math.stackexchange.com or to look at solution manuals

Merging multiple PDF files

Mac You can use the Preview software that comes with Mac, and drag-and-drop in the Thumbnail view, or follow these instructions.

Linux install pdftk (e.g., apt-get install pdftk), and the on the command line, it's just pdftk inputFile1.pdf inputFile2.pdf cat output outputFileName.pdf. This works on Mac and Windows too (on Mac, the exact command line works; on Windows, I'm not sure).

Windows there are lists of free web- and desktop-based software, but PDFtk is one of the most classic and respected (no viruses). I haven't used PDFtk on Windows, but the website claims they have a GUI; or if you don't like their GUI, try a 3rd party GUI that uses PDFtk.

Python

For overall Python, and numpy in particular, Matlab users might like NumPy for Matlab users.

For plotting in Python using Matplotlib, try these plotting cheatsheets and controlling figure aesthetics with seaborn.

Jupyter

Tips for exporting jupyter notebook code to a PDF:

  • You can try this Notebook to PDF conversion website that some of our students have had good luck with

  • Or try nbconvert which requires pandoc. You can do this on Colab, following the instructions here (but note that you may need to add a backslash before any white space when you run commands, e.g., change a command like

!cp drive/My Drive/Colab Notebooks/Untitled.ipynb ./ to !cp drive/My\ Drive/Colab\ Notebooks/Untitled.ipynb ./ )

Note that if you include latex in the jupyter notebook, when you run nbconvert, you cannot have any whitespace near the \$ symbols for math due to a requirement of pandoc (see here). So, $ f(x) = 3x^2 $ will not work, but $f(x) = 3x^2$ will be OK.

The downside of nbconvert is that images are saved as png, not pdf, so fonts don't come through, but that's not a big deal for homework.

If you run jupyter locally, you might be able to run nbconvert without using the command line; go to "Download" the "PDF via LaTeX".

Python source code (not Jupyter)

The non-preferred ways are (1) screenshot of your editor (not so nice since it's an image not text, but at least you get syntax color highlighting), and (2) export from a text editor to PDF (not so nice if you don't get syntax color highlighting).

It's not nice to the graders to submit code without syntax color highlighting!

Better ways: it depends on your system and editor, but there are many ways. For example, this stackoverflow 'printing python code to PDF' offers several suggestions. For example, since I already use vim and its setup with syntax highlighting, I can do this answer and do vim abc.py -c ":hardcopy > abc.ps" -c ":q" followed by ps2pdf abc.ps abc.pdf -- no extra software needed!

Matlab

You can use the export notebook features in Matlab (it can handle latex) if you want; see the Live-Editor; there are also claims on the internet that it's easy to get Jupyter to run with a Matlab kernel, so you could use Jupyter.

To just export a figure, there are builtin methods, but one of the nicer ways is to use export_fig, which works like export_fig MyFileName -pdf -transparent and makes a file MyFileName.pdf (note that PDF files for figures are preferred, since then the text is saved as a font and not bitmapped)