Transforming Ordinary Differential Equations to A simple Algebraic System Using SciPy (Part 1)
We return to solving differential equations back going back to the free fall/parachutist problem from a previous video. We will solve this problem using a finite difference method (Euler’s method) in two ways: First, will we use simple loops. Second, we will transform the system of equations into a sparse matrix representation. In the simple linear case in this video, we can solve for the position and velocity simply by inverting a matrix.
The next video in this series will deal with the nonlinear case which is more challenging to solve via matrix manipulation.
This may seem overkill for such a simple problem, especially given that Scipy comes with its own ODE solver, but we will use a similar method when we move on to partial differential equations. There, we will transform a PDE into a system of ODEs that can be solved with regular ODE solvers.
Edit: There was an error in both the code and the matrix as written out in the notebook. The first row should not have a -1 in it. Instead it should be a zero. It doesn''t make a difference in the result as the initial velocity is zero, but it is technically incorrect. I have fixed this in the notebook on Github.
Original Video: https://youtu.be/XPT3_L13RFM
Github: https://github.com/kpmooney/numerical_methods_youtube/tree/master/free_fall
Tip Jar: https://paypal.me/kpmooney
-
18:45
kpmooney
3 years agoTransforming Ordinary Differential Equations to A simple Algebraic System Using SciPy (Part 2)
18 -
30:32
kpmooney
3 years ago $0.07 earnedDifferential Algebraic Equations: Solving constrained differential equations in Python
111 -
40:12
kpmooney
3 years agoDifferential Equations and Maximizing Functions in Python: Solving Simple Physics Problems (Part 1)
41 -
14:36
kpmooney
3 years agoDifferential Equations and Maximizing Functions in Python: Solving Simple Physics Problems (Part 2)
23 -
2:28
GRE Practice
3 years agoSimple System of Equations: Practice GRE with a Cambridge PhD
30 -
12:11
kpmooney
3 years agoMore on Ordinary Differential Equations in Python: The Assimulo Package
44 -
7:20
ShoestringPrep
3 years ago $0.01 earnedSimple Solar System
4101 -
21:36
kpmooney
3 years agoMore Kinematics problems: Differential Equations and Event Detection using Python (Numpy and Scipy)
32 -
3:37
Apla_Tech Drywall Tools
3 years agoCustomer Using Apla-Tech's Continuous Flow System
90 -
20:48
Algebra Lectures
3 years agoMath80_MAlbert_3.5_Solving equations using multiplication and division properties of equality
44