PHYS 210 2014: Homework 3 Bug List

  1. Bugs are listed in reverse chronological order, with headings indicating which Problem(s) the bug relates to
  2. The online homework handout (Click HERE) should always be up to date
  3. Be sure to clear your browser cache as necessary---if you're not sure whether it's necessary or not, clear it just to be safe.
  4. I will indicate whether or not there is any specific action that you will need to take, relative to the original instructions, to deal with the defect.

Table of Contents

      
 
 
 
 
 
 
 
 
 
 
 

1 Nov 11: Nov 2 bug redux

Somehow the correction I made on Nov 2 to the sample output for the computation or \(\sqrt{2}\) got undone. This has been fixed.

Thanks to Pawel and Eric.

2 Nov 11: Problem 4. IMPORTANT!! Significant Bug in bounce.m corrected; online handout updated (page 21).

Jean and Chan have brought to my attention a serious bug in my original implementation of bounce.m.

This also has necessitated a change to the handout that, sadly, amounts to a clarification of November 9th's clarification (page 21).

Click HERE to see the corrected source code: search for the comment that begins with ZZZ.

As explained in the code comments, the assignment of the variable dlim, which defines the width of the border around the unit square for plotting purposes, was previously made inside the graphics section, which means that if plotting is disabled (i.e. plotenable is 0) then it doesn't get assigned. However, it needs to be assigned ALWAYS, even if plotting is disabled, since I have asked you to use it in your determination of when the simulation should end.

Action you need to take

This varies depending on whether you have or have not started working on the problem.

If you have started

If you have already copied bounce.m to mbounce.m and begun work on mbounce.m then simply move the assignment statement

dlim = 0.15;

out of the for loop: in my amended version I have put it immediately after the statement:

fwidth = 5;

So once your code reads ...

fwidth = 5;
dlim = 0.15;

... you're good to go.

If you have not started

If you have not yet copied bounce.m then you need to take NO ACTION, apart from following the updated instructions, which involve a clarfication of November 9th's clarifaction (sorry!), but please do get working on the problem!

Thanks to Jean and Chan.

3 Nov 9: Problem 4.2: Clarification of computational domain vs plotting domain (page 21)

Action you need to take

Read the clarification on page 21 and be sure that your implementation conforms to what is described there. There is no change to the original specification, but there has been some confusion on this point; hence the addendum.

4 Nov 5: Problem 4.6.1: Wrong bounds specified in equation (49) (page 32)

Action you need to take

Use the corrected bounds in your code (the same bounds used in bounce.m)

Description

The bounds for the plotting domain were incorrectly specified. They should be


\[ -0.15 \le x \le 1.15 \quad\quad\quad -0.15 \le y \le 1.15 \]

Thanks to ??? (send me your name and I'll post it here for posterity!)

5 Nov 4: Problem 3.2.2.2: Wrong upper bound of interval specified for root search (page 20)

Action you need to take

Use the corrected upper bound

Description

The 2-item list following the text

"Then create a script file tf2.m that"

incorrectly stated the range of \(x\) that is to be used for plotting and for identifying roots: it now correctly reads

\[ 0.1 \le x \le 18.0 \]

Previously the upper bound was given as 1.8.

Thanks to Connor B.

6 Nov 2: Problem 3: Sample output fixed (page 16)

Action you need to take: None, other than to note the change.

Description

I cut-and-paste the wrong output for the invocation of newtonfda that computes \(+\sqrt{2}\), so it was a duplicate of that for the \(-\sqrt{2}\) calculation. The displayed output is now correct.

7 Nov 2: Problem 3: Typo fixed (page 14)

Action you need to take: None

There was some text missing in the first paragraph of section 3.2.1, and the problem has been rectified.

8 Oct 31: Problem 3: Small and irrelevant change to newtonfda header (page 15)

Action you need to take

Use the amended header in your implementation of newtonfda

Description

I've changed the specification of the header for newtonfda to

function x = newtonfda(f, x0, h, epsilon, nmax)

It was previously

function [x] = newtonfda(f, x0, h, epsilon, nmax)

Since there is only one output argument, x, which is to be a vector, the [ ] around x are redundant: i.e. the definitions are equivalent, so I'm opting for the syntactically-simpler one.

9 Oct 31: Problem 2: Typo in 2.3 instructions (page 8)

Action you need to take

Use the corrected header in your implementation of zebra

Description

The function header is

function z = zebra(n)

not

z = zebra(n)

as in the original.

Thanks to Kevin K.

10 Oct 30: IMPORTANT: Instruction clarification (page 3)

Action you need to take

Read or reread item 10 of the updated instructions carefully, paying heed to the Warning!! section.

11 Oct 30: Problem 2: Bug in 2.4 (page 9)

Action you need to take: None

Equation (1) had a typo: there was a subscript \(k\) on \(y^{\rm in}\) which has been corrected to \(i\)

Thanks to Amanda.