Numerical methods to solve first order differential equation - Douis.net

We consider that the gradient of the line is ( approx.) the mean of the gradient at the gradient at . This gives : ( , ) ( , ). 2. The improved Euler's formula. r r.
108KB taille 5 téléchargements 250 vues
Numerical methods to solve first order differential equation              

 

In this chapter, we want to solve equations which can be written dy  f ( x, y ) and y ( x0 )  y0 dx There are three methods to solve numerically this equation.

 

Formulae to be used will be stated explicitly in questions.      

Knowing P0 ( x0 , y0 ), we work out P1 then P2 then P3 etc.  

 

   

Euler's formula To work out Pr 1 , we consider that the gradient of the line Pr Pr 1 is (approx.) equal to the gradient at Pr .

 

This gives: yr 1  yr  hf ( xr , yr )  

 

The mid-point formula We consider that the gradient of the line Pr 1 Pr 1 is (approx.) equal to the gradient at Pr :   yr 1  yr 1  2hf ( xr , yr )

This gives    

The improved Euler's formula We consider that the gradient of the line Pr Pr 1 is ( approx.) the mean of the gradient at Pr and the gradient at Pr 1. h  f ( xr , yr )  f ( xr 1 , yr*1 )  2 with yr*1  yr  hf ( xr , yr )

yr 1  yr 

This gives :

 

Or as it is given in the exam question: 1 yr 1  yr   k1  k2  2 where k1  hf ( xr , yr ) and k2  hf ( xr  h, yr  k1 ) Possible layout for your workings out: