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
The Bubba Army
20 hours agoGOVERNMENT SHUTDOWN! - Bubba the Love Sponge® Show | 10/01/25
4,503 watching -
7:22
Adam Does Movies
17 hours ago $0.04 earnedThe Smashing Machine - Movie Review
2751 -
5:15
Blackstone Griddles
11 hours agoCreamy Cajun Linguine with Bruce Mitchell on the Blackstone Griddle
337 -
9:18
Freedom Frontline
16 hours agoMarco Rubio DESTROYS Stephanopoulos And Exposes USAID Scam
496 -
0:39
OfficialJadenWilliams
4 days agoRealizing you're stuck in the Back Rooms
17 -
9:14
The Art of Improvement
23 hours agoHow to Stop Overthinking
228 -
8:33
Damon Imani
16 hours agoDamon OBLITERATES Everyone On The View For 8 Minutes Straight! | Compilation Vol.16
2792 -
18:08
Actual Justice Warrior
20 hours agoMamdani CRIES Victim After Eric Adams Drops Out
2.43K15 -
23:08
DeVory Darkins
1 day ago $10.62 earnedDemocrats STUNNED by Trump meeting as Omar EMBARRASSES after shocking statement
15.6K87 -
2:17:10
qixso
13 hours ago $1.94 earnedBO7 ON THE WAY !
22.5K3