Presentation is loading. Please wait.

Presentation is loading. Please wait.

10.1 Definition of differential equation, its order, degree,

Similar presentations


Presentation on theme: "10.1 Definition of differential equation, its order, degree,"— Presentation transcript:

1 10. SOLUTION OF DIFFERENTIAL EQUATION, INITIAL AND BOUNDARY VALUE PROBLEM
10.1 Definition of differential equation, its order, degree, solution, and initial and boundary value problem. 10.2 Different types of methods for the solution of initial and boundary value problems. 10.3 Applications of initial and boundary value problems.

2 10.1 Definition Differential equation. The order and degree .
General Solution. Particular Solution. Initial value Problem. Boundary value Problem.

3 10.2 Euler’s Method let us suppose that we have to find y1,y2,……,yn, corresponding to x1,x2,…..,xn, where xn=x0+nh (n=1,2,…….n) and h is difference between two consecutive value of x. The basic principle of this method is that in a small interval a curve is roughly a straight line. Ym+1=ym+hf(xm, ym).

4 Example Given 𝑑𝑦 𝑑𝑥 = 𝑥 3 +𝑦, 𝑦 0 =1, compute y(0.02) by Euler’s method taking h=0.01. Solution:- Given 𝑑𝑦 𝑑𝑥 = 𝑥 3 + 𝑦 𝑤𝑖𝑡ℎ 𝑡ℎ𝑒 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 𝑦 0 = 1. We have f(x,y)= 𝑑𝑦 𝑑𝑥 = 𝑥 3 + 𝑦, x0 =0, y0 =1, h = 0.01. So x1 = x0 + h= 0.01 and x2 = x0 + 2h = 0.02. Applying the Euler’s method we get y1=y0+hf(x0, y0) =1.01 y2=y1+hf(x1, y1) =

5 Modified Euler’s Method
 = = 0.02.

6 Continued We get y1(0)=y0+hf(x0, y0) =1.01.
Applying Euler’s modified formula we get y1(1)=y0+h[ 𝑓 𝑥 0 , 𝑦 0 +𝑓( 𝑥 1, 𝑦 1 (0) ) 2 ] = y1(2)=y0+h[ 𝑓 𝑥 0 , 𝑦 0 +𝑓( 𝑥 1, 𝑦 1 (1) ) 2 ] = so y1(1)= y1(2)=

7 Continued y2(0)=y1+hf(x1, y1) =1.02015 and
so y2 =

8 Picard’s Method We consider the differential equation 𝑑𝑦 𝑑𝑥 =f(x,y)
or dy = f(x,y)dx. Integrating we get 𝑦 0 𝑦 𝑑𝑦= 𝑥 0 𝑥 𝑓(𝑥,𝑦)𝑑𝑥 or y=y0+ 𝑥 0 𝑥 𝑓(𝑥,𝑦)𝑑𝑥 . The first approximation of y is denoted by y(1) and y(1)=y0+ 𝑥 0 𝑥 𝑓(𝑥, 𝑦 0 )𝑑𝑥 . Similarly putting y = y(1), we get 2nd approximation as y(2)=y0+ 𝑥 0 𝑥 𝑓(𝑥, 𝑦 (1) )𝑑𝑥 , so nth approximation is y(n)=y0+ 𝑥 0 𝑥 𝑓(𝑥, 𝑦 (𝑛−1) )𝑑𝑥 .

9 Example Example:- Solve the differential equation 𝑑𝑦 𝑑𝑥 = 𝑦 2 +𝑥, 𝑦 0 =0 by Picard’s method when x = 0.1, x = 0.2. Solution . The first approximation be y1 and y1 = 𝑥 (𝑥+0)𝑑𝑥 = 𝑥 The second approximation be y2 and y2=0 + 0 𝑥 𝑥+ 𝑥 𝑑𝑥= 𝑥 𝑥 5 .

10 Continued Similarly the third approximation be y3 and y3
= 1 2 𝑥 𝑥 𝑥 𝑥 11 . For x = 0.1 we get y2 = and y3 = so y(0.1) = For x = 0.2, we can consider at x = 0.1, y1 = as the initial values. We can write the first approximation y1 as

