Question:medium

Let \( y(x) \) be the solution of the initial value problem \[ \frac{dy}{dx} = \sin(\pi(x + y)), \quad y(0) = 0. \] Using Euler's method, with the step-size \( h = 0.5 \), the approximate value of \( y(1.5) + 2y(1) \) is equal to (in integer):

Show Hint

Use Euler's method with a fixed step-size to approximate the solution of an initial value problem. At each step, compute the function's value and update the solution iteratively.
Updated On: Feb 2, 2026
Show Solution

Correct Answer: 1

Solution and Explanation

To solve the initial value problem using Euler's method with step-size \( h = 0.5 \), we approximate \( y(x) \) in discrete steps to find \( y(1) \) and \( y(1.5) \). The differential equation is given by: \[\frac{dy}{dx} = \sin(\pi(x + y))\] with initial condition \( y(0) = 0 \).
1. Step 1: Compute \( y(0.5) \)
\(\begin{aligned} y_{n+1} &= y_n + h \cdot f(x_n, y_n)\\ f(x_n, y_n) &= \sin(\pi(x_n + y_n))\\ x_0 &= 0, \, y_0 = 0\\ f(0, 0) &= \sin(\pi \cdot 0) = 0\\ y_1 &= y_0 + 0.5 \cdot 0 = 0 \end{aligned}\)
2. Step 2: Compute \( y(1) \)
\(\begin{aligned} x_1 &= 0.5, \, y_1 = 0\\ f(0.5, 0) &= \sin(\pi \cdot 0.5) = 1\\ y_2 &= 0 + 0.5 \cdot 1 = 0.5 \end{aligned}\)
3. Step 3: Compute \( y(1.5) \)
\(\begin{aligned} x_2 &= 1, \, y_2 = 0.5\\ f(1, 0.5) &= \sin(\pi \cdot 1.5) = -1\\ y_3 &= 0.5 + 0.5 \cdot (-1) = 0 \end{aligned}\)
4. Final Calculation
We need to find \( y(1.5) + 2y(1) \):
\(\begin{aligned} y(1.5) & = 0, \, y(1) = 0.5\\ y(1.5) + 2y(1) &= 0 + 2 \times 0.5 = 1 \end{aligned}\)
5. Verification
The result \( 1 \) falls within the expected range of 1 to 1.
Thus, the approximate value of \( y(1.5) + 2y(1) \) is \( \boxed{1} \).
Was this answer helpful?
0