Finite difference for BVP in Python

Aber

Hey poeops. I am trying to learn some nunerical math using the book Finite Difference Methods for Ordinary and Partial Differential Equations: Steady State and Time Dependent Problems by Randall J. LeVeque.

This post is regarding chapter 2 in the book. I want to run through an example in the book which is discussed here:

At the end of the first answer by VoB there is Octave code. Unfortunately I don't have that program. does anyone by any chance similar code in Python? Or can transle that in Python and numpy?

I know I might appear extremely lazy by not doing it myself but this will take me a whole day( I am not the best programmer), which is too long for "just" a demonstration of example

Daniel Duffy

C++ author, trainer
Don't be lazy, be clever

I reckon the Jacobian is taken care of in the solver? (default, J is done for you by fd).

God luck; let us know how you get on.

y'' + k * exp(y) = 0
y(0) = y(1) = 0

for k = 1.

Last edited:

Replies
0
Views
443
Replies
1
Views
687
Replies
2
Views
1K
Replies
7
Views
3K
Replies
7
Views
2K