Chapter
13
Differential Equations
13.1 Introduction to Differential Equations A differential equation is an equation which states a relationship between an independent variable dy d 2 y y ( = f ( x )) x, a dependent variable and at least one of the derivatives , ,... etc. Differential dx dx 2 equations play an important role in the applications of Mathematics to scientific problems. The order of a differential equation is the order of the highest derivative which occurs in it. The degree of a differential equation is the power of the highest derivative which occurs in it. Differential equation dy = 2 x + x 2 + ln x dx 2 dy 1 + y 2sec x = y dx
Order 1
Degree 1
1
1
dy = x + y dx
1
2
d 2 y dy x = + e + 3 tan x dx 2 dx
2
1
2
A solution of a differential equation in x and y is an equation relating x and y, with no derivatives and satisfies the differential equation. Example 1: Solve the differential equation
dy = 2. dx
Solution: dy =2 dx By integration, y = 2 x + C , where C is an arbitrary constant (i.e. any real number). Note: (i) y = 2 x + C is the “general solution” (i.e. a collection of all possible solutions) of the dy = 2. differential equation dx (ii) The general solution of a first order DE contains one arbitrary constant. (iii)
We can find the particular solution of a differential equation if conditions (e.g. y = 7 when x = 0) are given.
2
Chapter 13 Differential Equations Using the example above, by substituting x = 0 and y = 7 into y = 2 x + C , we get C = 0. Therefore, the particular solution of the differential equation is y = 2 x + 7 .
Chapter 13. Differential Equations
3
13.2 Solving First Order Differential Equations 13.2.1 Separable variables We use direct integration to solve differential equations of the following forms: dy = f ( x) (a) ( rhs is an expression involving x only) dx dy = g( y ) (b) ( rhs is an expression involving y only) dx Example 2: Determine the general solution of the differential equation
dy = 2 x + x 2 + ln x, for x > 0 . dx
Solution:
Self-review 1: Solve the differential equation
dy 10 2x − 3 = 2 | +c ] . [Answer: y = 10 ln | dx 2 x − 5 x + 3 x −1
Example 3: Find the general solution of the differential equation Solution:
dy − 2y = 0. dx
4
Chapter 13 Differential Equations Example 4: Find the general solution of the differential equation 2
dy 1 + y 2 = . dx y
Solution: dy 1 + y 2 2 = dx y 2 y dy =1 2 1 + y dx Integrating both sides, we have 2y dy = ∫ 1dx 2
∫ 1 + y
ln ( 1 + y 2 ) = x + c 1 + y 2 = e x +c y 2 = Ae x − 1, ∴
A = ec
The general solution is y 2 = Ae x − 1.
Example 5: Find
the
particular
given that y = 0 when x = 0. Solution:
solution
of
the
differential
dy −3 y 2 =0, equation y + e dx
Chapter 13. Differential Equations
5
Self review 2: (93/II/14a) Find the general solution of the differential equation
dy = (1 − y 2 ) , giving your answer dx
in the form y = f(x). Ae 2 x − 1 [Answer: y = ] Ae 2 x + 1
13.2.2 Reduction by substitution Some of the first order differential equations are not directly integrable (or separable). However, we can perform a simple substitution to make the differential equation directly integrable (or separable). Procedure: (i) Get rid of y (the dependent variable) and its derivative in the original differential equation using the given substitution. (ii) The new differential equation (involving x and u, or z or v and respective derivatives
du , dx
dz dv or ) will be “variable separable”. dx dx Note: The variables u, v, or z are all functions of x and they can be differentiated with respect Example 6: The variables x and y are related by the differential equation substitution z = 2x + y, show that
dz dx
=
3z z −1
dy 2 x + y + 2 = . Using the dx 2 x + y − 1
. Solve this equation and hence find the general
solution of y. Solution:
Integrating both sides, we have z −1 dz = ∫ 3 dx z 1 ∫ 1 − z dz = 3 x + c
∫
z − ln | z |= 3x + c Thus, the general solution is y −ln | 2 x + y| = x + c.
(NOTE: The final answer should be in the original variables. Leave the final answer in the form y = f(x) whenever possible.)
6
Chapter 13 Differential Equations
Example 7: Use the substitution u = −2t + v to solve the differential equation
dv dt
= (−2t + v ) 2 − 7 , given that
v = 0 when t = 0. Solution: (***notice the independent variable is now t, not x) du dv ⇒ = −2 + Given: u = −2t + v dt dt dv u −3 = ( −2t + v ) 2 − 7 ln = 6t + 6c dt u +3 du + 2 = u2 − 7 dt du = u2 − 9 dt 1 du =1 2 u − 9 dt
u −3 = e 6t + 6 c u +3 u −3 = ±e 6c e6t = Ae6t where A = ±e6c u +3 3( Ae6t + 1) u= 1 − Ae6 t
1 ∫ u 2 − 32 du = ∫ 1 dt 1 u −3 ln = t +c 6 u + 3
3( Ae 6t + 1) 1 − Ae 6t 3( Ae6t + 1) v = 2t + 1 − Ae6t −2t + v =
3( Ae6t + 1) 1 − Ae 6t 3( A + 1) 0= ∴ A = −1 When t = 0, v = 0, 1− A 3(−e6t + 1) The particular solution would be y = 2t + 1 + e6t The general solution is v = 2t +
You can only substitute in values from conditions when your equations no longer have any modulus sign.
Self review 3: Use the substitution y = vx , where v is a function of x, to reduce the differential equation to a dy dv x = 3 x + y differential equation of the form = f ( x ) . Solve this equation for v and hence dx dx find y in terms of x. [Answer: y = 3 x ln x + cx ]
13.3 Solving Second Order Differential Equations We solve differential equations of the form
Example 8:
d2y = f ( x) by performing direct integration twice. dx 2
Chapter 13. Differential Equations d2 x = − sin 3t . Hence find the particular dt 2 dx = 1 when t = 0. solution to the above differential equation if x = 2, dt Solution: Find the general solution to the differential equation
*Note: i) the general solution of a 2nd order DE contains two arbitrary constants. ii) To find the particular solution, two sets of conditions are required dx =1} ) (in the above example, { t = 0, x = 2 } and { t = 0, dt Self review 4: d2 y Find the general solution to the differential equation 2 = e 2 x . Hence, find the particular solution dx dy for which y = 1 and =2 when x = 0. dx 1 2x 1 2x [Answer: y = e + cx + d , y = (e + 6 x + 3) ] 4 4
7
8
Chapter 13 Differential Equations
13.4 Solution Curves (Family of Curves) The general solution to a differential equation with an arbitrary constant gives a family of curves. Each value of the arbitrary constant gives a particular curve of the family (corresponding to a particular solution). Unless otherwise stated in the question, we usually consider values of c which are negative, zero and positive. Example 9: i) Sketch the family of solution curves of the differential equation ii) Solve the differential equation
dy = 2. (see Example 1) dx
dy = 2 x − 2 and sketch the family of solution curves. dx
Solution: i)
From example 1, y = 2 x + C is the general solution of the differential equation Putting C = –2, 0, 2, we get the following solutions respectively: y = 2x – 2, y = 2x, y = 2x + 2. Sketch of family of solution curves (from GC):
ii) Integrate with respect to x : ∴
dy = 2x − 2 dx ∫ 1 dy = ∫ 2 x − 2 d x
The general solution is y = x 2 − 2 x + c.
When c = –2: When c = 0: When c = 2:
y = x2 − 2 x − 2 y = x2 − 2 x y = x2 − 2 x + 2
The family of solution curves can be sketched using a graphic calculator: (Take note of the differences in the brackets)
dy = 2. dx
Chapter 13. Differential Equations
9
(Note: You may need to zoom in to see the curves separately)
13.5 Applications of Differential Equations [Mathematical Models] It is often desirable to describe the behaviour of some real-life system or phenomenon, whether physical, sociological, or even economic, in mathematical terms. The mathematical description of a system or a phenomenon is called a mathematical model. For example, we may wish to understand the mechanisms of a certain ecosystem by studying the growth of animal populations in that system, or we may wish to date fossil by analyzing the decay of a radioactive substance in the fossil in which it was discovered. Construction of a mathematical model of a system involves: (i) Identifying the variables that are responsible for changing the system. (ii) Making a set of reasonable assumptions, or hypothesis, about the system we are trying to describe. These assumptions will include any empirical laws that may be applicable to the system. The assumptions made about a system frequently involve a rate of change of one or more of the variables. This gives rise to equations involving derivatives i.e. a differential equation or a system of differential equations. The independent variable is usually time, denoted by t, since the change is occurring over a time period. For mathematics at H2 level, you should obtain one differential equation which looks like either dy dy d2 y = f ( x) , = g( y ) or = h( x) . The problem is usually whether you can dx dx dx 2 (i) identify the dependent and independent variables, and form the differential equation (ii) identify the initial conditions (iii) solve the resulting DE by integration To form the differential equation, remember that Rate of change = Rate of increase – Rate of decrease of x of x of x
In this section, conditions will be given to solve for the constants. Note that whenever the questions mention initially, in the beginning or originally, it means when t = 0.
10
Chapter 13 Differential Equations
Example 10: (An example on radioactive decay) The rate at which a certain radioactive substance decays is proportional to the amount present. A block of this substance having a mass of 100g originally is observed. After 40 hrs, its mass reduces to 90 g. Form a differential equation to describe this phenomenon. Find (i)
an expression for the mass of the substance at any time and give a sketch to illustrate the process of decay with time t;
(ii) the time-lapse before the block decays to one half of its original mass. Solution: (i)
(iii)
When x = 50, −(
⇒
50 = 100e
∴
t = 263 hrs
1 10 ln ) t 40 9
⇒
−(
e
1 10 ln ) t 40 9
=
1 ⇒ 2
−(
1 10 1 ln )t= ln 40 9 2
Example 11: (An example on population dynamics) A colony of micro-organisms in a dish is growing at a rate proportional to the number of organisms present at any time. There are initially no organisms. Write down a differential equation that models the growth of the organisms. Given that the colony doubles in size in T hours, find the total time taken for the colony to triple in size. Give a condition under which the model may be inappropriate.
Chapter 13. Differential Equations
11
Solution: Let n be the number of micro-organisms. Rate of increase ∝ n ⇒ Rate of increase = kn, wher e k > 0 Rate of decrease = 0 A differential equation that models the growth of the organisms would be dn dn = kn − 0 ⇒ = kn dt dt Integrating the above equation on both sides, we have 1 ∫ n dn = ∫ k d t ln n = kt + c ⇒ n = e kt +c ⇒ n = ae kt
, a = ec
When t = 0, n = no: a = no n = n0 e kt Since colony doubles in size in T hours, i.e. n = 2n0 at t =T: 2no = no e kT ln 2 ⇒ 2 = e kT ⇒ ln 2 = kT ⇒ k = T ln 2
Thus, at time t, n = n e T o
t
For colony to triple in size, let the time taken be θ hours i.e. ln 2
3no = no e T ln 2
⇒ 3=e T
θ
(θ )
⇒ ln 3 =
ln 2 θ T
⇒θ =
ln 3 T. ln 2
Any logical answer will be accepted. For example: The model may be inappropriate if there is a decrease in the micro-organisms along with time as the model accounts for the growth of micro-organisms only. Example 12 (NYJC/2/2): (an example involving input/output) In a controlled experiment, the rate at which liquid fuel is pumped into a tank is twice the remaining volume of the tank, and the rate at which the fuel in the tank is used up is proportional to the square 3 3 m and the volume of fuel in the of the volume of fuel in the tank. The capacity of the tank is 2 tank at time t is x m3 . (i)
Given that the volume of fuel in the tank stabilizes at 1 m3 , show that the increase of the fuel dx = − x2 + 2x − 3 . is given by the differential equation dt
(
)
(ii)
Given that the tank is initially empty, find x in terms of t.
(iii)
Sketch the graph of your solution curve in (ii).
12
Chapter 13 Differential Equations
Solutions: (i)
(ii)
(
dx = − x2 + 2x − 3 dt 1 dx = −1 2 x + 2x − 3 d t 1 d x = − dt 2 x + 2x − 3 1 d x = − dt ( x + 1) 2 − 22
∫ ∫
)
∫ ∫
1 x −1 ln = −t + C 4 x+3 x −1 = e −4t + 4C = e −4t × e 4C x+3 x −1 = A e −4t where A = ± e 4C x+3 1 When t = 0 , x = 0 , A = − , 3 −3 ( x − 1) = ( x + 3) e −4t
(
)
x 3 + e −4t = 3 − 3e −4t x= (iii)
(
3 1 − e −4 t 3+ e
−4 t
)
Alternatively: 4 1 1− = − e −4 t x+3 3 12 x= −3 3 + e −4 t
Chapter 13. Differential Equations
13
Summary Differential Equations
1st order i.e.
dy dx
(A) Variable separable dy = f ( x) dx dy = g( y ) (b) dx (one arbitrary constant in general solution) (a)
2nd order i.e.
(C)
d2 y dx 2
d2 y = f ( x) dx 2
( perform integration twice; two arbitrary constants in general solution. )
(B) Reduction by given substitution – to turn it to “variable separable”
D) Application Problems -
identify the variables involved (dependent variable is often time, t) set up the DE according to the description of question (draw a diagram if possible) find the general solution solve for particular solution, using conditions given in question.
E) Family of solution curves - use GC to obtain curves, by letting the arbitrary constant take on a range of values (e.g. – 2, 0, 2) - use curly brackets (e.g. {– 2, 0, 2}) when inputting the function in GC in place of the arbitrary constant.
14
Chapter 13 Differential Equations
Self-reading Appendix: General case of “variable separable” differential equations dy = f ( x)g( y ) ( rhs can be written as a PRODUCT of expressions dx in x and y ). (this case is excluded from the H2 syllabus; it does not involve any new concept and may appear in some JC prelim exam papers).
In general, the two variables of the differential equation can be separated if
dy can be written as a dx
PRODUCT of a function in x and a function in y. i.e.
dy = f ( x)g( y ) dx
⇒
1
ò g( y) dy = ò f ( x) dx
Example: Are the following differential equations “separable”? dy dy dy =x+y i) ii) ( x +1) = 2 - sin y iii) y ( x - 1) = x( y + x) - x dx dx dx Example: 2 Find the general solution of the differential equation (1 + x )
dy − xy (1 + y ) = 0 . dx
Solution: dy xy (1 + y ) x = ( note : f ( x) = and g( y ) = y (1 + y ) ) 2 dx 1+ x 1 + x2 1 x ∫ y(1 + y) dy = ∫ 1 + x 2 dx 1 1 1 2x ∫ y − 1 + y dy = 2 ∫ 1 + x 2 dx 1 ln y − ln 1 + y = ln ( 1 + x 2 ) + c 2 y 1 ln = ln ( 1 + x 2 ) + c 1+ y 2 y = ±eln 1+ y
1+ x 2 + c
y = A 1 + x2 , 1+ y y=
A = ± ec
A 1 + x2 1 − A 1 + x2
Thus, the general solution is y =
A 1 + x2 1 − A 1 + x2
.