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

# Chapter 3. Applications of First-Order Ordinary Differential Equations

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

120

Chapter 3 Applications of First-Order Equations

EXAMPLE 3.1.1: Use the deﬁnition of orthogonality to verify that the

1 x2 are orthogonal at the point

curves given by y

x and y

2/ 2, 2/ 2 .

SOLUTION: First note that the point

graph of y

given by y

x and y

1 and y

1

x/ 1

2/ 2, 2/ 2 lies on both the

x2 .

The derivatives of the functions are

x2 , respectively.

In:= Clear x, y

y1 x

x

y2 x

1

x2

In:= y1 x

Out= 1

In:= y2 x

x

Out=

1 x2

Hence, the slope of the tangent line to y

stitution of x

tangent line at

2/ 2 into y

2/ 2, 2/ 2 .

In:= y2

Out=

x/ 1

x2

x at

2/ 2, 2/ 2 is 1. Sub-

yields 1 as the slope of the

2

2

1

Thus, the curves are orthogonal at the point

2/ 2, 2/ 2 because the

slopes of the lines tangent to the graphs of y

x and y

1 x2 at

the point

2/ 2, 2/ 2 are negative reciprocals. We graph these two

1 x2 at

2/ 2, 2/ 2 in

curves along with the tangent line to y

Figure 3-1 to illustrate that the two are orthogonal. Note that the graphs

are displayed correctly even though several error messages, which are

1 x2 is undeﬁned

not all displayed here, are generated because y

3.1 Orthogonal Trajectories

121

1.5

1

0.5

-1.5

-1

-0.5

0.5

1

1.5

-0.5

-1

-1.5

Figure 3-1

The curves are orthogonal at the point

2/ 2, 2/ 2

if x < 1 or x > 1. The option AspectRatio->1 speciﬁes that the ratio

of lengths of the x-axis to the y-axis in the resulting graphics object be 1.

3 3

,

,

2 2

3 3

3 3

PlotRange

,

,

,

,

2 2

2 2

AspectRatio 1, PlotStyle

Dashing

GrayLevel 0 , GrayLevel 0.5

In:= Plot

x,

1

x2 , x

1 x2

Plot

plnr

is not a machine size real number at x

2 , x,

0.01

,

1.5.

The next step in our discussion of orthogonal curves is to determine the set of

orthogonal curves to a given family of curves. We refer to this set of orthogonal

curves as the family of orthogonal trajectories. Suppose that a family of curves is

deﬁned as F x, y

C and that the slope of the tangent line at any point on these

curves is dy/ dx

f x, y . Then, the slope of the tangent line on the orthogonal

trajectory is dy/ dx

1/ f x, y so the family of orthogonal trajectories is found by

solving the ﬁrst-order equation dy/ dx

1/ f x, y .

122

Chapter 3 Applications of First-Order Equations

EXAMPLE 3.1.2: Determine the family of orthogonal trajectories to the

family of curves y cx2 .

SOLUTION: First, we must ﬁnd the slope of the tangent line at any

point on the parabola y cx2 . Differentiating with respect to x results in

dy/ dx 2cx. However from y cx2 , we have that c y/ x2 . Substitution

into dy/ dx 2cx then yields dy/ dx 2 y/ x2 x 2y/ x on the parabolas.

Hence, we must solve dy/ dx

x/ 2y to determine the orthogonal trajectories. This equation is separable, so we write it as 2y dy

x dx, and

2

2

x

k, where k is a constant,

then integrating both sides gives us 2y

which we recognize as a family of ellipses. Note that an equivalent

result is obtained with DSolve.

In:= sol

Out=

x

,y x ,x

2y x

4C 1

x2

, y x

2

DSolve y x

y x

x2

4C 1

2

We graph several members of the family of parabolas y cx2 , the family

k, and the two families of curves together. First,

of ellipses 2y2 x2

we deﬁne parabs to be the list of functions obtained by replacing c in

y cx2 by nine equally spaced values of c between 3/ 2 and 3/ 2.

In:= parabs

Table c x2 , c,

3 3 1

, ,

2 2 8

Next, we graph the list of functions parabs for 3 x 3 with Plot

and name the result p1. The graphs in p1 are not displayed because the

option DisplayFunction->Identity is included in the Plot command. We graph several ellipses 2y2 x2 k by using ContourPlot to

graph several level curves of f x, y

y2 12 x2 and name the result p2.

Including the option PlotPoints->120 helps assure that the ellipses

appear smooth in the result. Including the option ContourStyle->

GrayLevel[.4] speciﬁes that the contours be drawn in a light gray.

(This will help us distinguish between the ellipses and the parabolas

when we show the graphs together.) As with p1, p2 is not displayed.

Finally, p1 and p2 are displayed together with Show in Figure 3-2.

Notice that these two families appear orthogonal, conﬁrming the results

we obtained.

In:= p1

Plot Evaluate parabs , x, 3, 3 ,

DisplayFunction Identity

3.1 Orthogonal Trajectories

