Mathematics For Engineers I: Youngwoon Choi, PH.D

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

Mathematics for

Engineers I

Youngwoon Choi, Ph.D.


Department of Bioengineering, Korea University
youngwoon@korea.ac.kr
Biomedical Engineering Mathematics II

Chapter 2
Second-Order ODE*
*ODE: Ordinary Differential Equation
Overview
ODEs can be grouped into
• Nonlinear ODEs → generally difficult to solve
• Linear ODEs → relatively simple to solve
various properties can be characterized
standard methods for many of these equations
simpler solution formulas than those of nonlinear ODEs

Linear ordinary differential equations of 2nd order


• many important applications in mechanics and electric engineering,
etc.
• representative theory for all linear ODEs exists
• simpler solution formulas than those of higher order

For 2nd order ODEs, this chapter includes


• derivation of general solutions
• particular solutions in connection with initial value problems
2.1 Homogeneous Linear 2nd order ODEs
A second order & Linear ODEs
y + p(x)y+ q(x)y = r(x)
2.1 Homogeneous Linear 2nd order ODEs

Ex1) Homogeneous linear ODE y + y = 0

y = cosx, y = sinx are solutions, and so is y = cosx + sinx.


2.1 Homogeneous Linear 2nd order ODEs
Ex2) A nonhomogeneous linear ODE y ''+ y = 1
The functions y = 1 + cos x and y = 1 + sin x are solutions.

But, their sum is not a solution. Neither is the constant multiples.

Ex3) A nonlinear ODE y '' y − xy ' = 0

The functions y = x 2 and y = 1 are solutions.

But, their sum is not a solution. Neither is –x2.


2.1 Homogeneous Linear 2nd order ODEs
⚫ Initial Value Problem. Basis. General Solution.
• Initial Conditions : y ( x0 ) = K0 , y ' ( x0 ) = K1
• Initial Value Problems
: A differential equation consists of the homogeneous linear ODE and
two initial conditions.

Ex4) Solve the initial value problem


y ''+ y = 0, y ( 0) = 3.0, y ' ( 0) = −0.5
Step 1 General solution.
y = c1 cos x + c2 sin x (  2 + 1 = 0   = i ) → a form of the general solution

Step 2 Particular solution.

y ( 0 ) = c1 = 3.0, y ' ( 0 ) = c2 = −0.5 ( y ' = −c1 sin x + c2 cos x )   y = 3.0 cos x − 0.5sin x
2.1 Homogeneous Linear 2nd order ODEs
⚫ Definition General Solution, Basis, Particular Solution
A general solution of an ODE on an open interval I is a solution y = c1 y1 + c2 y2
in which y1 and y2 are solutions of the equation on I that are not proportional,
and c1, c2 are arbitrary constants. These y1 and y2 are called a basis ( or a
fundamental system ) of solutions of the equation on I. A particular solution
of the equation on I is obtained if we assign specific values to c1 and c2 in

y = c1y1 + c2y2.

ODE: y + p(x)y+ q(x)y = 0


Solutions: y1 and y2 (basis) (y1 ∝ y2)

General solution: y = c1y1+c2y2 (c1 & c2, constants)


2.1 Homogeneous Linear 2nd order ODEs
• Two functions y1 and y2 are called linearly independent on I where they are
defined if (7) k1 y1 ( x ) + k2 y2 ( x ) = 0 everywhere on I implies k1=0 and k2=0.

• y1 and y2 are called linearly dependent on I if (7) also holds for some constants,
not both zero.

If k1 0 or k2  0, we can divide and see that y1 and y2 are proportional,


k2 k1
y1 = − y2 or y2 = − y1
k1 k2

⚫ Definition Basis (Reformulated)


A basis of solutions of the equation on an open interval I is a pair of linearly
independent solutions of the equation on I.
2.1 Homogeneous Linear 2nd order ODEs
Ex6) Basis, General Solutions, Particular Solution

Verify by substitution that y1 = ex and y2 = e-x are solutions of the ODE .


Then solve the initial value problem

• check the solutions by substitution:

