Midterm 2020 sol PDF

Title Midterm 2020 sol
Author Anonymous User
Course Engineering Mathematics
Institution Memorial University of Newfoundland
Pages 10
File Size 362.2 KB
File Type PDF
Total Downloads 93
Total Views 138

Summary

Midterm 2020 sol...


Description

ENGI 3424 Mid Term Test - Solutions 2020 October 15 1.

The displacement x ( t ) of the free end of a mass-spring system beyond the equilibrium position is governed by the ordinary differential equation d2 x dx + 4 + 40x = 36 e −2t 2 dt dt together with the initial conditions x( 0) = x (a) By any valid method, find the complete solution to this initial value problem. (b) Is the system under-damped, critically damped or overdamped?

(a) A.E.:

 2 + 4  + 40 = 0   =

Immediately: (b) the system is under -damped (a) C.F.:

xC = e

−2 t

−4  16 − 160 −4  − 144 − 4  12 j = = = − 2 6 j 2 2 2

(  is a complex conjugate pair)

( A cos 6t + B sin 6t )

P.S. by the method of undetermined coefficients: − − r( t) = 36 e−2 t is not a constant multiple of either x1 = e 2 t cos 6t or x2 = e 2t sin 6t Therefore try xP = c e −2t Substitute into 



 x P

( 4 − 8 + 40) c e−2t = 36 e− 2t

= 36 e−2t :  36c = 36  c = 1

−2t

xP = e

OR P.S. by the method of variation of parameters: x1 = e −2t cos 6t , x2 = e − 2t sin 6t , r( t) = 36 e−2 t

W =

x1 x

(

x2

=

e −2t cos 6t 2t

[12] [2]

( −2 cos 6t − 6sin 2t )

e −2t sin 6t e −2t ( −2sin 6t + 6 cos 2t )

)

= e −4t −2sin 6t cos 6t + 6 cos 2 2t + 2cos 6t sin 6t + 6sin 2 6t = 6 e −4t

ENGI 3424

Mid Term Test - Solutions

Page 2 of 10

1 (a) (continued) W1 = u

0

x2

r

x

v

−36 e− 4t sin 6t

W W

W2 = W W

(

x

)

= − 6sin 6 t  u = cos 6t

6 e − 4t

x1 0

)(

= − x r = − e −2t sin 6t 36 e −2t = − 36 e −4t sin 6t

(

= + x1r = e− 2t cos 6t

36 e−4t cos 6t 6 e −4 t

)( 36e− 2t ) = 36e− 4t cos 6t

= 6 cos 6t  v = sin 6t

(

)

(

)

xP = u  x1 + v  x2 = ( cos 6t ) e − 2t cos 6t + ( sin 6t ) e − 2t sin 6t = e − 2t [Clearly the method of undetermined coefficients is much faster!]

G.S.: 2t 2t 2t x (t ) = xC + xP = e − ( A cos 6t + B sin 6t ) + e − = e − (1 + A cos 6t + B sin 6t ) 

2t

x

( −2 − 2 Acos 6t − 2 B sin 6 t

I.C.: x (0 ) = 6  e 0 (1+ A + 0 )= 6 

x C.S.:



+ 0 − 6 Asin 6t + 6 B cos 6t)

A= 5

e 0 (− 2− 10− 0 + 0− 0+ 6B )= 6 

6B = 18 

x (t ) = e − 2t (1 + 5cos 6t + 3sin 6t )

[not required: graph of the complete solution]

B= 3

ENGI 3424 1 (a)

Mid Term Test - Solutions

Page 3 of 10

(continued)

Additional notes: In the method of undetermined coefficients, if the incorrect choice of trial particular solution is made, then no consistent value of the constant c can emerge: !

xP = ct e −2t

e −2t

 x

Substitute into

P

= 36 e−2t :

((−4 + 4t ) + 4 (1− 2t ) + 40t )c e −2t = 36e − 2t

 (36t + 0 )c = 0t + 36  36c = 0 and 0 = 36 which obviously has no solution for c. 1 It is incorrect to claim 36ct = 36  c = t because c is a constant, not a function of t. However, this second error cancels out the first error! 1 1 2t 2t c=  xP = t e− = e− which is the correct particular solution. t t

There is a formula for the particular solution of the ODE constants and r, k are non-zero constants): r xP ( t ) = 2 ekt k +k p +q

re

kt

