Verify ? Help, I do not understand the question

  • Thread starter Thread starter monkey372
  • Start date Start date
monkey372
Messages
3
Reaction score
0
"Verify"? Help, I do not understand the question!

Verify the formulas for Forward Euler, Backward Euler and the Trapezoidal Rule for y' = -y starting from the standard form for the difference methods.

I am an exchange student so I do not really understand the question. What does it mean by verify? If someone can get me started with at least the first method, I am sure I can figure the rest out. Thank you!
 
Last edited:
Physics news on Phys.org


Edited: Apparently I can't read.
 
Last edited:


Coto said:
I'm guessing it wants you to derive them starting from a Taylor expansion of y, but I'm not for sure considering I don't know what the "standard form" is for the difference methods?

The question only listed the formulas for the three methods so I am guessing that it is the standard form. I do not understand how to Taylor expand given that y' = -y.
 


Sorry, I completely misread the question.

I take back my last post :).

Instead, why don't you try this: Solve the ODE analytically and compare that analytical solution to the formula which results from an application of one of the standard forms.
 


Take for example, the forward Euler:
y_{n+1}-y_{n}=-hy_{n}
Now, Taylor expand y_{n+1}\equiv y(t_{n}+h)
(y_{n}+hy_{n}'+h^{2}y_{n}''/2+..)-y_{n}=-hy_{n}
so:
(y_{n}'+hy_{n})=-h^{2}y_{n}''/2+...
And then, you can say the error of the method is of order O(h^{2})
 
Last edited:


monkey372 said:
Verify the formulas for Forward Euler, Backward Euler and the Trapezoidal Rule for y' = -y starting from the standard form for the difference methods.

I am an exchange student so I do not really understand the question. What does it mean by verify? If someone can get me started with at least the first method, I am sure I can figure the rest out. Thank you!
I would interpret that to mean that you are to calculate, given some initial condition on y, using those three methods, and compare the results with exact solution, y(t)= Ce^{-t}
 


monkey372 said:
The question only listed the formulas for the three methods so I am guessing that it is the standard form. I do not understand how to Taylor expand given that y' = -y.
Although I do not believe it is necessary for this problem, you would use a Taylor expansion to solve a differential equation by:
First, you would need, in order to solve a first order equation, some additional condition on y, say the value y(a) at x= a.

Then y'(a)= -y(a).

From y'= -y, differentiating both sides, y''= -y' so that y"(a)= -y'(a)= y(a).
From y''= -y', differentiating both sides, y'''= -y'' so that y'''(a)= -y''(a)= -y(a).
From y'''= -y'', differentiating both sides, y''''= -y''' so that y''''(a)= -y'''(a)= y(a).

Get the idea? You can prove, say by induction, that y^{(n)}(a)= (-1)^ny(a). That is that the nth derivative at x= a is y(a) if n is even, -y(a) if n is odd.

The Taylor's formula is
y(a)+ y'(a)(x- a)+ \frac{y''(a)}{2!}(x- a)^2+ \frac{y'''(a)}{3!}(x- a)^2+ \cdot\cdot\cdot
= \sum_{n=0}^\infty \frac{y^{(n)}(a)}{n!}(x- a)^n

which, for this problem, is
\sum_{n=0}^\infty \frac{(-1)^n y(a)}{n!}(x- a)^n
= y(a)\sum_{n=0}^\infty \frac{1}{n!}(-(x-a))^n
which you might recognize as the Taylor's series for y(a)e^x about x= a.

However, I would interpret "verify" as meaning to actually do the three indicated numerical solutions, for some initial condition and some choice of step size, and compare the results to the actual solution.
 


Moderator's note: thread moved from "Differential Equations"

Let's let the OP chime in with an attempt at solving this before offering further help. The Taylor expansion seems irrelevant to this problem.
 
Back
Top