Tải bản đầy đủ - 0 (trang)
Chapter 7. Applications of Systems of Ordinary Differential Equations

Chapter 7. Applications of Systems of Ordinary Differential Equations

Tải bản đầy đủ - 0trang

568



Chapter 7 Applications of Systems of Ordinary Differential Equations



C



capacitance,



V



voltage, and



L



inductance.



The relationships corresponding to the drops in voltage in the various components

of the circuit that were stated in Chapter 5 are also given in the following table.

Circuit Element

Inductor

Resistor

Capacitor

Voltage Source



Voltage Drop

dI

L

dt

RI

1

Q

C

V t



7.1.2 L–R–C Circuit with One Loop

In determining the drops in voltage around the circuit, we consistently add the

voltages in the clockwise direction. The positive direction is directed from the negative symbol towards the positive symbol associated with the voltage source. In

summing the voltage drops encountered in the circuit, a drop across a component

is added to the sum if the positive direction through the component agrees with

the clockwise direction. Otherwise, this drop is subtracted. In the case of the following L–R–C circuit with one loop involving each type of component, the current

is equal around the circuit by Kirchhoff’s Current Law as illustrated in Figure 7-1.

Also, by Kirchhoff’s Voltage Law, we have the sum

RI



L



dI

dt



1

Q

C



V t



0.



Figure 7-1 A simple L–R–C circuit



7.1 Mechanical and Electrical Problems with First-Order Linear Systems



569



Solving this equation for dI/ dt and using the relationship between I and Q, dQ/ dt

I, we have the following system of differential equations with initial conditions on

charge and current, respectively:

dQ/ dt

dI/ dt

Q0



I

R

I

L

I0 .



1

Q

LC

Q0 , I 0



V t

L



(7.1)



EXAMPLE 7.1.1: Determine the charge and current in an L–R–C circuit

Q0 and I 0

I0 .

with L 1, R 2, C 4/ 3, and V t

e t if Q 0



SOLUTION: We begin by modeling the circuit with the system of

differential equations

dQ/ dt



I

3

4Q



dI/ dt



2I



e



t



which can be written in matrix form as

dQ/ dt

dI/ dt



0 1

3/ 4 2



Q

I



0

.

e t



We solve the initial-value problem with DSolve, naming the result

sol.



In[1438]:= Clear q, i

sol



Out[1438]=



DSolve D q t , t

i t ,

D i t ,t

3/4q t

2i t

Exp t ,

q 0

q0, i 0

i0 , q t , i t , t



q t



1

2

2



3 t/ 2

t



1

4



i t

2



i0



4

q0



3 t/ 2

t



i0



t/ 2



8



3



12



3 q0



t



4



2 i0



q0 ,



16

3



t



t



t/ 2



q0



4



t



6 i0



570



Chapter 7 Applications of Systems of Ordinary Differential Equations



We now select, copy, and paste the formulas obtained in sol for Q

and I, respectively, and then use Expand to distribute the e 3t/ 2 term

through the parentheses.

In[1439]:= Expand

t



2e



3 t/ 2



Out[1439]= 2



t/ 2



t



2e

3

1

2



t



4



3 t/ 2



1

e

4

4 i0



3 t/ 2

t/ 2



2



1

2



i0



In[1440]:= Expand



Out[1440]=



1 3 t/ 2

4 8 et/2 2

e

2

4 i0

q0 3 et 4 q0



4



i0



t/ 2



3

4



q0



16 et/2



3 4

t



i0



t/ 2



3

2



q0



3 t/ 2



3 t/ 2



q0

3

2



t/ 2

3 t/ 2



q0



6

3e



t



3 t/ 2



3

4



4



i0



4



i0



4



q0



i0



t/ 2



q0



The result indicates that limt Q t

limt I t

0 regardless of the

values of Q0 and I0 . This is confirmed by graphing Q t (in black) and

I t (in gray) together (choosing Q 0

I0

1) in Figure 7-2 as well as

parametrically in Figure 7-3.

In[1441]:= Plot Evaluate q t , i t /.sol/.

q0 1, i0 1 , t, 0, 10 ,

PlotStyle

GrayLevel 0 , GrayLevel 0.5



1.25

1

0.75

0.5

0.25

2



4



6



10



8



-0.25



Figure 7-2 Q t (in black) and I t (in gray) for 0



t



10



7.1 Mechanical and Electrical Problems with First-Order Linear Systems



0.4

0.2

0.2 0.4 0.6 0.8



1



1.2 1.4



-0.2



Figure 7-3 Parametric plot of Q versus I for 0



t



10



In[1442]:= ParametricPlot

Evaluate q t , i t /.sol/.

q0 1, i0 1 , t, 0, 10



7.1.3 L–R–C Circuit with Two Loops

The differential equations that model the circuit become more difficult to derive

as the number of loops in the circuit increases. For example, consider the circuit in

Figure 7-4 that contains two loops.



Figure 7-4



