The algorithm is basically as follows. The notation is slightly different from that in the website...

90.2K

Verified Solution

Question

Advance Math

The algorithm is basically as follows. The notation is slightlydifferent from that in the website you were given, but there is nodifference in the method.

Given the initial value problem

dy/dx=f(x,y),y(a)= y_0

Euler’s Method with step size h consists in applying theiterative formula

y_(n+1)= y_n+h?f(x_n,y_n ),n?0

To compute successive approximations y_1,y_2,y_3,? to the (true)values ?y(x?_1),?y(x?_2),?y(x?_3),? of the exact solution y=y(x) atthe points x_1,x_2,x_3,?, respectively.

In plain English:
You want to approximate the value of dy/dx (or y’) at some point inan interval.

Step 1: Depending on how accurate you need to be, divide theinterval up into little pieces of equal length; this length is thestep size h. For purposes of discussion, let’s use the interval[0,1] and use ten intervals, so h = 0.1.

Step 2: y_0=0
Step 3: y_1=y_0+0.1f(x_0,y_0)
Step 4: y_2=y_1+0.1f(x_1,y_1)

Stop after ten steps, in this case. Usually the stopping criterionis a level of accuracy.

You can easily set this up in Excel.

Exercises
Use Euler’s Method with step sizes h =0.1,0.02, 0.004, 0.0008 (thatis, do the problem 4 times, each with a more precise value of h) ,10 equally spaced iterations.


1. y^'=x^2+y^2,y(0)=0,0?x?1

2. y^'=x^2-y^2,y(0)=1,0?x?2

3. y^'=ln?y,y(1)=2,1?x?2

4. y^'=x^(2/3)+y^(2/3),y(0)=1,0?x?2

5. y^'=x+?x,y(0)=1,0?x?2

6. y^'=x+?x,y(0)= -1,0?x?2

Answer & Explanation Solved by verified expert
4.3 Ratings (887 Votes)
clear allclose allfunction for which Euler method have to calculatefyx x2y2all hhh01 002 0004 00008fprintfFor the function fxydispffor i1lengthhhstep size hhhhiinitial valuey00 x00xend1y1resultxresult eulermethodfy0x0xendhfigure1hold onplotxresulty1resultlgndisprintfFor step size 4fhendxlabelxylabelyxtitleyx vs x plot for function 1legendlgndbox onfyx x2y2all hhh01 002 0004 00008fprintfFor the function    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students