123

3

2

1

-3

-2

-1

1

2

3

-1

-2

-3

Figure 3-2 The two sets of curves are orthogonal to each other

In:= p2

x2

, x, 3, 3 , y, 3 , 3 ,

2

Contours 30, ContourStyle GrayLevel 0.5 ,

DisplayFunction Identity

ContourPlot y2

In:= Show p1, p2, PlotRange

3 , 3 , 3, 3

AspectRatio 1,

DisplayFunction \$DisplayFunction

,

EXAMPLE 3.1.3 (Temperature): Let T x, y represent the temperature at

the point x, y . The curves given by T x, y

c (where c is constant) are

called isotherms. The orthogonal trajectories are curves along which

heat will ﬂow. Determine the isotherms if the curves of heat ﬂow are

given by y2 2xy x2 c.

SOLUTION: We begin by ﬁnding the slope of the tangent line at each

point on the heat ﬂow curves y2 2xy x2 c using implicit differentiation.

124

Chapter 3 Applications of First-Order Equations

In:= eq1

Out=

x

2

y x

2xy x

In:= step1

Out=

2

2x

x2

2x y x

y x

2

c

c

Dt eq1, x

2y x

2xy x

2y x y x

Dt c, x

Because c represents a constant, d/ dx c

0. We interpret step2 to be

equivalent to the equation 2yy 2y 2xy 2x 0, where y dy/ dx.

In:= step2

Out=

2x

step1/.Dt c, x

2y x

2xy x

0

2y x y x

0

We calculate y

dy/ dx by solving step2 for y’[x] with Solve and

name the result imderiv.

In:= imderiv

Out=

This equation is also

homogeneous of degree one.

y x

Solve step2, y x

x y x

x y x

Thus, dy/ dx

x y / x y so the orthogonal trajectories satisfy the

differential equation dy/ dx

x y/ x y.

Writing this equation in differential form as x y dx x y dy 0,

we see that this equation is exact because / y x y

1

/ x x y.

Thus, we solve the equation by integrating x y with respect to x to yield

1 2

xy g y . Differentiating f with respect to y then gives us

f x, y

2x

x g y . Then, because the equation is exact, x g y

x y.

fy x, y

1 2

y which implies that g y

y

.

This

means

that

Therefore, g y

2

the family of orthogonal trajectories (isotherms) is given by 12 x2 xy

1 2

k.

2y

Note that DSolve is able to solve this differential equation.

In:= DSolve y x

Out=

y x

y x

x

x

x y x

, y x , x //Simplify

x y x

2C 1

2C 1

2 x2 ,

2 x2

To graph y2 2xy x2 c and 12 x2 xy 12 y2 k for various values of

c and k to see that the curves are orthogonal, we use ContourPlot.

First, we graph several level curves of y2 2xy x2 c on the rectangle 4, 4

4, 4 and name the result cp1. The option Contours->40

3.1 Orthogonal Trajectories

125

instructs Mathematica to graph 40 contours instead of the default

of ten.

In:= cp1

ContourPlot y2 2xy x2 , x, 4, 4 ,

y, 4, 4 , ContourShading False,

Axes Automatic, Contours 40,

PlotPoints 120, AxesOrigin

0, 0 ,

Frame False,

DisplayFunction Identity

Next we graph several level curves of 12 x2 xy 12 y2

k on the same

rectangle and name the result cp2. In this case, the option

ContourStyle->{{GrayLevel[0.4],Dashing[{0.01}]}}

speciﬁes that the contours are to be dashed in a medium gray.

In:= cp2

x2 y2

, x, 4, 4 ,

2

2

y, 4, 4 , ContourShading False,

Axes Automatic, Contours 40,

PlotPoints 120,

ContourStyle

GrayLevel 0.4 ,

Dashing 0.01

, AxesOrigin

0, 0 ,

Frame False,

DisplayFunction Identity

ContourPlot xy

The graphs are then displayed side-by-side using Show and Graphics

Array in Figure 3-3 and together using Show in Figure 3-4.

-4

4

4

2

2

-2

2

4

-4

-2

2

-2

-2

-4

-4

Figure 3-3

Several members of each family of curves

4

126

Chapter 3 Applications of First-Order Equations

4

2

-4

-2

2

4

-2

-4

Figure 3-4 The two sets of curves are orthogonal to each other

In:= Show GraphicsArray

In:= Show cp1, cp2,

DisplayFunction

cp1, cp2

\$DisplayFunction

EXAMPLE 3.1.4: Determine the orthogonal trajectories of the family of

curves given by y2 2cx c2 . Graph several members of both families

of curves on the same set of axes.

SOLUTION: After deﬁning eq to be the equation y2

implicitly differentiate.

In:= eq

Out=

yˆ2

2c x

2cx

c2 , we

cˆ2

step1 Dt eq

2 x Dt c

2 c Dt x

2 y Dt y

2 c Dt c

As in the previous examples, we interpret Dt[x] to be 1, Dt[c] to be

