Hi!!!
I want to write a Matlab code for Backward Euler Method y^{n+1}=y^{n}+hf(t^{n+1},y^{n+1}).
Which method is better to use to determine y^{n+1}???
Thanks in advance!!!
Backward Euler Method
Moderators: gmalivuk, Moderators General, Prelates
Backward Euler Method
Last edited by mathmari on Sun Apr 28, 2013 9:55 am UTC, edited 1 time in total.
 gmalivuk
 GNU Terry Pratchett
 Posts: 26767
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: Backward Euler Method
What have you done so far? Have you done other examples of this method in your class? Where are you getting stuck?
(In other words, give us more to go on. We're not here to do your homework for you.)
(In other words, give us more to go on. We're not here to do your homework for you.)
Re: Backward Euler Method
I have written a code using fixed point iteration. Is this a good method for this problem, or is, for example, Newton's method better???
 Voekoevaka
 Posts: 42
 Joined: Wed Apr 10, 2013 10:29 am UTC
 Location: Over nine thousand.
Re: Backward Euler Method
You can write y^{n+1} in terms of y^{n} and t^{n+1} (which is already known), but it works only with particular cases of f.
I'm a dozenalist and a believer in Tau !
Re: Backward Euler Method
Ok...Thank you...!!!
Re: Backward Euler Method
mathmari wrote:I have written a code using fixed point iteration. Is this a good method for this problem, or is, for example, Newton's method better???
It depends on the function. When you put the equation into a form to do fixed point iteration it may diverge instead of converging. Sometimes when that happens you can invert the equation into a form that will converge, but not always. Newton's method isn't guaranteed to converge for all values, either, but when it does it generally converges faster than fixed point iteration. OTOH, you need to know the derivative of your function to use Newton's method.
Re: Backward Euler Method
PM 2Ring wrote:mathmari wrote:I have written a code using fixed point iteration. Is this a good method for this problem, or is, for example, Newton's method better???
It depends on the function. When you put the equation into a form to do fixed point iteration it may diverge instead of converging. Sometimes when that happens you can invert the equation into a form that will converge, but not always. Newton's method isn't guaranteed to converge for all values, either, but when it does it generally converges faster than fixed point iteration. OTOH, you need to know the derivative of your function to use Newton's method.
Thank you very much!!!!!!!
Re: Backward Euler Method
You can in many cases try using an approximation for the derivative instead of the exact derivative if you want to use Newton's method. I tend to use [f(x+h)f(xh)]/2h as my approximation. iirc, the error is O(h^2), so you should make h a small number for best results. It won't generally work for quickly oscillating functions around x or within h of a cusp, though.
Re: Backward Euler Method
Ok...Thank you very much!!!

 Posts: 154
 Joined: Sun Oct 22, 2006 4:29 am UTC
Re: Backward Euler Method
dwarduk2 wrote:or within h of a cusp, though.
Or within h of a corner.
Who is online
Users browsing this forum: Bing [Bot] and 8 guests