{"id":10234,"date":"2017-06-13t15:35:33","date_gmt":"2017-06-13t22:35:33","guid":{"rendered":"\/\/www.catharsisit.com\/hs\/?p=10234"},"modified":"2022-06-14t15:35:33","modified_gmt":"2022-06-14t22:35:33","slug":"ap-calculus-bc-review-eulers-method","status":"publish","type":"post","link":"\/\/www.catharsisit.com\/hs\/ap\/ap-calculus-bc-review-eulers-method\/","title":{"rendered":"ap calculus bc review: euler’s method"},"content":{"rendered":"
what is euler’s method? in this post we review this technique for approximating solutions to certain kinds of differential equations and work out a few examples based on what you may see on the ap calculus bc exam.<\/p>\n
euler’s method is a step-based method for approximating the solution to an initial value problem<\/em> of the following type.<\/p>\n the given time t<\/em>0<\/sub> is the initial time<\/strong>, and the corresponding y<\/em>0<\/sub> is the initial value<\/strong>.<\/p>\n first, you must choose a small step size h<\/em> (which is almost always given in the problem statement on the ap exam).<\/p>\n then the solution at later times t<\/em>1<\/sub>, t<\/em>2<\/sub>, t<\/em>3<\/sub>, … can be found using the following algorithm.<\/p>\n it’s helpful to understand a little of the theory behind euler’s method. in fact, a good grasp of the theory helps you in other areas of calculus as well.<\/p>\n the key is that the y<\/em>\u00a0‘ always measures the rate of change<\/strong> of the function y<\/em>. so even if you don’t know what y<\/em> is, if you can tell how fast it’s changing, then that info can help you to build up the values of y<\/em>.<\/p>\n now if y<\/em> changes from y<\/em>0<\/sub> to y<\/em>1<\/sub> in the time interval from t<\/em>0<\/sub> to t<\/em>1<\/sub>, then we can express this fact using the derivative:<\/p>\n letting the difference in time be h<\/em> = t<\/em>1<\/sub> – t<\/em>0<\/sub>, then the formula becomes:<\/p>\n the final piece of the puzzle is to use the given information that y<\/em>\u00a0‘ = f<\/em>(t<\/em>, y<\/em>).<\/p>\n that means that you can replace y<\/em>\u00a0‘ by its current value as determined by the function f<\/em>. if you’re only going from t<\/em>0<\/sub> to t<\/em>1<\/sub> (a single step), then you get:<\/p>\n on the other hand, why stop at just one step? once you know the value of y<\/em>1<\/sub>, then you can use that value in a similar way to find out y<\/em>2<\/sub>. then use y<\/em>2<\/sub> to find y<\/em>3<\/sub>, etc.<\/p>\n it’s important to realize that this method does not give exact answers \u2014 just good estimates.<\/p>\n unless the directions specify to use euler’s method, do not use it!<\/strong><\/p><\/blockquote>\n instead, if you have to solve a differential equation or initial value problem, then try using methods like separation of variables<\/a><\/em> or in the simplest cases, integration<\/em> (for a refresher, take a look at: ap calculus exam review: integrals<\/a>).<\/p>\n ok enough theory. let’s get to the examples!<\/p>\n use euler’s method with h<\/em> = 0.25 to estimate y<\/em>(1) if y<\/em>\u00a0‘ = 3y<\/em> – 1 and y<\/em>(0) = 1.<\/p>\n the first clue is in the given information. the equation y<\/em>(0) = 1 means that the initial time is x<\/em>0<\/sub> = 0 and initial value is y<\/em>0<\/sub> = 1.<\/p>\n note, here we are using x<\/em> instead of t<\/em> because sometimes the ap calculus question will be in terms of x<\/em> and y<\/em> rather than t<\/em> and y<\/em>.<\/p>\n because the step size is 0.25, we use x<\/em>n<\/sub> = x<\/em>0<\/sub> + nh<\/em> to get:<\/p>\n now remember, the derivative is given you you: y<\/em>\u00a0‘ = 3y<\/em> – 1. use this to fill out the table.<\/p>\n <\/p>\n finally, we see that our final answer is: y<\/em>(1) = y<\/em>4<\/sub> = 6.586.<\/p>\n let y<\/em> = f<\/em>(t<\/em>) be a function satisfying here, the step size is h<\/em> = 0.5, so there will only be two new time values before landing on the goal time t<\/em> = 1:<\/p>\n t<\/em>1<\/sub> = 0 + 1(0.5) = 0.5, and t<\/em>2<\/sub> = 0 + 2(0.5) = 1.<\/p>\n also, the given derivative function looks messy. just substitute y<\/em> for f<\/em>(t<\/em>) to make it easier to work with.<\/p>\n so we can rephrase the question with y<\/em>\u00a0‘ = t<\/em>(2 – y<\/em>). notice this time the formula involves both variables, t<\/em> and y<\/em> in this case.<\/p>\n the initial value is y<\/em>0<\/sub> = 8.<\/p>\n the final answer is 6.5.<\/p>\n find y<\/em>(2) by euler’s method with step size 0.2 if y<\/em>(1) = 4 and y<\/em>\u00a0‘ = y<\/em>.<\/p>\n this time, with step size h<\/em> = 0.2, there will be five new t<\/em>-values to worry about.<\/p>\n the final answer is 9.953.<\/p>\n the preceding problem can be done by exact means as well. this will serve as a good verification that our method actually works.<\/p>\n if y<\/em>\u00a0‘ = dy<\/em>\/dt<\/em> = y<\/em>, then by separation of variables, we have: (1\/y<\/em>) dy<\/em> = dt<\/em>.<\/p>\n integrating both sides, we get: ln |y<\/em>| = t<\/em> + c<\/em>.<\/p>\n now because the initial value 4 is positive, we can safely ignore the absolute value bars in this problem. the use your algebra skills and the given initial values to solve for y<\/em>.<\/p>\n you can check on your own that plugging in t<\/em> = 1 results in a value very close to 4. but what we’re really interested in is t<\/em> = 2.<\/p>\n 1.4715e<\/em>2<\/sup> = 10.873.<\/p>\n even though our estimate of 9.953 seems off the mark compared to the actual result of 10.873, it’s actually not bad. in fact, better estimates could have been produced by decreasing the step size. at any rate, our estimate is in the same ballpark, which is all that can be hoped for when using euler’s method.<\/p>\n while euler’s method may at first seem alien, it’s actually easy to use. you just have to plug the right numbers into a certain formula multiple times until you arrive at the desired result.<\/p>\n conceptually, the method is not much different than tracing a path through a slope field<\/em>. at each point, the direction of your path is determined by the direction of the arrows in the field just as the given function y<\/em>\u00a0‘ = f<\/em>(t<\/em>, y<\/em>) determines the values of y<\/em> for later times t<\/em>.<\/p>\n for a guide to understanding this and other topics on the ap calculus bc test, start here: what to expect on the ap calculus bc test<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" what is euler’s method? in this post, we review this technique and work out a few examples based on what you may see on the ap calculus bc exam.<\/p>\n","protected":false},"author":223,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[240],"tags":[241],"ppma_author":[24932],"class_list":["post-10234","post","type-post","status-publish","format-standard","hentry","category-ap","tag-ap-calculus"],"acf":[],"yoast_head":"\n<\/p>\n
<\/p>\n
why does it work?<\/h3>\n
<\/p>\n
<\/p>\n
<\/p>\n
when should i use euler’s method?<\/h3>\n
examples<\/h2>\n
example 1 \u2014 getting the basics down<\/h3>\n
solution<\/h4>\n
<\/p>\n
\n\n
\n n<\/em><\/th>\n x<\/em>n<\/sub><\/th>\n y<\/em>n<\/sub><\/th>\n y<\/em>n<\/sub>'<\/th>\n<\/tr>\n<\/thead>\n\n \n 0<\/td>\n 0<\/td>\n 1<\/td>\n 3(1) – 1 = 2<\/td>\n<\/tr>\n \n 1<\/td>\n 0.25<\/td>\n 1 + 0.25(2) = 1.5<\/td>\n 3(1.5) – 1 = 3.5<\/td>\n<\/tr>\n \n 2<\/td>\n 0.5<\/td>\n 1.5 + 0.25(3.5) = 2.375<\/td>\n 3(2.375) – 1 = 6.125<\/td>\n<\/tr>\n \n 3<\/td>\n 0.75<\/td>\n 2.375 + 0.25(6.125) = 3.906<\/td>\n 3(3.906) – 1 = 10.718<\/td>\n<\/tr>\n \n 4<\/td>\n 1<\/td>\n 3.906 + 0.25(10.718) = 6.586<\/td>\n <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n example 2 \u2014 slightly more challenging<\/h3>\n
. use euler’s method with step size 0.5 to estimate the value of f<\/em>(1).<\/p>\n
solution<\/h4>\n
\n\n
\n n<\/em><\/th>\n t<\/em>n<\/sub><\/th>\n y<\/em>n<\/sub><\/th>\n y<\/em>n<\/sub>'<\/th>\n<\/tr>\n<\/thead>\n\n \n 0<\/td>\n 0<\/td>\n 8<\/td>\n 0(2 – 8) = 0<\/td>\n<\/tr>\n \n 1<\/td>\n 0.5<\/td>\n 8 + 0.5(0) = 8<\/td>\n 0.5(2 – 8) = -3<\/td>\n<\/tr>\n \n 2<\/td>\n 1<\/td>\n 8 + 0.5(-3) = 6.5<\/td>\n <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n example 3 \u2014 one more for the road<\/h3>\n
solution<\/h4>\n
\n\n
\n n<\/em><\/th>\n t<\/em>n<\/sub><\/th>\n y<\/em>n<\/sub><\/th>\n y<\/em>n<\/sub>'<\/th>\n<\/tr>\n<\/thead>\n\n \n 0<\/td>\n 1<\/td>\n 4<\/td>\n 4<\/td>\n<\/tr>\n \n 1<\/td>\n 1.2<\/td>\n 4 + 0.2(4) = 4.8<\/td>\n 4.8<\/td>\n<\/tr>\n \n 2<\/td>\n 1.4<\/td>\n 4.8 + 0.2(4.8) = 5.76<\/td>\n 5.76<\/td>\n<\/tr>\n \n 3<\/td>\n 1.6<\/td>\n 5.76 + 0.2(5.76) = 6.912<\/td>\n 6.912<\/td>\n<\/tr>\n \n 4<\/td>\n 1.8<\/td>\n 6.912 + 0.2(6.912) = 8.294<\/td>\n 8.294<\/td>\n<\/tr>\n \n 5<\/td>\n 2<\/td>\n 8.294 + 0.2(8.294) = 9.953<\/td>\n <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n checking your answer<\/h4>\n
<\/p>\n
final thoughts<\/h2>\n