All Exams Test series for 1 year @ ₹349 only
Question

Consider the following differential equation
$\frac{dy}{dx} = x + \ln(y)$ ; $y = 2$ at $x = 0$
The solution of this equation at $x = 0.4$ using Euler method with a step size of $h = 0.2$ is ___________________ .

Euler Method Steps for Differential Equation

We need to solve the differential equation $\frac{dy}{dx} = x + \ln(y)$ with the initial condition $y(0) = 2$ using Euler's method. The step size is $h = 0.2$, and we want to find the approximate value of $y$ at $x = 0.4$. Euler's method formula is:

$y_{n+1} = y_n + h \cdot f(x_n, y_n)$

Where $f(x, y) = x + \ln(y)$.

The initial point is $(x_0, y_0) = (0, 2)$. We need two steps to reach $x = 0.4$. ($x_1 = 0.2, x_2 = 0.4$).

Step 1: Calculate $y_1$ at $x_1 = 0.2$

  • $x_0 = 0$, $y_0 = 2$, $h = 0.2$.
  • Calculate $f(x_0, y_0) = f(0, 2) = 0 + \ln(2)$.
  • Using $\ln(2) \approx 0.6931$.
  • $f(0, 2) \approx 0.6931$.
  • Apply the formula: $y_1 = y_0 + h \cdot f(x_0, y_0)$.
  • $y_1 \approx 2 + 0.2 \cdot (0.6931)$.
  • $y_1 \approx 2 + 0.13862$.
  • $y_1 \approx 2.13862$.

Step 2: Calculate $y_2$ at $x_2 = 0.4$

  • $x_1 = 0.2$, $y_1 \approx 2.13862$, $h = 0.2$.
  • Calculate $f(x_1, y_1) = f(0.2, 2.13862) = 0.2 + \ln(2.13862)$.
  • Using $\ln(2.13862) \approx 0.7600$.
  • $f(0.2, 2.13862) \approx 0.2 + 0.7600 = 0.9600$.
  • Apply the formula: $y_2 = y_1 + h \cdot f(x_1, y_1)$.
  • $y_2 \approx 2.13862 + 0.2 \cdot (0.9600)$.
  • $y_2 \approx 2.13862 + 0.19200$.
  • $y_2 \approx 2.33062$.

The approximate solution at $x = 0.4$ is $y_2 \approx 2.33062$. This value lies between 2.3 and 2.4.

Was this answer helpful?

Important Questions from Numerical Methods

  1. If f(x) is a polynomial of degree n in x, then nth difference of this polynomial is

  2. What is Lagrange’s interpolation polynomial for the following data?

    x24
    f(x)35

  3. If f(1) = 4 and f(5) = 6, then what is the value of f(3) using Lagrange’s interpolation?

  4. Which theorem states that "An integral function attains every finite value with atmost one possible exception"?

  5. Let h be defined in finite-difference fraction notation as follows.

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App