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

Self attendance check using

KOREA INCLASS APP.

• Students should check attendance using


the app at every class participation.
• See the app guide for details.
Mathematics for
Engineers I

Youngwoon Choi, Ph.D.


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

Chapter 1
First-Order ODE*

*ODE: Ordinary Differential Equation


Overview
Studying ordinary differential equations (ODEs) by
• deriving them from physical or other problems (modeling)
• solving them by standard methods
• interpreting solutions and their graphs in terms of a given problem

Existence and uniqueness of solutions will also be discussed.

Begin with the simplest ODEs (1st order)


• with only the first derivative of the unknown function
• usual notation for the unknown function will be y(x),
or y(t) → independent variable is time t

Gain a conceptual understanding of the basic terms


• such as ODEs, direction field, and initial value problems
ODEs for physics
1.1 Basic Concepts
Modeling
⚫ Differential Equation : An equation containing derivatives of an unknown function

Ordinary Differential Equation


Differential Equation
Partial Differential Equation

⚫ Ordinary Differential Equation (ODE)


An equation that contains one or several derivatives of an unknown function of
one independent variable
3
y ' = cos x, y ''+ 9 y = e −2 x
y'y '''− ( y ' ) = 0
2
Ex) ,
2
❖ Partial Differential Equation (PDE)

An equation involving partial derivatives of an unknown function of two or


more variables
 2u  2u
Ex) + 2 =0 (Sec. 1.4 & Main subject in fall semester)
x y
2
1.1 Basic Concepts
Modeling
⚫ Order : The highest derivative of the unknown function

Ex) (1) y ' = cos x  First order