11 Continued y1 = 𝑥 (𝑥 )𝑑𝑥 = 𝑥 𝑥 ≈ The second approximation be y2 and y2 = 𝑥 𝑥 𝑑𝑥= 𝑥 𝑥− =

12 Runge-Kutta Method Properties of this method.

13 Continued Let k1=hf(x,y), k2=f(x+ ℎ 2 ,𝑦+ 𝑘 1 2 ),
k3=f(x+ ℎ 2 ,𝑦+ 𝑘 2 2 ), k4= hf(x+h,y+k3) so y1= y (k1+2k2+2k3+k4) or yk+1 = yk (k1+2k2+2k3+k4).

14 Example Example:- Solve the differential equation
𝑑𝑦 𝑑𝑥 = 𝑦 2 +𝑥, 𝑦 0 =1 by Runge-Kutta method for x = 0.2. Solution. Considering h = 0.1, we have x0 = 0, y0 =1, f(x,y) = x + y2 . Now k1 = , k2 = , k3= and k4 = so y1=y(0.1)= For the second step, we have x0 = 0.1, y0 = Now k1 = , k2 = , k3= , k4 = so y(0.2) =

15 Taylor’s series Method
Let 𝑑𝑦 𝑑𝑥 =f(x,y) is a differential equation whose solution is y = f(x) and y(x0) =y0 be initial condition. Using Taylor’s series of one variable for the expansion of the function f(x) at x=x0, we get 𝑓 𝑥 =𝑓 𝑥 𝑥− 𝑥 0 1! 𝑓 ′ 𝑥 𝑥− 𝑥 ! 𝑓 ′′ 𝑥 0 +…. Which can be written as y=f(x)=y0+ 𝑥− 𝑥 0 1! 𝑦 0 ′ + 𝑥− 𝑥 ! 𝑦 0 ′′ +.…. Putting x = x1+h, we get f(x1+h)= y1=y0+ ℎ 1! 𝑦 0 ′ + ℎ 2 2! 𝑦 0 ′′ +… In general Yn+1=yn + ℎ 1! 𝑦 𝑛 ′ + ℎ 2 2! 𝑦 𝑛 ′′ + ℎ 3 3! 𝑦 𝑛 ′′′ +…

16 Example Example:- Find the value of y(1.1) and y(1.2) using Taylor’s series given that 𝑑𝑦 𝑑𝑥 =𝑥 𝑦 , y(1) =1 taking the first three terms of the Taylor’s series expansion. Solution. Given 𝑑𝑦 𝑑𝑥 =𝑥 𝑦 , y0 = 1, x0 =1, h = 0.1 and y0’ =1. Differentiating the given equation w.r.t. x we get 𝑑 2 𝑦 𝑑 𝑥 2 = 1 3 𝑥 𝑦 − 𝑑𝑦 𝑑𝑥 + 𝑦 ⇒ 𝑦 0 ′′ = 4 3 .

17 Continued Taking the first three terms of the Taylor’s formula we get
𝑦 1 = 𝑦 0 +ℎ 𝑦 0 ′ + ℎ 𝑦 0 ′′ = ⇒ y(1.1) = x1 = x0 + h = = 1.1 and 𝑦 1 ′ = 𝑥 1 𝑦 = Similarly 𝑦 1 ′′ = Putting these values we get y2 = y(1.2) = 1.228

18 Milne’s Predictor – Corrector Method
For the solution of 1st order differential equation, we use Milne’s Method. Both the Milne’s predictor and Milne’s corrector formula is obtained by integrating the Newton’s forward interpolation formula i.e. ȳ n+1=yn-3+( 4ℎ 3 )[2fn-2-fn-1+2fn] and corrector formula is yn+1=yn-1+( ℎ 3 ) [fn-1+4fn+fn+1]

19 Example Example:- Solve the differential equation 𝑑𝑦 𝑑𝑥 = 1 2 (1+ 𝑥 2 )𝑦 2 by Milne’s Predictor-Corrector method where y(0.1) =1.06, y(0.2) = 1.12, y(0.3) = 1.21. Solution. Using Milne’s predictor formula we write ȳ 4 = y0+( 4ℎ 3 )[2y1’-y2’+2y3’]. We have y’ = (1+ 𝑥 2 )𝑦 2 , y0 =1, y1 = 1.06, y2 =1.12, y3 =1.21 and h = 0.1 so

