Last lecture: Recurrence relations and differential equations The solution to the differential equation dx = ax is x(t) = ce ax, where c = x() is determined by the initial conditions x(t) Let X(t) = and suppose that R has an y(t) eigenbasis {v, w} for the matrix A =, where Av = λv and Aw = µw a b c d The solution of the system of differential equations X (t) = AX(t) is x(t) v = w c e λt y(t) v w = c c e µt e λt v + c e µt w -
Systems of linear DEs, the diffusion equation, mixing problems 9-93 Solving a general linear system of differential equations: Suppose that A = a a a n a a a n a n a n a nn which has an eigenbasis {v, v,,v n }, where Av i = λ i v i, for some λ i R is an n n matrix Let x (t), x (t),,x n (t) be differentiable functions x (t) and set X(t) = x n (t) Suppose that X (t) = AX(t) Claim X(t) = c e λ t v + c e λ t v + + c n e λ nt v n, for some constants c, c,,c n R Equivalently, where P = X(t) = P v v vn c e λ t c e λ t c n e λ nt, -
Solving a general linear system of differential equations To see this, let Y (t) = P X(t) = Y (t) = P X (t) = P AX(t) = P APY (t) = Y (t) = = Y (t) = = X(t) = P λ λ λ n c e λ t c e λ t c n e λ nt c e λ t c e λ t c n e λ nt Y (t) Remark The set S = { X(t) F n : X (t) = AX(t) } is a vector { subspace of the vector space f } F n = : f, f,,f n F f n -
Remark { { e λ t, e λ t, } e λ nt } = e t λ, e t λ, e nt λ is a basis of the solution space S = for given initial conditions the solution is unique! Another example Example Solve the system dx dy = 3x + 4y = 3x + y subject to the initial conditions x() = 6 and y() = Let X(t) = = X (t) = X(t) Now, 3 λ 4 3 λ x(t) y(t) = (λ 6)(λ + ) So the eigenvalues are 6 and The corresponding eigenvectors are respectively (check!) 3 4 3 = (3 λ)( λ) = λ 5λ 6 The general solution is X(t) = c e 6t 4 3 4 3 and, +c e t, -3
Putting t = gives 6 c = and c = Therefore, = e 6t = c 4 3 4 3 e t + c = The diffusion equation 95 Porous membrane Segment Segment v(t) Segment 3 w(t) Consider an infinite pipe (in both directions) as above Suppose that segments and 3 of the pipe contain a gas in initial concentrations v() and w() At all times the concentration of the gas in segments and 4 is zero (these segments have infinite volume) Question : The gas starts to diffuse through the system at time t = Can we find an equation for the concentration of the gas in each segment at time t? -4
Basic principle The diffusion rate between two segments is the difference in the concentration the two segments =(amount in)-(amount out) Therefore, dw dv = ( v) +(w v) = w v = (v w) +( w) = v w We have to solve the system of differential equations dv v+w wv dw = v w = Now, λ λ = (λ + ) = λ + 4λ + 3 = (λ + )(λ + 3) Therefore, the eigenvalues of The corresponding eigenvectors are are and 3 and Therefore, the solution to the diffusion equation is = c e t + c e 3t v(t) w(t) Note that v(t) and w(t) both go to zero as t -5
Mixing problems 93 5L/min Tank 5L water + kg salt 5L/min Tan 5L water Question Find the amount of salt in the two tanks at time t Let x(t) be the number of kilograms of salt in tank at time t Let y(t) be the number of kilograms of salt in tank at time t Then dx = 5 dy = (amount in)-(amount out) 5 y 5 5x = x + y = 5 5 x 5 5y = x y So, = dx dy -6
= = c e t Using the initial conditions, = e t + c e t Mixing problems Example II 9 L/min L/min Pure water Tank A Litres No Salt Tank B Litres 5kg Salt 3 L/min 9 L/min Question Find the amount of salt in each tank a time t Let x(t) be the number of kilograms of salt in tank A at time t Let y(t) be the number of kilograms of salt in tank B at time t -7
Then dx = (amount in)-(amount out) = 3 y x = x + 3y Then dy = x y = x y So our coupled system of differential equations is: = dx dy 3 To solve this we find the eigenvalues and eigenvectors of the matrix 3 The characteristic equation is = λ 3 λ = (λ + ) 36 = λ + 4λ 8 = λ = ( 4 ± ) Hence, the eigenvalues are 6 and 8 6 3 R = λ = 6: 3 R 6 R = 6 R R =R +R R = R So, the 6 eigenvector is -8
Similarly, the 8 eigenvector is: Therefore, = c e 6t Now, = = 5 x() y() = c = c = 5 4 = c So we find that 5 x(t) y(t) + c = 54 e 6t + c e 8 + 5 4 e 8t Higher order differential equations Consider the differential equation x + ax + bx + cx = Set X = Then X = x x x x x x = ax bx cx x x = a b c x x x -9
That is, X = a b c X Therefore, we can use linear algebra to solve such differential equations Explicitly, if {v, v, v 3 } is an eigenbasis for A = a b c, with Av i = λ i v i, then X = c e λ t v + c e λ t v + c 3 e λ 3t v 3, for some c, c, c 3 R Question : Can we solve x +ax +bx +cx+d =? If c then we can set y = c x + d c Then y = c x, y = c x and y = c x So, y + ay + by + y = c x + a c x + b c x + c x + d c = c( x + ax + bx + cx + d ) = y Hence, if we set Y = then Y = y y and we can proceed as before a b Y -