Differential Equations Quiz: Improved Euler Heuns Method
18 questions · exam conditions
0:00
Improved Euler Heuns MethodQuestion 1 of 18

Consider applying Heun's method to dydx=sin(xy)\frac{dy}{dx} = \sin(xy), y(0)=π/6y(0) = \pi/6, with h=0.1h = 0.1. After computing the predictor y1y_1^*, a student finds that f(0.1,y1)f(0.1, y_1^*) requires evaluating sin(0.1y1)\sin(0.1 \cdot y_1^*). If y10.524y_1^* \approx 0.524, what is the most appropriate way to handle the corrector calculation?

Use linear approximation sin(0.0524)0.0524\sin(0.0524) \approx 0.0524 to avoid computational complexity
Calculate sin(0.0524)\sin(0.0524) exactly using series expansion to maintain method accuracy
Use calculator or numerical evaluation of sin(0.0524)\sin(0.0524) as the method requires
Replace sin(xy)\sin(xy) with xyxy approximation since the argument is small
← Back to quizzes

Differential Equations Quiz

Differential Equations Quiz: Improved Euler Heuns Method

Practice Improved Euler Heuns Method in Differential Equations with focused quiz questions that help you check what you know, review explanations, and build confidence with test-style prompts.

What this quiz covers

This quiz focuses on Improved Euler Heuns Method, giving you a quick way to practice the rules, question types, and explanations that matter most for Differential Equations.

How to use this quiz

Try each quiz question before looking at the correct answer. Use the explanations to review missed ideas, then come back to similar questions until the pattern feels familiar.

All questions

Question 1

Consider applying Heun's method to dydx=sin(xy)\frac{dy}{dx} = \sin(xy), y(0)=π/6y(0) = \pi/6, with h=0.1h = 0.1. After computing the predictor y1y_1^*, a student finds that f(0.1,y1)f(0.1, y_1^*) requires evaluating sin(0.1y1)\sin(0.1 \cdot y_1^*). If y10.524y_1^* \approx 0.524, what is the most appropriate way to handle the corrector calculation?

  1. Use linear approximation sin(0.0524)0.0524\sin(0.0524) \approx 0.0524 to avoid computational complexity
  2. Calculate sin(0.0524)\sin(0.0524) exactly using series expansion to maintain method accuracy
  3. Use calculator or numerical evaluation of sin(0.0524)\sin(0.0524) as the method requires (correct answer)
  4. Replace sin(xy)\sin(xy) with xyxy approximation since the argument is small
Explanation: Heun's method requires accurate evaluation of the function f(x,y)f(x,y) at both predictor and corrector stages. Using approximations (choices A, D) or unnecessary series expansions (choice B) defeats the purpose of the numerical method. Standard numerical evaluation is appropriate and necessary. Choice A introduces additional error. Choice B is unnecessarily complex. Choice D changes the differential equation being solved.

Question 2

A student is approximating the solution to y=f(x,y)y' = f(x,y) with y(xn)=yny(x_n)=y_n and step size hh. They perform the following two calculations: k1=hf(xn,yn)k_1 = h \cdot f(x_n, y_n) yn+1=yn+12(k1+hf(xn+h,yn+k1))y_{n+1} = y_n + \frac{1}{2} (k_1 + h \cdot f(x_n+h, y_n+k_1)) This calculation scheme represents which numerical method?

  1. Euler's Method
  2. Improved Euler (Heun's) Method (correct answer)
  3. Midpoint Method
  4. Classic Fourth-Order Runge-Kutta Method
Explanation: Let's analyze the given formulas. The first calculation is k1=hf(xn,yn)k_1 = h \cdot f(x_n, y_n). This represents the increment in yy according to Euler's method. The term yn+k1y_n+k_1 is therefore yn+hf(xn,yn)y_n + h \cdot f(x_n, y_n), which is the predictor step in Heun's method, often denoted yn+1y_{n+1}^*. Substituting this into the second equation: yn+1=yn+12(hf(xn,yn)+hf(xn+h,yn+1))y_{n+1} = y_n + \frac{1}{2} (h f(x_n, y_n) + h f(x_n+h, y_{n+1}^*)) Factoring out h/2h/2: yn+1=yn+h2[f(xn,yn)+f(xn+h,yn+1)]y_{n+1} = y_n + \frac{h}{2} [f(x_n, y_n) + f(x_n+h, y_{n+1}^*)]. This is the standard formula for the Improved Euler (Heun's) method, which averages the slope at the beginning of the interval, f(xn,yn)f(x_n, y_n), and the estimated slope at the end of the interval, f(xn+h,yn+1)f(x_n+h, y_{n+1}^*).

