<<

Queen’s University and Engineering and Mathematics and

MATH 237

Differential Equations and Computer Methods

Supplemental Course Notes

Serdar Y¨uksel

November 19, 2010 This document is a collection of supplemental lecture notes used for Math 237: Differential Equations and Computer Methods. Serdar Y¨uksel Contents

1 Introduction to Differential Equations 7 1.1 Introduction: ...... 7 1.2 Classification of Differential Equations ...... 7 1.2.1 OrdinaryDifferentialEquations...... 8 1.2.2 PartialDifferentialEquations ...... 8 1.2.3 Homogeneous Differential Equations ...... 8 1.2.4 N-thorderDifferentialEquations ...... 8 1.2.5 LinearDifferentialEquations ...... 8 1.3 Solutions of Differential equations ...... 9 1.4 DirectionFields...... 10 1.5 Fundamental Questions on First-Order Differential Equations...... 10

2 First-Order Ordinary Differential Equations 11 2.1 ExactDifferentialEquations...... 11 2.2 MethodofIntegratingFactors...... 12 2.3 SeparableDifferentialEquations ...... 13 2.4 Differential Equations with Homogenous Coefficients ...... 13 2.5 First-Order Linear Differential Equations ...... 14 2.6 Applications...... 14

3 Higher-Order Ordinary Linear Differential Equations 15 3.1 Higher-OrderDifferentialEquations ...... 15 3.1.1 LinearIndependence ...... 16 3.1.2 WronskianofasetofSolutions ...... 16 3.1.3 Non-HomogeneousProblem ...... 17

4 Higher-Order Ordinary Linear Differential Equations 19 4.1 Homogeneous Linear Equations with Constant Coefficients ...... 19

3 4.1.1 L(m)withdistinctRealroots...... 19 4.1.2 L(m)withrepeatedRealroots ...... 20 4.1.3 L(m)withComplexroots ...... 20 4.2 Non-Homogeneous Equations and the Principle of Superposition ...... 20 4.2.1 MethodofUndeterminedCoefficients ...... 21 4.2.2 VariationofParameters ...... 22 4.2.3 ReductionofOrder...... 23 4.3 Applications of Second-Order Equations ...... 24 4.3.1 Resonance...... 25

5 Systems of First-Order Linear Differential Equations 27 5.0.2 Higher-Order Linear Differential Equations can be reduced to First-Order Systems 28 5.1 TheoryofFirst-OrderSystems ...... 29

6 Systems of First-Order Constant Coefficient Differential Equations 31 6.1 HomogeneousCase...... 31 6.2 How to Compute the Exponential ...... 32 6.3 Non-HomogeneousCase ...... 33 6.4 RemarksontheTime-VaryingCase ...... 34

7 Stability and Lyapunov’s Method 35 7.1 Stability...... 35 7.1.1 LinearSystems ...... 35 7.1.2 Non-LinearSystems ...... 36 7.2 Lyapunov’sMethod ...... 36

8 Method 39 8.1 Transformations ...... 39 8.1.1 LaplaceTransform ...... 39 8.1.2 PropertiesoftheLaplaceTransform ...... 39 8.1.3 Laplace Transform Method for solving Initial Value Problems...... 40 8.1.4 InverseLaplaceTransform...... 40 8.1.5 Convolution: ...... 41 8.1.6 StepFunction...... 41 8.1.7 Impulseresponse ...... 41

9 Numerical Methods 43 9.1 NumericalMethods...... 43 9.1.1 Euler’sMethod...... 43 9.1.2 ImprovedEuler’sMethod ...... 43 9.1.3 Including the Second Order Term in Taylor’s Expansion ...... 44 9.1.4 OtherMethods ...... 44

A Brief Review of Complex Numbers 45 A.1 Introduction...... 45 A.2 Euler’s Formula and Exponential Representation ...... 46

B Similarity Transformation and the Jordan Canonical Form 49 B.1 SimilarityTransformation ...... 49 B.2 Diagonalization...... 49 B.3 JordanForm ...... 49

Chapter 1

Introduction to Differential Equations

1.1 Introduction:

Many phenomena in engineering, physics and broad areas of applied mathematics involve entities which change as a function of one or more variables. The movement of a car along a road, the propagation of sound and waves, the path an airplane takes, the amount of charge in a capacitor in an electrical circuit, the way a cake taken out from a hot oven and left in room temperature cools down and many such processes can all be modeled and described as differential equations. In class we discussed a number of examples such as the swinging pendulum, a falling object with drag and an electrical circuit involving resistors and capacitors. Let us make a definition:

Definition 1.1.1 A differential equation is an equation that relates an unknown function and one or more of its derivatives of with respect to one or more independent variables.

For instance, the equation dy = 5x dx − relates the first derivative of y with respect to x, with x. Here x is the independent variable and y is the unknown function. In this course, we will learn how to solve such differential equations. We will make a precise definition of what solving a differential equation means shortly. dny Before proceeding further, we make a remark on notation. Recall that dxn is the n-th derivative of y (n) dny with respect to x. One can also use the notation y to denote dxn . It is further convenient to write y′ = y(1) and y′′ = y(2). In physics, the notation involving dots is also common, such thaty ˙ denotes the first-order derivative. Different classifications of differential equations are possible and such classifications make the analysis of the equations more systematic.

1.2 Classification of Differential Equations

There are various classifications for differential equations. Such classifications provide remarkably simple ways of finding the solutions (if they exist) for a differential equation. Differential equations can be of the following classes:

7 1.2.1 Ordinary Differential Equations

If the unknown function depends only on a single independent variable, such a differential equation is ordinary. The following is an ordinary differential equation:

d2 d 1 L Q(t)+ R Q(t)+ Q(t)= E(t), dt2 dt2 C which is an equation which arises in electrical circuits. Here, the independent variable is t.

1.2.2 Partial Differential Equations

If the unknown function depends on more than one independent variables, such a differential equation is said to be partial. Heat equation is an example for partial differential equations:

∂2 ∂ α2 f(x,t)= f(x,t) ∂x2 ∂t

Here x,t are independent variables.

1.2.3 Homogeneous Differential Equations

If a differential equation involves terms all of which contain the unknown function itself, or the deriva- tives of the unknown function, such an equation is homogeneous. Otherwise, it is non-homogeneous.

1.2.4 N-th order Differential Equations

The order of an ordinary differential equation is the order of the highest derivative that appears in the equation. For example 2y(2) + 3y(1) = 5, is a second-order equation.

1.2.5 Linear Differential Equations

A very important class of differential equations are linear differential equations. A differential equation

F (y, y(1), y(2),...,y(n))= g(x) is said to be linear if F is a linear function of the variables y, y(1), y(2),...,y(n). Hence, by the properties of linearity, any linear differential equation can be written as follows:

n (i) an−i(x)y = g(x) Xi=0 for some a0(x),a1(x),...,an(x) which don’t depend on y. For example, ay + by(1) + cy = 0 is a linear differential equation, whereas

yy(1) + 5y = 0, is not linear.

If a differential equation is not linear, it is said to be non-linear.

1.3 Solutions of Differential equations

Definition 1.3.1 To say that y = g(x) is an explicit solution of a differential equation

dy dny F (x,y, , ) = 0 dx dxn on an interval I R, means that ⊂ dg(x) dng(x) F (x, g(x), ,..., ) = 0, dx dxn for every choice of x in the interval I.

Definition 1.3.2 We say that the relation G(x, y) = 0 is an implicit solution of a differential equation

dy dny F (x,y, , ) = 0 dx dxn if for all y = g(x) such that G(x, g(x)) = 0, g(x) is an explicit solution to the differential equation on I.

Definition 1.3.3 An n-th parameter family of functions defined on some interval I by the relation

h(x,y,c1,...,cn) = 0, is called a general solution of the differential equation if each member of the family is an explicit solution. Each element of the general solution is a particular solution.

Definition 1.3.4 A particular solution is imposed by supplementary conditions that accompany the differential equations. If all supplementary conditions relate to a single point, then the condition is called an initial condition. If the conditions are to be satisfied by two or more points, they are called boundary conditions.

Recall that in class we used the falling object example to see that without a characterization of the initial condition (initial velocity of the falling object), there exist infinitely many solutions. Hence, the initial condition leads to a particular solution, whereas the absence of an initial condition leads to a general solution.