20 Continued ȳ 4 = and y’4 = 1 2 [(1+ 𝑥 4 2 ) ȳ 4 2 = Using Milne’s corrector formula we get y4 = y2 + ℎ 3 (y2’+4y3’ + ȳ 4’ ) =

21 Adams Bash Predictor Corrector Formula
Integrating the Lagrange’s polynomial formula within certain interval, we get Adams Bash Predictor formula as Ȳk+1 = yk + ( ℎ 24 )[55 𝑦 𝑘 ′ −59 𝑦 𝑘−1 ′ +37 𝑦 𝑘−2 ′ - 9 𝑦 𝑘−3 ′ ] and corrector formula is yk+1 = yk + ( ℎ 24 )[ 𝑦 𝑘−2 ′ −5 𝑦 𝑘−1 ′ 𝑦 𝑘 ′ +9 𝑦 𝑘+1 ′ ].

22 Example Example:- Solve the initial value problem 𝑑𝑦 𝑑𝑥 = x2 + x2y, y(1) = 1 at x = 1(0.1) 1.3, by any numerical method and at x = 1.4 by Adams-Bashforth method. Solution. As 𝑑𝑦 𝑑𝑥 = x2 + x2y = x2 (1+ y) or y’ = x2 (1+ y) and we have x0 = 1, y0 = 1. Computing the value of y(1.1), y(1.2), y(1.3) by Taylor’s algorithm we get

23 Continued y(1.1) = y1=1.233, y2 = , y3 = and y0’=2y1’=2.702, y2’ =3.669, y3’ =5.035. Using Adams-Bashforth predictor formula we get ȳ 4 = y3 + ( ℎ 24 ) [55y3’ - 59y2’+37y1’ - 9y1’] = By Adams Bash Corrector Formula we get y4 = y3 + ℎ 24 (9y4’ +19y3’-5y2’ +y1’) =2.5751

24 Example Example: - Solve the boundary value problem
𝑦 " = 𝑦 ′ +1; 𝑦 0 =1, 𝑦(1)=2(𝑒−1) using second order method with h = 1/3. Solution: - Here we consider four nodal points 𝑥 0 =0, 𝑥 1 = 1 3 , 𝑥 2 = 2 3 , 𝑥 3 =1. The values of y at 𝑥 0 and 𝑥 3 are given from the boundary conditions. The second order method gives the difference equation

25 Continued 𝑦 𝑖−1 −2 𝑦 𝑖 + 𝑦 𝑖+1 = ℎ 2 𝑦 𝑖+1 − 𝑦 𝑖−1 2ℎ +1
𝑦 𝑖−1 −2 𝑦 𝑖 + 𝑦 𝑖+1 = ℎ 2 𝑦 𝑖+1 − 𝑦 𝑖−1 2ℎ +1 𝑜𝑟 1+ ℎ 2 𝑦 𝑖−1 −2 𝑦 𝑖 + 1− ℎ 2 𝑦 𝑖−1 = ℎ 2 , 𝑖=1,2 For h = 1/3 and i = 1,2 we get the system of equations 7 6 𝑦 0 −2 𝑦 𝑦 2 = 1 9 7 6 𝑦 1 −2 𝑦 𝑦 3 = 1 9

26 Continued Using the boundary conditions 𝑦 0 =1, 𝑦(1)=2(𝑒−1)
𝑦 0 =1, 𝑦(1)=2(𝑒−1) and simplifying, we get −36 𝑦 𝑦 2 =−19 21 𝑦 1 −36 𝑦 2 =32−30𝑒=− Solving these two we get 𝑦 1 = , 𝑦 2 =

27 10.3 Applications Solving the differential equation numerically we can find out the death time of a person, Modeling the spread of an Epidemic, Calculating the radiative heat transfer to a thin metal plate, modeling genetic switch etc.


Download ppt "10.1 Definition of differential equation, its order, degree,"

Similar presentations


Ads by Google