→ not proportional, a basis

• construct a general solution:

• obtain the particular solution:

so the answer is
2.1 Homogeneous Linear 2nd order ODEs
⚫ Find a Basis if One Solution Is Known. Reduction of Order
If one solution is found in some way, the 2nd order ODE is reduced to
1st order OED. → reduction of order

Apply reduction of order to the homogeneous linear ODE y ''+ p ( x ) y '+ q ( x ) y = 0 .

y = y2 = uy1 (Substitute) ( y ' = y2 ' = u ' y1 + uy1' , y '' = y2 '' = u '' y1 + 2u ' y1 '+ uy1'' )

2 y1 '+ py1
 u '' y1 + u ' ( 2 y1 '+ py1 ) + u ( y1'' + py1' + qy1 ) = 0  u ''+ u ' =0 ( y1 ''+ py1 '+ qy1 = 0 )
y1
 y ' 
U = u ', U ' = u ''  U' +  2 1 + p  U = 0 (Separation of variables and integration)
 y1 
dU  y '  1 −  pdx
 = −  2 1 + p  dx & ln U = −2 ln y1 −  pdx   U= e , y2 = uy1 = y1  Udx
U  y1  y12
2.1 Homogeneous Linear 2nd order ODEs
y = y2 = uy1 ( y ' = y2 ' = u ' y1 + uy1' , y '' = y2 '' = u '' y1 + 2u ' y1 '+ uy1'' )

2 y1 '+ py1
 u '' y1 + u ' ( 2 y1 '+ py1 ) + u ( y1'' + py1' + qy1 ) = 0  u ''+ u ' =0 ( y1 ''+ py1 '+ qy1 = 0 )
y1
 y ' 
U = u ', U ' = u ''  U' +  2 1 + p  U = 0 (Separation of variables and integration)
 y1 
dU  y '  1 −  pdx
 = −  2 1 + p  dx & ln U = −2 ln y1 −  pdx   U= e , y2 = uy1 = y1  Udx
U  y1  y12
2.1 Homogeneous Linear 2nd order ODEs
Ex7) Reduction of Order if a Solution Is Known. Basis

Find a basis of solution of the ODE (x 2


− x ) y ''− xy '+ y = 0 .

One solution : y1 = x (check!)

Apply reduction of order :

Insert those into the ODE,

By the substitution

Separation of variables and integration:

and thus,
2.1 Homogeneous Linear 2nd order ODEs
Ex7) Reduction of Order if a Solution Is Known. Basis

We can also use the formula for the second solution.


x 1
( 2
)
x − x y ''− xy '+ y = 0 y ''
(

x −x
2
)
y '+
(x −x
2
y=0
)
Standard form

x 1 1 −  pdx 1  x1−1dx 1 1
p=− 2 =−  U= 2e = 2e = − 2
x −x x −1 y1 x x x
 1
 y2 = y1  Udx = x  ln x +  = x ln x + 1
 x
2.2 Homogeneous Linear ODEs with
Constant Coefficient

⚫ Second-order homogeneous linear ODEs with constant coefficients


y ''+ ay '+ by = 0
Trial solution of the form of

⚫Characteristic equation (Auxiliary Equation) :

 2 + a + b = 0
2.2 Homogeneous Linear ODEs with
Constant Coefficient
The roots of the characteristic equation are

Case 1 Two real roots 1, 2 if a 2 − 4b  0  y = c1e1x + c2e2 x

Case 2 A real double root =-a/2 if a 2 − 4b = 0 y = ( c1 + c2 x ) e


− ax
 2

※ reduction of order
1 −  pdx
U= e , y2 = uy1 = y1  Udx
y12

Case 3 Complex conjugate roots  = − a 2  i if


( A cos  x + B sin  x )
− ax
a 2 − 4b  0  y=e 2

❖ Euler formula : eit = cos t + i sin t


2.2 Homogeneous Linear ODEs with
Constant Coefficient
Ex2) Initial Value Problem in the Case of Distinct Real Roots

