Google Search in:

2250-4 12:55pm Lecture Record Week 4 S2010

Last Modified: January 31, 2010, 14:08 MST.    Today: October 21, 2017, 13:40 MDT.

2 Feb: Numerical Solutions for y'=f(x,y)

Repeated here is the material from last week, part of which will be repeated in the second lecture on numerical methods, as review. This week, the remained of the topics, on Euler, Heun and RK4, will be completed. A brief discussion of computer implementation, as a maple session, will occur at a later date.
Euler, Heun, RK4 algorithms
   Computer implementation in maple
   Geometric and algebraic ideas in the derivations.
     Numerical Integration   Numerical Solutions of DE
     RECT                    Euler
     TRAP                    Heun [modified Euler]
     SIMP                    Runge-Kutta 4 [RK4]

   Numerical work maple L3.1, L3.2, L3.3, L4.1, L4.2, L4.3 will be
     submitted after Spring Break. No numerical problems from ch 2
     are assigned.
   All discussion of maple programs will be based in the TA session
     [Cox and Murphy].
   There will be one additional presentation of maple lab details
     in the main lecture. The examples used in maple labs 3, 4 are
     the same as those in exam review problems ER-1, ER-2. Each has
     form dy/dx=f(x,y) and requires a non-quadrature algorithm, e.g.,
     Euler, Heun, RK4.
Numerical Solution of y'=f(x,y)
   Two problems will be studied, in maple labs 3, 4.
   First problem
      y' = -2xy, y(0)=2
      Symbolic solution y = 2 exp(-x^2)
   Second problem
      y' = (1/2)(y-1)^2, y(0)=2
      Symbolic solution y = (x-4)/(x-2)
   The work begins in exam review problems ER-1, ER-2, both due
   before the first midterm exam. The maple numerical work is due
   much later, after Spring Break.

Exam Review: Problems ER-1, ER-2 (46.9 K, pdf, 01 Jan 2010)
Examples
   Web references contain two kinds of examples.
     The first three are quadrature problems dy/dx=F(x).
     The fourth is of the form dy/dx=f(x,y), which requires a
       non-quadrature algorithm like Euler, Heun, RK4.

       y'=3x^2-1, y(0)=2, solution y=x^3-x+2
       y'=exp(x^2), y(0)=2, solution y=2+int(exp(t^2),t=0..x).
       y'=2x+1, y(0)=3 with solution y=x^2+x+3.
       y'=1-x-y, y(0)=3, solution y=2-x+exp(-x).
Rect, Trap, Simp rules from calculus
   Introduction to the Euler, Heun, RK4 rules from this course.
   Example: y'=3x^2-1, y(0)=2 with solution y=x^3-x+2.
   Example: y'=2x+1, y(0)=3 with solution y=x^2+x+3.
   Dot tables,  connect the dots graphic.
   How to draw a graphic without knowing the solution equation for y.
     Key example y'=sqrt(x)exp(x^2), y(0)=2.
     Challenge: Can you integrate sqrt(x) exp(x^2)?
   Making the dot table by approximation of the integral of F(x).
   Rect, Trap, Simp rules and their accuracy of 1,2,4 digits resp.
