Consider the following differential equations dydt ty y0 1
Consider the following differential equations dy/dt = ty, y(0) = 1 y\'/y - y = 0, y(1) = 2 Solve the differential equation, using Euler\'s method on [0, 1] for (I) and [1, 3] for (II). In both cases use two values of the stepsize h (h = 0.1 and h = 0.01)^1. Compute the error, using the exact solution
Solution
euler method = yn+1= yn+h f(xn,yn)
1. dy/dt=ty y(0)=1
x0=0 yo=1
h=0.1
y1=1+(0.1)(0x1)
y(0,1)=1
h=0.01
y1=1+(0.01)(0X1)
y1 =1
2.y1/y-y=0 y(1)=2
y1=y2
y1=1+0.1(32)
=1.9
h=0.01
y1=1+(0.01)(32)
y1 =1.09
![Consider the following differential equations dy/dt = ty, y(0) = 1 y\'/y - y = 0, y(1) = 2 Solve the differential equation, using Euler\'s method on [0, 1] for Consider the following differential equations dy/dt = ty, y(0) = 1 y\'/y - y = 0, y(1) = 2 Solve the differential equation, using Euler\'s method on [0, 1] for](/WebImages/6/consider-the-following-differential-equations-dydt-ty-y0-1-987747-1761507601-0.webp)