Definition 1.3.5 A differential equation together with an initial condition (boundary conditions) is called an initial value problem (boundary value problem). 1.4 Direction Fields

The solutions to first-order differential equations can be represented graphically, without explicitly solving the equation. This also provides further understanding to the solutions to differential equations. In particular, consider a point P = (x, y) R2. ∈ dy = f(x, y) dx

dt Consider a point (x0, y0). It follows that, at this point, dx = f(x0, y0). What this means is that, the rate of change in y with respect to x at this point is given by f(x0, y0). Hence, a line segment showing the change is a line with slope f(x0, y0). The differential equation above tells us what the slope in the graph, that is the ratio of a small change in y with respect to a small change in x, is. As such, one can draw a graph to obtain the direction field. Upon a review of preliminary topics on differential equations, we proceed to study first-order ordinary differential equations.

1.5 Fundamental Questions on First-Order Differential Equations

One may ask the following questions: Does there exists a solution? How many solutions do exist? And finally, if the answer of the existence question is affirmative, how do we find the solution(s)? Here is an important theorem for first-order differential equations. We refer to this as the existence and uniqueness theorem.

Theorem 1.5.1 Suppose that the real-valued function f(x, y) is defined on a rectangle U =[a, b] [c,d], ∂ × and suppose f(x, y) and ∂y f(x, y) are continuous on U. Suppose further that (x0, y0) is an interior point of U. Then there is an open subinterval (a1, b1) [a, b], x0 (a1, b1) such that there is exactly dy ⊂ ∈ one solution to the differential equation dx = f(x, y) that is defined on (a1, b1) and passes trough the point (x0, y0).

The above theorem is important as it tells us that under certain conditions, there can only exist one dy solution. For example dx = sin(y) has a unique solution that passes through a point in the (x, y) plane. dy 1/3 On the other hand dx = y might not have a unique solution in the neighborhood around y = 0, ∂ 1/3 −2/3 since ∂y y = (1/3)y is not continuous when y = 0. In class, we will have some brief discussion on the existence and uniqueness Theorem via the method of successive approximations (which is also known as Piccard’s method). A curious student is encouraged to think a bit more about the Theorem, on why the conditions are needed. Chapter 2

First-Order Ordinary Differential Equations

A first-order differential equation has the form:

y(1) = f(x, y)

We start the analysis with an important sub-class of first order differential equations. These are exact differential equations.

2.1 Exact Differential Equations

Definition 2.1.1 Let F (x, y) be any function of two-variables such that F has continuous first partial derivatives in a region U R2. The total differential of F is defined by ⊂ ∂ ∂ dF (x, y)= F (x, y)dx + F (x, y)dy ∂x ∂y

Definition 2.1.2 A differential equation of the form

M(x, y)dx + N(x, y)dy = 0

is called exact if there exists a function F (x, y) such that ∂ M(x, y)= F (x, y) ∂x and ∂ N(x, y)= F (x, y) ∂y

In this case, M(x, y)dx + N(x, y)dy = 0, is called an exact differential equation.

We have the following theorem, to be proved in class:

∂ ∂ Theorem 2.1.1 If the functions M(x, y),N(x, y) and their partial derivatives ∂y M(x, y) and ∂x N(x, y) are continuous on a domain U R2, then the differential equation ⊂ M(x, y)dx + N(x, y)dy = 0,

11 is exact if and only if ∂ ∂ M(x, y)= N(x, y), x, y U) ∂y ∂x ∀ ∈ If the equation is exact, the implicit solutions are given by

F (x, y)= c, where F has partial derivatives as M(x, y) and N(x, y) on U.

Exercise 2.1.1 Show that ydx + xdy = 0, is an exact differential equation and find the solution passing through the point (1, 3) for x,y > 0.

2.2 Method of Integrating Factors

Sometimes an equation to be solved is not exact, but can be made exact. That is, if

M(x, y)dx + N(x, y)dy = 0 is not exact, it might be possible to find µ(x, y) such that

µ(x, y)(M(x, y)dx + N(x, y)dy)= µ(x, y)M(x, y)dx + µ(x, y)N(x, y)dy = 0, is exact. The function µ(x, y) is called an . In this case, if µ(x, y) is non-zero, then, the solution to the new equation becomes identical to the solution of the original, non-exact equation. Now, let us see what the integrating factor should satisfy for exactness. It must be that,

∂ ∂ µ(x, y)M(x, y) = µ(x, y)N(x, y) ∂y ∂x     and hence,

∂ ∂ ∂ ∂ ( µ(x, y))M(x, y)+ µ(x, y)( M(x, y)) = ( µ(x, y))N(x, y)+ µ(x, y)( N(x, y)) ∂y ∂y ∂x ∂x

It is not easy to find such a µ(x, y) in general. But, if in the above, we further observe that µ(x, y) is only a function of x, that is can be written as µ(x), then we have:

∂ d ∂ µ(x) M(x, y)= µ(x))N(x, y)+ µ(x) N(x, y) ∂y dx ∂x

This can be written as d ∂ ∂ ( µ(x))N(x, y)= µ(x)( N(x, y) M(x, y)) dx ∂x − ∂y and

∂ ∂ d ( N(x, y) M(x, y)) ( µ(x)) = µ(x) ∂x − ∂y (2.1) dx N(x, y)

If ( ∂ M(x, y) ∂ N(x, y)) P (x)= ∂y − ∂x N(x, y) is only a function of x, then we can solve the equation (2.1) as a first-order, ordinary differential equation as d ( µ(x)) = µ(x)P (x), (2.2) dx for which the solution is: x µ(x)= e P (u)duK, R for some constant K. A brief word of caution follows here. The integrating factor should not be equal to zero, that is µ(x, y) = 0 along the path of the solution. In such a case, the solution obtained might be different, 6 and one should check the original equation given the solution obtained by the method of integrating factors.

Exercise 2.2.1 Consider the following differential equation dy + T (x)y = R(x), dx Find an integrating factor for the differential equation.

See Section 5 below for the answer.

2.3 Separable Differential Equations

A differential equation of the form

F (x)G(y)dx + f(x)g(y)dy = 0,

is called a separable differential equation. 1 For such DEs, there is a natural integrating factor: µ(x, y)= G(y)f(x) , the substitution of which leads to F (x) g(y) dx + dy = 0, f(x) G(y) which is an exact equation. An implicit solution can be obtained by:

F (x) g(y) dx + dy = c, f(x) G(y) Z Z

One again needs to be cautious with the integrating factor. In particular, if G(y0) = 0, then it is possible to lose the solution y(x)= y0 for all x values. Likewise, if there is an x0 such that f(x0)=0, then, x(y)= x0 for all y is also a solution. Remark: If the initial condition is y such that G(y ) = 0, then y(x)= y is a solution. 0 0 0 ⋄

2.4 Differential Equations with Homogenous Coefficients

-This definition should not be confused with the definition of homogeneous equations discussed earlier.- A differential equation of the form dy = f(x, y), dx is said to have homogenous coefficients if one can write y f(x, y)= g( ), x for some function g(.). For differential equations with homogenous coefficients, the transformation y = vx reduces the problem to a separable equation in x and v. Note that, the essential step is that

dy d(vx) dv = = v + x . dx dx dx Alternatively, M(x, y)dx + N(x, y)dy = 0, has homogenous coefficients if

M(αx,αy) M(x, y) = , α R, α = 0 N(αx,αy) N(x, y) ∀ ∈ 6

2.5 First-Order Linear Differential Equations

Consider a linear differential equation: dy + P (x)y = Q(x), dx We can express this as (Q(x) P (x)y)dx dy = 0 − − This equation is not exact. Hence, following the discussion in Section 2 above, we wish to obtain an integrating factor. It should be observed that

∂ ((Q(x) P (x)y)) ∂ ( 1) ∂y − − ∂x − = P (x), 1 − is only a function of x and hence we can use the integrating factor

µ(x)= e P (x)dx R to obtain an exact equation:

e P (x)dx(Q(x) P (x)y)dx e P (x)dxdy = 0 R − − R Exercise 2.5.1 Consider the following differential equation dy + y = et, dt Find an integrating factor for the differential equation. Obtain the general solution.

2.6 Applications