Solve the initial value problem y ''+ y '− 2 y = 0, y ( 0 ) = 4, y ' ( 0 ) = −5

Step 1 General solution.


 2 +  − 2 = 0 ( Characteristic equation )   = 1 or − 2   y = c1e x + c2e −2 x

Step 2 Particular solution.

y ' = c1e x − 2c2 e −2 x


 y ( 0 ) = c1 + c2 = 4, y ' ( 0 ) = c1 − 2c2 = −5
 c1 = 1, c2 = 3
  y = e x + 3e −2 x
2.2 Homogeneous Linear ODEs with
Constant Coefficient
Ex4) Initial Value Problem in the Case of a Double Root

Solve the initial value problem y ''+ y '+ 0.25 y = 0, y ( 0 ) = 3.0, y ' ( 0 ) = −3.5

Step 1 General solution.


 2 +  + 0.25 = 0 ( Characteristic equation )   = −0.5   y = ( c1 + c2 x ) e −0.5 x

Step 2 Particular solution.

y ' = c2e−0.5 x − 0.5 ( c1 + c2 x ) e −0.5 x


 y ( 0 ) = c1 = 3.0, y ' ( 0 ) = c2 − 0.5c1 = −3.5
 c1 = 3, c2 = −2
  y = ( 3 − 2 x ) e−0.5 x
2.2 Homogeneous Linear ODEs with
Constant Coefficient
Ex5) Complex Roots. Initial Value Problem

Solve the initial value problem y ''+ 0.4 y '+ 9.04 y = 0, y ( 0) = 0, y ' ( 0) = 3
Step 1 General solution.
 2 + 0.4 + 9.04 = 0 ( Characteristic equation )   = −0.2  3i   y = e−0.2 x ( A cos3x + B sin 3x )

Step 2 Particular solution.

y ' = −0.2e −0.2 x ( A cos 3 x + B sin 3 x ) + e −0.2 x ( −3 A sin 3 x + 3B cos 3 x )

 y ( 0 ) = A = 0, y ' ( 0 ) = −0.2 A + 3B = 3
 A = 0, B =1

  y = e −0.2 x sin 3 x
2.2 Homogeneous Linear ODEs with
Constant Coefficient
2.4 Modeling: Free Oscillations
• We consider a basic mechanical system, a mass on an elastic spring,
which moves up and down.
⚫ Setting Up the Model ❖ Physical Information
Newton’s second law : Mass  Acceleration = Force
Hook’s law: The restoring force is directly proportional to the
distance.
We choose the downward direction as the positive direction.

❖ Modeling
System in static equilibrium

< Mechanical mass-spring system > F0 = −ks0 ( k : Spring constant )


F0 + W = −ks0 + mg = 0
Weight of body : W = mg
System in motion (undamped)
Restoring force : F1 = −ky (Hook’s law)
my '' = F1 (Newton’s second law) my ''+ ky = 0
2.4 Modeling: Free Oscillations
⚫ Undamped System : ODE and Solution
• ODE : my ''+ ky = 0
• Harmonic oscillation :
k
y ( t ) = A cos 0t + B sin 0t = C cos (0t −  ) , 0 2 =
m
< Harmonic oscillation >
C = A + B , tan  = B
2 2
A
⚫ Damped System : ODE and Solutions

• Damping force : F2=-cy (c: the damping constant), my=F1+F2 ( Newton’s second law )

my + cy + ky = 0

• Three types of motion

Case 1 (Overdamping) c  4mk , Distinct real roots.


2

Case 2 (Critical damping) c = 4mk , A real double root.


2

Case 3 (Underdamping) c  4mk , Complex conjugate roots.


2
2.4 Modeling: Free Oscillations
⚫ Discussion of the Three Cases

• Overdamping (c 2
 4mk )
: y ( t ) = c1e
− ( −  ) t − ( +  ) t
+ c2e

c c 2 − 4mk
where  = , =
2m 2m

< Typical motions in the overdamped case >

• Critical damping

(c 2
= 4mk ) : y ( t ) = ( c1 + c2t ) e − t , =
c
2m

