Lecture notes, lecture a - Math for civil engineering (engi 4425) (chapters 1 to 8).pdf PDF

Title Lecture notes, lecture a - Math for civil engineering (engi 4425) (chapters 1 to 8).pdf
Course Mathematics for Civil Engi
Institution Memorial University of Newfoundland
Pages 95
File Size 2.2 MB
File Type PDF
Total Downloads 68
Total Views 109

Summary

Chapter 1: First Order Ordinary Differential Equation 1 Introduction Ordinary differential equation (ODEs): Equation involving only one independent variable and one or more dependent variables, together with their derivatives with respect to the independent variable. For example, dx kx dt (1) Where ...


Description

Chapter 1: First Order Ordinary Differential Equation 1.1 Introduction Ordinary differential equation (ODEs): Equation involving only one independent variable and one or more dependent variables, together with their derivatives with respect to the independent variable. For example, dx  kx dt

(1.1)

Where the dependent variable x(t) is a function of independent variable t. Partial differential equation: Similar equation involving derivatives and more than one independent variable (not in this course).

The order of an ODE is that of the highest order derivative present.

The degree of an ODE is the exponent of the highest order derivative present.

Linear ODE: each derivative that appears in the ODE is raised to the power 1 and is not multiplied by any other derivative (but possibly by a function of the independent variable but not dependent variable), that is, if the ODE is of the form

n

 ak  x   k 0

dk y  R x dx k

1

Example 1.1 Determine the order, degree of equation (1.1), and is it linear?

In this course, the only first order ODEs to be considered will have the general form

M(x, y) dx + N(x, y) dy = 0 with the following classification: Type

Feature

Example

Separable M(x, y) = f (x) g(y) and N(x, y) = h(x) k(y)

Reducible to separable

M(tx, ty) = tn M(x, y) and N(tx, ty) = tn N(x, y) for the same n

Exact

N M  y x

Linear

M/N = P(x)y  R(x) or N/M = Q(y)x  S(y)

Bernoulli

M/N = P(x)y  R(x)yn or N/M = Q(y)x  S(y)xn

2

1.2 Separable First-order ODEs Separable ODE: A first order ODE that can be re-written in the form

f (y) dy = g(x) dx The solution of a separable first order ODE follows from

 f y  dy



 g x  dx

The method to solve separable ODE is called separation of variables. Example 1.2 Find the solution of equation 1.1.

Let A = eC, then the general solution is

x(t) = A ekt (A > 0) The value of the arbitrary constant A can be found if the value of x is known at any one value of t. Often this information is provided as an initial condition: A = x(0).

Verify the solution of

A e kt dx by separation of variables  k x 1  x  is x t   dt 1  A e kt

3

Example 1.3 A particle falls under gravity from rest through a viscous medium such that the drag force is proportional to the square of the speed. Find the speed v(t) at any time t > 0 and find the terminal speed v.

Key points: Net force = force due to gravity  drag force dv m  m g  bv 2 dt This separates to

It is shown that the general solution is v t  

k 1  Ae  pt  , where pt 1  Ae 

p2

bg m

The initial condition v(0) = 0 allows A to be found as 1. The complete solution is then v t   k 

1  e pt , where 1  e pt

p2

and v = k is the terminal speed.

4

bg m

and k 

mg b

1.3 Exact First Order ODEs 1.3.1 Exact ODEs The solution to the first order ordinary differential equation

M(x, y) dx + N(x, y) dy = 0 can be written in the implicit form u(x, y) = c , (where c is a constant) u u dx   du  dy  0 . x y If M(x, y) and N(x, y) can be written as the first partial derivatives of some function u with

respect to x and y respectively (i.e.

), then Clairaut’s theorem,

 2u  2u   y x x  y leads to the test (or condition) for an exact ODE: M N  y x

from which the solution is either u 

 M dx

or u 

 N dy .

dy Example 1.4 Find the general solution of   y e x  x .  dx 

Rewrite as y e x  x  dx  ex dy  0   N M

The test for an exact ODE is positive: M N  ex  y x

5

x2  f y  2 where f (y) is an arbitrary function of integration. u   e x  f  y y u 

 M dx 

 y e

x

 x dx  y e x 

Therefore u  y ex 

x2  c1  c2 2

The general solution is  x 2  x y   A  e 2  

Note: A separable first order ODE is also exact, (but not all exact ODEs are separable).

1.3.2 Integrating Factor