A two-loop circuit



571



572



Chapter 7 Applications of Systems of Ordinary Differential Equations



In this case, the current through the capacitor is equivalent to I1

the voltage drops around each loop, we have:



I2 . Summing



1

Q V t

0

R1 I1

C

dI2

1

L

R2 I2

Q 0.

dt

C



(7.2)



1

1

Q and using the

V t

R1

R1C

I2 we have the following system:



Solving the first equation for I1 we find that I1

relationship dQ/ dt



I



I1



1

1

Q I2

V t

R1C

R1

1

R2

Q

I2 .

LC

L



dQ

dt

dI2

dt



(7.3)



EXAMPLE 7.1.2: Find Q t , I t , I1 t , and I2 t in the L–R–C circuit with

R2

C

1 and V t

e t if Q 0

3 and

two loops given that R1

1.

I2 0



SOLUTION: The nonhomogeneous system that models this circuit is

dQ/ dt



Q



dI2 / dt



Q



I2



e



t



I2



with initial conditions Q 0

3 and I2 0

1. We solve the initial-value

problem with DSolve naming the result sol. We define Q t and I2 t

to be the results.

In[1443]:= Clear q, i

sol



Out[1443]=



DSolve D q t , t

q t

i2 t

D i2 t , t

q t

i2 t , q 0

i2 0

1 , q t , i2 t , t



q t

i2 t



In[1444]:= q t

In[1445]:= i2 t



t



3

t



sol

sol



Cos t ,

Cos t 2 3 Sin t



1, 1, 2

1, 2, 2



Sin t



Exp

3,



2



t ,



7.1 Mechanical and Electrical Problems with First-Order Linear Systems



573



We verify that these functions satisfy the system by substituting back

into each equation and simplifying the result with Simplify.

In[1446]:= D q t , t

Simplify

Out[1446]= 0



q t



i2 t



In[1447]:= D i2 t , t



q t



i2 t



Exp



t



//



//Simplify



Out[1447]= 0



We use the relationship dQ/ dt

In[1448]:= i t

Out[1448]=



and then I1 t



D q t ,t

t



3



I to find I t



Cos t



t



3



Sin t



I2 t to find I1 t .



It



In[1449]:= i1 t

t



Out[1449]=



i t

3



t



i2 t



Cos t



We graph Q t , I t , I1 t , and I2 t with Plot and display the result using

Show and GraphicsArray in Figure 7-5.



3

2.5

2

1.5

1

0.5

1



-0.5

-1

-1.5

-2



2



3



4



5



1 2 3 4 5



1 2 3 4 5



-0.5

-1

-1.5

-2

-2.5

-3

1.4

1.2

1

0.8

0.6

0.4

0.2



1

Figure 7-5 Q t , I t , I1 t , and I2 t for 0



2

t



5



3



4



5



574



Chapter 7 Applications of Systems of Ordinary Differential Equations



In[1450]:= p1



Plot q t , t, 0, 5 , PlotRange All,

DisplayFunction Identity

p2 Plot i t , t, 0, 5 , PlotRange All,

DisplayFunction Identity

p3 Plot i1 t , t, 0, 5 , PlotRange All,

DisplayFunction Identity

p4 Plot i2 t , t, 0, 5 , PlotRange All,

DisplayFunction Identity

Show GraphicsArray

p1, p2 , p3, p4



7.1.4 Spring–Mass Systems

The displacement of a mass attached to the end of a spring was modeled with a

second-order linear differential equation with constant coefficients in Chapter 5.

This situation can then be expressed as a system of first-order ordinary differential equations as well. Recall that if there is no external forcing function, then the

cx kx 0,

second-order differential equation that models this situation is mx

where m is the mass attached to the end of the spring, c is the damping coefficient,

and k is the spring constant found with Hooke’s law. This equation is transformed

c

k

x

x and then

y so that y

x

into a system of equations by letting x

m

m

solving the differential equation for x . After substitution, we have the system

dx

dt

dy

dt



y

k

x

m



(7.4)



c

y.

m



In previous chapters, the displacement of the spring was illustrated as a function

of time. However, problems of this type may also be investigated using the phase

plane.



EXAMPLE 7.1.3: Solve the system of differential equations to find the

displacement of the mass if m 1, c 0, and k 1.



SOLUTION: In this case, the system is



dx/ dt

dy/ dt



y

x



which in matrix



0 1

X. A general solution is found with DSolve and

10

named gensol for later use.

form is X



7.1 Mechanical and Electrical Problems with First-Order Linear Systems



In[1451]:= Clear x, y

gensol



Out[1451]=



x t

y t



DSolve D x t , t

D y t ,t

x t

C 1 Cos t

C 2 Cos t



y t ,

, x t ,y t



,t



C 2 Sin t ,

C 1 Sin t



Note that this system is equivalent to the second-order differential equax 0, which we solved in Chapters 4 and 5. At that time, we

tion x

found a general solution to be x t