< Critical damping>


2.4 Modeling: Free Oscillations
• Underdamping

(c 2
)
 4mk : y (t ) = e −t ( A cos  * t + B sin  * t ) = Ce −t cos( * t −  )

and

< Damped oscillation in Case 3 >


Reference:
Comparison of the Three Oscillations

https://www.youtube.com/watch?v=99ZE2RGwqSM
2.5 Euler-Cauchy Equations
⚫ Euler-Cauchy Equations : x2y + axy + by = 0

substitute

⚫ Auxiliary Equation : m2 + (a-1)m + b = 0

⚫Three kinds of the general solution of the equation

Case 1 Two real roots m1 , m2  y = c1 x m1 + c2 x m2

Ex1)
2.5 Euler-Cauchy Equations

Case 2 A real double root m=


(1 − a )  y = ( c1 + c2 ln x ) x m
2
A second solution can be obtained by the method of reduction of order.
m=
(1 − a )  y = ( c1 + c2 ln x ) x m
2
1 −  pdx
U= e , y2 = uy1 = y1  Udx
y12

Ex2)
2.5 Euler-Cauchy Equations
Case 3 Complex conjugate roots m =   i  y = x   A cos ( ln x ) + B sin ( ln x )

Ex3)
(Auxiliary Equation)
2.7 Nonhomogeneous ODEs
⚫ Nonhomogeneous linear ODEs
y + p(x)y + q(x)y = r(x), r(x)  0

⚫ Definition General Solution, Particular Solution

A general solution of the nonhomogeneous ODE y + p(x)y + q(x)y = r(x) on an


open interval I is a solution of the form

y ( x ) = yh ( x ) + y p ( x )
here, yh = c1 y1 + c2 y2 is a general solution of the homogeneous ODE y + p(x)y +
q(x)y = 0 on I and yp is any solution of y + p(x)y + q(x)y = r(x) on I containing no
arbitrary constants.

A particular solution of y + p(x)y + q(x)y = r(x) on I is a solution obtained from


y(x)=yh(x)+yp(x) by assigning specific values to the arbitrary constants c1and c2 in yh.
2.7 Nonhomogeneous ODEs
⚫ Theorem 1 Relations of Solution of y + p(x)y + q(x)y = r(x) to Those of y +
p(x)y + q(x)y = 0

• The sum of a solution y of y + p(x)y + q(x)y = r(x) on some open interval I and a
solution y of y + p(x)y + q(x)y = 0 on I is a solution of y + p(x)y + q(x)y = r(x) on I.

In particular, y ( x ) = yh ( x ) + y p ( x ) is a solution of y + p(x)y + q(x)y = r(x) on I.

• The difference of two solutions of y + p(x)y + q(x)y = r(x) on I is a solution of y +


p(x)y + q(x)y = 0 on I.

⚫Theorem 2 A General Solution of a Nonhomogeneous ODE Includes All


Solutions

If the coefficients p(x), q(x), and the function r(x) in y + p(x)y + q(x)y = r(x) are
continuous on some open interval I, then every solution of y + p(x)y + q(x)y = r(x)
on I is obtained by assigning suitable values to the arbitrary constants c1 and c2 in a
general solution y ( x ) = yh ( x ) + y p ( x ) of y + p(x)y + q(x)y = r(x) on I.
2.7 Nonhomogeneous ODEs
⚫ Method of Undetermined Coefficients
⚫ Choice Rules for the Method of Undetermined Coefficients

• Basic Rule. If r(x) in y + ay + by = r(x) is one of the functions in the first column in
Table 2.1, choose yp in the same line and determine its undetermined coefficients by
substituting yp and its derivatives into y + ay + by = r(x).

• Modification Rule. If a term in your choice for yp happens to be a solution of the


homogeneous ODE corresponding to y + ay + by = r(x), multiply your choice of yp
by x ( or by x2 if this solution corresponding to a double root of the characteristic
equation of the homogeneous ODE ).

• Sum Rule. If r(x) is a sum of functions in the first column of Table 2.1, choose for yp
the sum of the functions in the corresponding lines of the second column.
2.7 Nonhomogeneous ODEs

