Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Backwards Euler method

Posted on 2007-11-19
5
1,428 Views
Last Modified: 2012-06-27
The final part of a question presents the "Backwards Euler method", as:

x(n+1) = x(n) + h * f( (n+1) * h,  x(n+1) )              (where f(t,x) = dx/dt)

It then says to apply this method to the linear equation dx/dt=x, and show that the method converges to the true solution x(t)=e^t as t->infinity.

It is obvious that the term (1+t/n)^n will turn up at some stage (seeing as the limit of it, as t->infinity, is e^t). But I'm struggling to get started. My problem is that in order to find the derivative at x(n+1), I must find what x(n+1) is; but to find x(n+1), I need to know the derivative at x(n+1)...

So, can someone at least get me past this hurdle, then I will hopefully be able to figure the rest for myself.

An earlier part of this question might be relevent; it says to apply Euler's method to dx/dt=kx. For which I get:

x(n)=x0(1+hk)^n

...

Thanks
0
Comment
Question by:Beta07
  • 4
5 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 20316803
isn't dx/dt=x the same as  dx/dt=kx with k=1
0
 
LVL 2

Author Comment

by:Beta07
ID: 20319315
Indeed. I suppose you're suggesting that I use:

x(n)=x0(1+hk)^n

(with k=1), to find x(n+1)? I thought about this, but (although it's probably the right way to go), it doesn't really make much sense to me:
Surely by incorporating the standard Euler method into the backwards one, you'd lose some of the advantages of using the backwards method in the first place?

Either way, I'll assume it's the correct method. Which gives me:

x(1) = x(0) + h*x(0)(1+h)
x(2) = x(1) + h*x(0)(1+h)²
       = x(0) + h*x(0)(1+h) + h*x(0)(1+h)²
x(3) = x(2) + h*x(0)(1+h)³
       = x(0) + h*x(0)(1+h) + h*x(0)(1+h)^2 + h*x(0)(1+h)³
...
x(n+1) = x(0){1+h(1+h) + h(1+h)² + h(1+h)³ + ... + h(1+h)^n}
           = x(0){(1+h)^(n+1) - h)}

(Using the equation for the partial sum of a geometric series (and rearranging), in that last step).

Now, this looks quite promising:

x(n+1) = x(0){(1+h)^(n+1) - h)}
=>
x(n) = x(0){(1+h)^n - h}

The question says to use the substitution: h=t/n; thus

x(n) = x(0){(1+t/n)^n - h}

So we're almost there:  the limit as h->0 (or n->infinity)* of
{(1+t/n)^n - h}
is:
e^t

However, I'm not sure how to properly finish this question off. I don't think it would make much sense to say:

lim[h->0]  x(n)/x(0)  =  e^t

So, I guess I'm looking for a rearrangement of:

x(n) = x(0){(1+t/n)^n - h}

such that when I take the limit of both sides, I get x(t) on one side, and e^t on the other....?


Thank you

* In my original question (and also on the question sheet), it says "as t->infinity (equivalently, h->0)"; I can only assume they mean "n->infinity,.. h->0".
0
 
LVL 2

Author Comment

by:Beta07
ID: 20319318
(Please ignore the  characters)
0
 
LVL 2

Author Comment

by:Beta07
ID: 20319330
>>
So, I guess I'm looking for a rearrangement of:

x(n) = x(0){(1+t/n)^n - h}

such that when I take the limit of both sides, I get x(t) on one side, and e^t on the other....?
>>

Or, I suspect, a rearrangement such that when I take the limit of both sides, I get dx/dt on one side, and e^t on the other..?
0
 
LVL 2

Author Comment

by:Beta07
ID: 20320013
Sorry,

> x(n+1) = x(0){1+h(1+h) + h(1+h)² + h(1+h)³ + ... + h(1+h)^n}
              = x(0){(1+h)^(n+1) - h)}

Should be

x(n) = x(0){1+h(1+h) + h(1+h)² + h(1+h)³ + ... + h(1+h)^n}
       = x(0){(1+h)^(n+1) - h)}

Thus

>>
x(n+1) = x(0){(1+h)^(n+1) - h)}
=>
x(n) = x(0){(1+h)^n - h}
>>

Is of course wrong.

So we've got:

x(n) = x(0){(1+h)^(n+1) - h)}
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Guide to the PMT, FV, IPMT and PPMT Functions In MS Excel we have the PMT, FV, IPMT and PPMT functions, which do a fantastic job for interest rate calculations.  But what if you don't have Excel ? This article is for programmers looking to re…
Have you ever thought of installing a power system that generates solar electricity to power your house? Some may say yes, while others may tell me no. But have you noticed that people around you are now considering installing such systems in their …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question