c1 cos t c2 sin t which is equivalent

xt

to the first component of X

, the result obtained with DSolve.

yt

Also notice that 0, 0 is the equilibrium point of the system. The eigen0 1

values of A

are Λ

i,

10

0 1

1 0



In[1452]:= Eigenvalues

Out[1452]=



,



so we classify the origin as a center.

We graph several members of the phase plane for this system with

ParametricPlot in Figure 7-6.



4



2



-4



-2



2

-2



-4



Figure 7-6 The origin is a center



4



575



576



Chapter 7 Applications of Systems of Ordinary Differential Equations



In[1453]:= toplot



Flatten

Table x t , y t /.gensol/.

C 1

i, C 2

j , i, 3, 3 ,

j, 0, 3 , 2



In[1454]:= ParametricPlot Evaluate toplot ,

t, 0, 2 Π , PlotRange

5 , 5 , 5, 5

AspectRatio 1



,



7.2 Diffusion and Population Problems

with First-Order Linear Systems

7.2.1 Diffusion through a Membrane

Solving problems to determine the diffusion of a substance (such as glucose or salt)

in a medium (like a blood cell) also leads to systems of first-order linear ordinary

differential equations. For example, suppose that two solutions of a substance are

separated by a membrane where the amount of the substance that passes through

the membrane is proportional to the difference in the concentrations of the solutions. The constant of proportionality is called the permeability, P, of the membrane. Therefore, if we let x and y represent the concentration of each solution, and

V1 and V2 represent the volume of each solution, respectively, then the system of

differential equations is given by

dx

dt

dy

dt



P

y

V1

P

x

V2



x

(7.5)

y



where the initial concentrations of x and y are given.



EXAMPLE 7.2.1: Suppose that two salt concentrations of equal volume V are separated by a membrane of permeability P. Given that

P V , determine each concentration at time t if x 0

2 and y 0

10.



7.2 Diffusion and Population Problems with First-Order Linear Systems



SOLUTION: In this case, the initial-value problem that models the

situation is

dx/ dt y x

dy/ dt



x



x0



y



2, y 0



10 .



A general solution of the system is found with DSolve and named

gensol.

In[1455]:= Clear x, y

DSolve D x t , t

D y t ,t

x t

x t ,y t ,t

1 2t

2t

1

C 1

2



gensol



Out[1455]=



x t

1

2

1

2



2t



2t



1



2t



x t ,

,



C 2 ,y t



2t



1



y t

y t



1

2



C 1



2t



1



2t



C 2



We then apply the initial conditions and use Solve to determine the

values of the arbitrary constants.

In[1456]:= cvals

Out[1456]=



C 1



Solve



e



2t



C 2 /.t > 0



C 1



e 2t C 1

C 2 /.t > 0

4, C 2

6



2,



10



The solution is obtained by substituting these values back into the

general solution.

In[1457]:= sol

Out[1457]=



gensol/.cvals



x t

y t



2t



3

2



2t



1

2t



1

1



2t



2t



2

3



2t



2t



1

1



,



2t



Of course, DSolve can be used to solve the initial-value problem

directly as well.

In[1458]:= sol



Out[1458]=



DSolve D x t , t

y t

x t ,

D y t ,t

x t

y t ,x 0

2,

y 0

10 , x t , y t , t

x t

2 2t 2 3 2t ,y t

2 2t 2 3 2t



We graph this solution parametrically with ParametricPlot in

Figure 7-7(a). We then graph x t and y t together in Figure 7-7(b). Notice



577



578



Chapter 7 Applications of Systems of Ordinary Differential Equations



10

10

8

6

4

2



8

6

4

2



1

2



4



6



3



4



5



8 10



(a)

Figure 7-7



2

(b)



(a) Parametric plot of x versus y. (b) x t (in black) and y t (in gray)



that each concentration approaches 6 which is the average value of the

two initial concentrations.

In[1459]:= p1



ParametricPlot x t , y t /.sol,

t, 0, 5 , Compiled False,

PlotRange

0, 10 , 0, 10 ,

AspectRatio 1, AxesOrigin

0, 0 ,

DisplayFunction Identity



In[1460]:= p2



Plot Evaluate x t , y t /.sol ,

t, 0, 5 , PlotRange

0, 10 ,

PlotStyle

GrayLevel 0 ,

GrayLevel 0.5 ,

DisplayFunction Identity



In[1461]:= Show GraphicsArray



p1, p2



7.2.2 Diffusion through a Double-Walled Membrane

Next, consider the situation in which two solutions are separated by a doublewalled membrane, where the inner wall has permeability P1 and the outer wall

has permeability P2 with 0 < P1 < P2 . Suppose that the volume of solution within

the inner wall is V1 and that between the two walls is V2 . Let x represent the concentration of the solution within the inner wall and y the concentration between the



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 7. Applications of Systems of Ordinary Differential Equations

Tải bản đầy đủ ngay(0 tr)

×