Occasionally it is possible to transform a non-exact first order ODE into exact form. Suppose that P dx + Q dy = 0

is not exact (i.e.

), but that

is exact, where I (x, y) is an integrating factor.

6

Then, using the product rule, I M P M  IP  P  I  y y y and N I Q N  I Q   Q  I  x x x From the exactness condition M N  y x

I I  P Q   Q   P  I    x y  x   y



If we assume that the integrating factor is a function of x alone, then dI 1 dI 1 P Q   0   Q  0  I      I dx Q dx x y

This assumption is valid only if

1 Q

 P Q       x  y

 P Q       R x is a function of x only. x  y

 R  x  dx If so, then the integrating factor is I x   e [Note that the arbitrary constant of integration can be omitted safely.] Then

u 

 M dx



e

 R  x  dx  P x, y  dx ,

etc.

If we assume that the integrating factor is a function of y alone, then 0 

dI Q   P   P  I    dy  x  y

This assumption is valid only if



1 P

1 dI 1  Q P        I dy P  x  y 

 Q P     R y  a function of y only.   y   x

 If so, then the integrating factor is I  y   e

u 

 N dy



e

 R y dy Q x , y  dy ,

R  y  dy

etc.

7

and

Example 1.5 Solve the differential equation 2 y dx + x dy = 0 .

The most efficient method of solution is by the method of separation of variables. As an illustration of the integrating factor:

P = 2 y, Q = x  Py = 2, Qx = 1

 R = (2  1) / x (which is a function of x only, as required)

The exact form of this ODE is therefore

2 xy dx + x2 dy = 0 .

Therefore the general solution is x2y = A (where more information, such as an initial condition, is needed to determine the value of the arbitrary constant of integration A ), or

You can find the integrating factor as a function of y only, then get the same solution.

8

1.4 Linear First Order ODEs 1.4.1 Linear ODE

The general form of a linear first order ordinary differential equation is dy  P x  y  R  x  dx [or, in some cases, dx  Qy  x  S y  ] dy Written in the standard exact form with an integrating factor in place, the first equation becomes

I (x) (P(x) y  R(x)) dx + I (x) dy = 0 Compare this with the exact ODE du = M(x, y) dx + N(x, y) dy = 0

The exactness condition

N M leads to the integrating factor  x y

I x   eh

h x  

x 

, where

The general solution of

y x   e h

x



 e

h x

 P x  dx .

dy  P x  y  R x  is dx



R x  dx  C , where



h x  

9

 P x  dx

Example 1.6 Solve the ODE

y '2 y  6e x Compare this ODE with it is linear ODE, and

Check the solution satisfy the ODE by yourself. 1.4.2 Bernoulli ODE

Bernoulli ODE: has the form

y' p (x) y  q (x )yn It is easily to show this is not linear ODE. However, we can convert it into a linear 1st-order ODE by the change of variable

Proof:

10

Example 1.7. Solve

dy  y  y3 . dx

1.5 Reduction of Order

Occasionally a second order ordinary differential equation can be reduced to a pair of first order ordinary differential equations.

11

If the ODE is of the form f (y", y', x) = 0 (that is, no y term), then the ODE becomes the pair of linked first order ODEs f (p', p, x) = 0 , p = y' If the ODE is of the form g (y", y', y) = 0 (that is, no x term), then the ODE becomes the pair of linked first order ODEs

 dp g  p  , p ,  dy where the chain rule 

 y   0 , 

dy dx

d 2y d  dy  dp dp dy dp    p     2 dx  dx  dx dy dx dy dx

2

Example 1.8 Solve

p 

d 2y  dy     . 2 dx  dx 

12

13

Chapter 2: Higher Order Ordinary Differential Equation 2.1 General Form

Of the second (and higher) order ordinary differential equations (ODE), only linear equations with constant coefficients will be considered in this chapter:

d 2y dy P  Q y  R x  2  dx dx Where P and Q are constant coefficients. If R(x)=0, then it becomes homogeneous ODE as d2 y dy  P  Qy  0 2 dx dx The principle of superposition of solutions of the homogeneous equation is valid because it is linear. That is, if y = u(x) and y = v(x) are both solutions of the homogeneous ODE, then so also is y = c1 u(x) + c2 v(x) , where c1 and c2 are any constants. If R(x)≠0, then it is non-homogeneous ODE. dy d 2y  P  Q y  R x  2 dx dx Thus the general solution (G.S.) of a non-homogeneous is the sum of two parts: the complementary function (C.F.) (which is the general solution of the associated homogeneous ODE) and a particular solution (P.S.).

2.2 Homogeneous ODE

If y = ex is a solution to the homogeneous ODE, then

Substituting above into the homogeneous ODE,

i.e. 2 + P  + Q = 0 this is the auxiliary equation (A.E.). Three cases result, (in which c1, c2, c3, c4 are arbitrary constants of integration):

14

1). If the roots 1, 2 of the auxiliary equation are real and distinct, then the complementary function (general solution of the homogeneous ODE) is y C x   c1 e 1 x  c 2 e 2 x 2). If the roots 1, 2 of the auxiliary equation are real and equal, then the complementary function is y C x   c1  c2 x e x

