How to Solve Differential Equations in PYTHON

preview_player
Показать описание
Check out my course on UDEMY: learn the skills you need for coding in STEM:

Examined are first order ordinary differential equations (ODEs), coupled first order ODEs, and higher order ODEs.

All code can be found on Github:

Discord

Air friction While Falling Video:

3 Body Motion Video:

0:00 Introduction
0:45 First Order ODEs
8:42 Coupled First Order ODEs
13:32 Second Order ODEs
16:12 Example: Coupled Higher Order Equations
19:52 Dealing with Messy ODEs...Be Careful
Рекомендации по теме
Комментарии
Автор

I love your channel. I'm a PhD student in theoretical cosmology and I've always had troubles with computational part. Your videos have really helped me to improve my code skills. Please, don't stop making videos. Keep it up!

flaviopineda
Автор

Awesome video once again! ❤️❤️❤️ I love differential equations. I would like to add that one can also use the Runge-Kutta-Nystrom method(s) to specifically solve 2nd order ODEs (or systems of 2nd order ODEs) directly without needing to transform them into a system of 1st order ODEs. 2nd order ODEs occurs often IRL that it was developed to specifically and directly solve ODEs. I compared the Runge-Kutta-Nystrom method to the classical fourth-order Runge-Kutta method and it's actually 1 to 3 orders of magnitude more accurate than the latter, while allowing you to directly solve a 2nd order ODE as it is.

AJ-etvf
Автор

Just a heads up, you don't need to do the transpose and then index to get the column, you can just select the column directly if you want using the correct numpy slice syntax, e.g. "sol[:, 0]"... Thanks for all the videos you make BTW they're super helpful

dsds-rjrg
Автор

I am a physics student and these videos have been really helpful to help me solve physics problems using python. keep up the great work!

kananvirkar
Автор

you are concised and cut through the basic elements of understanding. Not many have these skills, not even all teachers/professors.

MatUserName
Автор

Great work. Very impressive approach as usual. You are the best! Keep it up.
For the next work, please do data fitting and parameter estimation for epidemiological models (or system of ODEs) with data that has more than one column

Eighty__WAW
Автор

Oh god, I had to solve these by hand in my first year in Uni 15 years ago and it still gives me chills and cold sweat seeing them.

rollinas
Автор

I love your style of teaching. I was wondering if you could also do a tutorial for LATEX? Thank you! :)

dashoelorenz
Автор

Great vid.
How do you solve PDE in python, specially coupled PDEs?

brawnstein
Автор

Yesss! Differential equations in Python - time for some numerical Rock'n'Roll :) Thanks, man!

blackguardian
Автор

The best description I could've find in the internet. many thanks. I like the color of your eyes btw :))))

erfanbensaeed
Автор

Thank you for such a wonderful video lesson. Request you to make a video on finding Lyapunov exponents of coupled differential equation.
Thank you

RanjibBanerjee
Автор

extremely helpful
Thank you, Mr. P Solver

kshitijshah
Автор

Very useful to apply for any first order and second order differential equations. Thank you so much.

upgraduate
Автор

love you big bro, you really help me as a physics graduate

prateek
Автор

great video although gosh I cant even begin to wrap my head around the math behind this, im glad you treated it as a black box for the video. Do you have any resources if someone did want to learn the math behind how these are solved

dhaufjebzjchseis
Автор

Isn't there an error at around 15:50? The definition of the diffeq should be dSdt(t, S): x, v = S ... !? Here it does not seem to matter since the diff eqs do not explicitly depend on t.

erikp
Автор

Awesome stuff! Just loved your post.

Would you have some study material which could further elucidate your examples?

Ideally, I would like to know how to evaluate the success of a differential equation solver, as well as the stability of the model. Would you be so kind as to provide us with some material (if not a new youtube video) describing how to do that?

SIncerely,

philipeleal
Автор

I have a question for you sir. In your first example you write the initial condition v0=0 for v=0 at time t=0. How about : how do you write the initial condition for example v=5 at time t= 3?

lajuelar
Автор

Thanks so much for the tutorial. Do you have videos for using python solving partial differential equations?

zhukunwang