(2) y ''+ 9 y = 0  Second order
( )
(3) x2 y ''' y '+ 2e x y '' = x 2 + 2 y 2  Third order

⚫ First-order ODE : Equations contain only the first derivative y '


and may contain y and any given functions of x

• Explicit Form : y ' = f ( x, y )

• Implicit Form : F ( x, y, y ') = 0


1.1 Basic Concepts
Modeling
⚫ Solution : Functions that make the equation hold true

• General Solution: a solution containing an arbitrary constant

Solution • Particular Solution: a solution that we choose a specific


constant

• Singular Solution: an additional solution that cannot be


obtained from the general solution

▪ Ex) (Problem 16) ODE : ( y ') − xy '+ y = 0


2

General solution : y = cx − c 2
Particular solution : y = 2 x − 4
Singular solution : y = x2 / 4
1.1 Basic Concepts
Modeling
⚫ Initial Value Problems : An ordinary differential equation together
with a specified value of the unknown function at a given point in the
domain of the solution

y ' = f ( x, y ) , y ( x0 ) = y0

Ex4) Solve the initial value problem


= 3 y, y (0 ) = 5.7
dy
y' =
dx
Step 1 Find the general solution.
(see Example 3.) General solution : y ( x ) = ce3x
Step 2 Apply the initial condition.

y(0) = ce0 = c = 5.7


Particular solution : y(x ) = 5.7e3 x
1.1 Basic Concepts
Modeling
⚫ Modeling

❖ The typical steps of modeling in detail

Step 1. The transition from the physical situation to its mathematical

formulation

Step 2. The solution by a mathematical method

Step 3. The physical interpretation of differential equations and their

applications
1.1 Basic Concepts
Modeling
Ex5) Given an amount of a radioactive substance, say 0.5 g(gram), find the
amount present at any later time.
Physical Information
Experiments show that at each instant a radioactive substance decomposes at a rate
proportional to the amount present.
Step 1 Setting up a mathematical model (a differential equation) of the physical
process.
dy dy
By the physical law : y  = − ky
dt dt
The initial condition : y ( 0 ) = 0.5
Step 2 Mathematical solution.
General solution : y ( t ) = ce − kt

Particular solution : y ( 0 ) = ce0 = c = 0.5  y ( t ) = 0.5e − kt


dy
Always check your result : = 0.5ke − kt = −ky, y ( 0 ) = 0.5e0 = 0.5
dt
Step 3 Interpretation of result.
The limit of y as t →  is zero.
1.1 Basic Concepts
Modeling
Ex5)

When k = 1.5

y = 0.5e-1.5t
1.2 Geometric Meaning of y=f(x,y)
⚫ Direction Field
: directions of solution curves of a given ODE by drawing short straight-line
segments in the x-y plane.

⚫ Reason of importance of the direction field

• You need not solve an ODE.

• The method shows the whole family of solutions and their typical properties.
1.2 Euler’s method for y=f(x,y)
⚫ Numeric Method by Euler
: yields approximate solution values at equidistant x-values
with an initial value

x1 =x0 + h, y1 = y0 + hf ( x0 , y0 )
y’(x1, y1)
x2 =x0 + 2h, y2 = y1 + hf ( x1 , y1 )
x3 =x0 + 3h, y3 = y2 + hf ( x2 , y2 )

y’(x0, y0)

h
x2
1.2 Euler’s method for y=f(x,y)
1.3 Separable ODEs
⚫ Separable Equation : g ( y) y ' = f ( x)
❖ For a differential equation to be separable, all functions including y in the
differential equation must be multiplied by the derivative on the left side, and all
the x ’s must be on the other side of the equal sign.

⚫ Method of Separating Variables

 dy 
g ( y ) y = f ( x) ⇒  g ( y)dy =  f ( x)dx + c 
 dx
dx = dy 

Ex1) Solve y ' = 1 + y2


y' dy / dx dy
=1  =1  = dx
1+ y 2
1+ y 2
1+ y 2

1
  1 + y 2 dy =  dx + c  arctan y = x + c  y = tan ( x + c )
1.3 Separable ODEs
Ex5) Mixing problems occur frequently in chemical industry. We explain here how to
solve the basic model involving a single tank. The tank in the Figure contains 1000 gal of
water in which initially 100 lb of salt is dissolved. Brine runs in at a rate of 10 gal/min,
and each gallon contains 5 lb of dissolved salt. The mixture in the tank is kept uniform by
stirring. Brine runs out at 10 gal/min. Find the amount of salt in the tank at any time t.
Step 1 Setting up a model.
▶ Salt’s time rate of change (dy / dt = y') = Salt inflow rate – Salt outflow rate
“Balance law”
Salt inflow rate = 10 gal/min × 5 lb/gal = 50 lb/min
Salt outflow rate = 10 gal/min × y/1000 lb/gal = y/100 lb/min

▶ The initial condition : y(0) = 100 (5000 − y )


y 1
 y ' = 50 − =
100 100
1.3 Separable ODEs
Step 2 Solution of the model.
t
dy 1 1 −
▶ General solution : =− dt  ln y − 5000 = − t + c*  y − 5000 = ce 100
y − 5000 100 100
▶ Particular solution :
t

y (0) = 5000 + ce = 5000 + c = 100  c = −4900
0
y = 5000 − 4900e 100
1.3 Separable ODEs
⚫ Extended Method : Reduction to Separable Form

- Certain first order equations that are not separable can be made separable by a simple
change of variables.

▶ A homogeneous ODE  y
y ' = f   can be reduced to separable form by the substitution of y=ux
x

 y du dx  y 
y ' = f    u ' x + u = f (u )  =  y = ux  u = & y ' = ( ux ) ' = u ' x + u 
x f (u ) − u x  x 

▪ Ex8) Solve 2 xyy ' = y 2 − x 2

1 y x 1 1 2u 1
2 xyy ' = y 2 − x 2  y' =  −   u ' x + u = u −   du = − dx
2 x y 2 u u2 +1 x
2
c  y c
 u +1 =
2
   +1 =  x 2 + y 2 = cx
x x x
1.4 Exact ODEs, Integrating Factors
⚫ Exact Differential Equation : The ODE M(x , y)dx +N(x , y)dy =0 is called an exact differential
equation if the differential form M(x , y)dx +N(x , y)dy is exact, that is, this form is the differential
u u
du = dx + dy of some function u(x,y)
x y

❖ If ODE is an exact differential equation, then


M ( x, y ) dx + N ( x, y ) dy = 0  du = 0  u ( x, y ) = c

M N  M   u   2u   u  N 
⚫ Condition for exactness : =  =  = =  = 
y x  y y  x  xy x  y  x 

⚫ Solve the exact differential equation

• M ( x, y ) = u  u ( x, y ) =  M ( x, y ) dx + k ( y ) 
u
= N ( x, y )  get
dk
& k ( y)
x y dy
u u
• N ( x, y ) =  u ( x, y ) =  N ( x, y ) dy + l ( x )  = M ( x, y )  get dl
& l ( x)
y x dx
1.4 Exact ODEs, Integrating Factors
▪ Ex1) Solve cos ( x + y ) dx + ( 3 y 2 + 2 y + cos ( x + y ) ) dy = 0

Step 1 Test for exactness.


M
M ( x, y ) = cos ( x + y )  = − sin ( x + y )
y M N
=
N y x
N ( x, y ) = 3 y 2 + 2 y + cos ( x + y )  = − sin ( x + y )
x

Step 2 Implicit general solution.

u ( x, y ) =  M ( x, y ) dx + k ( y ) =  cos ( x + y ) dx + k ( y ) = sin ( x + y ) + k ( y )
u dk dk
 = cos ( x + y ) + = N ( x, y )  = 3y2 + 2 y  k ( y) = y 3 + y 2 + c *
y dy dy

 u ( x, y ) = sin ( x + y ) + y3 + y 2 = c

Step 3 Checking an implicit solution.

u u
du = dx + dy = cos ( x + y ) dx + (cos ( x + y ) + 3 y 2 + 2 y )dy = 0
x y
1.4 Exact ODEs, Integrating Factors
⚫ Reduction to Exact Form, Integrating Factors

Some equations can be made exact by multiplication by some function, F ( x, y )  0 ,

which is usually called an Integrating Factor.

▪ Ex3) Consider the equation − ydx + xdy = 0


 
∵ ( − y ) = −1, ( x) = 1  not exact.
y x

Multiplying by 1 gives an exact equation.


x2

y 1    y 1   1 

x2
dx + dy = 0  ∵ − 2  = − 2 =  
y  x  x  x  
x  x
1.4 Exact ODEs, Integrating Factors
⚫ How to Find Integrating Factors FPdx + FQdy = 0

  F P F Q
The exactness condition : ( FP ) = ( FQ )  P+F = Q+F
y x y y x x

Golden Rule : If you cannot solve the problem, try to solve a simpler one.

Hence, we look for an integrating factor depending only on one variable.

F F
Case 1) F = F ( x)  = F', =0
x y

1 dF 1  P Q 
FPy = F ' Q + FQx  = R ( x ) where R ( x ) =  − 
F dx Q  y x 
  F ( x ) = exp (  R ( x ) dx )

1  Q P 
Case 2) F* = F * ( y ) 
1 dF *
F * dy
= R * where R* =  −   F * ( y ) = exp
P  x y 
(  R * ( y ) dy )
1.4 Exact ODEs, Integrating Factors
▪ Ex5) Find an integrating factor and solve the initial value problem
(e x+ y
+ ye y ) dx + ( xe y − 1) dy = 0, y ( 0) = −1

Step 1 Nonexactness.
P
P ( x, y ) = e x + y + ye y  = e x + y + e y + ye y
y P Q

Q y x
Q( x, y ) = xe y − 1  = ey
x
1  P Q 
R=  −  =
1
Q  y x  xe − 1
y ( e x+ y
+ e y
+ ye y
− e y
) =
1
xe − 1
y ( e x + y + ye y )  Fails.
1.4 Exact ODEs, Integrating Factors
Step 2 Integrating factor. General solution.

1  Q P 
y (
e y − e x + y − e y − ye y ) = −1
1
R* =  −  = x+ y
 F * ( y ) = e− y
P  x y  e + ye

 (e x
+ y ) dx + ( x − e− y ) dy = 0 is the exact equation.
u
u =  ( e x + y ) dx + k ( y ) = e x + xy + k ( y )  = x + k ' ( y ) = x − e− y  k ' ( y ) = −e − y , k ( y ) = e − y
y

Step 3 Particular solution

The general solution is u(x, y ) = e + xy + e = c


x −y

y ( 0) = −1  u ( 0, −1) = e0 + 0 + e = 3.72  u ( x, y ) = e x + xy + e− y = 3.72


1.5 Linear ODEs, Bernoulli Equation
Homogeneous Linear ODEs
Linear ODEs
ODEs Nonhomogeneous Linear ODEs
Nonlinear ODEs

⚫ Linear ODEs : ODEs which is linear in both the unknown function and its derivative.

Ex. y '+ p ( x ) y = r ( x ) : Linear differential equation

y '+ p ( x ) y = r ( x ) y 2 : Nonlinear differential equation

• Standard Form : y '+ p ( x ) y = r ( x ) ( r(x) : Input, y(x) : Output )


⚫ Homogeneous, Nonhomogeneous Linear ODE

y '+ p ( x ) y = 0 : Homogeneous Linear ODE

y '+ p ( x ) y = r ( x )  0 : Nonhomogeneous Linear ODE


1.5 Linear ODEs, Bernoulli Equation
⚫ Homogeneous Linear ODE.(Apply the method of separating variables)

y = ce 
dy − p ( x ) dx
y '+ p ( x ) y = 0  = − p ( x ) dx  ln y = −  p ( x ) dx + c * 
y

Ex1) Solve the initial value problem

y '+ y tan x = sin 2 x, y (0) = 1.


1.5 Linear ODEs, Bernoulli Equation
Ex2) Electric Circuit
Model the RL-circuit in the figure and solve the resulting ODE for the current I(t) A (amperes),
where t is time. Assume that the circuit contains as an EMF E(t) (electromotive force) a battery
of E=48 V (volt), which is constant, a resistor of R=11 W (ohms), and an inductor of L=0.1 H
(henrys), and that the current is initially zero.

Physical Laws: A current I in the circuit causes a voltage drop RI


across the resistor (Ohm’s law) and a voltage drop LI’= L dI/dt across
the conductor, and the sum of these two voltage drops equals the
EMF (Kirchhoff’s Voltage Law, KVL).
1.5 Linear ODEs, Bernoulli Equation
Ex2) Electric Circuit

Solutions with different IVs


1.5 Linear ODEs, Bernoulli Equation
⚫Nonhomogeneous Linear ODE.(Find the integrating factor and solve )

y '+ p ( x ) y = r ( x )  ( py − r ) dx + dy = 0 is not exact

   
 ( py − r ) = p  0 = (1) 
 y x 

1  P Q 
 F = e
1 dF pdx
Find integrating factor R =  − = p  =p  = eh
Q  y x  F dx
where h =  pdx

Then the equation e  ( py − r ) dx + e 


pdx pdx
dy = 0 is exact.
1.5 Linear ODEs, Bernoulli Equation
Solve e
pdx
( py − r ) dx + e 
pdx
dy = 0 e h ( py − r ) dx + e h dy = 0

Method I (general method)

N = F = eh , M = F ( py − r ) = e h ( py − r )

u
N ( x, y ) =  u ( x, y ) =  N ( x, y ) dy + l ( x ) (Using N is simple)
y

y = e − h   re h dx + c 
 
1.5 Linear ODEs, Bernoulli Equation
Solve e
pdx
( py − r ) dx + e 
pdx
dy = 0 e h ( py − r ) dx + e h dy = 0

Method II (special method in the textbook)

dy
e h ( py − r ) + e h =0
dx

y = e − h   re h dx + c 
 
1.5 Linear ODEs, Bernoulli Equation
▪ Ex1) Solve the linear ODE y '− y = e2 x

Compare to y '+ p ( x ) y = r ( x )

p = −1, r = e2 x , h =  pdx = − x   y = e− h   eh rdx + c  = e x   e− xe2 x dx + c  = e x e x + c  = e 2 x + ce x


1.5 Linear ODEs, Bernoulli Equation
⚫ Bernoulli Equation : y '+ p ( x ) y = g ( x ) y a ( a0 &1)
1− a
We set u ( x ) =  y ( x )
 u ' = (1 − a ) y − a y ' = (1 − a ) y − a ( gy a − py ) = (1 − a ) ( g − py1− a ) = (1 − a )( g − pu )

 u '+ (1 − a ) pu = (1 − a ) g : a nonhomogeneous linear ODE


1.5 Linear ODEs, Bernoulli Equation
▪ Ex4) Logistic Equation
Solve the following Bernoulli equation, known as the logistic equation y' = Ay − By
2

y ' = Ay − By 2  y '− Ay = − By 2 & a = 2 ( u = y −1 )


 u ' = − y −2 y ' = − y −2 ( Ay − By 2 ) = − Ay −1 + B = − Au + B  u '+ Au = B
B  B
p = A, r = B  h =  pdx = Ax & u = e − h   e h rdx + c  = e − Ax  e Ax + c  = ce − Ax +
A  A

1 1
y= =
( )
The general solution of the logistic equation is
u B + ce− Ax
A

You might also like