Chapter 3: Modeling with First-Order Differential Equations - - PowerPoint PPT Presentation

chapter 3 modeling with first order differential equations
SMART_READER_LITE
LIVE PREVIEW

Chapter 3: Modeling with First-Order Differential Equations - - PowerPoint PPT Presentation

Overview Linear Models Nonlinear Models Summary Chapter 3: Modeling with First-Order Differential Equations Department of Electrical Engineering National Taiwan University ihwang@ntu.edu.tw September 26, 2013 DE Lecture 3


slide-1
SLIDE 1

Overview Linear Models Nonlinear Models Summary

Chapter 3: Modeling with First-Order Differential Equations

王奕翔

Department of Electrical Engineering National Taiwan University ihwang@ntu.edu.tw

September 26, 2013

王奕翔 DE Lecture 3

slide-2
SLIDE 2

Overview Linear Models Nonlinear Models Summary

1 Overview 2 Linear Models

Growth and Decay Cooling and Warming Mixtures Series Circuit

3 Nonlinear Models

Population Dynamics and Logistic Equation Chemical Reactions

4 Summary

王奕翔 DE Lecture 3

slide-3
SLIDE 3

Overview Linear Models Nonlinear Models Summary

1 Overview 2 Linear Models

Growth and Decay Cooling and Warming Mixtures Series Circuit

3 Nonlinear Models

Population Dynamics and Logistic Equation Chemical Reactions

4 Summary

王奕翔 DE Lecture 3

slide-4
SLIDE 4

Overview Linear Models Nonlinear Models Summary

Organization of Lectures in Chapter 2 and 3

  • (2-1)
  • (2-6)

Separable DE (2-2) DE (2-3) Exact DE (2-4)

  • (2-5)

Linear Models (3-1) Nonlinear Models (3-2)

王奕翔 DE Lecture 3

slide-5
SLIDE 5

Overview Linear Models Nonlinear Models Summary

What is covered in this lecture

We will learn how to model a system by first-order differential equations, solve them by the methods that we have learned, and answer the questions in which we are interested. 解應用題基本步驟:

1 寫下描述系統變化的微分方程式:定義自變數和應變數 2 用學過的方法來解寫下的微分方程式:得到描述系統特性的函數 3 解決一開始待解的問題

王奕翔 DE Lecture 3

slide-6
SLIDE 6

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

1 Overview 2 Linear Models

Growth and Decay Cooling and Warming Mixtures Series Circuit

3 Nonlinear Models

Population Dynamics and Logistic Equation Chemical Reactions

4 Summary

王奕翔 DE Lecture 3

slide-7
SLIDE 7

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Population Growth

Thomas Malthus 人口論 (1798): 人口增加速率正比於人口總數。 1 couple: 1 child per 10 months. 10 couples: 10 children per 10 months. This model can also be extended to other kinds of population, for example, bacteria. Example (培養皿中的細菌數) Initially (t = 0) there are P0 number of bacteria. At time t = 1 hour, there are 2P0 number of bacteria. If the rate of growth is proportional to the total population, find the total population at time t, that is, P(t), and the time at which there are 4P0 number of bacteria.

王奕翔 DE Lecture 3

slide-8
SLIDE 8

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Population Growth

A: First we write down the DE and initial conditions relating P(t) and t: dP dt = kP, P(0) = P0, k > 0 which can be solved as follows. dP P = k dt, P ̸= 0 = ⇒ ln |P| = kt + c 兩邊積分 = ⇒ ln P0 = c 代初始值 = ⇒ P(t) = P0ekt, t ≥ 0. To determine k, we plug in the other condition: P(1) = 2P0 = P0ek = ⇒ k = ln 2 = ⇒ P(t) = P02t. Finally, the time it takes for the population to reach 4P0 is: log2 4 = 2 hours.

王奕翔 DE Lecture 3

slide-9
SLIDE 9

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Radioactive Decay