Example for your study:
   Problem:  y'=x+1, y(0)=1
     It has a dot table with x=0, 0.25, 0.5, 0.75, 1 and
          y= 1, 1.25, 1.5625, 1.9375, 2.375.
     The exact solution y = 0.5(1+(x+1)^2) has values
          y=1, 1.28125, 1.625, 2.03125, 2.5000.
     Determine how the dot table was constructed and identify
       which rule, either Rect, Trap, or Simp, was applied.
    Introduction: Maple Labs 3 and 4, due after Spring Break.
    Maple lab 3 S2010. Numerical DE (82.5 K, pdf, 01 Jan 2010)
    Maple lab 4 S2010. Numerical DE (78.9 K, pdf, 01 Jan 2010)
    References for numerical methods:
    Manuscript: Numerical methods manuscript (112.1 K, pdf, 03 Sep 2009)
    Text: Maple L3 snips S2010 (maple text) (5.0 K, txt, 24 May 2007)
    Maple Worksheet: Maple L3 snips S2010 (maple .mws) (6.6 K, mws, 25 May 2007)
    Text: Maple code for maple labs 3 and 4 (5.1 K, txt, 03 Jan 2009)
    Maple Worksheet: Sample maple code for Euler, Heun, RK4 (1.9 K, mws, 21 Feb 2006)
    Maple Worksheet: Sample maple code for exact/error reporting (2.1 K, mws, 21 Feb 2006)
    How to use maple at home (4.0 K, txt, 06 Jan 2010)
    Maple lab 3 symbolic solution, ER-1 solution. (184.6 K, jpg, 08 Feb 2008)
    Transparencies: Sample Report for 2.4-3. Includes symbolic solution report. (175.9 K, pdf, 02 Jan 2010)
    S2010 notes on numerical DE report for Ch2 Ex 10 (49.5 K, pdf, 01 Jan 2010)
    S2010 notes on numerical DE report for Ch2 Ex 12 (64.4 K, pdf, 01 Jan 2010)
    S2010 notes on numerical DE report for Ch2 Ex 4 (49.5 K, pdf, 01 Jan 2010)
    S2010 notes on numerical DE report for Ch2 Ex 6 (65.9 K, pdf, 01 Jan 2010)
    Sample Report for 2.4-3 (175.9 K, pdf, 02 Jan 2010)
    Transparencies: ch2 Numerical Exercises 2.4-5,2.5-5,2.6-5 plus Rect, Trap, Simp rules (219.5 K, pdf, 29 Jan 2006)

The work for book sections 2.4, 2.5, 2.6 is in maple lab 3 and maple lab 4.
The numerical work using Euler, Heun, RK4 appears in L3.1, L3.2, L3.3.
The actual symbolic solution derivation and answer check were submitted as Exam Review ER-1. Confused? Follow the details in the next link, which duplicates what was done in ER-1.
Sample symbolic solution report for 2.4-3 (22.6 K, pdf, 19 Sep 2006)
Confused about what to put in your L3.1 report? Do the same as what appears in the sample report for 2.4-3 (link below). Include the hand answer check. Include the maple code appendix. Then fill in the table in maple Lab 3, by hand. The example shows a hand answer check and the maple code appendix.

Sample Report for 2.4-3 (175.9 K, pdf, 02 Jan 2010)
Download all .mws maple work-sheets to disk, then run the worksheet in xmaple.
In Mozilla firefox, save to disk using right-mouseclick and then "Save link as...". Some browsers require SHIFT and then mouse-click. Open the saved file in xmaple or maple.
Extension .mws [or .mpl] allows interchange between different versions of maple. Mouse copies of the worksheet pasted into email allow easy transfer of code between versions of maple.

2 Feb: Linear Algebraic Equations. No matrices. Section 3.1.

Maple lab 2 problem 1
   Discussion: Option 1: Freezing pipes maple lab 2
   Problem: u' + ku = kA(t)
   Integration methods
      Tables
      Maple
   Answer check by computer
    Links for maple lab 2:
    Option 1: Maple Lab 2, Newton cooling freezing pipes (112.1 K, pdf, 01 Jan 2010)
    Option 1: maple worksheet text freezing pipes (1.2 K, txt, 02 Jan 2010)
    Option 2: Maple Lab 2, Newton cooling swamp cooler (159.0 K, pdf, 01 Jan 2010)
    Option 2: maple worksheet text swamp cooler (1.3 K, txt, 02 Jan 2010)
    For more on superposition y=y_p + y_h, see Theorem 2 in the link
    Linear DE part I (152.7 K, pdf, 07 Aug 2009)
    For more about home heating models, read the following links.
    Manuscript: Linear equation applications, brine tanks, home heating (374.2 K, pdf, 28 Jul 2009)
    Slides: Brink tanks (62.9 K, pdf, 30 Nov 2009)
    Slides: Home heating (73.8 K, pdf, 30 Nov 2009)