In class, applications in numerous of areas of engineering and applied mathematics will be discussed. Chapter 3

Higher-Order Ordinary Linear Differential Equations

3.1 Higher-Order Differential Equations

In class we discussed the Existence and Uniqueness Theorem for higher-order differential equations. In this note, we will restrict the analysis to linear such equations.

Definition 3.1.1 An nth order linear differential equation in a dependent variable y and independent variable x defined on an interval I R has the form ⊂ a (x)y(n) + a (x)y(n−1) + + a (x)y(1) + a (x)y = g(x). (3.1) n n−1 ··· 1 0 If g(x) = 0 for all x in I, then the differential equation is homogeneous, otherwise, it is non-homogeneous.

For notational convenience, we write the left hand side of (3.1) via: (D)(y(x)) = a (x)D(n)(y)+ a (x)D(n−1)(y)+ + a (x)D(1)(y)+ a (x)D(0)(y), P n n−1 ··· 1 0 which we call as the polynomial operator of order n. The following is the fundamental theorem of existence and uniqueness applied to such linear differential equations:

Theorem 3.1.1 If a0(x),a1(x),...,an(x) and g(x) are continuous and real-valued functions of x on an interval I R and a (x) = 0, x I, then the differential equation has a unique solution y(x) ⊂ n 6 ∀ ∈ which satisfies the initial condition (1) (n−1) y(x0)= y0, y (x0)= y1,...,y (x0)= yn−1, where x I, y , y ,...,y R. 0 ∈ 0 1 n−1 ∈ The following is an immediate consequence of the fundamental theorem:

Theorem 3.1.2 Consider a linear differential equation defined on I: (D)(y(x)) = 0, P such that a0(x),a1(x),...,an(x) and g(x) are continuous and real-valued functions of x and y(x ) = 0, y(1)(x ) = 0,...,y(n−1)(x ) = 0, I. 0 0 0 ∀ Then, y(x) = 0, x I ∀ ∈

15 Exercise 3.1.1 Let f1, f2,...,fn be solutions to

(D)(y(x)) = 0. P Then, c f (x)+ c f (x)+ + c f (x) = 0, 1 1 2 2 ··· n n is also a solution, for all c ,c ...,c R. 1 2 n ∈

3.1.1

Linear independence/dependence is an important concept which arises in differential equations, as well as in linear algebra.

Definition 3.1.2 The set of functions f (x), f (x), f (x),...,f (x) are linearly independent on an { 1 2 3 n } interval I if there exist constants, c1,c2,...,cn; not all zero, such that

c f (x)+ c f (x)+ + c f (x) = 0, x I. 1 1 2 2 ··· n n ∀ ∈ If this condition implies that c = c = = c = 0, 1 2 ··· n the functions f1(x), f2(x), f3(x),...,fn(x) are said to be linearly independent.

Theorem 3.1.3 Consider the differential equation

(D)(y(x)) = 0, P defined on I. There exist n linearly independent solutions to this differential equation. Furthermore, every solution to the differential equation (for a given initial condition) can be expressed as a linear combination of these solutions.

(2) ′ Exercise 3.1.2 Consider y + y = 0 with y(0) = 5, y (0) = 1. Verify that y1(x) = sin(x) and (2) − y2(x) = cos(x) both solve y + y = 0. Hence, the general solution is c1 sin(x)+ c2 cos(x). Find c1 and c2.

3.1.2 of a set of Solutions

An important issue is with regard to the Wronskian, which will help us understand the issues on linear dependence.

Definition 3.1.3 Let f , f ,...,f be n linearly functions with (n 1) derivatives on an interval I. 1 2 n − The f1 f2 ... fn (1) (1) (1)  f1 f2 ..., fn  W (f1, f2,...,fn) = det ......    ......   (n−1) (n−1) (n−1) f f ..., fn   1 2  is called the Wronskian of these functions.  

Theorem 3.1.4 Let f , f ,...,f be n 1st order differentiable functions on an interval I. If these 1 2 n − functions are linearly dependent, then the Wronskian is identically zero on I. The proof of this is left as an exercise. The student is encouraged to use the definition of linear independence to show that the Wronskian is zero. The main use of Wronskian is given by the following, which allows us to present an even stronger result. It says that if the Wronskian is zero at any given point, then the set of solutions are linearly dependent.

Theorem 3.1.5 Let y1, y2,...,yn be n solutions to the linear equation.

(D)(y(x)) = 0. P They are linearly dependent if and only if the Wronskian is zero on I. The Wronskian of n solutions to a linear equation is either identically zero, or is never 0.

The proof of this for a second-order system will be presented as an exercise.

3.1.3 Non-Homogeneous Problem

Consider the differential equation

(D)(y(x)) = g(x). P

Suppose yp1 and yp2 are two solutions to this equation. Then, it must be that, by linearity,

(D)(y (x) y (x)) = g(x) g(x) = 0 P p1 − p2 − Hence, y (x) y (x) solves the homogenous equation: p1 − p2 (D)(y(x)) = 0. P

Hence, any solution to a particular equation can be obtained by obtaining one particular solution to the non-homogenous equation, and then adding the solutions to the homogenous equation, and finally obtaining the coefficients for the homogenous-part of the solution. We will discuss non-homogeneous equations further while studying methods for solving higher-order linear differential equations.

Chapter 4

Higher-Order Ordinary Linear Differential Equations

In this note, we will develop methods for solving higher-order linear differential equations.

4.1 Homogeneous Linear Equations with Constant Coefficients

Consider the following differential equations:

a y(n) + a y(n−1) + + a y(1) + a y = 0. n n−1 ··· 1 0 Here a ,a ,...,a ,a are R-valued constants { n n−1 1 0} For such equations, we look for solutions of the form

y(x)= emx.

The substitution of this solution into the equation leads to

(a mn + a mn−1 + + a m + a )emx = 0 n n−1 ··· 1 0 We call L(m)= a mn + a mn−1 + + a m + a , the characteristic polynomial of the equation. n n−1 ··· 1 0 Recall that an nth order linear differential equation has n linearly independent solutions. Furthermore, every particular solution to a given initial value problem can be expressed as a linear combination of these n solutions. As such, our goal is to obtain n linearly independent solutions which satisfy a given differential equation. With this reminder, we now proceed to the analysis for L(m) = 0. There are three possibilities.

4.1.1 L(m) with distinct Real roots

In case L(m) = 0 has n distinct roots, m1, m2,...,mn are different and each of

y(x)= emix, i = 1, 2,...,n is a solution. In this case, y(x)= c em1x + c em2x + + c emnx 1 2 ··· n is the general solution.

19 4.1.2 L(m) with repeated Real roots

Suppose m1 is a root with multiplicity k. In this case, each of

xiem1x

is a solution for i = 1, 2 . . . , k 1. Note that these are linearly independent. You are encouraged to − prove linear independence of these by using the definition of linear independence.

4.1.3 L(m) with Complex roots

With complex roots, the analysis is identical to Real roots. In particular, emx is a solution. If m = a + ib, then e(a+ib)x is a solution. As such,

e(a+ib)x = eax(cos(bx)+ i sin(bx)) is a solution. Since L(m) = 0 only has Real coefficients in the polynomial values, it follows that if m is a complex valued root, then the complex conjugate of m is also a solution. Hence,

e(a−ib)x = eax(cos(bx)+ i sin( bx)) − is also a solution. As such a linear combination of e(a+ib)x and e(a−ib)x is also a solution. Instead of working with c eax(cos(bx)+ i sin(bx)) + c eax(cos(bx) i sin(bx)), we could have 1 2 − ′ ax ′ ax c1e cos(bx)+ c2e sin(bx)).

′ ′ Here, in general c1 and c2 can be complex valued, but for the initial value problems with Real valued ′ ′ initial values, it suffices to search for c1,c2 to be Real valued. In case m = a + ib and m = a ib are repeated complex valued roots k times, then, each of the 1 2 − following are solutions:

eax cos(bx), eax sin(bx), xeax cos(bx), xeax sin(bx),...,xk−1eax cos(bx),xk−1eax sin(bx)

4.2 Non-Homogeneous Equations and the Principle of Superposition

Consider the differential equation (D)(y(x)) = g(x). P Suppose yp1 and yp2 are two solutions to this equation. Then, it must be that, by linearity,

