GENERAL GUIDANCE FOR HOMEWORK IN ORDER TO GET FULL CREDIT

Some important announcements from your TA/grader

Homework 1

Read and carefully study Chapter 1. Learn FORTRAN. Learn how to edit, compile and mail your FORTRAN programs.

Homework 2

Implement the solution of the Gaussian Elimination algorithm. Use it to solve the 10-dimensional linear system Ax=b where:

A=[1,0,1,0,1,0,1,0,1,0              b=[1
   0,1,0,1,0,1,0,1,0,1                 0
   1,2,3,3,1,1,1,0,0,0                 0
   0,3,0,0,0,3,3,3,3,4                 0
   0,1,0,0,1,0,0,1,0,0                 0
   0,0,1,0,1,0,0,0,0,1                 0
   4,5,0,0,7,6,0,0,6,6                 0
   4,0,0,0,4,0,0,4,0,0                 0
   0,4,0,0,0,4,0,0,0,4                 0
   0,0,0,0,0,0,0,1,2,3]                0]
                    

Solution:
Main code
Description
data

Homework 3

PROBLEM 1: Make sure that the code that you developed for HW2 is working properly. In order to get credit you must implement the Gaussian Elimination algorithm described in the book. Other solutions will not be given credit.

PROBLEM 2: Solve the following problem using theory of linear equations. Namely, first write the problem into the form Ax=b. Then use your Gaussian elimiation program to get the solution.

A rope over the top of a fence has the same length on each side and weights 0.4 lbs/ft. On one end hangs a monkey holding a banana, and on the other end a log equal to the weight of the monkey and the banana combined. The banana weighs 2 ounces per inch. The length of the rope in feet is the same as the age of the monkey, and the difference of the weight of the monkey and the banana in ounces is sixteen times the age of the monkey's mother. The combined ages of the monkey and its mother are 30 years. One-fourth of the difference of the weight of the monkey and the banana in pounds is one-fifth of the total weight of rope and the log. The difference in age between the monkey and its mother is the same as the lenght of the rope in feet. How long is the banana?

PROBLEM 3: Solve Exercise number 6, Chapter 2, page 108 of the text. You have the option to use your software written for HW2 in order to get the solution.

NOTE: E-mail Sam any code used. Bring a print out of the solution to class. No late homework will be accepted under any circumstances.

Homework 4

PROBLEM 1: Implement the Jacobi iteration algorithm on an Excel spreadsheet or in a FORTRAN program (your choice). Print the value of the entire vector x and all the vector norms (as described in class) at EACH iteration.

Implement the solution of the Jacobi iteration algorithm. Use it to solve the 4-dimensional linear system Ax=b where:


A=[ -4  1  1  1       b=[ 1
     1 -4  1  1           1
     1  1 -4  1           1 
     1  1  1 -4]          1]

The initial guess to the solution should be x0=[0,0,0,0]T

NOTE: E-mail Sam any code used. Bring a print out of the solution to class. No late homework will be accepted under any circumstances.

PROBELM 2: Excercize 2 from the book "by hand" (i.e., no need to write any computer code of any kind for it).

PROBELM 3: Excercize 18 from the book "by hand"

Solution:
Main code
data

Homework 5

PROBLEM 1: Solve the initial value problem dy/dx = x sqrt(y) over the interval x=0 to x=1. Initial conditions are y(0)=1. Plot your result.

PROBLEM 2: Solve dy/dt = y cos(t) where y(0) = 1. Plot result.

PROBLEM 3: Solve y'' + y' + 5y = 0 where y(0)=3 and y'(0)=0. Solve from x=0 to 5. Plot result.