(where p, q are

provided that k 2 + k p + q  0 , (which is equivalent to ek t not being a constant multiple of either component of the complementary function). It is not difficult to prove that this formula works. In question #1, p = 4, q = 40, r = 36, k = − 2 36 36 −2t 2t e−2t = e  xP ( t ) = = e− 4 − 8 + 40 36

ENGI 3424 2 (a)

Mid Term Test - Solutions

Page 4 of 10

Use the RK4 (Runge-Kutta) method with a single step (h = 0.5) to estimate the value of y at x = 0.5 to three decimal places, given that y ( 0 ) = 1 and that y is the solution of the ordinary differential equation dy = x2 + y dx dy Note: the RK4 algorithm for = f ( x, y) , y ( xo ) = yo includes dx k1 = f ( xn, yn )

( f ( xn + 12 h ,

[10]

) yn + 12 h k )

k2 = f xn + 12 h, yn + 12 h k1 k3 =

2

k4 = f ( xn + h , yn + h k3 ) h y n+1 = y n + (k 1 + 2k 2 + 2k 3 + k 4 ) 6 (b) Confirm your answer by solving the ordinary differential equation exactly.

(a)

[12]

xo = 0, yo = 1, h = 0.5  x1 = 0.5

k1 = f ( xo , yo ) = xo2 + yo = 0 +1 = 1.000000

( ) ( ) ( ) = f ( xo + 12 h, yo + 12 hk ) = ( xo + 12 h) + ( yo + 12 hk ) = ( 0.25) 2

k2 = f xo + 12 h, yo + 12 hk1 = xo + 12 h + yo + 12 hk1 = ( 0.25) + 1.25 = 1.312500

k3

2

2

2

2

2

+ 1.328125 = 1.390625

k4 = f ( xo + h, yo + hk3 ) = ( xo + h) + ( yo + hk3 ) = ( 0.5) +1.6953125 = 1.9453125 2

y1 = y o +

2

h 0.5 ( k 1 + 2k 2 + 2k 3 + k 4 ) = 1+ (1+ 2.625+ 2.78125+ 1.9453125 ) 6 6

0.5 ( 8.3515625 ) = 1 + 0.695963 6 correct to 3 d.p., y (0.5 ) = 1.696 = 1+

One must keep greater precision than three decimal places in all intermediate calculations, otherwise rounding errors can propagate and cause an error in the final answer.

ENGI 3424

2 (b)

Mid Term Test - Solutions

dy dy 2 2 = x + y  − y = x which is linear, but not separable. dx dx P = − 1  h =  P dx =  − 1dx = − x  e h = e− x

e

h R dx

(

=  e −x x2 dx

)

= − x 2 + 2x + 2 e− x

y = e−h

(  e hR dx + C )

((

)

= e x − x2 + 2 x + 2 e − x + C

)

 y ( x) = C e − x −2 x −2 x

2

y ( 0 ) = 1  1 = C − 0 − 0− 2  Complete solution: x y ( x) = 3 e − x 2 − 2 x − 2

C= 3

 y( 0.5) = 3 e0.5 − 0.25 − 1 − 2 = 1.696163 The RK4 estimate is identical to the third decimal place (but not the fourth).

OR The Chapter 2 method can be adapted to this first order ODE: dy − y = x2 dx A.E.:  − 1= 0   = 1 C.F.: y = Ae x P.S.: r = x 2 Therefore try y P = bx2 + cx + d  yP = 2bx+ c Substitute into y P − y P = x 2



(2bx + c )

− (bx 2 + cx + d ) = x 2 + 0 x + 0

Matching coefficients: x2 : − b = 1  b = −1

x1 : 2b − c = 0  c = 2b = − 2 x0 : c − d = 0  d = c = − 2  yP = − x2 − 2 x − 2 and the same general solution as before arises:

y ( x ) = Ae x − x2 − 2 x − 2

Page 5 of 10

ENGI 3424 3.

Mid Term Test - Solutions

Page 6 of 10

Find the equation of the family of orthogonal curves to the family of curves y = x 3+C and sketch two members of each family on the same diagram.

[5] [9]

dy = 3x 2 + 0 dx The orthogonal family must satisfy dy 1 1 1 x −1 = − 2 = − x−2  y = −  +A  dx 3x 3 3 −1 y = x 3 +C



y=

1 +A 3x

Many choices of A and C are possible, including those that produce this graph:

The important features of any sketch are: Every member of the original family (blue curves) has a point of inflexion with zero slope at its y axis intercept. Every member of the orthogonal family (red curves) has a vertical asymptote at the y axis and a horizontal asymptote at y = A. Every red curve intersects every blue curve (twice) at right angles. No two members of the same family ever meet each other.

ENGI 3424 4.

Mid Term Test - Solutions

Page 7 of 10

Find the complete solution to the initial value problem dy y = 1, y ( 0) = − 1 dx

[10]

The ODE is non-linear but is separable. dy y = 1  y dy = 1 dx   y dy =  1 dx  dx  y 2 = 2 x + A (where A = 2c)

y ( 0) = − 1  + 1= 0+ A 

y2 = x+ c 2

A= 1  y 2 = 2x + 1

Note: the explicit forms y =  2 x + 1 and y = − 2 x + 1 are also correct, but y = 2 x + 1 is not correct (inconsistent with y ( 0) = − 1 )

Note: There is no possibility of a singular solution for this non-linear ODE, as there is no division by any function of y during the separation of variables. dy = 1. Also note that y  k (where k is any constant) is not a solution to the ODE y dx

ENGI 3424 5.

Mid Term Test - Solutions

Page 8 of 10

BONUS QUESTION

[+6]

Use the transformation of variables x = e t to find the general solution to 2

x2

d y dy − 3x + 4y = x2 2 dx dx

From page 2.36 of the lecture notes: dx = et = x Let x = et  dt dy dy dt dy dx dy 1 dy =  =  = e− t = By the chain rule, dx dt dx dt dt dt x dt

 x

dy dy = dx dt

d 2 y d  dy  d  dy  dx dy  1 d  − t dy  1  − t d 2y e = =  =  = − e −t        e 2 2 dx dx  dx  dt  dx  dt x dt  dt  x dt dt  2 1  d 2 y dy  d 2 y dy 2 d y = 2 2 −   x = − x  dt dt  dx 2 dt 2 dt d 2y dy + bx + cy = r (x ) , 2 dx dx (where b and c are constants) therefore transforms into the ODE  d 2 y dy  dy d2 y dy b cy r x − + + =  + ( b− 1) + cy = r ( x ) ( )  dt 2 dt  2 dt dt dt  

Any Cauchy-Euler ODE of the type x2

Here b = −3, c = 4,

( )

r ( x ) = x2 = et

2

= e2 t

A.E.:

d 2y dy 2 − 4 + 4y = e t 2 dt dt 2  2 − 4  + 4 = 0  (  − 2 ) = 0   = + 2, + 2

C.F.:

yC (t ) = ( At + B )e 2 t

The equivalent ODE is

P.S. by the method of undetermined coefficients: 2t 2t r( t) = e but e2t and t e are both parts of the C.F. Therefore try

y P (t ) = c t 2e 2t 

)