Term in r ( x ) . Choice for y p ( x ) .

Ke x Ce x

kxn ( n = 0, 1, ) K n x n + K n −1 x n −1 + + K1 x + K 0

k cos  x
K cos  x + M sin  x
k sin  x

ke x cos  x
e x ( K cos  x + M sin  x )
ke x sin  x

<Table 2.1 Method of Undetermined Coefficients >


2.7 Nonhomogeneous ODEs
Ex1) Solve the initial value problem y ''+ y = 0.001x2 , y ( 0) = 0, y ' ( 0) = 1.5
Step 1 General solution of the homogeneous ODE. yh = A cos x + B sin x

Step 2 Solution yp of the nonhomogeneous ODE.

r ( x ) = 0.001x 2  y p = K 2 x 2 + K1 x + K 0  K 2 = 0.001, K1 = 0, K 0 = −0.002


 y p = 0.001x 2 − 0.002   y = A cos x + B sin x + 0.001x 2 − 0.002

Step 3 Solution of the initial value problem.


y ( 0) = A − 0.002 = 0, y ' ( 0) = B = 1.5   y = 0.002cos x + 1.5sin x + 0.001x2 − 0.002
2.8 Modeling: Resonance
⚫ Free Motion : Motions in the absence of external forces caused solely
by internal forces. restoring force

my + cy + ky = 0
force of inertia
damping force

⚫ Forced Motion : Model by including an external force.

my + cy + ky = r(t)

external force

• r(t) : Input or Driving Force

• y(t) : Output or Response


2.8 Modeling: Resonance
⚫ Motion with periodic external forces

• Nonhomogeneous ODE : my + cy + ky = F0cost

m (0 2 −  2 )
• Use the method of undetermined coefficients
c
y p = a cos t + b sin t , a = F0 , b = F0
m (0 −  ) +  c
2 2 2 2 2 2
m (0 − 
2 2
)
2 2
+  2c2

m ( 0 2 −  2 ) c k
a = F0 , b = F0 0 =
m 2 ( 0 2 −  2 ) +  2 c 2 m 2 ( 0 2 −  2 ) +  2 c 2
2 2 m
2.8 Modeling: Resonance
⚫ Undamped Forced Oscillations. Resonance
F0 F0
c=0  yp = cos t  y = C cos (0t −  ) + cos t
m (0 −  )
2 2
m (0 −  )
2 2

• Homogenous solution: yh = C cos(0t −  )

❖ This output is a superposition of two harmonic oscillations of the frequencies 0


and .
0 cycles 
• Natural frequency :
2  sec 
 cycles 
• Frequency of the driving force :
2  sec 
2.8 Modeling: Resonance
❖ Resonance : Excitation of large oscillations by matching input and natural
frequencies.
F0
When  = 0, y p = cos t is no longer a valid.
m ( 0 2 −  2 )
The nonhomogeneous ODE becomes

F0
By the modification rule, y p = t sin 0t ( = 0 )
2m0

< Particular solution in the case of resonance >


2.8 Modeling: Beats
❖ Beats: Forced undamped oscillation when the difference of the input and natural

frequencies is small.
F0 2 F0  0 +    0 −  
y= ( cos  t − cos  t ) = sin  t  sin  t
m (0 2 −  2 ) m (0 2 −  2 )  2
0
  2 

< Beasts >


2.8 Modeling: Resonance

⚫ Damped Forced Oscillations


• Transient Solution : The general solution y=yh+yp of the nonhomogeneous ODE
• Steady-State Solution : The particular solution yp

❖ After a sufficiently long time the output of a damped vibrating system under a
purely sinusoidal driving force will practically be a harmonic oscillation whose
frequency is that of the input.

❖ Whereas in the undamped case the amplitude of yp approaches infinity as 