Linear Algebraic Equations sections 3.1, 3.2
   Frame sequences
   Toolkit: combo, swap, multiply
   Plane and space geometry
   The three possibilities
     Unique solution
     No solution
     Infinitely many solutions
   Method of elimination
     Example for a unique solution
         x + 2y =  1
         x -  y = -2
     Example for no solution
         x + 2y = 1
         x + 2y = 2
     Example for infinitely many solutions
         x + 2y = 1
              0 = 0
   Parameters in the general solution
   Differential equations example, problem 3.1-26
      y'' -121y = 0, y(0)=44, y'(0)=22
      General solution given: y=A exp(11 x) + B exp(-11 x)
      Substitute y into y(0)=44, y'(0)=22 to obtain a 2x2
        system for unknowns A,B that has the unique solution
        A=23, B=21.
Prepare 3.1 problems for next collection. See problem notes section 3.1:
html: Problem notes S2010 (4.4 K, html, 31 Jan 2010)
    References
    Exam Review: Problems ER-1, ER-2 (46.9 K, pdf, 01 Jan 2010)
    Transparency: Sample solution ER-1. (184.6 K, jpg, 08 Feb 2008)
    Slides: Linear equations, reduced echelon, three rules (155.6 K, pdf, 06 Aug 2009)
    Slides: Infinitely many solutions case (93.8 K, pdf, 03 Oct 2009)
    Slides: No solution case (58.4 K, pdf, 03 Oct 2009)
    Slides: Unique solution case (86.0 K, pdf, 03 Oct 2009)
    Slides: Three rules, frame sequence, maple syntax (35.8 K, pdf, 25 Jan 2007)
    Manuscript: Linear algebraic equations, no matrices (292.8 K, pdf, 01 Feb 2010)
    Transparencies: Ch3 Page 149+, Exercises 3.1 to 3.6 (869.6 K, pdf, 25 Sep 2003)
    Transparency: 3x3 Frame sequence and general solution (90.0 K, pdf, 28 Sep 2006)

3-4 Feb: Murphy and Cox

Exam 1 review, questions and examples on exam problems 1,2,3,4,5.
Murphy's Lecture, time permitting: Maple Lab 2, problem 1,2,3 details.
Exam 1 date is Feb 17, 2-4pm in WEB 104 or Feb 18, 6:50am in JTB 140.
Sample Exam: Exam 1 key from F2009. See also S2009, exam 1.
Answer Key: Exam 1, f2009, 7:30am (62.9 K, pdf, 30 Sep 2009)
Answer Key: Exam 1, f2009, 12:25pm (339.3 K, pdf, 11 Oct 2009)
Answer Key: Exam 1, S2009, 7:30am (395.7 K, pdf, 02 Mar 2009)
Answer Key: Exam 1, S2009, 10:45am (310.2 K, pdf, 02 Mar 2009)

4 Feb: Frame Sequences. Three Possibilities. No matrices. Sections 3.2, 3.3.

Lecture: 3.1, 3.2, 3.3
   Frame sequences
   Toolkit: combo, swap, multiply
   Plane and space geometry
   The three possibilities
     Unique solution
     No solution
     Infinitely many solutions
   Lead variable
   Free variable
   Signal equation
   Echelon form
     The last frame test
     The last frame algorithm
   A detailed account of the three possibilities
     Unique solution == zero free variables
     No solution == signal equation
     Infinitely many solutions == one+ free variables
How to solve a linear system using the toolkit 
  Toolkit: swap, combo, mult
  Toolkit operations neither create nor destroy solutions!
  Frame sequence examples
  Computer algebra systems and error-free frame sequences.
  How to program maple to make a frame sequence without errors.
 
Solved Problems
   Example 4 in 3.2
     Back-substitution should be presented as combo operations in a
       frame sequence, not as isolated, incomplete algebraic jibberish.
     Technically, back-substitution is identical to applying the
       frame sequence method to variables in reverse order.
     The textbook observes that an echelon matrix as frame one is
       a special case, when only combo operations are required to
       determine the last frame. Then, and only then, does the last
       frame algorithm apply to write out the general solution.
   Problem 3.2-24
     The book's answer is wrong, it should involve k-4.
     See references on 3 possibilities with symbol k.

Beamer slides: 3 possibilities with symbol k (60.0 K, pdf, 31 Jan 2010)
Slides: 3 possibilities with symbol k (72.8 K, pdf, 31 Jan 2010)
Manuscript: Example 10 in Linear algebraic equations no matrices (292.8 K, pdf, 01 Feb 2010) In all your solved problems, to be submitted for grading, please use frame sequences to display the solution, as in today's lecture examples. Expected is a sequence of augmented matrices. Yes, you may use maple to make the frame sequence. The maple answer check for the last frame is rref(A).
    References for this lecture.
    Slides: Linear equations, reduced echelon, three rules (155.6 K, pdf, 06 Aug 2009)
    Slides: Infinitely many solutions case (93.8 K, pdf, 03 Oct 2009)
    Slides: No solution case (58.4 K, pdf, 03 Oct 2009)
    Slides: Unique solution case (86.0 K, pdf, 03 Oct 2009)
    Manuscript: Linear algebraic equations, no matrices (292.8 K, pdf, 01 Feb 2010)

4 Feb: Augmented Matrix for System Ax=b. RREF. Last Frame Algorithm. Sections 3.3, 3.4.

Review
  Last frame test. The RREF of a matrix.
  Last frame algorithm.
   Scalar form of the solution.
   Vector form of the solution.
Lecture: 3.3 and 3.4
  Translation of equation models
   Equality of vectors
   Scalar equations to augmented matrix
   Augmented matrix to scalar equations
  Matrix toolkit: Combo, swap and multiply
  Frame sequences for matrix models.
  Special matrices
    Zero matrix
    identity matrix
    diagonal matrix
    upper and lower triangular matrices
    square matrix
  THEOREM. Homogeneous system with a unique solution.
  THEOREM. Homogeneous system with more variables than equations.
     Equation ideas can be used on a matrix A.
     View matrix A as the set of coefficients of a homogeneous
     linear system Ax=0. The augmented matrix B for this homogeneous
     system would be the given matrix with a column of zeros appended:
     B=aug(A,0).

Last Frame Algorithm

How to use maple to compute a frame sequence. Example is Exercise 3.2-14 from Edwards-Penney.
Maple Worksheet: Frame Sequence in maple, Exercise 3.2-14 (3.1 K, mws, 23 Sep 2009)
Maple Text: Frame Sequence in maple, Exercise 3.2-14 (2.8 K, txt, 23 Sep 2009)
Answer checks should also use the online FAQ.
html: Problem notes S2010 (4.4 K, html, 31 Jan 2010)

9 Feb: Matrix Operations. Frame Sequence Analysis for Matrices. Section 3.4, 3.5.

Review: Answer checks with matlab, maple and mathematica. Pitfalls.
Review of the three possibilities and frame sequence analysis to find the general solution.
    Frame sequences with symbol k.
    Slides: Three possibilities, theorems on infinitely many solutions, equations with symbols (100.3 K, pdf, 23 Sep 2009)
    Beamer slides: 3 possibilities with symbol k (60.0 K, pdf, 31 Jan 2010)
    Slides: 3 possibilities with symbol k (72.8 K, pdf, 31 Jan 2010)
    Manuscript: Example 10 in Linear algebraic equations no matrices (292.8 K, pdf, 01 Feb 2010)
Matrices
    Vector.
    Matrix multiply
    The college algebra definition
    Examples.
    Matrix rules
      Vector space rules.
      Matrix multiply rules.

