Question: error between exact and approximation

Dear all,

I need to compute the error, How to define the error between the exact and approximation.

 

                               d              
                              --- y(x) = -y(x)
                               dx             
                               y(x) = exp(-x)

 

I have a problem in this code, my goal is to compute the error between the approximate solution obtained by RK3 and Exact  and E ( approximation by RK3).

How to definie the error and prouve that the error is O(h^4)  ( with one step) and the global error is O(h^3).

Thank you  for helping me.

 

 

 

Please Wait...