Block 89: Scientific Computing in Practice
Apply SciPy + SymPy together to a realistic scientific problem.
Concepts
- Choosing symbolic vs numerical approach
- Exponential decay and growth models
- Fitting curves to data: scipy.optimize.curve_fit()
- Reporting results with uncertainty
Code Examples
See exercise below.
Exercise
Fit an exponential decay model y = A * exp(-k*t) to noisy data using curve_fit. Plot fit vs data. Report A and k with error estimates. Verify the fit result symbolically with SymPy.
Homework
What is residual analysis and why is it important when fitting models to data?