3). If the roots 1, 2 of the auxiliary equation are the complex conjugate pair a  bj, then the complementary function is  y C x   eax c 1 e jbx  c 2 e jbx   eax c 3 cos bx  c 4 sin bx  This last case can also be written in the forms yC = A eax cos (bx  ) or yC = A eax sin (bx  ) where A and  are arbitrary constants of integration.. Example 7.1 The extension s of a spring of mass m moving in one dimension under the influences of a restoring force cs and a drag force bv (where v is the speed of the free end of the spring): d 2s b ds c   s  0 2 dt m dt m The auxiliary equation is b c 2     0 m m The behaviour of the spring then depends on the relative values of b , c and m. 2

c  b  1) If  then   m  2m  the system is under-damped and exhibits damped oscillations: s(t) = A eat sin (kt  )

where a

b , k 2m

c  b    m  2m 

2

2

2) If

c  b     m  2m 

then

the system is over-damped and passes through zero at most once before settling asymptotically to zero:

s t   A e 1t  B e  2t 15

where

1  

b  2m

2

c b  b   , 2      2m  2m  m

2

c  b      2m  m

2

3) If

c  b     m  2m 

then

the system is critically damped and passes through zero at most once before settling asymptotically to zero as rapidly as possible:

If b = 0 (no friction at all), then the system is totally undamped and exhibits simple harmonic motion: s(t) = A sin (kt  )

where

k

c . m

2.3 Non-homogeneous ODE

The general solution (G.S.) of a non-homogeneous is the sum of the complementary function (C.F.) (which is the general solution of the associated homogeneous ODE) and a particular solution (P.S.). The method to find C.F. is introduced in Section 2.2, the methods to determine P.S. include: 1). Undermined Coefficients 2). Variation of parameters 2.3.1 Undetermined Coefficients

The non-homogeneous ODE is dy d 2y  P  Q y  R x  dx dx 2

The method of undermined coefficients is only valid when R(x) is of the form xn, epx, sin px, cos px, and/or sums or products thereof. If the function R(x) does not contain any part of the complementary function, then assume that the particular solution yP(x) is of the same form as R(x). 16

If R(x) = ekx , then try yP = c ekx , with c to be determined.

If R(x) = (a polynomial of degree n), then try yP = (a polynomial of degree n), with all (n + 1) coefficients to be determined.

If R(x) = (a multiple of cos kx and/or sin kx), then try yP = c cos kx + d sin kx , with c and d to be determined. This method can be extended to cases where R(x) = (a sum and/or product of the functions above). But: if part (or all) of trial yP is included in the complementary function, then multiply the trial yP by x to create a new trial yP. then check: If the resulted new trial yP is still included in the complementary function, then keep multiplying the new trial yP by x until a new trial yP is not included in the complementary function; otherwise, if only part of the resulted new trial yP is still included in the complementary function, then remove that part from the new trial yP.

Example 2.2 Find the general solution to the ODE y" + 2 y'  3 y = x2 + e2x The auxiliary equation is 2 + 2   3 = 0 which has the solutions  = 3 or +1. The complementary function is therefore yC(x) = A e3x + B ex R(x) = x2 + e2x which contains neither e3x nor ex .

Therefore, its particular solution is in the form of yP(x) = ax2 + bx + c + de2x then

17

Substituting above into the LHS of the ODE

Upon setting yP" + 2 yP'  3 yP = x2 + e2x and matching coefficients of x2 , x1 , x0 and e2x , we find the values of a, b, c and d.

The general solution is y(x) = yC(x) + yP(x): y x   A e  3x  B e x 

1 5

e 2x 

1 27

9 x

2

 12 x  14

