Premium Only Content
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
-
LIVE
Steven Crowder
2 hours agoDeport All Illegals | Change My Mind
45,167 watching -
LIVE
The Rubin Report
48 minutes agoWatch Bill O’Reilly Destroy Bill Maher’s Narrative w/ Facts in Under 1 Minute
1,434 watching -
59:08
VINCE
3 hours agoIs the Shutdown Coming To An End? (Guest Host Hayley Caronia) | Episode 165 - 11/10/25 VINCE
59.9K55 -
2:15:24
Matt Kohrs
11 hours agoStock Market Squeeze: Gov'nt Shutdown Ends, Stimulus Checks & Breaking News || Live Day Trading
18.8K6 -
LIVE
LFA TV
13 hours agoLIVE & BREAKING NEWS! | MONDAY 11/10/25
4,367 watching -
LIVE
Caleb Hammer
1 hour agoI Confronted The Governor Of Michigan | Financial Audit
156 watching -
28:45
Rethinking the Dollar
56 minutes agoMonday News Update: Dividend Checks, Gov't Shutdown & Silver
-
LIVE
The Big Migâ„¢
3 hours agoInsider Trader Of The Year Award Goes To Nancy Pelosi
2,352 watching -
1:03:54
Graham Allen
3 hours agoIs the Shutdown FINALLY ending!?! What was the deal?? + 50 Years Mortgages, $2K checks and More!!
93.1K76 -
LIVE
Badlands Media
13 hours agoBadlands Daily: November 10, 2025
4,509 watching