Solving Linear ODE using Python

Outline of The Article

1. Introduction
2. The Complete Program
3. Evolution of the Program
4. Explanation

Introduction

It is a well known secret that most of the times, algebraic equations are easier to solve than differential equations. That’s where Laplace Transfomrs come into the picture.

LT helps us ‘translate’ a differential equation into algebraic equations and then, ‘translate’ the corresponding solution of algebraic equation back into the solution of differential equation (using inverse LT).

This comes handy especially when we are trying to manually solve the differential equation.

The puzzle proposed to me was to write a Python program to illustrate solving second order differential equations using Laplace Transforms. It eventually evolved into a program to solve linear differential equations of order n, which is discussed here.

The problem used in the following program(s) is:

Problem: $y''+y' - 2y = 4, y(0)=2, y'(0) = 1$

This site uses Akismet to reduce spam. Learn how your comment data is processed.