Some important announcements from your TA/grader
All students should send me only one e-mail with all the HW questions attached to it, which means they should not
send me 3 seperate e-mails for each question.
Students should use this format to name their fortran files, and please no other format:
ID#_hw#_que#.f
For example: 9501645_hw2_13.f Please no uppercase letters...
Attached files should all be in fortran file format and nothing other than this. Please, no zip or text files.
Students should send me just one mail, which is the final one. They are sending me like 3 more e-mails with further corrections each time.
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
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.
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"
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.