Manuscript: Vectors and Matrices (266.8 K, pdf, 09 Aug 2009)
Manuscript: Matrix Equations (162.6 K, pdf, 09 Aug 2009)
    Examples: how to multiply matrices on paper.
    Slides: Matrix add, scalar multiply and matrix multiply (122.5 K, pdf, 02 Oct 2009)

Maple: Lab 2 problem L2.1 to be discussed today. Solution projected for L2.1.

References for chapters 3 and 4, Linear Algebra


    Manuscript: Linear algebraic equations, no matrices (292.8 K, pdf, 01 Feb 2010)
    Slides: vector models and vector spaces (110.3 K, pdf, 03 Oct 2009)
    Manuscript: Linear equations, reduced echelon, three rules (45.8 K, pdf, 22 Sep 2006)
    Manuscript: Three rules, frame sequence, maple syntax (35.8 K, pdf, 25 Jan 2007)
    Manuscript: Vectors and Matrices (266.8 K, pdf, 09 Aug 2009)
    Manuscript: Matrix Equations (162.6 K, pdf, 09 Aug 2009)
    Transparencies: Ch3 Page 149+, Exercises 3.1 to 3.6 (869.6 K, pdf, 25 Sep 2003)
    Transparency: Sample solution ER-1 [same as L3.1] (184.6 K, jpg, 08 Feb 2008)
    Slides: Elementary matrix theorems (114.4 K, pdf, 03 Oct 2009)
    Slides: Elementary matrices, vector spaces (35.8 K, pdf, 18 Feb 2007)
    Slides: Three possibilities, theorems on infinitely many solutions, equations with symbols (100.3 K, pdf, 23 Sep 2009)
    Beamer slides: 3 possibilities with symbol k (60.0 K, pdf, 31 Jan 2010)
    Slides: 3 possibilities with symbol k (72.8 K, pdf, 31 Jan 2010)
    Slides: Linear equations, reduced echelon, three rules (155.6 K, pdf, 06 Aug 2009)
    Slides: Infinitely many solutions case (93.8 K, pdf, 03 Oct 2009)
    Slides: No solution case (58.4 K, pdf, 03 Oct 2009)
    Slides: Unique solution case (86.0 K, pdf, 03 Oct 2009)
    Maple: Lab 5, Linear algebra (94.2 K, pdf, 01 Jan 2010)
    Slides: Three rules, frame sequence, maple syntax (35.8 K, pdf, 25 Jan 2007)
    Transparencies: 3x3 Frame sequence and general solution (90.0 K, pdf, 28 Sep 2006)
    html: Problem notes S2010 (4.4 K, html, 31 Jan 2010)
    Slides: Determinants 2008 (188.3 K, pdf, 26 Apr 2010)
    Manuscript: Determinants, Cramers rule, Cayley-Hamilton (186.5 K, pdf, 09 Aug 2009)
    Slides: Matrix add, scalar multiply and matrix multiply (122.5 K, pdf, 02 Oct 2009)
    Slides: Digital photos, Maxwell's RGB separations, visualization of matrix add (153.7 K, pdf, 16 Oct 2009)
    Slides: Inverse matrix, frame sequence method (71.6 K, pdf, 02 Oct 2009)
    Slides: More on digital photos, checkerboard analogy (109.5 K, pdf, 02 Oct 2009)
    Slides: Rank, nullity and elimination (111.6 K, pdf, 29 Sep 2009)
    Slides: Base atom, atom, basis for linear DE (85.4 K, pdf, 20 Oct 2009)
    Slides: Orthogonality (87.2 K, pdf, 10 Mar 2008)
    Slides: Partial fraction theory (121.5 K, pdf, 30 Aug 2009)
    Slides: The pivot theorem and applications (131.9 K, pdf, 02 Oct 2009)
    Text: Lawrence Page's pagerank algorithm (0.7 K, txt, 06 Oct 2008)
    Text: History of telecom companies (1.4 K, txt, 30 Dec 2009)