You are on page 1of 3

10257-2.

7-12P AID: 4446 | 22/3/2019

Given
y '  y (3  ty ), y (0)  0.5

(a)
y '  y (3  ty ), y (0)  0.5, h  0.1
Step 1
dy
 y (3  ty ), 0  t  3, y (0)  0.5, h  0.1
dt
y (t0 )  y0  (t0 , y0 )  (0, 0.5); y (0)  0.5

Step 2
Further,
y(t0 )  y0  y(0)  0.5
From the step size
t t 30
h N 0 
N N
30 3
N   30
h 0.1

Where N is the number of steps made from Euler formula.

Step 3
Further,
ti  t0  ih  0  i (0.1)
ti  (0.1)i
f (t , y )  y (3  ty )
f (ti , yi )  yi (3  ti yi )

Then f (ti , yi )  yi (3  ti yi )
Using Euler’s difference equation as yi 1  yi  hf (ti , yi ), i  0,1,..., N  1
Thus, equation becomes as:
yi 1  yi  (0.1)( yi (3  ti yi )), i  0,1,..., N  1
= 0.1,...,29

Step 4
Now, using ti 1  t0  (i  1)h and yi 1  yi  hf (ti , yi ) where f (ti , yi )  yi (3  ti yi )

t1  0.1, y1  0.65
t2  0.2, y2  0.840775
t5  0.5, y5  1.70308
Hence, the approximate values of the solution of the initial value problem corresponding
to values of t are as follows:
t5  0.5, y5  y (t5 )  y (0.5)  1.70308
t10  1.0, y10  y (t10 )  y (1.0)  3.066049
t20  2.0, y20  y (t20 )  y (2.0)  1.7720355
t25  2.5, y25  y (t25 )  y (2.5)  1.3734808
t30  3.0, y30  y (t30 )  y (3.0)  1.11924785

(b)
y '  y (3  ty ), y (0)  0.5, h  0.05
Step 1
dy
 y (3  ty ), 0  t  3, y (0)  0.5, h  0.05
dt
y (t0 )  y0  (t0 , y0 )  (0, 0.5); y(0)  0.5

Step 2
Further,
y(t0 )  y0  y(0)  0.5
From the step size
t t 30
h N 0 
N N
30 3
N   60
h 0.05

Where N is the number of steps made from Euler formula.

Step 3
Further,
ti  t0  ih  0  i (0.05)
ti  (0.05)i
f (t , y )  y (3  ty )
f (ti , yi )  yi (3  ti yi )
Then f (ti , yi )  yi (3  ti yi )
Using Euler’s difference equation as yi 1  yi  hf (ti , yi ), i  0,1,..., N  1
Thus, equation becomes as:
yi 1  yi  (0.05)( yi (3  ti yi )), i  0,1,..., N  1
= 0.1,...,59

Step 4
Now, using ti 1  t0  (i  1)h and yi 1  yi  hf (ti , yi ) where f (ti , yi )  yi (3  ti yi )

t1  0.05, y1  0.575
t2  0.1, y2  0.660423
Hence, the approximate values of the solution of the initial value problem corresponding
to values of t are as follows:
t10  0.5, y10  y (t10 )  y (0.5)  1.795475
t20  1.0, y20  y (t20 )  y (1.0)  3.0605108
t30  1.5, y30  y (t30 )  y (1.5)  2.4329189
t40  2.0, y40  y (t40 )  y (2.0)  1.7780659
t50  2.5, y50  y (t50 )  y (2.5)  1.3779507
t60  3.0, y60  y (t60 )  y (3.0)  1.1219106

(c)
y '  y (3  ty ), y (0)  0.5, h  0.025
Step 1
dy
 y (3  ty), 0  t  3, y (0)  0.5, h  0.025
dt
y (t0 )  y0  (t0 , y0 )  (0, 0.5); y(0)  0.5

Step 2
Further,
y(t0 )  y0  y(0)  0.5
From the step size
t t 30
h N 0 
N N
30 3
N   120
h 0.025

Where N is the number of steps made from Euler formula.

Step 3
Further,
ti  t0  ih  0  i (0.025)
ti  (0.025)i
f (t , y )  y (3  ty )
f (ti , yi )  yi (3  ti yi )
Then f (ti , yi )  yi (3  ti yi )
Using Euler’s difference equation as yi 1  yi  hf (ti , yi ), i  0,1,..., N  1
Thus, equation becomes as:
yi 1  yi  (0.025)( yi (3  ti yi )), i  0,1,..., N  1
= 0.1,...,119

Step 4
Now, using ti 1  t0  (i  1)h and yi 1  yi  hf (ti , yi ) where f (ti , yi )  yi (3  ti yi )
t1  0.025, y1  0.5375
t2  0.05, y2  0.577632
Hence, the approximate values of the solution of the initial value problem corresponding
to values of t are as follows:
t20  0.5, y20  y (t20 )  y (0.5)  1.8457894
t40  1.0, y40  y (t40 )  y (1.0)  3.0576891
t60  1.5, y60  y (t60 )  y (1.5)  2.4290497
t80  2.0, y80  y (t80 )  y (2.0)  1.7807386
t100  2.5, y100  y (t100 )  y (2.5)  1.3801748
t120  3.0, y120  y (t120 )  y (3.0)  1.1232799

(d)
y '  y (3  ty ), y (0)  0.5, h  0.01
Step 1
dy
 y (3  ty ), 0  t  3, y (0)  0.5, h  0.01
dt
y (t0 )  y0  (t0 , y0 )  (0, 0.5); y(0)  0.5

Step 2
Further,
y(t0 )  y0  y(0)  0.5
From the step size
t t 30
h N 0 
N N
30 3
N   300
h 0.01
Where N is the number of steps made from Euler formula.
Step 3
Further,
ti  t0  ih  0  i (0.01)
ti  (0.01)i
f (t , y )  y (3  ty )
f (ti , yi )  yi (3  ti yi )
Then f (ti , yi )  yi (3  ti yi )
Using Euler’s difference equation as yi 1  yi  hf (ti , yi ), i  0,1,..., N  1
Thus, equation becomes as:
yi 1  yi  (0.01)( yi (3  ti yi )), i  0,1,..., N  1
= 0.1,...,299

Step 4
Now, using ti 1  t0  (i  1)h and yi 1  yi  hf (ti , yi ) where f (ti , yi )  yi (3  ti yi )

t1  0.01, y1  0.515
t2  0.02, y2  0.530423
Hence, the approximate values of the solution of the initial value problem corresponding
to values of t are as follows:
t50  0.5, y50  y (t50 )  y (0.5)  1.87733896
t100  1.0, y100  y (t100 )  y (1.0)  3.0560704
t150  1.5, y150  y (t150 )  y (1.5)  2.4267217
t200  2.0, y200  y (t200 )  y (2.0)  1.7822413
t250  2.5, y250  y (t250 )  y (2.5)  1.3815008
t300  3.0, y300  y (t300 )  y (3.0)  1.1241118

You might also like