Question 3

When applying Heun's method to the IVP y=x+y2y' = x + y^2, y(0)=1y(0)=1 with a step size of h=1h=1, a student correctly computes the predictor value y1=2y_1^*=2. What is the correct value for the corrector slope m2=f(x1,y1)m_2 = f(x_1, y_1^*)?

  1. 11
  2. 44
  3. 22
  4. 55 (correct answer)
Explanation: When you encounter Heun's method problems, remember that this predictor-corrector technique uses two slope calculations: an initial predictor slope and a corrector slope based on the predicted y-value. Given the differential equation y=x+y2y' = x + y^2 with y(0)=1y(0) = 1 and step size h=1h = 1, you need to find the corrector slope m2=f(x1,y1)m_2 = f(x_1, y_1^*) where the student already found y1=2y_1^* = 2. First, identify your coordinates. Starting at (x0,y0)=(0,1)(x_0, y_0) = (0, 1), after one step of size h=1h = 1, you reach x1=0+1=1x_1 = 0 + 1 = 1. The corrector slope is simply the function f(x,y)=x+y2f(x,y) = x + y^2 evaluated at the point (x1,y1)=(1,2)(x_1, y_1^*) = (1, 2). Substituting these values: m2=f(1,2)=1+22=1+4=5m_2 = f(1, 2) = 1 + 2^2 = 1 + 4 = 5. This confirms answer D is correct. Looking at the wrong answers: A) 11 represents only the xx component, ignoring the y2y^2 term entirely. B) 44 captures only the y2=22y^2 = 2^2 component while forgetting to add the x=1x = 1 term. C) 22 likely comes from mistakenly using the predicted yy-value itself rather than evaluating the function. The key strategy for Heun's method problems is to carefully track your coordinates and systematically substitute into the given differential equation. Always double-check that you're evaluating f(x,y)f(x,y) at the correct point—many errors stem from using wrong coordinates or forgetting terms in the function.

Question 4

The local truncation error of Heun's method is on the order of O(h3)O(h^3). This is achieved by constructing the approximation yn+1y_{n+1} such that its Taylor series expansion in powers of hh matches the Taylor series expansion of the true solution y(xn+h)y(x_n+h). Up to which power of hh do these two expansions match?

  1. h0h^0
  2. h1h^1
  3. h2h^2 (correct answer)
  4. h3h^3
Explanation: The order of a numerical method is related to its local truncation error. The local truncation error is defined as the difference between the true solution and the numerical approximation after one step, assuming the previous value was exact. For a method to have a local truncation error of order O(hp+1)O(h^{p+1}), its Taylor series expansion must match the true solution's Taylor series expansion up to and including the term of order hph^p. Since Heun's method has a local truncation error of O(h3)O(h^3), its expansion must match the true solution's expansion up to the h2h^2 term. The mismatch first occurs at the h3h^3 term, which defines the order of the local error. Therefore, the expansions match for terms with powers h0,h1h^0, h^1, and h2h^2.

Question 5

Consider the initial value problem y=x2yy' = x^2 - y with y(0)=1y(0) = 1. One step of the Improved Euler (Heun's) method with a step size of h=0.1h=0.1 is used to find an approximation y1y(0.1)y_1 \approx y(0.1). The method uses a predictor slope m1=f(x0,y0)m_1 = f(x_0, y_0) and a corrector slope m2=f(x1,y1)m_2 = f(x_1, y_1^*). What is the value of the corrector slope m2m_2?

  1. 0.89-0.89 (correct answer)
  2. 1.00-1.00
  3. 0.99-0.99
  4. 0.945-0.945
