The PDF below contains the specific problems for Project 2.
MATLAB Starter Files
To help you get started, incomplete MATLAB templates are provided. These files contain the structure, comments, and plotting code you must fill in the missing code where indicated by:
[t, y] = ; % <-- COMPLETE: call forward_euler_sys
Each TODO section includes hints and the mathematical formula you need to implement. All figures are saved automatically as .png files in your working directory.Submission Instructions
Please submit the following two items on Canvas.
1. MATLAB Code (.m files)
Upload the following scripts and functions. Ensure your code is well-commented and runs without errors.
- Reusable Solver Functions:
forward_euler_sys.m(Forward Euler for systems)trapezoidal_sys.m(Trapezoidal Rule for systems)backward_euler_sys.m(Backward Euler with Newton/fixed-point)rk_explicit.m(General explicit Runge-Kutta solver)dopri45.m(Dormand-Prince adaptive RK4(5))
- Problem Scripts:
problem1_pendulum.m(Problem 1 Phase portraits and energy drift)problem2_robertson.m(Problem 2 Stiff system, Newton vs fixed-point)problem3_convergence.m(Problem 3 RK convergence study)problem4_adaptive.m(Problem 4 Adaptive vs fixed-step on satellite orbit)problem5_vanderpol.m(Bonus Problem 5 Van der Pol stiffness spectrum)
- Provided (do not modify):
fSat.m(Right-hand side for the restricted 3-body problem)
2. Written Report (PDF)
Submit a single PDF file (max 12 pages) containing:
- Figures: All plots generated by your MATLAB code with proper labels, titles, and legends (Blue sections).
- Tables: Summary tables for Problems 2, 3, and 5 as specified.
- Critical Thinking: Written answers for Problems 1C, 2C, 3C, and 4C (Orange sections). Superficial answers will not receive full credit.
- Bonus: If attempting Problem 5, include the method comparison figure, step-size history, scaling plot, and Part B analysis.
Grading
Problems 14: 25 points each (100 total). Bonus Problem 5: up to +15 points. Points earned on Problem 5 can offset deductions on Problems 14, but the project total is capped at 100.
Leave a Reply
You must be logged in to post a comment.