(D)(y (x) y (x)) = g(x) g(x) = 0 P p1 − p2 − Hence, y (x) y (x) solves the homogenous equation: p1 − p2 (D)(y(x)) = 0. P Hence, any solution to a particular equation can be obtained by obtaining one particular solution to the non-homogenous equation, and then adding the solutions to the homogenous equation, and finally obtaining the coefficients for the homogenous-part of the solution. Theorem 4.2.1 Let yp be a particular solution to a differential equation (D)(y(x)) = g(x), (4.1) P and let y = c y (x)+c y (x)+ +c y (x), be the general solution corresponding to the homogeneous c 1 1 2 2 ··· n n equation (D)(y(x)) = 0 P Then, the general solution of (4.2) is given by

y(x)= yp(x)+ yc(x)

Here yc(x) is called the complementary solution. We now present a more general result. This is called the principle of superposition.

Theorem 4.2.2 Let ypi (x) be respectively particular solutions of (D)(y(x)) = g (x), (4.2) P i for i = 1, 2 ...,m. Then, a y (x)+ a y (x)+ + a y (x) 1 p1 2 p2 ··· m pm is a particular solution to the DE (D)(y(x)) = a g (x)+ a g (x)+ + a g (x) P 1 1 2 2 ··· m m In the following, we discuss how to obtain particular solutions. We first use the method of undetermined coefficients and then the method of variation of parameters. The method of undetermined coefficients has limited use, but when it works, is very effective. The method of variation of parameters is more general, but requires more steps in obtaining solutions.

4.2.1 Method of Undetermined Coefficients

The derivative of a polynomial is a polynomial. As such, the polynomial operator applied to a poly- nomial function leads to a polynomial term. Furthermore, the order of the polynomial which results from being subjected to the polynomial operator, cannot be larger than the polynomial itself. A similar observation applies to the exponentials. The derivative of an exponential is another expo- nential. These observation leads us to the following result.

Theorem 4.2.3 Consider a linear, non-homogeneous, constant-coefficient ordinary differential equa- tion (D)(y(x)) = f(x) P Let f(x) be of the form f(x)= eax cos(bx)(p + p x + p x2+ + p xm)+ eax sin(bx)(q + q x + q x2+ + q xm), o 1 2 ··· m o 1 2 ··· m for some constants a,b,p0,p1,...,pm, q0, q1,...,qm. If a + ib is not a solution to L(m) = 0, then there exists a particular solution of the form y (x)= eax cos(bx)(A + A x + A x2+ + A xm)+ eax sin(bx)(B + B x + B x2+ + B xm), p o 1 2 ··· m o 1 2 ··· m where A0, A1,...,Am, B0, B1,...,Bm can be obtained by substitution. If a + ib is a root of the polynomial with multiplicity k, then the assumed particular solution should be modified by multiplying with xk. 4.2.2 Variation of Parameters

A particularly effective method is the method of variation of parameters. Consider, a (x)y(n) + a y(n−1) + + a (x)y(1) + a y = g(x), n n−1 ··· 1 0 where all of the functions are continuous on some interval, where a (x) = 0. n 6 Suppose y(x)= c y (x)+ c y (x)+ + c y (x) 1 1 2 2 ··· n n is the general solution to the corresponding homogeneous equation. This method, replaces ci with some function ui(x). That is, we look for u1(x),u2(x),...,un(x) such that

y (x)= u (x)y (x)+ u (x)y (x)+ + u (x)y (x) p 1 1 2 2 ··· n n It turns out that, we can always find such functions. As there are n unknowns, we need n equations, for which can have freedom on how to choose. We will find these equations in an innovative manner as follows: T Let U(x) = u1(x) u2(x) ... un(x) and Y (x) = y1(x) y2(x) ... yn(x) . Let us write in vector inner product form:    yp(x)= Y (x)U(x) (Recall that for two vectors a = [a a ... a ], b = [b b ... b ], aT b = a b + a b + + 1 2 n 1 2 n 1 1 2 2 ··· anbn). The first derivative writes as ′ ′ ′ yp(x)= Y (x)U(x)+ Y (x)U (x) Let’s take Y.U ′ = 0. In this case,

′′ ′′ ′ ′ yp (x)= Y (x)U(x)+ Y (x)U (x)

and let us take Y ′.U ′ = 0. By proceeding inductively, we obtain

(n) (n) (n−1) ′ yp (x)= Y U + Y .U

For the last equation, we substitute the expression into the differential equation. The differential equation is that: a (x)y(n) + a y(n−1) + + a (x)y(1) + a y = g(x), n p n−1 p ··· 1 p 0 p Hence, a (Y (n)U + Y (n−1)U ′)+ a Y (n−1)U + + YU = g(x) n n−1 ··· but a (Y (n)U)+ a Y (n−1)U + + YU = 0 n n−1 ··· and hence (n−1) ′ anY U = g(x)

Hence, we obtain: ′ y1 y2 ... yn u1 0 ′ ′ ′ ′ y1 y2 ... yn u2 0  . . .   .  =  .  ......  (n−1) (n−1) (n−1)  ′    y y ... y  u  g/an  1 2 n   n         You may recognize that the term above is the matrix M, whose determinant is the Wronskian. We already know that this matrix is invertible, since the functions y1, y2,...,yn are linearly independent solutions of the corresponding homogeneous differential equation. ′ u1 ′ u2 It follows that, we can solve for  .  by .   u′   n   0 0 (M(y , y ,...,y )(x))−1  .  1 2 n .    g(x)   an(x)    We will have to integrate out this term and obtain:

u1(x) 0 u (x) 0  2  −1   . = (M(y1, y2,...,yn)(x)) . dx + C, . .   Z  g(x)  un(x)      an(x)      for some constant C (this constant will also serve us in the homogeneous solution).

Hence, we can find the functions u1(x),u2(x),...,un(x), and using these, we can find y (x)= u (x)y (x)+ u (x)y (x)+ + u (x)y (x) p 1 1 2 2 ··· n n

As we observed, if the solution to the homogeneous equations are known, then a particular solution can be obtained. One question remains however, on how to obtain the solutions to the homogeneous equation. We now discuss a useful method for obtaining such solutions.

4.2.3 Reduction of Order

If one solution y1(x) to an 2nd order linear differential equation is known, then by substitution of y = v(x)y1(x) into the equation y′′ + p(x)y′ + q(x)y = 0, ′ ′ ′ ′′ ′′ ′ ′ ′′ with y (x)= v (x)y1(x)+ v(x)y1(x), y (x)= v (x)y1(x) + 2v (x)y1(x)+ v(x)y1 (x) ′′ ′ ′ ′ ′′ v(y + p(x)y + q(x)y)+ v (2y1 + py1)+ v y1 = 0 Thus, it follows that (2y′ + py ) v′′ + 1 1 v′ = 0 y1 This is a first-order equation in v′. Thus, v′ can be solved, leading to a solution for v, and ultimately solving for y(x)= v(x)y1(x). As such, if one solution to the homogeneous equation is known, another independent solution can be obtained. The same discussion applies for an nth order linear differential equation. If one solution is known, then by writing y(x) = v(x)y1(x) and substituting this into the equation (as we did above), a differential equation of order n 1 for v′(x) can be obtained. The n 1 linearly independent solutions for v′ can − − all be used to recover n 1 linearly independent solutions to the original differential equation. Hence, − by knowing only one solution, n linearly independent solutions can be obtained. 4.3 Applications of Second-Order Equations

Consider an electrical circuit consisting of a resistor, capacitor, inductor and a power supply. The equation describing the relation between the charge around the capacitor, the current and the power supply voltage is given as follows:

di(t) q(t) L + iR + = E(t), dt C where q(t) is the charge in the capacitor, i(t) is the current, L,R,C are inductance, resistance and capacitance values, respectively, and E(t) is the power supply voltage.

dqt(t) Recognizing that i(t)= dt , and dividing both sides by L,we have that d2q(t) R dq(t) q(t) E(t) + + = dt2 L dt LC L

This is a second order differential equation with constant coefficients. The equation is non-homogeneous. As such, we first need to obtain the solution to the corresponding homogeneous equation. This writes as: d2q(t) R dq(t) q(t) + + = 0 dt2 L dt LC