Explanation: The Improved Euler (Heun's) method consists of a predictor step and a corrector step. Given f(x,y)=x2yf(x,y) = x^2 - y, x0=0x_0=0, y0=1y_0=1, and h=0.1h=0.1.
  1. Calculate the predictor slope at the initial point: m1=f(x0,y0)=f(0,1)=021=1m_1 = f(x_0, y_0) = f(0, 1) = 0^2 - 1 = -1.
  2. Use the predictor slope to find a preliminary estimate for y1y_1 (the predictor value y1y_1^*): y1=y0+hf(x0,y0)=1+0.1(1)=0.9y_1^* = y_0 + h \cdot f(x_0, y_0) = 1 + 0.1 \cdot (-1) = 0.9.
  3. Calculate the corrector slope m2m_2 at the new point (x1,y1)=(0.1,0.9)(x_1, y_1^*) = (0.1, 0.9): m2=f(x1,y1)=f(0.1,0.9)=(0.1)20.9=0.010.9=0.89m_2 = f(x_1, y_1^*) = f(0.1, 0.9) = (0.1)^2 - 0.9 = 0.01 - 0.9 = -0.89.
The question asks for the value of the corrector slope m2m_2.

Question 6

One step of Heun's method is used to approximate y(0.5)y(0.5) for the IVP y=2y4xy' = 2y - 4x, y(0)=y0y(0) = y_0. With a step size of h=0.5h=0.5, the approximation obtained is y1=3y_1 = 3. What was the value of the initial condition y0y_0?

  1. 1.01.0
  2. 1.51.5
  3. 1.751.75
  4. 1.41.4 (correct answer)
Explanation: When you encounter Heun's method problems, remember that this is a two-stage Runge-Kutta method that uses both the slope at the current point and a predicted slope at the next point to make its approximation. For Heun's method with y=f(x,y)y' = f(x,y), the formula is: y1=y0+h2[f(x0,y0)+f(x0+h,y0+hf(x0,y0))]y_1 = y_0 + \frac{h}{2}[f(x_0, y_0) + f(x_0 + h, y_0 + hf(x_0, y_0))] Given y=2y4xy' = 2y - 4x with y(0)=y0y(0) = y_0, h=0.5h = 0.5, and y1=3y_1 = 3: First, calculate f(0,y0)=2y04(0)=2y0f(0, y_0) = 2y_0 - 4(0) = 2y_0 Next, find the predictor: y0+hf(0,y0)=y0+0.5(2y0)=2y0y_0 + hf(0, y_0) = y_0 + 0.5(2y_0) = 2y_0 Then calculate f(0.5,2y0)=2(2y0)4(0.5)=4y02f(0.5, 2y_0) = 2(2y_0) - 4(0.5) = 4y_0 - 2 Applying Heun's formula: 3=y0+0.52[2y0+(4y02)]3 = y_0 + \frac{0.5}{2}[2y_0 + (4y_0 - 2)] 3=y0+0.25[6y02]3 = y_0 + 0.25[6y_0 - 2] 3=y0+1.5y00.53 = y_0 + 1.5y_0 - 0.5 3=2.5y00.53 = 2.5y_0 - 0.5 3.5=2.5y03.5 = 2.5y_0 y0=1.4y_0 = 1.4 Choice A (1.0) would give y1=2y_1 = 2, not 3. Choice B (1.5) results in y1=3.25y_1 = 3.25. Choice C (1.75) yields y1=3.625y_1 = 3.625. These all stem from computational errors in applying Heun's two-stage process. The answer is D. Study tip: Always work backwards systematically when given the final result in numerical methods problems. Set up the complete formula first, then substitute known values and solve algebraically.

Question 7

For which of the following differential equations will one step of Euler's method and one step of Heun's method, starting from any initial condition (x0,y0)(x_0, y_0) and using the same step size hh, produce the exact same approximation for y(x0+h)y(x_0+h)?

  1. y=x2y' = x^2
  2. y=yy' = y
  3. y=10y' = -10 (correct answer)
  4. y=x+yy' = x+y
Explanation: Let y1Ey_1^E be the Euler approximation and y1Hy_1^H be the Heun's approximation. y1E=y0+hf(x0,y0)y_1^E = y_0 + h f(x_0, y_0). y1H=y0+h2[f(x0,y0)+f(x0+h,y1)]y_1^H = y_0 + \frac{h}{2} [f(x_0, y_0) + f(x_0+h, y_1^*)], where y1=y0+hf(x0,y0)=y1Ey_1^* = y_0 + h f(x_0, y_0) = y_1^E. For the two approximations to be equal, we must have: y0+hf(x0,y0)=y0+h2[f(x0,y0)+f(x0+h,y1E)]y_0 + h f(x_0, y_0) = y_0 + \frac{h}{2} [f(x_0, y_0) + f(x_0+h, y_1^E)] hf(x0,y0)=h2[f(x0,y0)+f(x0+h,y1E)]h f(x_0, y_0) = \frac{h}{2} [f(x_0, y_0) + f(x_0+h, y_1^E)] 2f(x0,y0)=f(x0,y0)+f(x0+h,y1E)2 f(x_0, y_0) = f(x_0, y_0) + f(x_0+h, y_1^E) f(x0,y0)=f(x0+h,y1E)f(x_0, y_0) = f(x_0+h, y_1^E). This condition means that the slope function f(x,y)f(x,y) must have the same value at the initial point (x0,y0)(x_0, y_0) and at the predicted next point (x0+h,y1E)(x_0+h, y_1^E). This is only guaranteed to be true for any (x0,y0)(x_0, y_0) and hh if the function f(x,y)f(x,y) is a constant. For the choice y=10y'=-10, we have f(x,y)=10f(x,y) = -10. Thus, f(x0,y0)=10f(x_0, y_0) = -10 and f(x0+h,y1E)=10f(x_0+h, y_1^E) = -10. The condition is met.

Question 8

Consider applying Heun's method to the IVP y=10yy' = -10y, y(0)=1y(0)=1. The true solution, y(x)=e10xy(x) = e^{-10x}, decays toward zero. For the numerical approximation y1y_1 after one step to be stable and exhibit decay (i.e., y1<y0|y_1| < |y_0|), the step size hh must be less than what maximum value?

  1. 0.10.1
  2. 0.20.2 (correct answer)
  3. 0.50.5
  4. 1.01.0
Explanation: We need to find the condition on hh such that y1<y0|y_1| < |y_0|. Here, y0=1y_0=1. First, let's compute y1y_1 in terms of hh. f(x,y)=10yf(x,y) = -10y, (x0,y0)=(0,1)(x_0, y_0) = (0,1). m1=f(0,1)=10(1)=10m_1 = f(0,1) = -10(1) = -10. y1=y0+hm1=110hy_1^* = y_0 + h m_1 = 1 - 10h. m2=f(h,y1)=10(110h)=10+100hm_2 = f(h, y_1^*) = -10(1-10h) = -10 + 100h. y1=y0+h2(m1+m2)=1+h2(1010+100h)=1+h2(20+100h)=110h+50h2y_1 = y_0 + \frac{h}{2}(m_1 + m_2) = 1 + \frac{h}{2}(-10 - 10 + 100h) = 1 + \frac{h}{2}(-20 + 100h) = 1 - 10h + 50h^2. The condition for stability is y1<1|y_1| < 1, which translates to 1<110h+50h2<1-1 < 1 - 10h + 50h^2 < 1. First inequality: 110h+50h2<1    50h210h<0    10h(5h1)<01 - 10h + 50h^2 < 1 \implies 50h^2 - 10h < 0 \implies 10h(5h-1) < 0. Since h>0h>0, we need 5h1<05h-1 < 0, which gives h<1/5h < 1/5 or h<0.2h < 0.2. Second inequality: 1<110h+50h2    0<210h+50h2-1 < 1 - 10h + 50h^2 \implies 0 < 2 - 10h + 50h^2. The quadratic 50h210h+250h^2 - 10h + 2 has discriminant Δ=(10)24(50)(2)=100400=300<0\Delta = (-10)^2 - 4(50)(2) = 100 - 400 = -300 < 0. Since the leading coefficient is positive, the quadratic is always positive. Thus, this inequality holds for all hh. Combining the conditions, the step size must satisfy h<0.2h < 0.2.

Question 9

For the system dydx=2x+y\frac{dy}{dx} = 2x + y, y(0)=1y(0) = 1, suppose Heun's method with h=0.3h = 0.3 gives y(0.3)1.423y(0.3) \approx 1.423 while the analytical solution yields y(0.3)=e0.32(0.3)21.350y(0.3) = e^{0.3} - 2(0.3) - 2 \approx 1.350. If the step size is halved to h=0.15h = 0.15, approximately what value should Heun's method produce at x=0.3x = 0.3?

  1. y(0.3)1.368y(0.3) \approx 1.368 (correct answer)
  2. y(0.3)1.377y(0.3) \approx 1.377
  3. y(0.3)1.386y(0.3) \approx 1.386
  4. y(0.3)1.395y(0.3) \approx 1.395
Explanation: Heun's method has global error O(h2)O(h^2). The original error was 1.4231.350=0.0731.423 - 1.350 = 0.073. When step size halves, error reduces by factor of 44: new error 0.073/4=0.018\approx 0.073/4 = 0.018. So y(0.3)1.350+0.018=1.368y(0.3) \approx 1.350 + 0.018 = 1.368. Choice B uses factor of 22 reduction. Choice C uses 4\sqrt{4} factor. Choice D assumes error reduces linearly with step size.

Question 10

Using Heun's method with step size h=0.2h = 0.2, approximate y(0.4)y(0.4) for the initial value problem dydx=x+y\frac{dy}{dx} = x + y, y(0)=1y(0) = 1. What is the value obtained after applying the predictor-corrector sequence twice?

  1. y(0.4)1.5824y(0.4) \approx 1.5824
  2. y(0.4)1.5936y(0.4) \approx 1.5936 (correct answer)
  3. y(0.4)1.6048y(0.4) \approx 1.6048
  4. y(0.4)1.6160y(0.4) \approx 1.6160
Explanation: Heun's method uses predictor-corrector: First step: y1=1+0.2(0+1)=1.2y_1^* = 1 + 0.2(0 + 1) = 1.2, then y1=1+0.1[(0+1)+(0.2+1.2)]=1.24y_1 = 1 + 0.1[(0 + 1) + (0.2 + 1.2)] = 1.24. Second step: y2=1.24+0.2(0.2+1.24)=1.528y_2^* = 1.24 + 0.2(0.2 + 1.24) = 1.528, then y2=1.24+0.1[(0.2+1.24)+(0.4+1.528)]=1.5936y_2 = 1.24 + 0.1[(0.2 + 1.24) + (0.4 + 1.528)] = 1.5936. Choice A uses only the predictor value. Choice C incorrectly adds an extra correction term. Choice D uses forward Euler throughout.

Question 11

When applying Heun's method to dydx=2y+3x\frac{dy}{dx} = -2y + 3x, y(1)=2y(1) = 2, with step size h=0.25h = 0.25, which expression correctly represents the predictor step from x=1x = 1 to x=1.25x = 1.25?

  1. y1=2+0.25[2(2)+3(1)]y_1^* = 2 + 0.25[-2(2) + 3(1)] (correct answer)
  2. y1=2+0.25[2(2)+3(1.25)]y_1^* = 2 + 0.25[-2(2) + 3(1.25)]
  3. y1=2+0.125[2(2)+3(1)]+0.125[2(2)+3(1.25)]y_1^* = 2 + 0.125[-2(2) + 3(1)] + 0.125[-2(2) + 3(1.25)]
  4. y1=2+0.25{[2(2)+3(1)]+[2(2)+3(1.25)]}y_1^* = 2 + 0.25\{[-2(2) + 3(1)] + [-2(2) + 3(1.25)]\}
Explanation: In Heun's method, the predictor step uses only the slope at the initial point: y1=y0+hf(x0,y0)y_1^* = y_0 + h \cdot f(x_0, y_0). Here, f(1,2)=2(2)+3(1)=1f(1,2) = -2(2) + 3(1) = -1, so y1=2+0.25(1)y_1^* = 2 + 0.25(-1). Choice B incorrectly uses the endpoint xx-value in the predictor. Choice C represents the corrector step formula. Choice D attempts to average slopes in the predictor step, which is incorrect procedure.

Question 12

Two students solve dydx=yx2\frac{dy}{dx} = y - x^2, y(1)=2y(1) = 2, using h=0.25h = 0.25. Student A uses Heun's method properly. Student B mistakenly applies the corrector formula twice in each step (i.e., uses the first corrector result as input to compute a second corrector). At x=1.25x = 1.25, which relationship holds?

  1. Student B's result is closer to the true solution than Student A's result
  2. Student B's result equals Student A's result since extra correction has no effect
  3. Student B's result has larger error than Student A's due to over-correction instability (correct answer)
  4. Student B inadvertently implements a higher-order method with better accuracy
Explanation: Applying the corrector formula multiple times in Heun's method leads to over-correction and can cause instability, especially when the step size is not very small. The method is designed for one predictor and one corrector step. Multiple corrections don't improve accuracy and typically introduce additional error. Choice A is incorrect as over-correction worsens accuracy. Choice B is wrong since extra correction does change the result. Choice D misunderstands that this doesn't create a higher-order method.

Question 13

For dydx=11+x2y2\frac{dy}{dx} = \frac{1}{1+x^2} - \frac{y}{2}, y(0)=0y(0) = 0, Heun's method with h=0.4h = 0.4 produces y(0.4)0.2847y(0.4) \approx 0.2847. The analytical solution is y(x)=2[arctan(x)x1+x2+Cex/2]y(x) = 2[\arctan(x) - \frac{x}{1+x^2} + Ce^{-x/2}] where CC satisfies the initial condition. What is the primary reason for any discrepancy between numerical and analytical results?

  1. The analytical solution contains a transcendental function that cannot be exactly represented
  2. Heun's method accumulates truncation error from the trapezoidal approximation over the integration interval (correct answer)
  3. The step size h=0.4h = 0.4 is too large for the exponential decay component of the solution
  4. Round-off errors in computing 11+x2\frac{1}{1+x^2} compound through the numerical iterations
Explanation: The primary source of error in Heun's method is the local truncation error O(h3)O(h^3) at each step, which accumulates to global error O(h2)O(h^2). This comes from the trapezoidal rule approximation inherent in the method. Choice A is irrelevant to numerical vs analytical comparison. Choice C misidentifies the error source. Choice D overestimates the impact of round-off error compared to truncation error for this step size.

Question 14

For the IVP dydx=xy\frac{dy}{dx} = \frac{x}{y}, y(2)=3y(2) = 3, using Heun's method with h=0.4h = 0.4, what is the most significant source of error in the first step compared to the analytical solution y=x2+5y = \sqrt{x^2 + 5}?

  1. The predictor step linearizes the nonlinear relationship between xx and yy
  2. The corrector step over-compensates for the curvature in the solution curve
  3. The method fails to account for the changing rate of change of the slope function
  4. The relatively large step size amplifies truncation errors from the trapezoidal approximation (correct answer)
Explanation: Heun's method has local truncation error O(h3)O(h^3), and the primary error source with h=0.4h = 0.4 is that this step size is relatively large for the curvature of the solution. The trapezoidal rule approximation in the corrector step introduces significant error when hh is not small enough. Choice A misidentifies the linearization issue. Choice B incorrectly suggests over-compensation. Choice C is vague and doesn't identify the primary error mechanism.

Question 15

Consider the initial value problem y=2x3y' = 2x - 3, with y(1)=5y(1) = 5. If one step of Heun's method with step size hh is used to approximate y(1+h)y(1+h), what is the local error of this approximation?

  1. 00 (correct answer)
  2. h2h^2
  3. Order O(h2)O(h^2) but non-zero
  4. Order O(h3)O(h^3) but non-zero
Explanation: Heun's method has a local truncation error of O(h3)O(h^3), meaning it can find the exact value for polynomial solutions of degree 2 or less in a single step. First, find the exact solution to the IVP by integration: y(x)=(2x3)dx=x23x+Cy(x) = \int (2x - 3) dx = x^2 - 3x + C. Using y(1)=5y(1)=5, we have 5=123(1)+C    5=2+C    C=75 = 1^2 - 3(1) + C \implies 5 = -2 + C \implies C=7. The exact solution is y(x)=x23x+7y(x) = x^2 - 3x + 7. The exact value at x=1+hx=1+h is y(1+h)=(1+h)23(1+h)+7=(1+2h+h2)(3+3h)+7=h2h+5y(1+h) = (1+h)^2 - 3(1+h) + 7 = (1+2h+h^2) - (3+3h) + 7 = h^2 - h + 5. Now, apply one step of Heun's method from (x0,y0)=(1,5)(x_0, y_0) = (1,5): f(x,y)=2x3f(x,y) = 2x-3. m1=f(1,5)=2(1)3=1m_1 = f(1, 5) = 2(1) - 3 = -1. Predictor: y1=y0+hm1=5+h(1)=5hy_1^* = y_0 + h \cdot m_1 = 5 + h(-1) = 5-h. Corrector slope: m2=f(1+h,5h)=2(1+h)3=2+2h3=2h1m_2 = f(1+h, 5-h) = 2(1+h) - 3 = 2+2h-3 = 2h-1. Approximation: y1=y0+h2(m1+m2)=5+h2(1+2h1)=5+h2(2h2)=5+h2hy_1 = y_0 + \frac{h}{2}(m_1 + m_2) = 5 + \frac{h}{2}(-1 + 2h-1) = 5 + \frac{h}{2}(2h-2) = 5 + h^2 - h. The error is the exact value minus the approximation: (h2h+5)(5+h2h)=0(h^2 - h + 5) - (5 + h^2 - h) = 0. The approximation is exact.

Question 16

Use Heun's method with a step size of h=0.2h=0.2 to approximate the solution of the initial value problem y=4y2y' = 4 - y^2, y(0)=0y(0)=0 at x=0.4x=0.4.

  1. 1.0881.088
  2. 1.4721.472
  3. 1.4281.428
  4. 1.2781.278 (correct answer)
Explanation: This problem requires two steps of Heun's method. Let f(x,y)=4y2f(x,y)=4-y^2. Step 1: Approximate y(0.2)y(0.2) from (x0,y0)=(0,0)(x_0, y_0) = (0,0) with h=0.2h=0.2. m1=f(0,0)=402=4m_1 = f(0,0) = 4 - 0^2 = 4. y1=y0+hm1=0+0.2(4)=0.8y_1^* = y_0 + h m_1 = 0 + 0.2(4) = 0.8. m2=f(x1,y1)=f(0.2,0.8)=4(0.8)2=40.64=3.36m_2 = f(x_1, y_1^*) = f(0.2, 0.8) = 4 - (0.8)^2 = 4 - 0.64 = 3.36. y1=y0+h2(m1+m2)=0+0.22(4+3.36)=0.1(7.36)=0.736y_1 = y_0 + \frac{h}{2}(m_1+m_2) = 0 + \frac{0.2}{2}(4+3.36) = 0.1(7.36) = 0.736. So y(0.2)0.736y(0.2) \approx 0.736. Step 2: Approximate y(0.4)y(0.4) from (x1,y1)=(0.2,0.736)(x_1, y_1) = (0.2, 0.736) with h=0.2h=0.2. m1=f(0.2,0.736)=4(0.736)2=40.541696=3.458304m_1' = f(0.2, 0.736) = 4 - (0.736)^2 = 4 - 0.541696 = 3.458304. y2=y1+hm1=0.736+0.2(3.458304)=0.736+0.6916608=1.4276608y_2^* = y_1 + h m_1' = 0.736 + 0.2(3.458304) = 0.736 + 0.6916608 = 1.4276608. m2=f(x2,y2)=f(0.4,1.4276608)=4(1.4276608)242.03821=1.96179m_2' = f(x_2, y_2^*) = f(0.4, 1.4276608) = 4 - (1.4276608)^2 \approx 4 - 2.03821 = 1.96179. y2=y1+h2(m1+m2)0.736+0.22(3.4583+1.9618)=0.736+0.1(5.4201)=0.736+0.54201=1.27801y_2 = y_1 + \frac{h}{2}(m_1'+m_2') \approx 0.736 + \frac{0.2}{2}(3.4583 + 1.9618) = 0.736 + 0.1(5.4201) = 0.736 + 0.54201 = 1.27801. The closest answer is 1.2781.278.

Question 17

Apply one step of Heun's method to the initial value problem y=2xy+1y' = \frac{2x}{y+1}, y(1)=1y(1)=1 with a step size of h=0.5h=0.5. What is the resulting approximation for y(1.5)y(1.5)?

  1. 1.5001.500
  2. 1.5501.550 (correct answer)
  3. 1.6251.625
  4. 1.7501.750
Explanation: We apply one step of Heun's method with f(x,y)=2xy+1f(x,y) = \frac{2x}{y+1}, (x0,y0)=(1,1)(x_0, y_0) = (1,1), and h=0.5h=0.5.
  1. Calculate the predictor slope m1m_1: m1=f(1,1)=2(1)1+1=1m_1 = f(1,1) = \frac{2(1)}{1+1} = 1.
  2. Calculate the predictor value y1y_1^*: y1=y0+hm1=1+0.5(1)=1.5y_1^* = y_0 + h \cdot m_1 = 1 + 0.5(1) = 1.5.
  3. Calculate the corrector slope m2m_2 at (x1,y1)=(1.5,1.5)(x_1, y_1^*) = (1.5, 1.5): m2=f(1.5,1.5)=2(1.5)1.5+1=32.5=65=1.2m_2 = f(1.5, 1.5) = \frac{2(1.5)}{1.5+1} = \frac{3}{2.5} = \frac{6}{5} = 1.2.
  4. Calculate the final approximation y1y_1: y1=y0+h2(m1+m2)=1+0.52(1+1.2)=1+0.25(2.2)=1+0.55=1.55y_1 = y_0 + \frac{h}{2}(m_1+m_2) = 1 + \frac{0.5}{2}(1+1.2) = 1 + 0.25(2.2) = 1 + 0.55 = 1.55.

Question 18

The Improved Euler (Heun's) method approximates the next value in a solution by using the average of two slopes. Geometrically, what do these two slopes represent?

  1. The slope at the beginning of the interval and an estimated slope at the end of the interval. (correct answer)
  2. The slope at the beginning of the interval and an estimated slope at the midpoint of the interval.
  3. The exact slopes of the true solution curve at the beginning and the end of the interval.
  4. The slope given by the forward Euler method and the slope given by the backward Euler method.
Explanation: Heun's method first calculates the slope at the current point (xn,yn)(x_n, y_n), which is m1=f(xn,yn)m_1 = f(x_n, y_n). It then uses this slope to make a preliminary estimate (a 'prediction') of the value at the end of the interval, yn+1=yn+hm1y_{n+1}^* = y_n + h \cdot m_1. It then calculates a second slope, m2=f(xn+1,yn+1)m_2 = f(x_{n+1}, y_{n+1}^*), which is an estimate for the slope at the end of the interval. The final approximation is made using the average of these two slopes. Therefore, the two slopes are the slope at the beginning of the interval and an estimated slope at the end.