In many of the following problems, it will be essential to
Chapter 3, Problem 7E(choose chapter or problem)
In many of the following problems, it will be essential to have a calculator or computer available. You may use a software package† or write a program for solving initial value problems using the improved Euler’s method algorithms on pages 127 and 128. (Remember, all trigonometric calculations are done in radians.)
IMPROVED EULER’S METHOD SUBROUTINE |
Purpose To approximate the solution \(\phi(x)\) to the initial value problem \(y^{\prime}=f(x, y)\) , \(y\left(x_{0}\right)=y_{0}\) , for \(x_{0} \leq x \leq c\). INPUT \(x_0,\ y_0,\ c\ ,N\) (number of steps), PRNTR (=1 to print a table) Step 1 Set step size \(h=\left(c-x_{0}\right) / N\), \(x=x_{0}\), \(x=x_{0}\) Step 2 For \(i=1\) to N, do steps 3-5 Step 3 Set \(F=f(x,\ y)\) \(G=f(x+h,\ y+hF)\) Step 4 Set \(x=x+h\) \(y=y+h(F+H)/2\) Step 5 If PRNTR = 1, print \(x,y\) |
IMPROVED EULER’S METHOD WITH TOLERANCE |
Purpose To approximate the solution to the initial value problem \(y^{\prime}=f(x, y)\) , \(y\left(x_{0}\right)=y_{0}\) , at \(x=c\), with tolerance \(\varepsilon\) INPUT \(x_0,\ y_0,\ c\ ,\varepsilon\) , M (maximum number of halvings of step size) Step 1 Set \(z=y_0\), PRINTR = 0 Step 2 For \(m=0\) to M, do steps 3-7†† Step 3 Set \(N=2^m\) Step 4 Call IMPROVED EULER’S METHOD SUBROUTINE Step 5 Print \(h,y\) Step 6 If \(|y-z|<\varepsilon\), go to Step 10 Step 7 Set \(z=y\) Step 8 Print “\(\phi (c)\) is approximately”; y; “ but may not be within the tolerance”; \(\varepsilon\) Step 9 Go to Step 11 Step 10 Print “\(\phi (c)\) is approximately”; y; “with tolerance”; \(\varepsilon\) Step 11 STOP OUTPUT Approximations of the solution to the initial value problem at \(x=c\) using \(2^m) steps |
Use the improved Euler’s method subroutine with step size \(h=0.1\) to approximate the solution to the initial value problem
\(y^{\prime}=x-y^{2}\), \(y(1)=0\),
at the points \(x=1.1\), 1.2, 1.3, 1.4, and 1.5. (Thus, input \(N=5\).) Compare these approximations with those obtained using Euler’s method (see Exercises 1.4, Problem 5).
Equation Transcription:
𝜙
𝜙
𝜙
Text Transcription:
phi(x)
y'=f(x,y) , y(x0=y0)
X_0 </= x </= c
x0,y0
h=(c-x_0)/N,x_0,y=y_0
i=1
F=f(x,y)
G=f(x+h,y+Hf)
x=x+h
y=y+h(F+G)/2
y'=(x,y), y(x_0)=y_0
x=c
epsilon
x_0,y_0
epsilon
z=y_0
m=0
N=2^m
|y-z|<epsilon
z=y
phi(c)
epsilon
phi(c)
epsilon
x=c
2^m
h=0.1
y'=x-y2
y(1)=0
x=1.1
N=5
Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.
Becoming a subscriber
Or look for another answer