Example 2.3 Find the complete solution of the ODE y" + 2 y' + y = ex , y(0) = y' (0) = 1

The auxiliary equation 2 + 2  + 1 = 0 has the repeated roots  = 1, 1. So the complementary function is yC = (Ax + B) ex . Since R(x) = ex, the particular solution should be in the form of yP = aex. However, this trial yP is included in the C.F., thus the new particular solution should be in the form of yP = 18

axex. But again, yP = axex is also included in the C.F., therefore the new particular solution should be in the form of yP = ax2ex which is OK, then: y"P + 2 y'P + yP = ex  ((2a  4ax + a x2) + (4ax  2a x2) + (a x2) ex = 1 ex  ((a  2a + a) x2 + ( 4a + 4a) x + (2a) ex = 1 ex  a = ½

Therefore the general solution is y x  



1 2

x 2  Ax  B e x

Now impose the initial conditions on this general solution: y(0) = (0 + 0 + B) e0 = 1  B = 1 y' (x) = (x + A  ½x2  Ax  B) ex  y' (0) = (0 + A  0  0  1) e0 = 1  A  1 = 1  A = 2 Therefore the complete solution is x 2 y x    12 x  2 x  1 e Note: that a complete solution requires additional information (often in the form of initial conditions). Two pieces of information are needed in order to evaluate both arbitrary constants of integration. However, do not substitute these conditions into the complementary function; wait until the general solution has been obtained.

2.3.2 Variation of Parameters

The method of variation of parameters is a more general method for finding the particular solution. It is successful even in some cases where the method of undetermined coefficients fails. However, where both methods are available, the method of undetermined coefficients is generally faster to use. If the complementary function for the ODE d 2y dy  P  Q y  R x  2 dx dx is yC(x) = C1y1(x) + C2y2(x) , then the particular solution is yP(x) = u(x) y1(x) + v(x) y2(x) , where the functions u(x) and v(x) need to be determined. We need two constraints in order to pin down the functional forms of u(x) and v(x). An obvious constraint is that u(x) y1(x) + v(x) y2(x) be a particular solution of the ODE. We have considerable freedom as to what the other constraint will be. yP = u y1 + v y2

19

Impose our “free” constraint,

But y1(x) and y2(x) are both solutions to

, then

Combine (2.1) and (2.2), we get

Define the Wronskian function W(x) to be  y y2  W y1, y2  x   det  1   y 1 y 2 

together with the associated determinants 0 W1  det  R

y2  y 0   y2 R and W2  det  1     y1R y 2   y1 R 

then Cramer’s rule yields solutions for u' and v' :

20

Therefore a particular solution is yP = u y1 + v y2 , where u x   



y2 x  R x  W  x

dx , v  x   



y1  x  R  x  W x 

dx , W  x  

y1 y 1

y2 y 2

Note that we can ignore the arbitrary constants of integration in both integrals, because A y1 and B y2 are both solutions of the homogeneous ODE and can therefore be absorbed into the complementary function. Example 2.4 Find the general solution of the ODE y" + 2y' − 3y = x2 + e2x . A.E.:

C.F.:

Particular solution by Variation of Parameters: W(x)=

W1(x)=

21

W2(x)=

yP = u y1 + v y2 =

Therefore, the general solution is

Note: this solution can be verified by method of undetermined coefficients. Example 2.5 Find the general solution of the ODE y" + y = tan x. A.E.:

C.F.:

Let c= cos x, s=sin x, then

22

Particular solution by Variation of Parameters: W(x)=

W1(x)=

W2(x)=

yP = u y1 + v y2 =

Therefore, the general solution is

Note: this solution can be found by method of undetermined coefficients since R(x) = tan x is not of the form xn, epx, sin px, cos px, and/or sums or products.

2.4 Higher Order Linear Ordinary Differential Equations

The nth order ordinary differential equation d ny d n 1 y d n2 y d 2y dy  a a a      a n y  R x  1  n n 1 n 2 n 2 2 2  an  1 dx dx dx dx dx

23

can be solved as follows. Form the auxiliary equation n + a1n1 + ... + an22 + an11 + an = 0 Find all n values for . Form the complementary function yC, which will be a linear combination of e1x , e 2x , , e nx (except for repeated roots). Complex conjugate pairs can be re-written in terms of sine and cosine functions.





Find a particular solution yP (by inspection, undetermined coefficients, or variation of parameters, as extended to this higher order equation). Write down the ge...


Similar Free PDFs