Math 342 - Week 2 Notes

Mon, Jan 24

Today we reviewed Taylor’s theorem from calculus. We also talked about using list comprehensions in Python.

Wed, Jan 26

Today we continued talking about Taylor series and polynomials. We used the Maclaurin series \[\ln(1+x) = \sum_{k = 0}^\infty \frac{(-1)^k x^{k+1}}{k+1}\] to calculate \(\ln(\frac{3}{2})\). Here is how I would do this using Python:

from scipy.special import factorial
x = 1/2
sum([(-1)**k*x**(k+1)/(k+1) for k in range(6)]) # 0.4046875

Of course, you would get a better approximation with more than six terms. After that example, we worked on the lab from Monday which is due on Friday.

Fri, Jan 28

Today we introduced the bisection method for finding the roots of a continuous function.