0% found this document useful (0 votes)
22 views3 pages

Q4. Find y (0.8), by Euler's Method, From The Differential Equation When y (0.3) 2, Correct To Four Decimal Places, Taking Step Length H 0.1

Using Euler's method, the approximate value of y(0.8) from the differential equation dy/dx = -y(1+x) with the initial condition y(0.3) = 2 and a step length of h = 0.1 is calculated to be 0.8868. The method involves iterative calculations based on the slope of the function at each step. While effective, Euler's method can introduce numerical errors, which can be reduced by using smaller step sizes.

Uploaded by

kavitha.niha94
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views3 pages

Q4. Find y (0.8), by Euler's Method, From The Differential Equation When y (0.3) 2, Correct To Four Decimal Places, Taking Step Length H 0.1

Using Euler's method, the approximate value of y(0.8) from the differential equation dy/dx = -y(1+x) with the initial condition y(0.3) = 2 and a step length of h = 0.1 is calculated to be 0.8868. The method involves iterative calculations based on the slope of the function at each step. While effective, Euler's method can introduce numerical errors, which can be reduced by using smaller step sizes.

Uploaded by

kavitha.niha94
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

dy − y

Q4. Find y(0.8), by Euler’s method, from the differential equation = when
dx 1+ x
y(0.3)=2, correct to four decimal places, taking step length h=0.1.

To solve y(0.8)y(0.8)y(0.8) using Euler's method for the differential equation

dydx=−y(1+x),\frac{dy}{dx} = -y(1+x),dxdy=−y(1+x),

where y(0.3)=2y(0.3) = 2y(0.3)=2, with a step length h=0.1h = 0.1h=0.1, we proceed step by
step. Euler's method is a numerical technique for approximating solutions to first-order
differential equations, using the formula:

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


+h⋅f(xn,yn),

where f(x,y)f(x, y)f(x,y) represents the derivative dydx\frac{dy}{dx}dxdy.

Step 1: Initializing Values

We are given:

● Initial condition: x0=0.3x_0 = 0.3x0=0.3, y0=2y_0 = 2y0=2,


● Step size: h=0.1h = 0.1h=0.1,
● Function: f(x,y)=−y(1+x)f(x, y) = -y(1+x)f(x,y)=−y(1+x).

We need to compute y(0.8)y(0.8)y(0.8) by taking steps from x0=0.3x_0 = 0.3x0=0.3 to


x=0.8x = 0.8x=0.8.

Step 2: Applying Euler’s Method


Iteration 1: From x0=0.3x_0 = 0.3x0=0.3 to x1=0.4x_1 = 0.4x1=0.4

Using the formula:

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


+h⋅f(xn,yn),

we calculate:

f(x0,y0)=−y0(1+x0)=−(2)(1+0.3)=−2.6.f(x_0, y_0) = -y_0(1+x_0) = -(2)


(1+0.3) = -2.6.f(x0,y0)=−y0(1+x0)=−(2)(1+0.3)=−2.6.
y1=y0+h⋅f(x0,y0)=2+0.1⋅(−2.6)=2−0.26=1.74.y_1 = y_0 + h \cdot f(x_0,
y_0) = 2 + 0.1 \cdot (-2.6) = 2 - 0.26 = 1.74.y1=y0+h⋅f(x0,y0
)=2+0.1⋅(−2.6)=2−0.26=1.74.

Iteration 2: From x1=0.4x_1 = 0.4x1=0.4 to x2=0.5x_2 = 0.5x2=0.5

Now, using x1=0.4x_1 = 0.4x1=0.4, y1=1.74y_1 = 1.74y1=1.74:


f(x1,y1)=−y1(1+x1)=−(1.74)(1+0.4)=−1.74⋅1.4=−2.436.f(x_1, y_1) = -
y_1(1+x_1) = -(1.74)(1+0.4) = -1.74 \cdot 1.4 = -2.436.f(x1,y1)=−y1
(1+x1)=−(1.74)(1+0.4)=−1.74⋅1.4=−2.436.
y2=y1+h⋅f(x1,y1)=1.74+0.1⋅(−2.436)=1.74−0.2436=1.4964.y_2 = y_1 +
h \cdot f(x_1, y_1) = 1.74 + 0.1 \cdot (-2.436) = 1.74 - 0.2436 =
1.4964.y2=y1+h⋅f(x1,y1)=1.74+0.1⋅(−2.436)=1.74−0.2436=1.4964.

