Professor Mohamed Hafez

TA: Edward Tavernetti

Contact:

Cluster 3 - Problem Set 2 – Guidelines

July 20, 2010

Excel Tips:

  • Use the “=” sign before entering a formula into a cell.
  • If you want to use π = 3.14159265358979323…, type: “pi()”
  • Use “$” the dollar sign to fix a cell reference when filling down. Example: A$12 will fix the row reference at row 12, also use $A12, $A$12 to fix the column and row and column respectively.
  • Select a cell or range of cells then use the “Delete” key to clear the contents (note this is not the “Backspace” key).
  • To make a nice plot quickly selected the entire contents of a range including a row at the top with header labels as shown below:

  • Then select the chart wizard icon: choose a scatter plot with non-linear interpolation for most of what we are doing.
  • Put each question on its own worksheet.
  • Work down the worksheet with new parts and not out to the right…

Instructions (Guidelines):

Note 1: This is a suggested way to approach the assignment. Do not attempt to every part of each question in sequence and all at once.

Note 2: Suggested values for step sizes (Δx, Δt) and ranges in time/ space are provided. It is recommended that you start by using these.

Note 3: If you get stuck anywhere for too long make sure to ask for help, talk to your neighbor, or go on to try something else.

  1. Login
  2. Open Excel
  3. Start with the first order problems. Do the exponential growth problem.
  4. Implement the method (a), make a plot, find the relative and abs. error.
  5. Do the same for either the logarithmic growth problem, the non-constant coefficient problem or the Logistic equation problem.
  6. Go on to the second order problems.
  7. Do the mass-spring system IVP using method (a) for the classical problem
  8. Implement the method, make a plot, find the relative and abs. error.
  9. Implement the method (d), make a plot
  10. Skip the rest of problem 2 for now. Come back to it later if you have time.
  11. Go on to the second order boundary value problem.
  12. First do the Gaussian elimination problem by hand.
  13. Do the Classical problem in 2.1 with method (a)
  14. Plot your approximation and the true solution on a single figure
  15. Implement the Gaussian elimination and Iterative methods in MATLAB programs in MATLAB
  16. Open Matlab
  17. Get the Code from the online version of the solutions:
  18. open a new .m files
  19. copy paste the codes into the .m file
  20. save and name the file to a directory
  21. Input the values of dx, omega, TOL,etc values where ever you see <INPUT VALUE>
  22. For the Gaussian elimination code you need to input the coefficients. Here you will generalize your result from the previous part you did by hand.
  23. Run the code and make the requested table in Excel. Make a plot of the data.
  24. Go on to the fourth order problems.
  25. Do either fourth order discretization or the reduction to a system of second order equations (easier)
  26. Go on to the second order eigenvalue problem.
  27. Start by following along with the explanation to find lambda = 9, 27 analytically.
  28. Go on to the third order ‘Jerk’ equation
  29. Implement the algorithm in Excel
  30. My solution uses 16,000 rows. Your solution might look something like this at the top of the worksheet:

h = / 0.01 / A = / 2.017
X / V / j / a
0.02 / 0 / 0
0.02 / 0 / -0.02 / -0.0002
0.02 / -0.000002 / -0.0196 / -0.0004
  1. When you have done all of the above, if you have time, go back to previous sections and do the problems that you skipped over.