Nonlinear Differential Equations Using Finite Differences: Can we Use Sparse Matrices?
NOTE: WHEN RECORDING THIS, i ACCIDENTALLY FORGOT TO USE THE SPARSE IDENTITY MATRIX IN MATLAB. THE GITHUB CODE HAS BEEN UPDATED AND IS CORRECT. THE 10000-DIMENSIONAL SYSTEM IS NOW SOLVED IN 0.9 SECONDS INSTEAD OF TWO MINUTES!
In answer to a question, we look at using sparse matrices in the solution of boundary value problems. For nonlinear problems, things become more complicated, but we can still use fsolve to solve the underlying system of equations. The issue with Python is the solver cannot handle sparse Jacobian matrices so this limits the utility of this method to small problems. For solvers that can handle sparse Jaboians such as MATLAB’s, we can still get good performance despite having to use a nonlinear solver.
Wikipedia Article on the Jacobian Matrix: https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant
Github Python Notebook: https://github.com/kpmooney/numerical_methods_youtube/blob/master/bvp/Nonlinear%20BVP.ipynb
Github MATLAB Code: https://github.com/kpmooney/numerical_methods_youtube/blob/master/bvp/Nonlinear.m
Tip Jar: https://paypal.me/kpmooney
-
29:48
kpmooney
3 years agoSparse Matrices to Speed up Calculations (Part 2): Partial Differential Equations - 1-D Diffusion
38 -
8:16
kpmooney
3 years agoSolving Banded Linear Systems in Python (Part 4)
30 -
15:06
kpmooney
3 years agoBoundary Value Problems via a Finite Difference method
59 -
18:33
kpmooney
3 years agoNumerically Integrating Differential Equations in Excel and Python: Runge Kutta Method
40 -
19:46
kpmooney
3 years agoPlaying with Singular Value Decomposition: Differences between Numpy & MATLAB (Image Compression)
251 -
30:32
kpmooney
3 years ago $0.04 earnedDifferential Algebraic Equations: Solving constrained differential equations in Python
93 -
18:45
kpmooney
3 years agoTransforming Ordinary Differential Equations to A simple Algebraic System Using SciPy (Part 2)
18 -
16:19
kpmooney
3 years agoNumerically Integrating Differential Equations in Excel and Python: Euler's Method
15 -
13:06
kpmooney
3 years agoNumpy and Scipy: Using Sparse Matrices in our Monte Carlo Simulation (part 3)
8 -
24:00
kpmooney
3 years agoSingular Value Decomposition, Linear Systems, and the Pseudoinverse
63