Question:

Consider the differential equation given below. Using the Euler method with the step size \( h \) of 0.5, the value of \( y \) at \( x = 1.0 \) is equal to ........ rounded off to 1 decimal place).

Show Hint

In Euler's method, make sure to calculate the value of \( f(x_n, y_n) \) at each step before using it to find \( y_{n+1} \).
Updated On: Apr 3, 2025
  • 2.625
  • 2.5
  • 2.0
  • 2.4
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

We are given the differential equation: \[ \frac{dy}{dx} = y + 2x - x^2, \quad y(0) = 1. \] We will solve this using the Euler method with step size \( h = 0.5 \). The general form of Euler's method is: \[ y_{n+1} = y_n + h \cdot f(x_n, y_n). \] At \( x = 0 \), we have \( x_0 = 0 \) and \( y_0 = 1 \). For \( x_1 = 0.5 \): \[ f(x_0, y_0) = y_0 + 2x_0 - x_0^2 = 1 + 2(0) - 0^2 = 1. \] Thus, \[ y_1 = y_0 + h \cdot f(x_0, y_0) = 1 + 0.5(1) = 1.5. \] For \( x_2 = 1.0 \): \[ f(x_1, y_1) = y_1 + 2x_1 - x_1^2 = 1.5 + 2(0.5) - (0.5)^2 = 1.5 + 1 - 0.25 = 2.25. \] Thus, \[ y_2 = y_1 + h \cdot f(x_1, y_1) = 1.5 + 0.5(2.25) = 1.5 + 1.125 = 2.625. \] Therefore, the value of \( y \) at \( x = 1.0 \) is \( 2.625 \).
Was this answer helpful?
0
0

Questions Asked in GATE CE exam

View More Questions