INHOMOGENEOUS LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS Definitions and a general fact If A is an n n matrix and f(t) is some given vector function, then the system of differential equations () x (t) Ax(t) = f(t) is said to be linear inhomogeneous The given Right Hand Side f(t) is sometimes called the forcing term The corresponding homogeneous equation is the same equation in which f(t) has been replaced by zero: (2) x (t) Ax(t) = Theorem The general solution of the inhomogeneous system of equations () is x(t) = x h (t) + x p (t), where x h (t) is the general solution to the homogeneous equation, and x p (t) is any particular solution to the inhomogeneous equation Since we know how to solve the homogeneous equation using the eigenvalues and eigenvectors of A, all we still have to do is find a particular solution 2 Finding Particular Solutions by Guessing 2 Exponential forcing terms If the forcing term f(t) is of the form f(t) = e αt v where α is a constant, and v is a constant vector, then try to find a solution of the form x p (t) = e αt w Substitution in the diffeq leads to αe αt w A ( e αt w ) = e αt v Cancelling exponentials then gives you the following equation for the vector w (3) (αi A)w = v If α is not an eigenvalue of A then this system can be solved, and the solution is w = ( αi A ) v so that the particular solution of the diffeq is (4) x p (t) = e αt( αi A ) v
2 INHOMOGENEOUS LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 22 Trigonometric forcing terms If the forcing term is f(t) = cos(ωt)a + sin(ωt)b then most of the time a particular solution of the same form can be found You can substitute a particular solution of the form x p (t) = cos(ωt)p + sin(ωt)q and solve for the vectors p and q The resulting algebra becomes complicated and it is better to use a detour through complex numbers The trick to remember is that the forcing term is the real part of f(t) = cos(ωt)a + sin(ωt)b cos(ωt)a + sin(ωt)b + i { sin(ωt)a + cos(ωt)b }, which can be written more shortly as (a ib)(cos ωt + i sin ωt) = ce iωt if c = a ib So instead of solving the original equation x p Ax p = f(t) you solve the complex version of this equation, namely (5) z p Az p = ce iωt Then the real part x p (t) = Re [ z p (t) is a solution of the original equation x Ax = f(t) You find z p (t) as in the previous case, namely, try z p (t) = e iωt d where d is an undetermined complex vector Substitution yields ( iωi A ) d = c = d = ( iωi A ) c Thus d can be computed by solving the system of equations ( iωi A ) d = c, eg by row reducing The solution will be a some complex vector d Multiply with e iωt, using Euler s formula, and take the real part to get the real particular solution x p (t) = Re[e iωt d 3 Variation of Constants 3 Description of the general method Suppose you have already solved the homogeneous equation x Ax =, and that your general solution is (6) x(t) = c x (t) + + c n x n (t) If you now want to find the solution to the inhomogeneous equation x (t) Ax(t) = f(t) then there is a trick, called variation of constants or variation of parameters that will give you that solution The trick is to look for a solution of the form (7) x(t) = c (t)x (t) + + c n (t)x n (t)
INHOMOGENEOUS LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 3 This is almost the same as the general solution to the homogeneous equation, except here the quantities c,, c n are no longer constants: we allow them to vary, and this gives the method its name The method consists of substituting (7) in the inhomogeneous equation, and deriving equations for the varying constants c (t),, c n (t) When you do the substitution, many terms will cancel, and you always end up with the following: If x (t),, x n (t) are solutions of the homogeneous equation, and if x p (t) is given by (7), then (8) x p(t) Ax p (t) = c (t)x (t) + + c n(t)x n (t) Since we want the right hand side x p Ax p to equal the forcing term f(t), so we must solve the equation(s) (9) c (t)x (t) + + c n(t)x n (t) = f(t) for the derivatives c (t),, c n(t) Once we have found c (t),, c n(t) we can integrate to find the varying constants c (t),, c n (t), and therefore also the solution x p (t) 32 When you have n eigenvectors and eigenvalues Typically you will have solved the homogeneous equation by computing the eigenvalues and corresponding eigenvectors λ,, λ n v,, v n of the matrix A (So Av = λ v, etc) If this is the case then x j (t) = e λjt v j is a solution, and the general solution you found is x(t) = c e λt v }{{} + + c n e λnt v n }{{} x (t) x n(t) In this case the method of Variation of Constants tells you to try a particular solution of the form x(t) = c (t) e λt v }{{} + + c n (t) e λnt v }{{ n } x (t) x n(t) where the constants c i have been replaced by functions of t Substituting x(t) in the equation x Ax = f is made easy by using the handy formula (8) which, in the present case, says () x Ax = c (t)e λt v + + c n(t)e λnt v n We now must set this equal to the forcing term f(t) To do this we write the forcing term as a linear combination of the eigenvectors () f(t) = f (t)v + + f n (t)v n Finding f (t),, f n (t) requires you to solve a system of n linear equations, which you can do by row reduction The equation x Ax = f together with () and () then implies (2) c (t)e λt = f (t), c n(t)e λnt = f n (t),
4 INHOMOGENEOUS LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS and thus c (t) = e λt f (t) dt, c n (t) = e λnt f n (t) dt Reinsert these formulas for c i (t) in the original definition of x(t) and you get [ [ (3) x(t) = e λt f (t) dt e λt v + + e λnt f n (t) dt e λnt v n The integrals between brackets [ are indefinite integrals, and therefore contain constants So the solution x(t) in this formula has n constants in it, and it is actually the general solution to the inhomogeneous equation If all you want is a formula for the general solution then you could stop here: (3) is your solution 33 The particular solution with zero initial data There is one particular solution which is of interest, namely, the solution x(t) which starts out with x() = Why? Suppose that you had to solve the initial value problem { x (t) Ax(t) = f(t) x() = a where a is the given initial value As before, we write the answer as (4) x(t) = x h (t) + x p (t), but now we also specify the initial values of both x h (t) and x p (t): let x h be the solution of (5) x h(t) Ax h (t) =, x h () = a and let x p (t) be the solution of (6) x p(t) Ax p (t) = f(t), x p () = If you think of the solution x(t) as the response to the input f(t), then equation (4) splits the response x(t) into a component x h (t) which is due to the initial conditions, and another component x p (t) which is due to the forcing term You can find x h (t) by solving the homogeneous equation and choosing the constants c i so that x h () = a You can find the forcing term by using Variation of Constants as above, and requiring c () =,, c n () = Then the equations (2) (and the Fundamental Theorem of Calculus) imply c (t) = c (s) ds = e λs f (s) ds (7) c n (t) = e λns f n (s) ds Finally you substitute these integrals in the definition (2) of x p (t), and you find [ [ (8) x p (t) = e λs f (s) ds e λt v + + e λns f n (s) ds e λnt v n } {{ } } {{ } c (t) c n(t) The Fundamental Theorem of Calculus says c(t) c() = c (s)ds, so if c() = then c(t) = c (s)ds
INHOMOGENEOUS LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 5 One often rewrites the coefficients of the vectors v i as follows: [ (9) e λs f (s) ds e λt = e λt e λs f (s) ds = e λ(t s) f (s) ds } {{ } c (t) The particular solution with zero initial data is then [ [ x p (t) = e λ(t s) f (s) ds v + + 34 Convolution integrals Integrals of the form g(t s)f(s) ds e λn(t s) f n (s) ds v n are called convolution integrals, and they show up very often when you solve constant coefficient linear differential equations The coefficient e λ(t s) f (s) ds of v in the particular solution x p is a convolution integral with g(t) = e λt It has the following interpretation: the v component of the response is given by Since f (s) is the v component of the input at time s, the v component of the solution is an average of the v components f (s) of the input at earlier times s The weight with which f (s) contributes to the solution at time t only depends on the time delay t s 4 An example Let y(t) be the solution of { y (t) + 3y (t) + 2y(t) = F (t), (2) y() = y () = First we rewrite this as a system of first order equations: let x = y, x 2 = y Then { x = x 2 x 2 = 2x 3x 2 F (t), so x = ( x x 2 ) satisfies x (t) = Ax(t) + f(t) with A = and f(t) = 2 3 The eigenvalues and vectors of A are λ =, v =, λ 2 = 2, v 2 = 2 Therefore we should find a particular solution of the form (2) x p (t) = c (t)e t + c 2 (t)e 2t 2 The initial conditions are x() = x () = x 2 () ( y() y = = () ) F (t)
6 INHOMOGENEOUS LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS We get these initial conditions if we require (22) c () = c 2 () = Substituting x p (t) from (2) in x Ax leads to (23) x p(t) Ax p (t) = c (t)e t + c 2(t)e 2t 2 by the handy identity () To compare this with f(t) we must write the forcing term f(t) as a combination of the eigenvectors v, v 2 : ( ( f + f f(t) = = f F (t) (t) + f ) 2 (t) = 2 2) f f 2 Solve this by row reduction: [ [ F (t) 2 F (t) F (t) = f (t) = F (t), f 2 (t) = F (t) Our decomposition of the forcing term f(t) into the eigenvectors v, v 2 is therefore (24) f(t) = F (t)v F (t)v 2 Now combining (24) and (23) we see that x Ax = f implies so that c (t)e t v + c 2(t)e 2t v 2 = F (t)v F (t)v 2 c (t)e t = F (t) and c 2(t)e 2t = F (t) Solving for c and c 2, and integrating, taking into account that c () = c 2 () =, you get c (t) = e s F (s) ds and c 2 (t) = Put this back into the solution x p (t): [ x p (t) = c (t)e t v + c 2 (t)e 2t v 2 = e s t F (s) ds v e 2s F (s) ds [ e 2(s t) F (s) ds v 2 ( y(t) y (t) To see the solution in all its components remember that v = and v2 = 2, so that [ x p (t) = e s t [ F (s) ds e 2(s t) F (s) ds 2 ) Adding these vectors produces a large formula Since x(t) = the top component of x p (t) is the solution y(t) to the second order equation we began with It is given by y(t) = e s t F (s) ds This integral is of the form where e 2(s t) F (s) ds = K(t s)f (s) ds K(τ) = e τ e 2τ { e (t s) e 2(t s)} F (s) ds
INHOMOGENEOUS LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 7 The interpretation of the convolution integral is that the solution y(t) is a response to all the inputs F (s) for < s < t, and that the contribution of the input F (s) at time s is weighed by a factor K(t s) Maximal influence after a delay of ln(2)=693 seconds ln 2 2 3 4 5 6 A graph of K(τ); K(τ) is maximal at τ = ln 2 5 Problems Use the method of variation of Constants to find the solution to y + 5y + 6y = F (t), with y() = y () = More specifically: (i) rewrite the equation as a system of first order differential equations of the form x = Ax + f(t); what are A and f(t) in this problem? (ii) Find the eigenvalues and eigenvectors of A (iii) Find the general solution to the homogeneous equation x = Ax (iv) Which kind of solution do you try when you use VoC to find a particular solution? (v) which initial conditions should you impose on x if you want y() = y () =? (vi) Find the solution x(t) (vii) Find the solution y(t) 2 Do the same for y y = F (t), with y() = y () = 3 Use VoC to find the solution to F (t) dx = Ax + f(t), with A = 5, and f(t) = dt 5 4 Write a formula for x 3 (t) (the third component of x(t)): the answer will be a convolution integral of the form K(t s)f (s) ds Identify K(t s) (There is an interpretation of this problem as in example 2 on page 496: in the present problem the inflow of brine into the first tank is given by F (t), rather than just 2 as in the book) The chain rule tells us that 6 Proof of formula (8) x (t) = c (t)x (t) + + c n (t)x n(t) +c (t)x (t) + + c n(t)x n (t)
8 INHOMOGENEOUS LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS Since the x j (t) are solutions to the homogeneous equation, we get x (t) = c (t)ax (t) + + c n (t)ax n (t) +c (t)x (t) + + c n(t)x n (t) On the other hand we also have Ax(t) = c (t)ax (t) + + c n (t)ax n (t), and therefore (25) x (t) Ax(t) = c (t)x (t) + + c n(t)x n (t)