• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Finite difference for BVP in Python

  • Thread starter Thread starter Aber
  • Start date Start date
Joined
8/7/15
Messages
91
Points
18
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
 
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:
Back
Top