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.
- Login
- Open Excel
- Start with the first order problems. Do the exponential growth problem.
- Implement the method (a), make a plot, find the relative and abs. error.
- Do the same for either the logarithmic growth problem, the non-constant coefficient problem or the Logistic equation problem.
- Go on to the second order problems.
- Do the mass-spring system IVP using method (a) for the classical problem
- Implement the method, make a plot, find the relative and abs. error.
- Implement the method (d), make a plot
- Skip the rest of problem 2 for now. Come back to it later if you have time.
- Go on to the second order boundary value problem.
- First do the Gaussian elimination problem by hand.
- Do the Classical problem in 2.1 with method (a)
- Plot your approximation and the true solution on a single figure
- Implement the Gaussian elimination and Iterative methods in MATLAB programs in MATLAB
- Open Matlab
- Get the Code from the online version of the solutions:
- open a new .m files
- copy paste the codes into the .m file
- save and name the file to a directory
- Input the values of dx, omega, TOL,etc values where ever you see <INPUT VALUE>
- 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.
- Run the code and make the requested table in Excel. Make a plot of the data.
- Go on to the fourth order problems.
- Do either fourth order discretization or the reduction to a system of second order equations (easier)
- Go on to the second order eigenvalue problem.
- Start by following along with the explanation to find lambda = 9, 27 analytically.
- Go on to the third order ‘Jerk’ equation
- Implement the algorithm in Excel
- 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
- 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.