0, and Dt[y] to represent dy/ dx.

3.1 Orthogonal Trajectories

127

In:= step2

Out=

The equation y2

2c

step1 /. Dt c

2 y Dt y

0, Dt x

1

0

c2 is a quadratic in c. Solving for c,

2cx

In:= cval

Solve eq, c

Out=

x

c

x2

y2 , c

x

x2

y2

we choose to substitute the ﬁrst value into the equation y dy/ dx

In:= imderiv

Out=

Solve step2, Dt y

x

x2 y2

y

Dt y

dy

dx

Then, we must solve

y

x2

x

y2

/.cval

c.

1

.

In:= de

y x

Evaluate 1/imderiv

y y x

y x

Out= y x

x

x2 y x 2

1, 1 , 2

/.

Note that Mathematica is able to solve this equation.

In:= DSolve de, y x , x //Simplify

Out=

y x

y x

C 1

2

C 1

2

C 1

C 1

2x ,

2x

Thus, y2 4C2 4Cx and replacing 2C with C yields y2 C2 2Cx or

y2 2Cx c2 , which means that this family of curves is self-orthogonal.

We conﬁrm that the family is self-orthogonal with ContourPlot in

Figures 3-5 and 3-6.

In:= cp1

ContourPlot cval 1, 1, 2 , x, 10, 10 ,

y, 10, 10 , ContourShading False,

Frame False, Axes Automatic,

AxesOrigin

0, 0 , Contours 30,

PlotPoints 120,

DisplayFunction Identity

In:= cp2

ContourPlot cval 2, 1, 2 , x, 10, 10 ,

y, 10, 10 , ContourShading False,

Frame False, Axes Automatic,

AxesOrigin

0, 0 , Contours 30,

PlotPoints 120,

DisplayFunction Identity

128

Chapter 3 Applications of First-Order Equations

10

10

5

5

-10 -5

5

-10 -5

10

5

-5

-5

-10

-10

Figure 3-5

The plots are symmetric about the y-axis

10

5

-10

-5

5

10

-5

-10

Figure 3-6 The family of curves is self-orthogonal

In:= Show GraphicsArray

In:= Show cp1, cp2,

DisplayFunction

cp1, cp2

\$DisplayFunction

10

3.1 Orthogonal Trajectories

129

Application: Oblique Trajectories

If we are given a family of curves that satisﬁes the differential equation dy/ dx

f x, y and we want to ﬁnd a family of curves that intersects this family at a constant angle Θ, we must solve the differential equation

f x, y tan Θ

.

1 f x, y tan Θ

dy

dx

For example, to ﬁnd a family of curves that intersects the family of curves x2 y2

c2 at an angle of Π/ 6, we ﬁrst implicitly differentiate the equation to obtain

2x

Because tan Θ

tan Π/ 6

2y

dy

dx

dy

dx

0

x

y

f x, y .

1/ 3, we solve

dy

dx

x/ y

1

x 3

1/ 3

x/ y 1/ 3

y 3

y

x

,

which is a ﬁrst-order homogeneous equation. With the substitution x

obtain the separable equation

1 v 3

dv

1 v2

3

dy.

y

Integrating yields

3

ln 1

2

so

3

ln 1

2

v2

tan

1

v

3 ln y

k1

x2

y2

tan

1

x

y

3 ln y

k1 .

Mathematica ﬁnds an equivalent implicit solution.

In:= sol1

3x

DSolve y x

y x

3y x

, y x , x //

x

FullSimplify

y x

Out= Solve 2 ArcTan

x

3 2 Log x

Log 1

y x

x2

2

2 C 1 ,y x

Similarly, for

dy

dx

x/ y

1

1/ 3

x/ y 1/ 3

x 3

y 3

y

x

,

vy, we

130

Chapter 3 Applications of First-Order Equations

we obtain

1 v 3

dv

1 v2

3

dy

y

so that the trajectories are

3

ln 1

2

In:= sol2

x2

y2

tan

1

x

y

3 ln y

3x

DSolve y x

y x

3y x

Out= Solve

C 1

y x

1

x

2

3 Log x , y x

ArcTan

k1 .

,y x ,x

x

3 Log 1

y x

x2

2

To conﬁrm the result graphically, we graph several members of each family of

curves in Figure 3-7

In:= toplot2

Out=

Solve sol2 1 , C 1

1

y

C 1

2 ArcTan

2

x

y2

3 Log 1

2 3 Log x

x2

In:= cp1

/.y x

y

ContourPlot x2 y2 , x, 10, 10 ,

y, 10, 10 , Frame False, Contours 20,

ContourStyle GrayLevel 0.5 ,

PlotPoints 120, AxesOrigin

0, 0 ,

DisplayFunction Identity

10

10

10

5

5

5

-10 -5

-5

5 10 -10 -5

-5

5 10 -10 -5

-5

-10

-10

-10

Figure 3-7

Several members of each family of curves

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

Chapter 3. Applications of First-Order Ordinary Differential Equations

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

×