Computer Programing and Typesetting

Computer Programming

Numerical mathematics courses, such as Numerical Analysis and Optimization, require computer programming in homework assignments and projects. MATLAB and Python are two most popular choices of programming languages.

  • MATLAB: a commercial scientific computing environment and programming language. Georgia State University students have free access to MATLAB here. Tutorials can be found here.

  • Python: a free and open source programming language that can perform a wide range of tasks including scientific computing. We mostly work with the numpy library. Tutorials of Python and numpy can be found here and here.

Sample computer program

You may expect to write programs like the Newton method for your homework assignments and projects. An example implementation can be found written in MATLAB and Python.

Self-assessment problems

It is important that you have working knowledge with at least one of these two languages before the semester begins. To check your readiness, try to implement the following two problems. If you can complete them and obtain correct results without difficulty, you should be good to go.

  • Finding the real roots of quadratic equations: write a program that finds the real roots of any given quadratic equation \(ax^2+bx+c=0\). The program should take \((a,b,c)\) as input and return the real roots \(x = (-b \pm \sqrt{b^2 - 4ac})\,/\,(2a)\) if \(b^2 \ge 4ac\) or the message “No real root for this equation” otherwise.

  • Generating Fibonacci sequence: let \(x_0=0\), \(x_1=1\), and \(x_{n}=x_{n-1}+x_{n-2}\) for \(n \ge 2\). Write a program to generate \(x_0,x_1,\dots,x_{10}\).

Frequently asked questions

  • Q: Do I have to write computer program to complete homework assignments?
    A: Yes, computer programming is required.

  • Q: Do I need to know both MATLAB and Python? Can I use another programming language?
    A: You can use either MATLAB or Python, not necessarily both. It is strongly recommended that you choose one from these two. You may consult the instructor if you can only use other programming languages.

  • Q: How do I know if I have enough ability in computer programming for this course before the semester begins?
    A: If you can implement the two self-assessment problems above and obtain correct results without difficulty, then you are good to go.

  • Q: Will the instructor teach how to write computer program during the class? Will the instructor answer questions related to programming in homework?
    A: The instructor will not teach computer programming. Programming in MATLAB or Python is a prerequisite. If you have no background in computer programming but have to take this course, please study the tutorials above, and make sure you can work out the two self assessment problems above before the semester begins. The instructor will not answer questions related to computer programming or debugging in homework.

Resources for LaTeX Typesetting

You are encouraged to submit homework typed in LaTeX. LaTeX is a simple typesetting software to generate math-rich documents.