{"title":"Week 20","authors":"N. Newton","doi":"10.4324/9780367821968-20","DOIUrl":null,"url":null,"abstract":"of forward Euler To solve dy dt = f (y, t), y(t 0) = y 0 numerically we choose a step length h > 0 and then calculate y 1 = y 0 + hf (y 0 , t 0), t 1 = t 0 + h y 2 = y 1 + hf (y 1 , t 1), t 2 = t 1 + h y 3 = y 2 + hf (y 2 , t 2), t 3 = t 2 + h etc. in which case y i is an approximation to y(t i) at each step. The approximation should get more accurate as h gets smaller. The error at each step will get worse if d 2 y/dt 2 is large and these errors can build up for longer time intervals. 1. We would like to to solve the differential equation dy dt = −10(t − 1)y with the given initial condition: y(0) = e −5. A reference solution to this problem can be plotted in MATLAB by typing the command sequence tt=0:0.01:2; ex=exp(-5*(tt-1).^2);plot(tt,ex,'-k')} (a) Find the analytic solution y(t), and evaluate it at (b) Compute the forward Euler solution by taking seven steps of the method with a step length of h = 0.2. (You will need a calculator to do this.) Generate a table which compare the analytic solution with the numerical solution. At which time t do you find the biggest error ? (c) Compute a more accurate forward Euler solution by taking four steps with a much smaller step length of h = 0.05. Compare this solution with the exact solution y(0.2) and compare the accuracy of this solution with the first time step result obtained in (b). Note that this differential equation is not as benign as it looks; if one wants to solve it over a long time interval, sophisticated numerical methods (like those that are built into MATLAB) are needed. A simple example of a sophisticated method is the implicit Euler method which will be discussed in the lectures. Solution 1. Analytical solution is y(t) = exp(−5(t − 1) 2) Plot of exact solution 1","PeriodicalId":363854,"journal":{"name":"Day-by-Day Math Thinking Routines in Kindergarten","volume":"22 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-02-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Day-by-Day Math Thinking Routines in Kindergarten","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4324/9780367821968-20","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

of forward Euler To solve dy dt = f (y, t), y(t 0) = y 0 numerically we choose a step length h > 0 and then calculate y 1 = y 0 + hf (y 0 , t 0), t 1 = t 0 + h y 2 = y 1 + hf (y 1 , t 1), t 2 = t 1 + h y 3 = y 2 + hf (y 2 , t 2), t 3 = t 2 + h etc. in which case y i is an approximation to y(t i) at each step. The approximation should get more accurate as h gets smaller. The error at each step will get worse if d 2 y/dt 2 is large and these errors can build up for longer time intervals. 1. We would like to to solve the differential equation dy dt = −10(t − 1)y with the given initial condition: y(0) = e −5. A reference solution to this problem can be plotted in MATLAB by typing the command sequence tt=0:0.01:2; ex=exp(-5*(tt-1).^2);plot(tt,ex,'-k')} (a) Find the analytic solution y(t), and evaluate it at (b) Compute the forward Euler solution by taking seven steps of the method with a step length of h = 0.2. (You will need a calculator to do this.) Generate a table which compare the analytic solution with the numerical solution. At which time t do you find the biggest error ? (c) Compute a more accurate forward Euler solution by taking four steps with a much smaller step length of h = 0.05. Compare this solution with the exact solution y(0.2) and compare the accuracy of this solution with the first time step result obtained in (b). Note that this differential equation is not as benign as it looks; if one wants to solve it over a long time interval, sophisticated numerical methods (like those that are built into MATLAB) are needed. A simple example of a sophisticated method is the implicit Euler method which will be discussed in the lectures. Solution 1. Analytical solution is y(t) = exp(−5(t − 1) 2) Plot of exact solution 1
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
20周
向前欧拉解决dy dt = f (y, t), y y (t 0) = 0数字我们选择步长h > 0然后计算y 1 = y 0 +高频t (0, 0), t 1 = 0 + h 2 = y 1 +高频(y 1 t 1), t h t 1 + 2 = 3 = y 2 +高频(y 2, t 2), t t 2 + 3 = h等在这种情况下,我是一个近似y (t i)在每一个步骤。当h变小时,近似会变得更精确。如果dy /dt很大,每一步的误差会更大,这些误差会在更长的时间间隔内累积。1. 我们想解微分方程dy dt = - 10(t - 1)y,初始条件为y(0) = e - 5。在MATLAB中可以通过输入命令序列tt= 0:01:2来绘制此问题的参考解;plot(tt,ex,'-k')} (a)找到解析解y(t),并在(b)处求值。通过步长为h = 0.2的方法进行7步计算前向欧拉解。(你需要一个计算器来做这个。)生成一个比较解析解和数值解的表格。在什么时候你发现最大的错误?(c)采用步长h = 0.05小得多的四步,计算出更精确的正演欧拉解。将该解与精确解y(0.2)进行比较,并将该解的准确性与(b)中获得的第一个时间步结果进行比较。注意,这个微分方程并不像看起来那么温和;如果想在很长一段时间内解决它,就需要复杂的数值方法(比如MATLAB中内置的那些)。一个简单的复杂方法的例子是隐式欧拉法,这将在讲座中讨论。解决方案1。解析解为y(t) = exp(- 5(t - 1) 2)
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Week 30 Week 23 Week 17 Week 40 Week 28
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1