{"title":"数值计算","authors":"D. Hiebeler","doi":"10.1201/9781315373379-11","DOIUrl":null,"url":null,"abstract":"with initial condition y(0) = 1. [This example was mentioned in class on April 23, 2015, and appears in the notes for Lecture 22.] (a) What is the exact solution? (b) Give the algebraic formula for one step of the forward (explicit) Euler method applied to this problem. Write (and run) code that executes four steps of the forward Euler method applied to the given function, using h = 0.6 and starting with t0 = 0. (d) Give the formula for one step of the backward (implicit) Euler method applied to this problem. (e) State (algebraically) the nonlinear equation ξ(η) = 0 that needs to be solved to obtain yk+1 when the backward Euler method is used to solve this problem. (f) Specify (algebraically) a Newton iteration that could be used to solve the nonlinear equation from part (e). (g) Write (and run) code, possibly as part of the program written in part (b), that executes four steps of the backward Euler method applied to this function, with h = 0.6, starting with t0 = 0. Please include a short discussion of your implementation of the zero-finding method used to solve the nonlinear equation at each step. (h) Use your code(s) to produce a plot (or plots), preferably superimposed, of the exact solution, the forward Euler iterates, and the backward Euler iterates. Please comment on the results—are they what you expected?","PeriodicalId":206253,"journal":{"name":"R and MATLAB®","volume":"50 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Numerical Computing\",\"authors\":\"D. Hiebeler\",\"doi\":\"10.1201/9781315373379-11\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"with initial condition y(0) = 1. [This example was mentioned in class on April 23, 2015, and appears in the notes for Lecture 22.] (a) What is the exact solution? (b) Give the algebraic formula for one step of the forward (explicit) Euler method applied to this problem. Write (and run) code that executes four steps of the forward Euler method applied to the given function, using h = 0.6 and starting with t0 = 0. (d) Give the formula for one step of the backward (implicit) Euler method applied to this problem. (e) State (algebraically) the nonlinear equation ξ(η) = 0 that needs to be solved to obtain yk+1 when the backward Euler method is used to solve this problem. (f) Specify (algebraically) a Newton iteration that could be used to solve the nonlinear equation from part (e). (g) Write (and run) code, possibly as part of the program written in part (b), that executes four steps of the backward Euler method applied to this function, with h = 0.6, starting with t0 = 0. Please include a short discussion of your implementation of the zero-finding method used to solve the nonlinear equation at each step. (h) Use your code(s) to produce a plot (or plots), preferably superimposed, of the exact solution, the forward Euler iterates, and the backward Euler iterates. Please comment on the results—are they what you expected?\",\"PeriodicalId\":206253,\"journal\":{\"name\":\"R and MATLAB®\",\"volume\":\"50 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2018-09-03\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"R and MATLAB®\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1201/9781315373379-11\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"R and MATLAB®","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1201/9781315373379-11","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
with initial condition y(0) = 1. [This example was mentioned in class on April 23, 2015, and appears in the notes for Lecture 22.] (a) What is the exact solution? (b) Give the algebraic formula for one step of the forward (explicit) Euler method applied to this problem. Write (and run) code that executes four steps of the forward Euler method applied to the given function, using h = 0.6 and starting with t0 = 0. (d) Give the formula for one step of the backward (implicit) Euler method applied to this problem. (e) State (algebraically) the nonlinear equation ξ(η) = 0 that needs to be solved to obtain yk+1 when the backward Euler method is used to solve this problem. (f) Specify (algebraically) a Newton iteration that could be used to solve the nonlinear equation from part (e). (g) Write (and run) code, possibly as part of the program written in part (b), that executes four steps of the backward Euler method applied to this function, with h = 0.6, starting with t0 = 0. Please include a short discussion of your implementation of the zero-finding method used to solve the nonlinear equation at each step. (h) Use your code(s) to produce a plot (or plots), preferably superimposed, of the exact solution, the forward Euler iterates, and the backward Euler iterates. Please comment on the results—are they what you expected?