For radioactive substances, the decay rate is proportional to the concurrent total amount A(t). dA dt = kA, A(0) = A0, k < 0. Half-life: the time it takes for 1/2 of the atoms in a initial amount to

  • degenerate. Example: the half-life of C-14 is 5730 years.

Example (碳14定年) A piece of fossil is found to contain 0.1% of the original amount of C-14. Estimate the age of the fossil given the half-life of C-14 is 5730 years.

王奕翔 DE Lecture 3

slide-10
SLIDE 10

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Radioactive Decay

A: We already know the function A(t): A(t)/A0 = ekt, A(0) = A0. Half-life = 5730 = ⇒ 0.5 = exp(5730k) = ⇒ k = − ln 2

5730.

Now, 0.001 = ekt = ⇒ t = − ln 1000

k

= 5730 × 3 × log2 10 ≈ 57104.

王奕翔 DE Lecture 3

slide-11
SLIDE 11

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Growth and Decay

If the growth/decay rate is proportional to the current total amount/population, we have dX dt = kX, X(0) = X0 With experience, we know immediately that X X0 = ekt. To find k, we need to plug in another condition.

王奕翔 DE Lecture 3

slide-12
SLIDE 12

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

1 Overview 2 Linear Models

Growth and Decay Cooling and Warming Mixtures Series Circuit

3 Nonlinear Models

Population Dynamics and Logistic Equation Chemical Reactions

4 Summary

王奕翔 DE Lecture 3

slide-13
SLIDE 13

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Cooling

  • I. Newton: 升(降)溫的速率與物體和周遭環境的溫差成正比

Example (Cooling of Hot Water) The initial temperature of a bottle of water is 100◦. At t = 10 minutes, it becomes 40◦. At t = 20 minutes, it becomes 28◦. What is the room temperature? A: According to Newton, we have dT dt = k(T − Tm), T(0) = 100, k < 0. We can solve it by first finding an integrating factor (exercise). Instead, here is a shortcut.

王奕翔 DE Lecture 3

slide-14
SLIDE 14

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Cooling

Observe that d(T−Tm)

dt

= k(T − Tm), T(0) − Tm = 100 − Tm. Hence, we immediately have T − Tm 100 − Tm = ekt. Plug in the two conditions 40 − Tm 100 − Tm = e10k, 28 − Tm 100 − Tm = e20k = ⇒ ( 40 − Tm 100 − Tm )2 = 28 − Tm 100 − Tm = ⇒ Tm = 25.

王奕翔 DE Lecture 3

slide-15
SLIDE 15

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

1 Overview 2 Linear Models

Growth and Decay Cooling and Warming Mixtures Series Circuit

3 Nonlinear Models

Population Dynamics and Logistic Equation Chemical Reactions

4 Summary

王奕翔 DE Lecture 3

slide-16
SLIDE 16

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Mixture of Two Fluids

input rate of brine 3 gal/min

  • utput rate of brine

3 gal/min constant 300 gal

Example (Mixture of Salt Solutions) In the figure, the concentration of salt of the incoming flow is 2 lb/gal. Initially there is 50 lb of salt in the tank. Find the concentration of salt in the tank as time t → ∞. A: Immediately we see that the final answer is 2 lb/gal. (Why?) We should do the calculation if we also want to know how the concentration changes with time. Let the total amount of salt at time t be A(t) lb. Incoming rate of salt: Rin = 2 × 3 = 6 lb/min; Outgoing: Rout = (current concentration) × 3 =

A 300 × 3 = A 100.

∴ dA dt = 6 − A 100, A(0) = 50.

王奕翔 DE Lecture 3

slide-17
SLIDE 17

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Mixture of Two Fluids

Solve dA dt = 6 − A 100, A(0) = 50.

1 Derive Auxiliary DE: Let µ(t) := the integrating factor to be found.

d (µA) dt = µdA dt + Adµ dt = µ { 6 − A 100 } + Adµ dt = 6µ + {dµ dt − µ 100 } A