+ 4t 2 e 2t

y

y P (t ) = c  c=

1  2

y P (t ) =

( ( 2+ 8t + 4t 2 )− 4 (2t+ 2t 2 )+ 4t 2 )e 2t =

1 2 2t t e 2

2c e

2t

= e

2t

ENGI 3424 5.

Mid Term Test - Solutions

Page 9 of 10

(continued)

OR P.S. by the method of variation of parameters:

y1 = e 2t , y 2 = t e 2t , r = e 2t

W= W1 =

u

y1 y

=

r

−t e4t

W W

4t

y1 y

t e2t

e 0

2t

= (1+ 2t − 2t )e 4t = e 4t

u= −

1 2 t 2

( )

= + y1r = e 2t e 2t = e 4 t

e 4t t

e4

= −t 

= 1 

y P = u  y1 + v  y2 = −

G.S.:

(1 + 2 t ) e

t

= − y r = − t e2 t e 2 t = − t e 4 t

y

W W

e2t

( )

0 y2

W2 =

v

y2

v= t

1 2 2t 1 t  e + t  t e 2t = t 2 e 2t 2 2

1 y ( t ) =  t 2 + At + B  e 2t 2 

but x = e t  t = ln x 

2 1  y ( x ) =  ( ln x ) + A ln x + B  x 2 2 

Note that alternative methods exist to solve these Cauchy-Euler ODEs, including one that begins with the substitution y = x r , but these methods are far beyond the scope of ENGI 3424 and are excluded by the wording of this question, which requires the use of the transformation x = e t .

ENGI 3424 5.

Mid Term Test - Solutions

Page 10 of 10

Additional note: The question does not require verification of this solution. However, such verification does provide good practice at the rules of differentiation, especially the product rule. 2 1  y ( x ) =  ( ln x ) + A ln x + B x 2 2   2 1 1 2   1   y ( x ) =  ( ln x ) + A + 0  x2 +  ( ln x ) + A ln x + B  ( 2 x ) x x 2 2     2 1   y ( x ) = x ( ln x + A) + 2x  ( ln x ) + A ln x + B  2   2 1  1   ln x A  y ( x) = ( ln x + A) + x  + 0  + 2  ( ln x ) + A ln x + B  + 2 x  +  x x  2   x 2 1   y ( x) = 1 + 3 ( ln x + A) + 2  ( ln x) + Aln x + B  2 

 x 2 y ( x ) − 3x y  ( x ) + 4y ( x ) = 2 1  x2 + 3x2 (ln x + A ) + 2 x2  ( ln x ) + A ln x + B  2 

1 2 − 3x 2 ( ln x + A ) − 6x2  ( ln x ) + A ln x + B  2   2 1  + 4x 2  ( ln x ) + A ln x + B  = x2 = r ( x) 2 

 Back to the index of solutions...


Similar Free PDFs