The characteristic polynomial is: R m L(m)= m2 + m + = 0, L LC with solutions: R R 2 1 m1 = + ( ) −2L r 2L − LC or m = α + (α2 w2 1 − − 0 q R 1 with α = 2L and w0 = LC The second root is: q m = α (α2 w2 2 − − − 0 q There are three cases:

2 2 α > w0. In this case, we have two distinct real roots: The general solution is given as qc(t) = • m1t m2t c1e + c2e

2 2 α = w0. In this case, we have two equal real roots: The general solution is given as qc(t) = • αt αt c1e + c2te α2 = w2. In this case, we have two complex valued roots: The general solution is given as • 0 q (t)= c eαt cos( (α2 w2t)+ c eαt sin( (α2 w2t) c 1 − 0 2 − 0 p p We now can solve the non-homogeneous problem by obtaining a particular solution and adding the complimentary solution above to the particular solution. Let E(t) = E cos(wt). In this case, we can use the method of undetermined coefficients to obtain a particular solution. Suppose w = w . 6 0 Using the method of undetermined coefficients, we find that a particular solution is given by

qp(t)= A cos(wt)+ B sin(wt), where E¯ 1 A = 2 2 (2αw) L w w + 2 2 0 w0−w and 2αAw B = w2 w2 0 − Hence, the general solution is

q(t)= qp(t)+ qc(t)

When R = 0, that is there is no resistance in the circuit, then α = 0 and the solution simplifies as the B term above becomes zero.

4.3.1 Resonance

Now, let us consider the case when α = 0 and w = w0, that is the frequency of the input matches the frequency of the homogeneous equation solution. In this case, when we use the method of undetermined coefficients, we need to multiply our candidate solution by t to obtain: qp(t)= At cos(w0t)+ Bt sin(w0t),

Substitution yields, E¯ A = 0, B = 2w0L

In this case, the solution is:

E¯ qp(t)= c1(w0t)+ c2 sin(w0t)+ t sin(w0t) 2w0L

As can be observed, the magnitude of qp(t) grows over time. This leads to breakdown in many physical systems. However, if this phenomenon can be controlled (say by having a small non-zero α value), resonance can be used for important applications.

Chapter 5

Systems of First-Order Linear Differential Equations

Definition 5.0.1 A set of differential equations which involve more than one unknown functions and their derivatives with respect to a single independent variable is called a system of differential equations.

For example

(1) y1 = f1(x, y1, y2,...,yn) (1) y2 = f2(x, y1, y2,...,yn) and up to: (1) yn = fn(x, y1, y2,...,yn) is a system of differential equations. Clearly, the first order equation that we discussed earlier in the semester of the form

y(1) = f(x, y), is a special case. If each of the functions f , f ,...,f is a linear function of x ,x ,...,x , then { 1 2 n} { 1 2 n} the system of equations is said to be linear. In this case, we have:

y(1) = ρ (t)y + ρ (t)y + + ρ (t)y + g (t) 1 11 1 12 2 ··· 1n n 1 y(1) = ρ (t)y + ρ (t)y + + ρ (t)y + g (t) 2 21 1 22 2 ··· 2n n 2 and up to: y(1) = ρ (t)y + ρ (t)y + + ρ (t)y + g (t) n n1 1 n2 2 ··· nn n n If g1, g2,...,gn are zero, then the equation is said to be homogeneous. We now state an existence and uniqueness theorem: Consider the following system of equations:

(1) x1 = f1(t,x1,x2,...,xn) (1) x2 = f2(t,x1,x2,...,xn) and up to: (1) xn = fn(t,x1,x2,...,xn)

27 Theorem 5.0.1 Let ∂fi , for all i 1, 2,...,n , j 1, 2,...,n , exist and be continuous in an { ∂xj } ∈ { } ∈ { } n + 1-dimensional domain containing the point (t ,x0,x0,...,x0 ). Then, there exists an interval [t 0 1 2 n 0 − h, t + h] with h> 0, such that for all t [t h, t + h], there exists a unique solution 0 ∈ 0 − 0

x1(t) = Φ1(t), x2(t) = Φ2(t),...,xn(t) = Φn(t)

of the system of differential equations which also satisfies

0 0 0 x1(t0)= x1, x2(t0)= x2,...,xn(t0)= xn

For a vector x(t) Rn, x′(t) denotes the derivative of the vector x(t), and it exists when all the ∈ components of x(t) are differentiable. The derivative of x(t) with respect to t is a vector consisting of the individual derivatives of the components of x:

′ x1(t) ′ x2(t) x′(t)=  .  .   x′ (t)  n    We note that, the integral of a vector is also defined in a similar pattern, that is, the following holds:

x1(t)dt x2(t)dt x(t)dt = R  . R . Z    x (t)dt  n    R 5.0.2 Higher-Order Linear Differential Equations can be reduced to First-Order Systems

One important observation is that any higher-order linear differential equation

y(n) + a (x)y(n−1) + a (x)y(n−2) + + a (x)y(1) + a (x)y = 0, n−1 n−2 ··· 1 0 can be reduced to a first-order system of differential equation by defining:

′ ′′ (n−1) x1 = y, x2 = y , x3 = y ,...,xn = y

It follows that, x1 = y ′ ′ x2 = y = x1 ′′′ ′ x3 = y = x2 until ′ xn = xn−1

As such, we obtain:

′ x1 0 1 0 ... 0 x1 ′ x2 0 0 1 ... 0 x2  ′      x3 = 0 0 0 ... 0 x3  .   . . . .   .   .   ......   .        x′   a (x) a (x) a (x) ... a (x) x   n − 0 − 1 − 2 − n−1   n       Hence, if we write:

x1 x  2 x = x3  .   .    x   n 0 1  0 ... 0 0 0 1 ... 0   A(x)= 0 0 0 ... 0  . . . .   ......     a (x) a (x) a (x) ... a (x) − 0 − 1 − 2 − n−1    We obtain a first-order differential equation: x′(t)= A(x)x(t)

As such, first-order systems of equations are very general.

Exercise 5.0.1 Express 5y(3) + y(2) + y(1) + y = 0 as a system of differential equations, by defining ′ ′′ x1 = y, x2 = y and x3 = y .

5.1 Theory of First-Order Systems

We first consider homogeneous linear differential equations with g(t)=0: x′(t)= A(x)x(t), where A(t) is continuous.

Theorem 5.1.1 Let x1(t),x2(t),...,xn(t) be solutions of the linear homogeneous equation. If these solutions are linearly independent, then the determinant of the matrix M(t)= x1(t) x2(t) ...xn(t) is non-zero for all t values where the equation is defined. 

Definition 5.1.1 A linearly independent set of solutions to the homogeneous equation is called a fun- damental set of solutions.

Theorem 5.1.2 Let x1,x2,...,xn be a fundamental set of solutions to { } x′(t)= A(t)x(t) in an interval α

Chapter 6

Systems of First-Order Constant Coefficient Differential Equations

6.1 Homogeneous Case

If a system of linear equations consist of constant-coefficient equations, then, a linear equation becomes of the form: x′(t)= Ax(t) where A is a constant (independent of t) matrix. We observed that, we need to find a fundamental set of solutions to be able to solve any such differential equation with an arbitrary initial condition. Recall further that, a fundamental set of solutions is any set of linearly independent solutions satisfying the equation. Let us first assume that A is a Real- (and as such, has n full eigenvectors, which are i i linearly independent). In this case, we have that if Av = λiv , then

x1 = eλitvi is a solution to the equation x′(t)= Ax(t)

Let us verify this: d d xi = (eλitvi)= λ vieλit = λ vieλit = Axi dt dt i i Hence, we can find n such solutions, and these provide a fundamental set of solutions. However, it is not always the case that we can find n eigenvectors. Sometimes, one has use generalized eigenvectors. We now provide the general solution where A can also have generalized eigenvectors.

Theorem 6.1.1 Consider an initial value problem, with initial conditions x(t)= x0. In this case, the following is a solution: At x(t)= e x0 where t2 tn eAt = I + At + A2 + ...An + ... 2 n! is the matrix exponential.

The above can be verified by direct substitution. Furthermore, by the uniqueness of the solution, this is the solution to the equation. As such, eAt can be used directly to provide solutions.

31 6.2 How to Compute the Matrix Exponential

First, let us consider a 2 2 matrix × 1 0 A = I = 0 1   In this case, t2 tn eAt = I + It + I2 + + In + ... 2! ··· n! Since In = I for any n, it follows that et 0 eAt = 0 et   With similar arguments, if A is diagonal

λ1 0 0 A = 0 λ 0 ,  2  0 0 λ3   we obtain eλ1t 0 0 eAt = 0 eλ2t 0 ,   0 0 eλ3t   Hence, it is very easy to compute the exponential when the matrix has a nice form. What if A has a Jordan form? We now discuss this case. First, we use a result that if AB = BA, that is if A and B commute, then

e(A+B) = eAeB

You will prove this in your assignment. In this case, we can write a matrix

λ1 1 0 A = 0 λ 1  1  0 0 λ1   as B + C, where λ1 0 0 B = 0 λ 0  1  0 0 λ1   0 1 0 C = 0 0 1   0 0 0 We note that BC = CB, for B is the  multiplied by a scalar number. Hence,

eAt = eBteCt.

All we need to compute is eCt, as we have already discussed how to compute eBt. It should be observed that C3 = 0. For a where the number of 1’s off the diagonal is k 1, the kth power is equal to 0. − Now, t2 t3 eCt = I + Ct + C2 + C3 + ..., 2! 3! becomes 1 t t2/2 t2 eCt = I + Ct + C2 = 0 0 t 2!   0 0 1   Hence, 2 λ1t 2 λ1t λ1t t λ1t e 0 0 1 t t /2 e te 2 e eAt = 0 eλ1t 0 0 0 t = 0 eλ1t teλ1t       0 0 eλ1t 0 0 1 0 0 eλ1t       Now that we know how to compute the exponential of a Jordan form, we can proceed to study a general matrix. Let A = P BP −1,

where B is in a Jordan form. Then,

A2 = (P BP −1)2 = P BP −1P BP −1 = P B2P

A3 = (P BP −1)3 = P BP −1P BP −1P BP −1 = P B3P and hence, Ak = (P BP −1)3 = P BP −1P BP −1(P BP −1)k−1 = P BkP

Finally, eA = P (eB)P −1 and eAt = P (eBt)P −1

Hence, once we obtain a or a Jordan form matrix B, we can compute the exponential eAt very efficiently.

6.3 Non-Homogeneous Case

Consider x′(t)= Ax(t)+ g(t), with initial condition x(0) = x0. In this case, via variation of parameters, we look for a solution of the form x(t)= X(t)v(t), where X(t) is a fundamental matrix for the homogeneous equation. We obtain the solution (with the details presented in class) as: t At A(t−τ) x(t)= e x0 + e g(τ)dτ Z0 You could verify this result by substitution. The uniqueness theorem reveals that this has to be the solution. This equation above is a fundamentally important one for mechanical and control systems. Suppose a spacecraft needs to move from the Earth to the moon. The path equation is a more complicated version of the equation above, and g(t) is the control term. 6.4 Remarks on the Time-Varying Case

We note that the discussions above also apply to the case when A is a function of t. In this case,

x′(t)= A(t)x(t), and x(t)= X(t)c, where d X(t)= A(t)X(t) dt and det(X(t)) = 0, t 6 ∀

−1 Definition 6.4.1 If X(t) is a fundamental matrix, then Φ(t,t0) = X(t)X(t0) is called a state- transition matrix such that x(t) = Φ(t,t0)x(t0)

Hence, the state-transition matrix Φ(t1,t0), transfers the solution at time t0 to another time t1. Chapter 7

Stability and Lyapunov’s Method

7.1 Stability

In many engineering applications, one wants to make sure things behave nicely in the long-run; without worrying too much about the particular path the system takes (so long as these paths are acceptable). Stability is the notion that makes sure things behave well in the long-run. Before proceeding further, let us recall the l norm: For a vector x Rn, 2 ∈ n x = x2, || ||2 v i ui=1 uX t where xi denotes the ith component of the vector x. We have three definitions of stability:

1. Local Stability: For every ǫ > 0, δ > 0 such that x(0) < δ implies that x(t) < ǫ, t 0 ∃ || ||2 || ||2 ∀ ≥ (This is also known as stability in the sense of Lyapunov). 2. Local Asymptotic Stability: δ > 0 such that x(0) <δ implies that lim x(t) = 0. ∃ || ||2 t→∞ || ||2 3. Global Asymptotic Stability: For every x(0) Rn, lim x(t) = 0. Hence, here, for any ∈ t→∞ || ||2 initial condition, the system converges to 0.

One could consider an inverted pendulum as an example of a system which is not locally stable except at the point of equilibrium. It should be added that, stability does not necessarily need to be with regard to the origin; that is stability can hold for any x . In this case, the above norms should be replaced with x(t) x (such 0 || − 0||2 that, for example for the asymptotic stability case, x(t) will converge to x0).

7.1.1 Linear Systems

Theorem 7.1.1 For a linear differential equation x′ = Ax, the solution is locally and globally asymptotically stable if and only if

max Re λi < 0, λi { { }} where Re . denotes the real part of a , and λ denotes the eigenvalues of A. { } i 35 We could also further strengthen the theorem.

Theorem 7.1.2 For a linear differential equation

x′ = Ax, the system is locally stable if and only if

• max Re λi 0, λi { { }} ≤ If Re λ = 0, for some λ , the algebraic multiplicity of this eigenvalue should be the same as the • { i} i geometric multiplicity.

Here, Re . denotes the real part of a complex number, and λ denotes the eigenvalues of A. { } i

Exercise: Prove the theorem.

7.1.2 Non-Linear Systems

In practice, many systems are not linear, and hence the above theorem is not applicable. For such systems, there are two approaches:

Linearization

Consider x′ = f(x), where f is an infinitely differentiable, non-linear function. Linearization around a point x0 means the first-order approximation:

f(x)= f(x )+ f ′(x )(x x )+ h.o.d., 0 0 − 0

where h.o.d. stands for higher order terms. Now consider x0 = 0 and further with the condition that f(0) = 0. One then studies the properties of the linearized system by only considering the properties ′ of f (x0) and applies the theorem we discussed above. However, it should be noted that, this method only works locally, and hence, the real part of the eigenvalues being less than zero only imply local stability due to the approximation at the Taylor . The second approach is the method of Lyapunov. However, we should note that this method is applicable to any system, linear or non-linear.

7.2 Lyapunov’s Method

A common approach is via the so-called Lyapunov’s second method. In class we defined Lyapunov (Energy) functions: V (x): Rn R is a Lyapunov function if → 1. V (x) > 0, x = 0 ∀ 6 2. V (x) = 0, if x = 0.

3. V (x), is continuous, and has continuous partial derivatives.

First we present results on local asymptotic stability. Let Ω Rn be a closed, bounded set containing ∈ 0. Theorem 7.2.1 a) For a given differential equation x′(t) = f(x(t)) with f(0) = 0, if we can find a Lyapunov function V (x) such that d V (x(t)) 0, dt ≤ for all x = 0 and x Ω, then, the system is locally stable (stable in the sense of Lyapunov). 6 ∈

b) For a given differential equation x′(t) = f(x(t)) with f(0) = 0, if we can find a Lyapunov function V (x) such that d V (x(t)) < 0, dt for all x = 0 and x Ω, then the system is locally asymptotically stable. 6 ∈

We provided a brief sketch of proof for the results above in class. The theorem above can be strengthened to global asymptotic stability if part b of the Theorem above is also satisfied by some Lyapunov function with the following property:

1. The Lyapunov function V (x) is radially unbounded, that is lim V (x)= ||x||2→∞ ∞

Exercise: Can you prove the above result? Revisit your class notes, and follow the discussion we had regarding the sketch of a proof. Exercise: Show that x′ = x3 is locally asymptotically stable, by picking V (x) = x2 as a Lyapunov − function. Is this solution globally asymptotically stable? Example: Consider x′′ + x′ + x = 0. Is this system asymptotically stable?

′ Hint: Convert this equation into a system of first-order differential equations, via x1 = x and x2 = x1, x′ = x x . Then apply V (x ,x )= x2 + x x + x2 as a candidate Lyapunov function. 2 − 1 − 2 1 2 1 1 2 2 You will encounter many applications where stability is a necessary prerequisite for acceptable perfor- mance. In particular, in control systems one essential goal is to adjust the system dynamics such that the system is either locally or globally asymptpotically stable. For the scope of this course, all you need to know are the notions of stability and application of Lyapunov theory to relatively simple systems. The above is provided to provide a more complete picture for the curious. If time permits, we will discuss these issues further at the end of the semester, but this is highly unlikely. Mathematics and Engineering students will revisit some of these discussions in different contexts, but with essentially same principles, in MATH 332, MATH 335 and MATH 430.

Chapter 8

Laplace Transform Method

8.1 Transformations

A transformation is a map from a signal set to another one, such that is onto and one-to-one T T (hence, bijective). Let us define a set of signals on the time-domain. Consider the following mapping: ∞ g(s)= K(s, t)x(t)dt, s R. ∈ Zτ=−∞ Here K(s, t) is called the Kernel of the transformation. The idea is to transform a problem involving x(t) to a simpler problem involving g(s), obtaining a solution, and then transforming back to x(t).

8.1.1 Laplace Transform

Let x(t) be a R valued function defined on t 0. − ≥ Let s R be a real variable. The set of improper integrals for s R give rise to the Laplace transform. ∈ ∈ ∞ X(s)= x(t)e−stdt, s R ∈ Zτ=0 We will also denote X(s) by (x), L evaluated at s. Hence, you might imagine (x) as a function, and X(s) is the value of this function at L s. The Laplace transform exists for the set of functions such that f(t) Meαt, t 0, | |≤ ∀ ≥ for some finite M < and α> 0 and f(t) is a piece-wise continuous function in every interval [0, ζ], ∞ ζ 0, ζ R. We say a function is piece-wise continuous if every finite interval can be divided into a ≥ ∈ finite number of subintervals in which the function is continuous, and the function has a finite left-limit and a right-limit in the break-points.

8.1.2 Properties of the Laplace Transform

Laplace transform is linear.

39 Theorem 8.1.1 Let f be a real, continuous function and f(t) Meαt. Furthermore, suppose f ′(t) | | ≤ is piece-wise continuous on every finite interval. Then,

(f ′)= s (f) f(0), L L − for all s > α.

The same discussion applies to the derivatives of higher order:

Theorem 8.1.2 If f, f (1), f (2),...,f (n−1) are continuous and f (n) is piecewise continuous on every bounded interval, and f (i)(t) Meαt, | |≤ for all i = 1, 2,...,n 1 and all t 0, then for all s α − ≥ ≥ (f n)= sn (f) sn−1f(0) sn−2f (1)(0) sn−3f (2)(0) f (n−1)(0), L L − − − −···−

Another important property of Laplace Transforms is that

(eatf t)= F (s a) L − And dn (tnf t) = ( 1)n F (s) L − dsn

8.1.3 Laplace Transform Method for solving Initial Value Problems

Consider a linear DE with constant coefficients:

a y(n) + a y(n−1) + + a y = b(t), n n−1 ··· 0 (1) (n−1) with y(0) = c0, y (0) = c1,...,y (0) = cn−1. Then, we have

(y(n))= sn (y) sn−1c sn−2c c L L − 0 − 1 ···− n−1 (y(n−1))= sn−1 (y) sn−2c sn−1c c L L − 0 − 1 ···− n−2 and (y(1))= s (y) c L L − 0 Combining all, we obtain:

(a sn + a sn−1 + + a ) (y) c (a sn−1 + a sn−2 + + a ) n n−1 ··· 0 L − 0 n 1 ··· 1 c (a sn−2 + a sn−3 + + a ) c a − 1 n 1 ··· 2 ···− n−1 n = B(s). (8.1)

As such, we could obtain the Laplace transform of y(t). We now will have to find the function which has its Laplace transform as Y (s). Thus, we need to find an inverse Laplace transform.

8.1.4 Inverse Laplace Transform

The inverse of the Laplace Transform is not necessarily unique. But, when we assume the functions to be piecewise continuous, the inverse is essentially unique (up to a number of discontinuities). We will find the inverse, by a table lookup. In general, there is an inverse formula, but this involves complex integration. We will not consider this in this course. 8.1.5 Convolution:

Let f and g be two functions that are piecewise continuous on every finite closed interval, and be less that Meαt, t 0. and f(t)= g(t) = 0 for t 0. The function ∀ ≥ ≤ ∞ h(t) = (f g)(t)= f(τ)g(t τ)dτ ∗ − Z0 is called the convolution of f and g.Then,

(f g)(s)= (f) (s) (g) (s), L ∗ L L     for all s values.

8.1.6 Step Function

We define a step function for a 0 as follows: ≥ ua(t) = 1(a≥0),

where 1(.) is the indicator function. We can show that for s> 0 1 (u (t)) = e−as L a s

8.1.7 Impulse response

Consider the following function: 1 ∆ if 0 t ∆, F∆(t)= ≤ ≤ (0 else. Now, consider lim F (t). This limit is such that, for every t = 0, the limit is zero valued. When ∆→0 ∆ 6 t = 0, however, the limit is . of We denote this limit by δ(t). ∞ This limit is known as the impulse. The impulse is not a regular function. It is not integrable. The proper way to study such a function is via distribution theory. This will be further covered in Math 334 and Math 335. For the purpose of this course however, we will always use the impulse function under the integral sign. In class, we showed that −st lim e F∆(t)dt = 1, ∆→0 Z for all s values. Consider a linear constant coefficient system (D)(y)= a y(n) + a y(n−1) + ...a y(1) + a y = g(t), P n n−1 1 0 with y(0) = y(1)(0) = = y(n−1)(0) = 0. We had observed that the Laplace transform of the solution G(s) ··· Y (s)= n n−1 ans +an−1s +···+a0 If g(t)= δ(t), then G(s) = 1 and hence, 1 Y (s)= . a sn + a sn−1 + + a n n−1 ··· 0 We denote y(t) when g(t) = δ(t), by h(t) and call it the impulse response of a system governed by a linear differential equation. Exercise 8.1.1 Consider the linear equation above. If g(t) = p(t) for some arbitrary function p(t) defined on t 0, then the resulting solution is equal to ≥ y(t)= p(t) h(t) ∗ Chapter 9

Numerical Methods

9.1 Numerical Methods

9.1.1 Euler’s Method

Consider

dx = f(x,t) dx

Let x(t) be the solution, such that x(t) admits a Taylor expansion around t0. We may express x(t) around x(t0) as

2 2 d d (t t0) x(t)= x(t )+ x(t) 0 (t t )+ x(t) 0 − + h.o.t., 0 dt |t=t − 0 dt2 |t=t 2! where h.o.t. (higher order terms) converge to zero as t t . → 0 One method to approximate the solution x(t) with a function Φ(t) by eliminating the terms in Taylor expansion after the first order term. That is, by obtaining:

Φ(t )= x(t )+ f(x(t ),t )(t t ) 1 0 0 0 1 − 0 in the interval t [t ,t + h], for some small h. Likewise, 1 ∈ 0 0 Φ(t ) = Φ(t )+ f(Φ(t ),t )(t t ) 2 1 1 1 2 − 1 in the interval t [t ,t + h] 2 ∈ 1 1 Φ(t ) = Φ(t )+ f(Φ(t ),t )(t t ) 3 2 2 2 3 − 2 and Φ(t ) = Φ(t )+ f(Φ(t ),t )(t t ) k k−1 k−1 k−1 k − k−1 This method is known as the Euler’s method.

9.1.2 Improved Euler’s Method

One way to improve the above method is via the averaging of the end-points in the interval [tk,tk + h]:

43 1 Φ(t ) = Φ(t )+ f(Φ(t ),t )+ f(Φ(t ),t ) (t t ) k k−1 2 k−1 k−1 k k k − k−1  

But, this requires the use of f(Φ(tk),tk) to compute Φ(tk). This is be computationally difficult. The improved Euler’s method replaces this term with Φ(t )+ f(Φ(t ),t )(t t ) k−1 k−1 k−1 k − k−1 Hence, for all k 0, the improved Euler’s method works as: ≥

1 Φ(t ) = Φ(t )+ f(Φ(t ),t ) + Φ(t )+ f(Φ(t ),t )(t t ) (t t ), k k−1 2 k−1 k−1 k−1 k−1 k−1 k − k−1 k − k−1   for t [t ,t + h]. k ∈ k−1 k−1

9.1.3 Including the Second Order Term in Taylor’s Expansion

Let for simplicity h = t t for all k values. k+1 − k Let for all k 0 ≥ 1 Φ(t + h) = Φ(t )+ x′(t )h + x′′(t )h2 k k k 2 k

That is, in the above, we truncate the Taylor expansion at the second term, instead of the first one. Here one has to compute the second derivative. This can be done as follows:

d2x d dx d ∂x′ ∂x′ dx ∂x′ ∂x′ x′′ = = = x′ = + = + x′ dt2 dt dt dt ∂t ∂y dt ∂t ∂x

9.1.4 Other Methods

In the above methods, a smaller h leads to a better approximation, with the additional complication of higher number of computations to reach from any point to another one. If the differential equation involves continuous functions, then there always exists a sufficiently small h, with which you can carry over the numerical approximation. It should be noted that, there are many other possibilities to further improve the approximation errors, such as the higher-order Taylor approximations. One other popular method which we will not discuss is the Runge-Kutta method, which assigns nu- merical weights on the average of the derivatives at various locations on the (x,t) values. However, the Taylor expansion based methods are more general. The approximations can be generalized for higher dimensional settings; in particular for systems of differential equations. These follow the same basic principles. One way is to linearize a system with the first order Taylor’s approximation for each of the terms in the system. Appendix A

Brief Review of Complex Numbers

A.1 Introduction

The square root of -1 does not exist in the space of real numbers. We extend the space of numbers to the so-called complex ones, so that all polynomials have roots. We could define the space of complex numbers C as the space of pairs (a, b), where a, b R, on which ∈ the following operations are defined:

(a, b) + (c,d) = (a + b, c + d)

(a, b).(c,d) = (ac bd,ad + bc) − We could also use the notation: (a, b)= a + bi.

In the above representation, the notation i stands for imaginary. As such b is the imaginary component of the complex number. With this definition, the square root of -1 is (0, 1) and this is denoted by the symbol i (some texts use the term j, in particular the literature in physics and electrical engineering heavily use j, instead of i). As such, complex number has the form

a + bi, where a denotes the real term, and b is the imaginary term in the complex number. Two complex numbers are equal if and only if both their real parts and imaginary parts are equal. We denote the space of complex numbers as C. One could think of a complex number as a vector in a two dimensional space; with the x-axis denoting the real component, and the imaginary term living on the y-axis. Observe that with b = 0, we recover the real numbers R. We define the conjugate of a complex number a + bi, is a bi. The absolute value of a complex number − is the Euclidean norm of the vector which represents the complex number, that is

a + bi = a2 + b2, | | p where . denotes the Euclidean norm of a vector. | | Complex numbers adopt the algebraic operations of addition, subtraction, multiplication, and division operations that generalize those of real numbers. These operations are conveniently carried out when the complex number is represented in terms of exponentials.

45 A.2 Euler’s Formula and Exponential Representation

The representation for ex in powers of x around 0 is given by

x2 xk ex =1+ x + + + + ... 2! ··· k! For any complex number z, we define ez by the power series:

z2 zk ez =1+ z + + + + ... 2! ··· k! In particular, if we assume the above holds for complex numbers as well, it follows that:

(iθ)2 (iθ)k eiθ = 1+ iθ + + + + ... 2! ··· k! θ2 θ3 θ4 (iθ)k = 1+ iθ i + + + ... (A.1) − 2! − 3! 4! ··· k! Let us recall the for cos(θ) and sin(θ) around 0:

θ2 θ4 θ6 θ2n cos(θ) = 1 + + + ( 1)n + ... − 2 4! − 6! ··· − (2n)!

θ3 θ5 θ7 θ2n+1 sin(θ)= θ + + + ( 1)n + ... − 3 5! − 7! ··· − (2n + 1)!

The above hold for all θ R. This can be verified by the fact that series converges and the error in ∈ the approximation converges to 0. Thus, eiθ satisfies: eiθ = cos(θ)+ i sin(θ) The above is known as Euler’s formula and is one of the fundamental relationships in applied mathe- matics. Also, note that via the equations above, it follows that

eiθ + e−iθ cos(θ)= , 2 and eiθ e−iθ sin(θ)= − 2i Now, we could represent complex numbers in terms of exponentials. For example

eiπ/2 = i

eiπ = 1 − ei3π/2 = i − ei2π = 1 Via an extension of this discussion, we can represent an arbitrary complex number z = a + ib as

reiφ with r = z = a2 + b2 | | and φ is such that p tan(φ) = (b/a), since a = √a2 + b2 cos(φ) and b = √a2 + b2 sin(φ) Such an exponential representation of a complex number also lets us take roots of complex numbers: For example let us compute:

( 1)1/4 − This might arise for example, when one tries to solve the homogenous differential equation

y(4) + y = 0 (A.2)

In this case, one needs to solve the polynomial

L(m)= m4 +1=0.

Since this is a fourth order equation, there needs to be four roots. We could compute the roots by expressing 1 as an exponential. Observe that − eiφ = ei(φ+2π).

Hence, we could have four different representations for 1 as follows: − 1= eiπ = ei3π = ei5π = ei7π − Hence, iπ/4 m1 = e i3π/4 m2 = e i5π/4 m3 = e i7π/4 m4 = e

All of which satisfy: m4 = 1, for i = 1, 2, 3, 4. Hence, after a few steps involving sines and cosines, i − the general solution to the homogenous equation

y(4) + y = 0, can be found to be: 1 1 1 1 iπ x −iπ x i3π x −i3π x y(x)= k1e 4 + k2e 4 + k3e 4 + k3e 4 , or 1 1 1 1 y(x)= c cos(π x)+ c sin(π x)+ c cos(3π x)+ c sin(3π x). 1 4 2 4 3 4 4 4

Appendix B

Similarity Transformation and the Jordan Canonical Form

B.1 Similarity Transformation

If A and B are two real square matrices related by

B = P −1AP, where P is a nonsingular matrix, then A and B are said to be similar. Since

det(λI B)= det(P −1(λI A)P )= det(P −1)det(λI A)det(P )= det(λI A), − − − − it follows that A and B have the same eigenvalues.

B.2 Diagonalization

If A is a real symmetric matric, and if we choose P to be a matrix whose columns are the orthonormal eigenvectors of A, then the matrix B = P −1AP is diagonal, which is also real, by an argument we proved in class. Hence, real symmetric matrices can be diagonalized by a similarity transformation. However, if the matrix A is not symmetric, then diagonalization might not be possible. For such systems, a structure, which is close to a diagonal form, known as the Jordan canonical form, can be obtained:

B.3 Jordan Form

If A is a real matrix, then there exists a non-singular matrix P such that, B = P −1AP , and B has the following form: B1 0 ... 0 0 ... 0 0 B2 ... 0 0 ... 0  ......  ......   B =  0 0 ... B 0 ... 0   k   0 0 ... 0 B ... 0   k+1   ......   ......     0000 0 ... B   m   49 where B , 1 i m have the form: i ≤ ≤

λi 1 0 ... 0 0 λi 1 ... 0 Bi =  . . . . .  ......    0 0 0 ... λ   i   One could also have a Jordan canonical matrix with only Real-valued entries (but we will not consider this). In class we defined the notions of algebraic multiplicity and geometric multiplicity of an eigenvalue. Recall that the algebraic multiplicity of an eigenvalue λi is equal to the number of times λi appears as a root to det(A λI)=0. − The geometric multiplicity is the size of (A λI) (the null space of A λI). This is equal to the N − − number of linearly independent eigenvectors that can be obtained as a result of the equation: Ax = λix. If the matrix A has at least one eigenvalue with its algebraic multiplicity greater than its geometric multiplicity, then diagonalization is not possible (Hence, it follows that, having a repeated eigenvalue does not automatically mean that diagonalization is not possible). A convenient way to generate a Jordan canonical form is through the use of eigenvectors and generalized eigenvectors: That is, the columns of the matrix P may consist of the eigenvectors and the generalized eigenvectors. Clearly, any n n with distinct eigenvalues (with n different eigenvalues) can be trans- × formed into a diagonal matrix, as there will be n Jordan blocks which form the diagonal matrix.