(41C) Euler-Taylor method (updated)
|
12-07-2019, 04:21 PM
(This post was last modified: 12-19-2019 02:00 PM by Namir.)
Post: #1
|
|||
|
|||
(41C) Euler-Taylor method (updated)
Euler-Taylor method
=================== To integrate f'(x,y) from x=a to x=b, give y(a), we use an extended version of the Euler method that includes the first AND second derivatives. Since we know f'(x,y) we can derive f''(x,y) and use the following formula: y = y + h*f'(x,y) + h^2/2*f''(x,y) Memory Map ========== Code:
LABELS ====== A - Main routine. B - calculate first derivative f'(x,y). C - calculate second derivative f''(x,y). E - calculate exact f(x,y) (used for results comparison). If the exact solution is not known, then just have the label just return a value like 0 or insert "N/A" into register X. Listing ======= Code: 1 LBL "EULTLR" Usage ===== 1. Run the program using XEQ "ELRTLR" or pressing key [A]. 2. Program prompts "A/^B?". Key in the value for a, press [ENTER], key in the value for b, and then press [R/S] key. 3. Program prompts "Y/^H?". Key in the value for y(a), press [ENTER], key in the value for increment h, and then press [R/S] key. 4) Program displays intermediate values of the integrated y. The program stops with the calculated value of y at x=b. 5) Press [X<>Y] to view the exact value of y at x=b. You calculate the value for y at any value of x by entering the value of x and the pressing the [E] key. |
|||
12-15-2019, 01:33 AM
(This post was last modified: 12-15-2019 01:35 AM by Namir.)
Post: #2
|
|||
|
|||
RE: (41C) Euler-Taylor method
The next version of the Euler-Taylor program uses the approximation for the second derivative that Albert Chan came up with (click here). Thus we can eliminate LBL C and its code. The program interacts with the user like in the first version:
Code:
|
|||
12-18-2019, 08:12 PM
Post: #3
|
|||
|
|||
RE: (41C) Euler-Taylor method
A third version of the program uses approximations for the second and third function derivatives, yielding better accuracy.
Memory Map ========== Code: R00 = a,x LABELS ====== Code: A - Main routine. Listing ======= Code: 1 LBL "EULTL3" |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)