User Tools

Site Tools


Math 445 HW1

If you have your own computer and want to run Matlab on it, download and install Matlab from UNH academic software. Otherwise find a UNH computer that has Matlab installed.

Remember, you are required to do these homeworks by yourself. If you get stuck, refer to your textbook. If you are absolutely stuck, talk to a fellow student, the teaching assistant, or the instructor, and get hints for how to proceed. But do not copy someone else's solved problem.

Problem 1: The combined resistance $R_T$ of three resistors $R_1, R_2, R_3$ in parallel is given by

R_T =  \frac{1}{\frac{1}{R_1} + \frac{1}{R_2} + \frac{1}{R_3}}

Create variables for the three resistors $R_1, R_2, R_3$, with values 5, 3, and 4. Then calculate $R_T$ by translating the above formula into Matlab syntax.

Problem 2: Another series expansion of $\pi$ is

\pi = 4 \sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{2k-1} = 4 \left(1 - \frac{1}{3} + \frac{1}{5} - \ldots \right)

Do you think finite truncations of this series will converge to $\pi$ faster or slower than the Ramanujan series from lab 1? Take a guess before testing in Matlab!

How many digits of accuracy do you get for two terms of this series? How many digits did you get for two terms of the Ramanujan series? What reason is there for the difference in the convergence rate of the two formulae?

Problem 3: A series expansion for $e$ is

e = \sum_{k=0}^{\infty} \frac{1}{k!} = 1 + \frac{1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \ldots

How many terms of this series do you need to get four digits of accuracy?

Problem 4: Let $e_n$ be the truncation of the above series after the $n$th term, i.e. $e_1 = 1$, $e_2 = 1 + 1/1!$, etc. Devise a Matlab expression that uses the log10 function to count the number of digits of accuracy for a given $e_n$. Use this expression to verify your answer for problem 3.

gibson/teaching/spring-2016/math445/hw1.txt · Last modified: 2016/01/25 11:55 by gibson