approaches 0, this will not happen in the damped case.
2.8 Modeling: Resonance
⚫ Practical resonance : The amplitude may have a maximum for some  depending on
the damping constant c. ( It will always be finite.)
⚫ Maximum amplitude of yp:
2mF0
• C*( max) is always finite when c > 0. C * (max ) =
c 4m20 2 − c 2
• The maximum amplitude increases monotone to infinity as c2(<2mk) goes to zero.
2.9 Modeling: Electric Circuits

< RLC-circuit >

< Elements in an RLC-circuit >


2.9 Modeling: Electric Circuits
⚫ Kirchhoff’s Voltage Law(KVL) : The voltage ( the electromotive force ) impressed
on a closed loop is equal to the sum of the voltage drops across the other elements
of the loop.
⚫ Voltage Drops.
RI (Ohm’s law) Voltage drop for a resistor of resistance R ohms ( W )
dI
LI ' = L Voltage drop for an inductor of inductance L henrys( H )
dt
Q Voltage drop for a capacitor of capacitance C farads ( F )
C
2.9 Modeling: Electric Circuits
d 2I
⚫Model of an RLC-circuit with electromotive force : L 2 + R dI + 1 I = E ' ( t ) = E0 cos t
dt dt C

I p = a cos t + b sin t = I 0sin (t −  )


−E 0 S E0R E0 a S
a= , b= , I0 = a 2 + b2 = , tan  = − =
R +S
2 2
R +S
2 2
R2 + S 2 b R

1
•Reactance : S =  L −
C
E0 E0
• Impedance : R 2 + S 2 = For AC circuit: I 0 =
I0 R2 + S 2
E
Analogy to DC circuit: I =
R
2.9 Modeling: Electric Circuits
• Homogeneous solution: Ih

Characteristic equation:

roots:

never zero in actual circuits

When t→∞, Ih→0.

This means that when t→∞, I→ Ip.

steady-state current
2.9 Modeling: Electric Circuits
⚫ Analogy of Electrical and Mechanical Quantities
• Entirely different physical or other systems may have the same mathematical
model.
• Practical importance of this analogy
1. Electric circuits are easy to assemble.
2. Electric quantities can be measured much more quickly and accurately than
mechanical ones.

Electrical System Mechanical System

Inductance L Mass m

Resistance R Damping constant c

Reciprocal ( 1 C ) of capacitance Spring modulus k


Derivative ( E0 cos t ) of electromotive
Driving force F0 cos t
force
Current I ( t ) Displacement y ( t )
< Analogy of Electrical and Mechanical Quantities >
2.10 Solution by Variation of Parameters
⚫ Method of Variation of Parameter
• p(x), q(x), r(x) in y + p(x)y + q(x)y = r(x) are continuous on some open interval I.
y2 r yr
• Solution formula : y p ( x ) = − y1  dx + y2  1 dx
W W

y1, y2 are a basis of solutions of y + p(x)y + q(x)y = 0.

y1 y2
※ Wronskian W ( y1 , y2 ) = = y1 y2 '− y2 y1 '
y1 ' y2 '
2.10 Solution by Variation of Parameters
⚫ Method of Variation of Parameter
• p(x), q(x), r(x) in y + p(x)y + q(x)y = r(x) are continuous on some open interval I.
y2 r yr
• Solution formula : y p ( x ) = − y1  dx + y2  1 dx
W W

y1, y2 are a basis of solutions of y + p(x)y + q(x)y = 0.

• The formula is obtained under the assumption that the ODE is written in standard

form. If it starts with f(x)y, divide first by f (x).

y2 r yr
• The integration in y p ( x ) = − y1  dx + y2  1 dx may often cause difficulties.
W W
2.10 Solution by Variation of Parameters

Ex1) Solve the nonhomogeneous ODE y ''+ y = sec x


A basis of solutions of the homogeneous ODE : y1 = cos x, y2 = sin x

Wronskian : W ( y1 , y2 ) = cos x cos x − sin x ( − sin x ) = 1


y2 r yr
Apply the method of variation of parameters : y p ( x ) = − y1  dx + y2  1 dx
W W

y p = − cos x  sin x sec xdx + sin x  cos x sec xdx = cos x ln cos x + x sin x

You might also like