Iteration 3: From x2=0.5x_2 = 0.5x2=0.5 to x3=0.6x_3 = 0.6x3=0.6

Using x2=0.5x_2 = 0.5x2=0.5, y2=1.4964y_2 = 1.4964y2=1.4964:

f(x2,y2)=−y2(1+x2)=−(1.4964)(1+0.5)=−1.4964⋅1.5=−2.2446.f(x_2,
y_2) = -y_2(1+x_2) = -(1.4964)(1+0.5) = -1.4964 \cdot 1.5 = -2.2446.f(x2
,y2)=−y2(1+x2)=−(1.4964)(1+0.5)=−1.4964⋅1.5=−2.2446.
y3=y2+h⋅f(x2,y2)=1.4964+0.1⋅(−2.2446)=1.4964−0.22446=1.2719.y_3
= y_2 + h \cdot f(x_2, y_2) = 1.4964 + 0.1 \cdot (-2.2446) = 1.4964 -
0.22446 = 1.2719.y3=y2+h⋅f(x2,y2
)=1.4964+0.1⋅(−2.2446)=1.4964−0.22446=1.2719.

Iteration 4: From x3=0.6x_3 = 0.6x3=0.6 to x4=0.7x_4 = 0.7x4=0.7

Using x3=0.6x_3 = 0.6x3=0.6, y3=1.2719y_3 = 1.2719y3=1.2719:

f(x3,y3)=−y3(1+x3)=−(1.2719)(1+0.6)=−1.2719⋅1.6=−2.0350.f(x_3,
y_3) = -y_3(1+x_3) = -(1.2719)(1+0.6) = -1.2719 \cdot 1.6 = -2.0350.f(x3
,y3)=−y3(1+x3)=−(1.2719)(1+0.6)=−1.2719⋅1.6=−2.0350.
y4=y3+h⋅f(x3,y3)=1.2719+0.1⋅(−2.0350)=1.2719−0.2035=1.0684.y_4 =
y_3 + h \cdot f(x_3, y_3) = 1.2719 + 0.1 \cdot (-2.0350) = 1.2719 - 0.2035
= 1.0684.y4=y3+h⋅f(x3,y3
)=1.2719+0.1⋅(−2.0350)=1.2719−0.2035=1.0684.

Iteration 5: From x4=0.7x_4 = 0.7x4=0.7 to x5=0.8x_5 = 0.8x5=0.8

Using x4=0.7x_4 = 0.7x4=0.7, y4=1.0684y_4 = 1.0684y4=1.0684:

f(x4,y4)=−y4(1+x4)=−(1.0684)(1+0.7)=−1.0684⋅1.7=−1.8163.f(x_4,
y_4) = -y_4(1+x_4) = -(1.0684)(1+0.7) = -1.0684 \cdot 1.7 = -1.8163.f(x4
,y4)=−y4(1+x4)=−(1.0684)(1+0.7)=−1.0684⋅1.7=−1.8163.
y5=y4+h⋅f(x4,y4)=1.0684+0.1⋅(−1.8163)=1.0684−0.1816=0.8868.y_5 =
y_4 + h \cdot f(x_4, y_4) = 1.0684 + 0.1 \cdot (-1.8163) = 1.0684 - 0.1816
= 0.8868.y5=y4+h⋅f(x4,y4
)=1.0684+0.1⋅(−1.8163)=1.0684−0.1816=0.8868.

Step 3: Final Answer

After five iterations, the value of y(0.8)y(0.8)y(0.8) is approximately:


0.8868.\boxed{0.8868}.0.8868.

Explanation and Conclusion

Euler's method uses a step-by-step approach to approximate the solution of a differential


equation by considering the slope of the function at each point. While simple and
computationally efficient, it introduces numerical errors due to the linear approximation in
each step. These errors can be minimized by using smaller step sizes or more sophisticated
methods, but for the given step size h=0.1h = 0.1h=0.1, the solution y(0.8)=0.8868y(0.8) =
0.8868y(0.8)=0.8868 is accurate to four decimal places.

You might also like