= Systems of Differential Equations = '''Systems of differential equations''' can be solved using linear algebra, specifically the calculation of [[LinearAlgebra/EigenvaluesAndEigenvectors|eigenpairs]]. <> ---- == Formulation == Consider a system of differential equations like: ''y',,1,, = ay,,1,, + by,,2,,'' ''y',,2,, = cy,,1,, - dy,,2,,'' Reformulate the system as: {{attachment:system1.svg}} Now consider a higher order differential equation like ''x'``'``' + ax'``' - bx' + cx = 0''. Define a set of substitutions: * ''y,,1,, = x'', so ''y',,1,, = x'``''. * ''y,,2,, = x'``'', so ''y',,2,, = x'``'``''. * ''y,,3,, = x'``'``'', so ''y',,3,, = x'``'``'``''. The original equation is now ''y',,3,, + ay,,3,, - by,,2,, + cy,,1,, = 0'', or equivalently ''y',,3,, = -ay,,3,, + by,,2,, - cy,,1,,''. Use this along with the substitution definitions for ''y',,1,,'' and ''y',,2,,'' to create the following reformulation: {{attachment:system2.svg}} ---- == Solution == The general solution to a single differential equation like ''y' = ry'' is ''y = ce^rt^'' where ''c'' is some constant. The [[LinearAlgebra/GeneralSolution|general solution]] to a system of differential equations like the above is of the form: {{attachment:gen.svg}} where each ''r,,n,,'' is unique and each ''c,,n,,'' is a vector matched to a specific ''r,,n,,''. Furthermore, each ''c,,n,,'' is [[LinearAlgebra/Orthogonality|orthogonal]] to the others. The ''k,,n,,'' are simply constants reflecting all linear combinations of these independent components. These pairs of ''r,,n,,'' and ''c,,n,,'' are [[LinearAlgebra/EigenvaluesAndEigenvectors|eigenpairs]]. === Repeated Eigenvalues === If there are repeated eigenvalues, it must be assumed that there is an additional independent solution. Consider a system with two variables. The repeated eigenpair will be notated ''r'' and ''c'' rather than ''r,,1,,'' and ''c,,1,,''. The general solution will have the form: ''y = k,,1,,e^rt^c + k,,2,,(te^rt^c + e^rt^d)'' where ''d'' is another, independent vector that satisfies the equation: ''('''A''' - r'''I''')d = c'' This is rather like solving for the eigenvector in the first place. Rather than identifying a linear combination that maps ''('''A''' - r'''I''')'' to the zero vector, ''d'' maps it to eigenvector itself. === Complex Eigenpairs === A [[LinearAlgebra/EigenvaluesAndEigenvectors#Complex_Eigenpairs|complex eigenpair]] can be refactored using Euler's equation (i.e., ''e^iθ^ = cosθ + isinθ''). Let the eigenvalue be ''a + bi''; the eigenvector will be left as ''c''. The solution then takes the form ''y = e^(a + bi)t^c'', but this can be refactored as ''y = e^at^ e^bit^ c'' and finally as ''y = e^at^ (cos(bt) + isin(bt)) c''. By multiplying out the trigonometric functions and ''c'', then factoring out the imaginary components, the solution becomes: {{attachment:complex1.svg}} The general solution however is formed by combinations of the independent components. The second component is used as a real vector, rather than an imaginary one. {{attachment:complex2.svg}} ---- CategoryRicottone