2 Solve Auxiliary DE: dµ

dt = µ

  • 100. One solution: µ(t) = e

t 100 .

3 Solve Original DE: Plug in µ(t) = e

t 100 and A(0) = 50:

e

t 100 A = 600e t 100 − 550 =

⇒ A(t) = 600 − 550e

−t 100 王奕翔 DE Lecture 3

slide-18
SLIDE 18

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

1 Overview 2 Linear Models

Growth and Decay Cooling and Warming Mixtures Series Circuit

3 Nonlinear Models

Population Dynamics and Logistic Equation Chemical Reactions

4 Summary

王奕翔 DE Lecture 3

slide-19
SLIDE 19

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

LRC Series Circuits

E(t) L C R L Inductor inductance L: henries (h) voltage drop across: L di dt i R Resistor resistance R: ohms (Ω) voltage drop across: iR i Capacitor capacitance C: farads (f) voltage drop across: 1 C i q C Current is the derivative

  • f charge:

i = dq dt E(t) = total voltage drop: E(t) = L d2q dt2 + Rdq dt + q C

王奕翔 DE Lecture 3

slide-20
SLIDE 20

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Example: LR Series Circuit

Example

E L R

Consider the LR circuit shown on the left, where E(t) = 10 volts, R = 10 ohms, L = 0.5 henry, and initial current i(0) = 0. Find i(t). A: Current i(t) satisfies the following DE: Ldi dt + Ri = E(t) = ⇒ 1 2 di dt + 10i = 10 = ⇒ di dt + 20i = 20

王奕翔 DE Lecture 3

slide-21
SLIDE 21

Overview Linear Models Nonlinear Models Summary Growth and Decay Cooling and Warming Mixtures Series Circuit

Example: LR Series Circuit

Solve di dt + 20i = 20, i(0) = 0.

1 Derive Auxiliary DE: Let µ(t) := the integrating factor to be found.

d (µi) dt = µdi dt + idµ dt = 20µ {1 − i} + idµ dt = 20µ + {dµ dt − 20µ } i

2 Solve Auxiliary DE: dµ

dt = 20µ. One solution: µ(t) = e20t.

3 Solve Original DE: Plug in µ(t) = e20t and i(0) = 0:

e20ti − 0 = ∫ t 20e20τdτ = ⇒ e20ti(t) = e20t − 1 = ⇒ i(t) = 1 − e−20t

王奕翔 DE Lecture 3

slide-22
SLIDE 22

Overview Linear Models Nonlinear Models Summary Population Dynamics and Logistic Equation Chemical Reactions

1 Overview 2 Linear Models

Growth and Decay Cooling and Warming Mixtures Series Circuit

3 Nonlinear Models

Population Dynamics and Logistic Equation Chemical Reactions

4 Summary

王奕翔 DE Lecture 3

slide-23
SLIDE 23

Overview Linear Models Nonlinear Models Summary Population Dynamics and Logistic Equation Chemical Reactions

Reality is not likely to be linear, usually

Thomas Malthus 人口論 (1798): 人口增加速率正比於人口總數。 dP dt = kP Points that are missing: Limited resources: population ↑, competition ↑ (nonlinearity kicks in!) Emigration and immigration Death, etc.

王奕翔 DE Lecture 3

slide-24
SLIDE 24

Overview Linear Models Nonlinear Models Summary Population Dynamics and Logistic Equation Chemical Reactions

1 Overview 2 Linear Models

Growth and Decay Cooling and Warming Mixtures Series Circuit

3 Nonlinear Models

Population Dynamics and Logistic Equation Chemical Reactions

4 Summary

王奕翔 DE Lecture 3

slide-25
SLIDE 25

Overview Linear Models Nonlinear Models Summary Population Dynamics and Logistic Equation Chemical Reactions

Population Dynamics

Limited resources: population ↑, competition ↑. = ⇒ the constant k may vary with P ! Hence, in general the population dynamics should be governed by dP dt = Pf(P).

