Backward Euler Method

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

mathmari
Posts: 81
Joined: Sat Apr 27, 2013 11:58 pm UTC

Backward Euler Method

Postby mathmari » Sun Apr 28, 2013 12:01 am UTC

Hi!!!
I want to write a Matlab code for Backward Euler Method yn+1=yn+hf(tn+1,yn+1).
Which method is better to use to determine yn+1???
Thanks in advance!!!
Last edited by mathmari on Sun Apr 28, 2013 9:55 am UTC, edited 1 time in total.

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 26767
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: Backward Euler Method

Postby gmalivuk » Sun Apr 28, 2013 6:55 am UTC

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.)
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

mathmari
Posts: 81
Joined: Sat Apr 27, 2013 11:58 pm UTC

Re: Backward Euler Method

Postby mathmari » Sun Apr 28, 2013 9:57 am UTC

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???

User avatar
Voekoevaka
Posts: 42
Joined: Wed Apr 10, 2013 10:29 am UTC
Location: Over nine thousand.

Re: Backward Euler Method

Postby Voekoevaka » Sun Apr 28, 2013 11:19 am UTC

You can write yn+1 in terms of yn and tn+1 (which is already known), but it works only with particular cases of f.
I'm a dozenalist and a believer in Tau !

mathmari
Posts: 81
Joined: Sat Apr 27, 2013 11:58 pm UTC

Re: Backward Euler Method

Postby mathmari » Sun Apr 28, 2013 9:03 pm UTC

Ok...Thank you...!!! :)

User avatar
PM 2Ring
Posts: 3713
Joined: Mon Jan 26, 2009 3:19 pm UTC
Location: Sydney, Australia

Re: Backward Euler Method

Postby PM 2Ring » Mon Apr 29, 2013 9:02 am UTC

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.

mathmari
Posts: 81
Joined: Sat Apr 27, 2013 11:58 pm UTC

Re: Backward Euler Method

Postby mathmari » Mon Apr 29, 2013 2:17 pm UTC

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!!!!!!! :D

dwarduk2
Posts: 31
Joined: Thu Mar 08, 2012 1:17 am UTC

Re: Backward Euler Method

Postby dwarduk2 » Thu May 02, 2013 11:44 pm UTC

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(x-h)]/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.

mathmari
Posts: 81
Joined: Sat Apr 27, 2013 11:58 pm UTC

Re: Backward Euler Method

Postby mathmari » Fri May 03, 2013 10:18 pm UTC

Ok...Thank you very much!!! :idea:

MostlyHarmless
Posts: 154
Joined: Sun Oct 22, 2006 4:29 am UTC

Re: Backward Euler Method

Postby MostlyHarmless » Sun May 05, 2013 7:08 pm UTC

dwarduk2 wrote:or within h of a cusp, though.


Or within h of a corner.


Return to “Mathematics”

Who is online

Users browsing this forum: Bing [Bot] and 8 guests