Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear...

31
Linear Algebra and Differential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer Science Chulalongkorn University Lecture 1 S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 1 / 31

Transcript of Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear...

Page 1: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Linear Algebra and Differential Equations

Sujin Khomrutai, Ph.D.

Department of Math & Computer ScienceChulalongkorn University

Lecture 1

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 1 / 31

Page 2: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Table of Contents

1 Introduction

2 Some Aspects

3 First Order ODEs: A Review

4 Second Order Linear Equations

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 2 / 31

Page 3: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

What are DEs?

Definition

A differential equation (or DE) is an equation involving a function andsome of its derivatives.

EX.

1 y ′ = 2xy is a DE. (variable x , a function y(x).)

2 x2 + u2 = 4 is not a DE. No derivative!

3 t2 + (y ′′)2 = 4 is a DE. (variable t, a function y(t).)

4 ux + 5uy = 1 is a DE. (variables x , y , a function u(x , y).)

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 3 / 31

Page 4: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

What are DEs?

Definition

A system of DEs is a group of equations involving two or more functionsand some of their derivatives.

EX.

1

{u′ = 2u + v

v ′ = −u + 4v .⇒ a system of DEs. (functions u, v)

2

{x + 2y = 2

−x + y = 0.⇒ not a system of DEs. No derivatives!

3

u = 3u − v

v ′ = u + w

w ′ = −1

⇒ a system of DES. (functions u, v ,w)

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 4 / 31

Page 5: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

ODEs vs. PDEs

Definition

In a DE,

1 only one variable ⇒ ordinary differential equation (or ODE).

2 two or more variables ⇒ partial differential equations (or PDE).

System of ODEs = 1 variable, at least 2 functionsSystem of PDEs = at least 2 variables, at least 2 functions.

EX.

1 y ′ = 2xy is an ODE.

2 uxx + uyy = 1 is a PDE.

3

{u′ = 2u + v

v ′ = −u + 4vis a system of ODEs.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 5 / 31

Page 6: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Goal & Some Prep.

Goal. We study DEs and sytems of DEs.

Variable. t = time, or x = a space variable.

Functions. y (ODE), vectors ~x = (x1, . . . , xn) (Systems of ODES)

Derivatives.

y ′ =dy

dt, y ′′ =

d2y

dt2, . . . , y (n) =

dny

dtn, . . .

and~x ′ = (x ′1, x

′2, . . . , x

′n), ~x ′′ = (x ′′1 , x

′′2 , . . . , x

′′n ), . . .

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 6 / 31

Page 7: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Some Aspects

Definition (Order)

For a DE or system of DEs, the highest order of derivative appeared iscalled the order.

EX.

1 y ′′ + 2y ′ = t3 ⇒ order = 2. (ODE)

2 y (4) − y ′′ + (y ′)5 = 0 ⇒ order = 4. (ODE)

3

{x ′1 = 2x1 − x2

x ′2 = −x1 + x2

⇒ order = 1. (system of ODEs)

4 ut + u(uxxt)5 = 0 ⇒ order = 3. (PDE)

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 7 / 31

Page 8: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Some Aspects

Definition (Solutions)

A solution to a DE is a function that the equation becomes true when wesubstitute the function and its derivatives into the equation.

EX.

1 y ′ = 2t ⇒ y(t) = t2.

2 y ′ = 2y ⇒ y(t) = e2t .

3 y ′ + 3y = 6 ⇒ y(t) = e−3t + 2.

4 y ′′ − 3y ′ + 2y = 0 ⇒ y(t) = C1et + C2e

2t .

5 y (4) = 1 ⇒ y(t) = t4

24 .

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 8 / 31

Page 9: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Some Aspects

Definition (Particular & General solutions)

A solution to a DE that contains no arbitrary constants is called aparticular solution.

A solution to a DE that contains some arbitrary constants and representsall possible particular solution is called a general solution.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 9 / 31

Page 10: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Some Aspects

EX. Consider the ODE y ′ = 2t.

y1(t) = t2 and y2(t) = t2 + 3 are solutions. They are particular solutions.

To find a general solution, we need integration

y ′ = 2t ⇒∫

y ′dt =

∫2tdt

which givesy(t)− y(0) = t2 ⇒ y(t) = t2 + C .

where C = y(0) is an arbitrary constant.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 10 / 31

Page 11: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Some Aspects

Definition (Linear vs Nonlinear)

An ODE is called a linear ODE if it can be expressed as

any(n) + · · ·+ a2y

′′ + a1y′ + a0y = f (t).

Otherwise, it is called nonlinear ODE.

EX.

1 y ′′ + 2ty ′ − 3y = et ⇒ linear.

2 ty (4) = 3y ′′ + sin t ⇒ linear.

3 y ′ + y2 = 0 ⇒ nonlinear.

4 y ′′′ + y ′′ + 2y ′ + 4y = x2 ⇒ linear. (Observe: variable is x .)

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 11 / 31

Page 12: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Some Aspects

Definition (Initial Value Problems)

An initial value problem (or IVP) is a problem that has a DE togetherwith some conditions for the solutions at some t0 (or some x0).

Solving IVP ⇒ Particular solution.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 12 / 31

Page 13: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Some Aspects

EX. Solve the initial value problem

y ′ = 3t + 2, y(0) = 0.

Sol. We integrate

y ′ = 3t + 2 ⇒∫

y ′dt =

∫(3t + 2)dt

then

y(t)− y(0) =3t2

2+ 2t

Using y(0) = 0, we obtain

y(t) =3t2

2+ 2t.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 13 / 31

Page 14: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

First Order ODE

Definition

A first order ODE is an equation of the form

F (t, y , y ′) = 0.

If it can be put into the form

y ′ = f (t)g(y)

it is called separable.

If it can be put into the form

y ′ + p(t)y = q(t)

it is a linear equation.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 14 / 31

Page 15: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Seprable Equations

How to solve separable eqns.?

To solve a separable equation, we write

dy

dt= f (t)g(y) ⇒ 1

g(y)dy = f (t)dt.

Then integrate ∫1

g(t)dy =

∫f (t)dt.

Solution can be implicitly defined.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 15 / 31

Page 16: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Separable Equations

EX. Solve the ODEdy

dt=

t

y.

Sol. We writeydy = tdt.

Integrate ∫ydy =

∫tdt ⇒ y(t)2

2− y(0)2

2=

t2

2.

Setting C = y(0)2, we get

y(t)2 = t2 + C .

This is a general solution.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 16 / 31

Page 17: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Separable Equations

EX. Sole the ODEdy

dx=

3x2

y − sin y.

Sol. We express

dy

dx=

3x2

y − sin y⇒ (y − sin y)dy = 3x2dx .

Then integrate∫(y − sin y)dy =

∫3x2dx ⇒ y2

2+ cos y = x3 + C .

The solution is implicit!

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 17 / 31

Page 18: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Separable Equations

EX. Sole the ODEy ′ = xy .

Sol. We write

y ′ = xy ⇒ 1

ydy = xdx .

Integrate ∫1

ydy =

∫xdx ⇒ ln y(t) =

x2

2+ C .

So

y(t) = ex2

2+C = De

x2

2 .

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 18 / 31

Page 19: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

First Order Linear ODE

Definition

For a linear equationy ′ + p(t)y = q(t),

the integrating factor is the function

I (t) = e∫p(t)dt .

Multiplying the ODE with I (t) and integrating, then

y(t) =1

I (t)

(∫I (t)q(t)dt + C

).

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 19 / 31

Page 20: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

First Order Linear ODEs

EX. Solve the ODEy ′ + 3t2y = 6t2.

Sol. This is a linear equation: p(t) = 3t2 and q(t) = 6t2.

The integrating factor

I (t) = exp

∫3t2dt = et

3.

Plug into the formula

y(t) =1

et3

(∫et

36t2dt + C

)∴ y(t) = e−t

3(

2et3

+ C)

= 2 + Ce−t3.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 20 / 31

Page 21: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

First Order Linear ODEs

EX. Solve the IVP (initial value problem)

x2y ′ + xy = 1 (x > 0), y(1) = 2.

Sol. Variable is x! Divide by x2 to bring coefficient of y ′ to 1:

y ′ +1

xy =

1

x2.

This is a linear equation: p(x) = 1/x and q(x) = 1/x2.

Integrating factor

I (x) = exp

∫1

xdx = e ln x = x .

Plug into the formula

y(x) =1

x

(∫x · 1

x2dx + C

)=

ln x + C

x.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 21 / 31

Page 22: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Second order ODEs

Definition

A second order ODE is an equation of the form

F (t, y , y ′, y ′′) = 0.

If the ODE can be put into the form

a(t)y ′′ + b(t)y ′ + c(t)y = f (t)

ory ′′ + p(t)y ′ + q(t)y = r(t)

it is called a second order linear ODE.

If a, b, c are constants, the ODE is called constant coefficients.

If f (t) = 0 or r(r) = 0, the ODE is called homogeneous.

Otherwise, it is nonhomogeneous.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 22 / 31

Page 23: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Second order ODEs

EX. Consider the ODE

3y ′′ + 2y ′ + 4y = t2 + 1.

This is a second order ODE.

It is linear, constant coefficients, and nonhomogeneous.

EX. Consider the ODE

5y ′′ + (tan t)y ′ + y2 = 0.

This is a second order ODE.

It is nonlinear because of the term y2.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 23 / 31

Page 24: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Second Order ODEs

EX. Consider the ODE

ty ′′ + (t + 1)y ′ + t2y = 0.

This is a second order ODE

a(t) = t, b(t) = t + 1, c(t) = t2, f (t) = 0.

It is linear, non-constant coefficients, and homogeneous.

We can divide by t to get another form

y ′′ +t + 1

ty ′ + ty = 0.

So p(t) = (t + 1)/t and q(t) = t.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 24 / 31

Page 25: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Initial Value Problems

Definition

If a second order ODE is supplied with two conditions of the form

y(t0) = k , y ′(t0) = l

it is called an initial value problem (or IVP).

Thus an IVP for a second order linear ODE is

(IVP)

{y ′′ + p(t)y ′ + q(t)y = f (t)

y(t0) = k , y ′(t0) = l .

Usually but not always, we choose t0 = 0.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 25 / 31

Page 26: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Existence and Uniqueness

Theorem

Consider an IVP of a second order linear ODE

(IVP)

{y ′′ + p(t)y ′ + q(t)y = f (t)

y(t0) = k , y ′(t0) = l .

If p(t), q(t), r(t) are continuous functions on an interval I , then the IVPhas a solution and it is unique.

The solution depends on the initial conditions k , l .

• The theorem can be applied to determine the longest interval I so thatthe problem has a unique solution.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 26 / 31

Page 27: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Existence and Uniqueness

EX. Find the longest interval I so that the IVP

(IVP)

{(t − 1)y ′′ + ty ′ + (t + 1)y = 0

y(2) = 2, y ′(2) = 3.

has a unique solution.

Sol. The conclusion does not involve the initial conditions!

Divide by (t − 1) so the coefficient of y ′′ becomes 1

y ′′ +t

t − 1y ′ +

t + 1

t − 1y = 0.

The functions p(t) = t/(t − 1), q(t) = (t + 1)/(t − 1), and r(t) = 0 arecontinuous on (−∞, 1) ∪ (1,∞).

The interval containing the initial time t0 = 2 is (1,∞) so the longestinterval is I = (1,∞).

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 27 / 31

Page 28: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Existence and Uniqueness

EX. Find the solution to the IVP

(IVP)

{y ′′ + p(t)y ′ + q(t)y = 0

y(t0) = 0, y ′(t0) = 0.

where p(t), q(t) are continuous functions.

Sol. By the theorem there is a unique solution.

Note that if we substitute y(t) = 0, it works

0′′ + p(t)0′ + q(t)0 = 0, 0(t0) = 0, 0′(t0) = 0.

So we get the solution to the IVP to be y(t) = 0.

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 28 / 31

Page 29: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Principle of Superposition

Theorem

If y1, y2 are solutions of a homogeneous ODE

y ′′ + p(t)y ′ + q(t)y = 0,

then C1y1 + C2y2 is also a solution.

Note. It is not true for nonhomogeneous equation

y ′′ + p(t)y ′ + q(t)y = r(t).

In order that C1y1 + C2y2 is a general solution y1, y2 have to be extra!

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 29 / 31

Page 30: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Wronskian

EX. Consider the ODE

y ′′ + 3y ′ + 2y = 0.

It can be shown that

y1(t) = e−t , y2(t) = e−2t

are solutions. Using the superposition principle, we form a solution formula

y(t) = C1e−t + C2e

−2t .

Whether this is a general solution depends on whether it can satisfy theinitial conditions

y(t0) = k , y ′(t0) = l ,

for any k , l .

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 30 / 31

Page 31: Linear Algebra and Differential Equationspioneer.netserv.chula.ac.th/~ksujin/Slide(216)1.pdfLinear Algebra and Di erential Equations Sujin Khomrutai, Ph.D. Department of Math & Computer

Wronskian

Plug the formula y(t) into the conditions{C1y1(t0) + C2y2(t0) = k ,

C1y′1(t0) + C2y

′2(t0) = l .

This system can be solved for any k, l if and only if

det

(y1(t0) y2(t0)y ′1(t0) y ′2(t0)

)6= 0.

Definition

For any two functions f , g , the Wronskian of f , g is the function

W (f , g) = det

[f (t) g(t)f ′(t) g ′(t)

].

S. Khomrutai (CU) Lin & Diff Eqns. Lecture 1 31 / 31