王奕翔 DE Lecture 3

slide-26
SLIDE 26

Overview Linear Models Nonlinear Models Summary Population Dynamics and Logistic Equation Chemical Reactions

Logsitic Equation

dP dt = Pf(P). Intuitively, the function f(P) should be a decreasing function of P. Simplest case: f(P) = a − bP, for a, b > 0. Definition (Logistic Equation) dP dt = P(a − bP)

王奕翔 DE Lecture 3

slide-27
SLIDE 27

Overview Linear Models Nonlinear Models Summary Population Dynamics and Logistic Equation Chemical Reactions

Solving Logistic Equation

Solve dP dt = P(a − bP). A: We can solve this by separation of variables. 1 P(a − bP)dP = dt, P ̸= 0, a b = ⇒ {1/a P + b/a a − bP } dP = dt = ⇒ 1 a ln |P| − 1 a ln |a − bP| = t + c′ = ⇒ P a − bP = ceat, why we pick 0 < P < a/b? = ⇒ P(t) = aceat 1 + bceat = ac e−at + bc Note: if P(0) = a

b, P(t) = a b for all t.

王奕翔 DE Lecture 3

slide-28
SLIDE 28

Overview Linear Models Nonlinear Models Summary Population Dynamics and Logistic Equation Chemical Reactions

Solution Curves of Logistic Equations

The solution is called Logistic Function: P(t) =

ac e−at+bc

Properties of Logistic Function P(t): increasing function. Population saturation:

a b.

P(t) → a

b as t → ∞; P(t) → 0 as t → −∞.

Saddle point: P =

a 2b P P0 a/2b a/b t P P0 a/2b a/b t

王奕翔 DE Lecture 3

slide-29
SLIDE 29

Overview Linear Models Nonlinear Models Summary Population Dynamics and Logistic Equation Chemical Reactions

Variants of Logistic Equations

dP dt = P(a − bP) ± h immigration or emigration dP dt = P(a − bP) + cekP 西瓜偎大邊 dP dt = P(a − b ln P) Gompertz DE Exercise Derive the population saturation point in each of the above models.

王奕翔 DE Lecture 3

slide-30
SLIDE 30

Overview Linear Models Nonlinear Models Summary Population Dynamics and Logistic Equation Chemical Reactions

1 Overview 2 Linear Models

Growth and Decay Cooling and Warming Mixtures Series Circuit

3 Nonlinear Models

Population Dynamics and Logistic Equation Chemical Reactions

4 Summary

王奕翔 DE Lecture 3

slide-31
SLIDE 31

Overview Linear Models Nonlinear Models Summary Population Dynamics and Logistic Equation Chemical Reactions

Chemical Reactions

Chemical A and B react and produce C. 大一普化:反應速率正比於反應物濃度的乘積 Initial concentration: [A] = a, [B] = b. X(t): concentration of C at time t. To produce one unit of C we need λa unit of A and λb unit of B. Then, we have the following DE governing the rate of reaction: dX dt = k(a − λaX)(b − λbX). How to solve? Separation of variables!

王奕翔 DE Lecture 3

slide-32
SLIDE 32

Overview Linear Models Nonlinear Models Summary

1 Overview 2 Linear Models

Growth and Decay Cooling and Warming Mixtures Series Circuit

3 Nonlinear Models

Population Dynamics and Logistic Equation Chemical Reactions

4 Summary

王奕翔 DE Lecture 3

slide-33
SLIDE 33

Overview Linear Models Nonlinear Models Summary

Short Recap

Growth and decay Series circuit Population dynamics Logistic equation Chemical reaction

王奕翔 DE Lecture 3

slide-34
SLIDE 34

Overview Linear Models Nonlinear Models Summary

Self-Practice Exercises

3-1: 3, 19, 27, 33, 35, 39, 43, 45 3-2: 5, 7, 9, 11, 15, 19, 21

王奕翔 DE Lecture 3