ADVANCED Mathematics For Mechinical Engineering
ADVANCED Mathematics For Mechinical Engineering
∞
𝒄𝒐𝒔𝒂𝒙 𝝅
∫ 𝟐 𝟐 𝟐
𝒅𝒙 = 𝟑 (𝟏 + 𝒂𝒃)𝒆−𝒂𝒃 , 𝒂 > 0 , 𝑏 > 0)
𝟎 (𝒙 + 𝒂 ) 𝟒𝒃
Unit 1
Introduction
Scientific calculators and computers have become part of everyday living. There are
certain mathematical calculations which are almost impossible to perform without
these devices. For instance, there are certain integration problems, such as
𝜋
∫0 (1 + 𝑥 2 )10 𝑑𝑥, which are difficult/impossible to evaluate without a computing
algorithm or computing device.
The disadvantage when using a computing device is that the answers may not be
accurate enough due to some or other rounding off errors hence numerical analysis
techniques become handy during computations.
Why is there a need for numerical methods?
• Computational methods may have some errors inherited or unintended.
These errors may require detection and correction before results may be
published.
• Most numerical methods give answers that are mostly approximations to
desired true solutions. The approximations themselves may result into the
propagation of these errors, thus they also require refinement.
• Refinement implies that there is a need to set bounds or restrictions to errors
to have meaningful results at the end.
or maximizers of functions
2
Example 1.1
The square root of 3 is estimated to be 1,732 (3D). Determine the relative error and
then the percentage error.
Solution
∆𝑥 = 𝑥𝐴 − 𝑥𝑇 = 1,732 − √3
= −0,00005
|∆𝑥| = 0,00005
∆𝑥 0,00005
𝑟 = |𝑥|= = 0,0000289
1,732
Example 1.2
Two lengths are measured as 473 mm to the nearest millimeter and as 1 km to
within 1 m on either side. A calculation using one of these measurements needs to
be used to minimize costs. Decide which measurement will minimize the costs.
3
Solution
We have 473 ± 1𝑚𝑚 𝑎𝑛𝑑 1000 ± 1𝑚. The actual error magnitudes differ
significantly. One might be tempted to opt for the error in 𝑚𝑚 as it seems to be the
best to use, however in this instance relative error or error percentages need to be
compared to get a clear picture and in making the right choice based on the
accuracy and precision in the measurements. The process leading to making a
choice is as follows:
0,5
𝑟1 = 473 = 0,001057 , 𝑃1 = 0,001057 × 100 ≈ 0,11%
0,5
𝑟2 = 1000 = 0,0005 , 𝑃2 = 0,0005 × 100 ≈ 0,05%
Activity 1.1
1. An iron rod of length 100 mm is heated and allowed to expand by no more than
0,5 mm on either side.
Determine:
(a) The value 𝑥𝐴 that may be assumed to be closest to the true length.
(b) The absolute error, relative error and percentage error
2. For a displacement transducer having calibration 𝑌 = 𝐾𝐸 where 𝐾 𝑎𝑛𝑑 𝐸 are
sensibility indices, estimate the uncertainty in displacement for 𝑌 if 𝐸 = 5,00 𝑉,
𝐾 = 10,10𝑚𝑚/𝑉 with tolerances ∆𝐾 = ±0,10 𝑚𝑚/𝑉 and ∆𝐸 = 0,01 𝑉
Example 1.3
Estimate the maximum error in 𝑦 if 𝑦 = 𝑠𝑖𝑛2 𝑥 for 𝑥 = 0,61 ± 0,005
Solution
We are given |∆𝑥| = 0,005
𝑑𝑦
So |∆𝑦| ≈ |𝑑𝑥 | |∆𝑥|
Activity 1.2
1. Determine the maximum error for
(a) 𝑦 = 1 + 𝑐𝑜𝑠𝑥 ; 𝑥 = 0,5 ; ∆𝑥 = 0,01
(b) 𝑦 = 𝑥𝑠𝑖𝑛𝑥 ; 𝑥 = 0,3 ; ∆𝑥 = 0,1
(c) 𝑦 = 1 + 𝑥 2 − 3𝑥 3 , 𝑥 = 0,3 ; ∆𝑥 = 0,1
(d) 𝑦 = 𝑠𝑒𝑐𝑥 ; 𝑥 = 0,12 ; ∆𝑥 = 0,01
(e) 𝑦 = ln(1 + 𝑥) ; 𝑥 = 1,0 ; ∆𝑥 = 0,02
(f) 𝑦 = 𝑠𝑖𝑛ℎ2𝑥 ; 𝑥 = 0,6 ; ∆𝑥 = 0,1
Example 1.4
Let 𝑢 = 𝑥 2 𝑦 3 𝑧 2 𝑤ℎ𝑒𝑟𝑒 ∆𝑥 = 0,2 ; ∆𝑦 = 0,1 𝑎𝑛𝑑 ∆𝑧 = 0,3. If 𝑥, 𝑦 𝑎𝑛𝑑 𝑧 are
𝑥 = 12, 𝑦 = 14 𝑎𝑛𝑑 𝑧 = 12 respectively, determine the maximum error of the product
function 𝑢.
Solution
𝑙𝑛𝑢 = 2𝑙𝑛𝑥 + 3𝑙𝑛𝑦 + 2𝑙𝑛𝑧
1 𝑑𝑢 2 1 𝑑𝑢 3 1 𝑑𝑢 2
=𝑥 ; =𝑦 ; =𝑧
𝑢 𝑑𝑥 𝑢 𝑑𝑥 𝑢 𝑑𝑥
1 𝑑𝑢 2 3 2
= ∆𝑥 + ∆𝑦 + ∆𝑧
𝑢 𝑑𝑥 𝑥 𝑦 𝑧
2 3 2
∆𝑢 = 𝑥 ∆𝑥 + 𝑦 ∆𝑦 + 𝑧 ∆𝑧
2 3
| ∆𝑢| = 𝑢 | | |∆𝑥| + 𝑢 | | |∆𝑦| + 𝑢|∆𝑧|
𝑥 𝑦
Since 𝑥 = 12 , 𝑦 = 14 , 𝑧 = 12 we have
2 3 2
∆𝑢 = 𝑢(12 . 0,2 + 14 . 0,1 + 12 . 0,3)
= 𝑢(0,1047)
≈ 𝑢(0,105) (3𝐷)
∴ maximum % error = 10,5 %
Class activity
Apply the principle as in the example above to calculate the maximum error for
𝑢 = (𝑥 = 1.23)4 (𝑦 = 3,45)2 (𝑧 = 8,54)2
where ∆𝑥 = ∆𝑦 = ∆𝑧 = 0,05
Example 1.5
Given measured quantities 𝐴 = 15,3 , 𝐵 = 5,112 , 𝐶 = 3,9567 and 𝐷 = 11,9457
𝐴2 𝐵𝐶
Determine the error in the calculation of 𝐾 = and determine the interval of
𝐷
accuracy and 𝐾𝑏 (the best accurate value of 𝐾), where ∆𝐴 = 0,05
∆𝐵 = 0,0005 𝑎𝑛𝑑 ∆𝐶 = ∆𝐷 = 0,00005
6
Solution
𝜕𝐾 𝜕𝐾 𝜕𝐾 𝜕𝐾
∆𝐾 = ∆𝐴 + 𝜕𝐵 ∆𝐵 + 𝜕𝐶 ∆𝐶 + 𝜕𝐷 ∆𝐷
𝜕𝐴
2𝐴𝐵𝐶 𝐴2 𝐶 𝐴2 𝐵 𝐴2 𝐵𝐶
∆𝐾 = . ∆𝐴 + ∆𝐵 + ∆𝐶 − ∆𝐷
𝐷 𝐷 𝐷 𝐷2
Let ∆𝐾 = 𝑒𝑘 , ∆𝐴 = 𝑒𝐴 , ∆𝐵 = 𝑒𝐵 , ∆𝐶 = 𝑒𝐶 , ∆𝐷 = 𝑒𝐷
Taking moduli and applying Schwartz inequality (|𝑎 ± 𝑏| ≤ |𝑎| + |𝑏|) we have
2𝐴𝐵𝐶 𝐴2 𝐶 𝐴2 𝐵 𝐴2 𝐵𝐶
|𝑒𝐾 | = | . 𝑒𝐴 + 𝑒𝐵 + . 𝑒𝐶 − . 𝑒𝐷 |
𝐷 𝐷 𝐷 𝐷2
2𝐴𝐵𝐶 𝐴2 𝐶 𝐴2 𝐵 𝐴2 𝐵𝐶
|𝑒𝐾 | ≤ | . 𝑒𝐴 | + | 𝑒𝐵 | + | . 𝑒𝐶 | + |− . 𝑒𝐷 |
𝐷 𝐷 𝐷 𝐷2
2𝐴𝐵𝐶 𝐴2 𝐶 𝐴2 𝐵 𝐴2 𝐵𝐶
|𝑒𝐾 | ≤ | | × 0,05 + | | × 0,0005 + | . 𝑒𝐶 | × 0,00005 + |− . 𝑒𝐷 | × 0,00005
𝐷 𝐷 𝐷 𝐷2
Activity 1.3
1. (a) For measured quantities 𝑥 = 0,1 𝑎𝑛𝑑 𝑦 = 0,2 𝑤ℎ𝑒𝑟𝑒 ∆𝑥 = 0,005 𝑎𝑛𝑑
∆𝑦 = 0,002, determine the maximum % error in the calculation of
𝑧 = 𝑐𝑜𝑠ℎ2 (𝑥 + 𝑦)
(b) The volume 𝑉 𝑐𝑚3 of a circular cylinder of radius 𝑟 𝑐𝑚 and height ℎ 𝑐𝑚
is given by 𝑉 = 𝜋𝑟 2 ℎ. If 𝑟 = 3 𝑐𝑚 𝑎𝑛𝑑 ℎ = 5 𝑐𝑚 where deviations are 1%
and 5% respectively, determine the absolute maximum error in the calculation
of 𝑉.
(c) Determine the maximum and negative minimum error in the calculation of
𝑅 = ln (3𝐴2 + 2𝐵 3 ) for the measured quantities 𝐴 = 1,41 ; 𝐵 = 1,3 subject to
the tolerance levels ±0,001 𝑎𝑛𝑑 ± 0,002 respectively.
7
is the lift coefficient, 𝑉 is free stream velocity and 𝐴 is the area covered by
the fluid. If 𝐶 can be measured to within 1%, 𝜌 to within 0,5% , 𝑉 to within
0,6% and 𝐴 to within 1%, determine the maximum percentage error in the
(f) The volume 𝑉 𝑐𝑚3 of a cylinder of radius 𝑟 𝑐𝑚 and height ℎ 𝑐𝑚 is given by
𝑉 = 𝜋𝑟 2 ℎ. If 𝑟 = 3 𝑐𝑚 𝑎𝑛𝑑 ℎ = 5 𝑐𝑚 where deviations are 1% and 5%
from true values respectively. Determine the absolute relative maximum
error in the calculation of the volume of the cylinder.
2. (a) For measured quantities 𝐴 = 2,41 ; 𝐵 = 4,0 ; 𝐶 = 2,91 𝑎𝑛𝑑 𝐷 = 1,711 with
deviation allowances of 0,5% , 5% , 4% 𝑎𝑛𝑑 0,5% respectively, determine
𝐴𝐵
the interval of accuracy in the calculation of 𝑇 = 𝐶 2 𝐷3
(b) Given measured values 𝐶 = 0,211 𝑎𝑛𝑑 𝐷 = 0,4115 and the individual error
deviations of 5 × 10−4 and 5 × 10−5 respectively, determine the limits of
accuracy and the best value 𝑃𝑏 in the calculation of 𝑃 = 𝐶𝑐𝑜𝑠(2𝜋𝐷)
Illustration
Suppose we want to solve the system of equations
2𝑥 + 3𝑦 = 4 (1)
𝑥2 + 𝑦2 = 3 (2)
using some iterative procedure.
1. The starting point will be to sketch the given curves and note some intercepts that
can help in guessing the starting value 𝑥0
𝑦
4
𝐵
3
2
𝐴 3
𝐶 𝐷 𝑥
√3 ≈ 1,732
The 𝑥 value at A should slightly be less than √3 say 𝑥 ≈ 1,5. From equation (1)
4−3
if 𝑥 = 1,5 , 𝑦 = ≈ 0,333. Substitution of 𝑦 = 0,333 into (2) ⇒ 𝑥 2 = 3 − (0,333)2
3
∴ 𝑥 ≈ ±1,6997
Now discard the negative value and use 𝑥1 = 1,6997. Return to equation (1) to
determine another 𝑦 – value 𝑦1 that will generate another 𝑥-value 𝑥2 . Use this
value to generate another 𝑦-value that is 𝑦2 . Apply this process until two successive
𝑥-values agree by say 4 decimal places. Rounding off to two decimal places will give
the approximate value of 𝑥 𝑡ℎ𝑎𝑡 𝑖𝑠 𝑥 ∗ 𝑎𝑛𝑑 ℎ𝑒𝑛𝑐𝑒 𝑦 ∗ can be determined. This
process also illustrates the convergence behaviour of 𝑦 𝑣𝑎𝑙𝑢𝑒𝑠 towards a true
solution of the system.
If the process is carried out consistently and accurately the iterates will be as follows
𝑥0 𝑎𝑠𝑠𝑢𝑚𝑒𝑑, 𝑎𝑙𝑙 𝑜𝑡ℎ𝑒𝑟 𝑥 𝑣𝑎𝑙𝑢𝑒𝑠 𝑓𝑟𝑜𝑚 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 (2) 𝑦 𝑣𝑎𝑙𝑢𝑒𝑠 𝑓𝑟𝑜𝑛 𝑢𝑠𝑖𝑛𝑔 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 (1)
𝒙 𝒚
𝑥0 = 1,50 ; 0,3333
𝑥1 = 1,699 ; 0,2000
𝑥2 = 1,721 ; 0,1863
𝑥3 = 1,722 ; 0,1853
9
𝑥4 = 1,722 ; 0,1852
𝑥5 = 1,722 ; 0,1852
∴ 𝑥 ∗ ≈ 1,72 𝑎𝑛𝑑 𝑦 ∗ ≈ 0,19
NB: Rounding off in intermediate steps may result into a slight difference in values
compared to the above scheme. The total error deviation at the end is a result of the
propagated errors inherited in between steps.
Class Activity
Establish an iterative procedure to determine the root of the polynomial
𝑦 = 𝑓(𝑥) = 𝑥 3 + 2𝑥 − 4
Example 1.6
Determining the algorithm for a sum to infinity of a convergent geometric progression
Given a geometric progression
𝑆 = 𝑎 + 𝑎𝑟 + 𝑎𝑟 2 + 𝑎𝑟 3 + ⋯ + 𝑎𝑟 𝑛−1 + ⋯
Let the sum of 𝑎 to 𝑛 terms be 𝑆𝑛 then
𝑆𝑛 = 𝑎 + 𝑎𝑟 + 𝑎𝑟 2 + 𝑎𝑟 3 + ⋯ + 𝑎𝑟 𝑛−1
= 𝑎 + 𝑟(𝑎 + 𝑎𝑟 + 𝑎𝑟 2 + ⋯ + 𝑎𝑟 𝑛−2 )
= 𝑎 + 𝑟𝑆𝑛−1
So 𝑆𝑛 = 𝑎 + 𝑟𝑆𝑛−1 is the iterative formula to find the sum to infinity.
This simple manipulation results into an algorithm that can be used to test
convergence of iterates in a geometric progression.
Given 𝑓(𝑥) = 0 we assume a value 𝑥0 within the identified range from graphing. We
then substitute this value in the formula to generate the next value 𝑥1 value and use
𝑥1 to generate 𝑥2 , …
The iteration values generated by this formula will converge towards the root of the
function. Approximations may be terminated after two successive 𝑥 values agree by
a pre-determined or stated number of decimal places. If by rounding off the last two
iterates we find that these numbers are equal, then this becomes the approximation
to the solution of the equation correct to the required number of decimal places
Example 1.6
Use Newton-Raphson method to approximate the root of the equation 𝑥 3 − 𝑥 − 1 = 0
closest to 𝑥0 = 1. Do calculations until two successive iterations agree by 5 decimal
places and then give the approximation correct to three decimal places.
Solution
𝑓(𝑥𝑛 ) = 𝑥 3 − 𝑥 − 1 𝑎𝑛𝑑 𝑓ʹ(𝑥𝑛 ) = 3𝑥 2 − 1
Assumed value 𝑥0 = 1, starting with 𝑛 = 0
𝑓(𝑥 )
𝑥1 = 𝑥0 − 𝑓ʹ(𝑥0 )
0
(1)3 −(1)−1
= 1−[ ]
3(1)2 −1
= 1,50000
(1,5)3 −(1,5)−1
𝑥2 = 1,5 − [ ]
3(1,5)2 −1
= 1,34783
Carrying on we find that 𝑥3 = 1,32520 , 𝑥4 = 1,32472 𝑎𝑛𝑑 𝑥5 = 1,32472
The last two iterates agree by 5 decimal places. Rounding off 𝑥4 𝑎𝑛𝑑 𝑥5 correct to
three decimal places we get 𝑥 ≈ 1,325
The Newton-Raphson method can be used to solve optimization problems by
constructing a sequence {𝑥𝑛 } from an initial guess 𝑥0 ∈ ℝ that converges towards
a minimizer 𝑥 ∗ of 𝑓(𝑥) by using a sequence of second order Taylor
approximations of 𝑓(𝑥) around iterates.
The general form of this numerical iteration is
𝑓ʹ(𝑥 )
𝑥𝑛+1 = 𝑥𝑛 − 𝑓″(𝑥𝑛 ) , 𝑓 ″ (𝑥𝑛 ) ≠ 0, 𝑛 = 1, 2, 3, …
𝑛
11
Example 1.7
An object moves according to the equation 𝑠(𝑡) = 𝑡 4 − 2𝑡 2 − 4.
Use Newton-Raphson method to approximate the minimum saddle/ stationery point
closest to 𝑡 = 1,1 and then determine the minimum displacement.
Solution
𝑠(𝑡) = 𝑡 4 − 2𝑡 2 − 4 , 𝑠ʹ(𝑡) = 4𝑡 3 − 4𝑡 , 𝑠 ″ (𝑡) = 12𝑡 2 − 4 , 𝑡0 = 1,1
𝑓ʹ(𝑡 )
𝑡𝑛+1 = 𝑡𝑛 − 𝑓″(𝑡𝑛 )
𝑛
4(1,1)3 −4(1,1)
𝑡1 = 1,1 − [ ]
12(1,1)2 −4
= 0,9741
4(0,9741)3 −4(0,9741)
𝑡2 = 0,9741 − [ ]
12(0,9741)2 −4
= 1,0011
4(0,9741)3 −4(0,9741)
𝑡3 = 0,9741 − [ ]
12(0,9741)2 −4
= 1,0011
4(1,0011)3 −4(1,0011)
𝑡4 = 1,0011 − [ ]
12(1,0011)2 −4
= 1,0000
𝑡5 = 1,0000
∴ 𝑡 ≈ 1,00 (2D)
Minimum displacement is 𝑠(1) = −5 ⇒ 5 units below the horizontal
Activity 1.4
1. Use Newton-Raphson method to approximate the roots of the following equations
correct to three decimal places subject to the initial condition given
(a) 𝑥 − 𝑐𝑜𝑠𝑥 = 0 , 𝑥0 = 0,7
(b) 𝑒 𝑥 − 2𝑥 − 5 = 0 , 𝑥0 = −2
(c) 𝑙𝑛𝑥 − 5 = 0 , 𝑥0 = 0,5
(d) 𝑐𝑜𝑠ℎ2𝑥 − 𝑥 = 0 , 𝑥0 = 0,3
12
Compute until two successive iterates agree to 4 decimal places and provide final
answer correct to 2 decimal places.
13
Unit 2
Introduction
Interpolation is a process of finding equations to approximate straight lines and
curves that best fit given sets of data/experimental data. This process also
involves the establishment of schemes or construction of tables using forward,
backward, shift, central and divided differences iterative techniques.
2.1. Interpolation
Many times, data is given only at discrete points such as
(𝑥0 ; 𝑦0 ) , (𝑥1 ; 𝑦1 ), … (𝑥𝑛−1 ; 𝑦𝑛−1 ), (𝑥𝑛 ; 𝑦𝑛 )
A continuous function 𝑓(𝑥) may be used to represent the 𝑛 + 1 data values with
𝑓(𝑥) passing through the 𝑛 + 1 points. As a result one can find the value of 𝑦 at any
other value of 𝑥 . This is called interpolation.
If the value to be approximated falls outside the range of the data given, the process
of estimating such a value is called extrapolation. To illustrate this method we start
with linear interpolation.
14
Definition 2.1
Let 𝐴(𝑥0 ; 𝑦0 ) 𝑎𝑛𝑑 𝐵(𝑥1 ; 𝑦1 ) be distinct points on the 𝑥𝑦- plane, then the linear
interpolation curve that passes through the points is given by
𝑥−𝑥1 𝑥−𝑥0
𝑃(𝑥) = 𝐿0 𝑓(𝑥0 ) + 𝐿1 𝑓(𝑥1 ) where 𝐿0 = 𝑥 𝑎𝑛𝑑 𝐿0 = 𝑥
0 −𝑥1 1 −𝑥0
Example 2.1
Determine the linear interpolation polynomial that best fit the points
1
𝑄 (2 ; 0) 𝑎𝑛𝑑 𝑅(3; 5) and then use the polynomial to estimate 𝑓(−1)
Solution
1
𝑥−𝑥1 𝑥−3 𝑥−3 𝑥−𝑥0 𝑥− 2𝑥−1
2
𝐿0 = 𝑥 = 1 =− , 𝐿1 = 𝑥 = 1 =
0 −𝑥1 −3 10 1 −𝑥0 3− 5
2 2
= 2𝑥 − 1
Hence 𝑓(−1) = 2(−1) − 1 = −3
Class Activity
1. (a) Determine the quadratic interpolation polynomial that passes through the points
(0; 1) , (2; 1) 𝑎𝑛𝑑 (3; 4) and then use the resulting curve to evaluate 𝑓(5) .
(𝑥 − 𝑥0 )(𝑥 − 𝑥1 ) … (𝑥 − 𝑥𝑁−1 )
…+ . 𝑓(𝑥𝑁 )
(𝑥1 − 𝑥0 )(𝑥1 − 𝑥2 ) … (𝑥𝑁 − 𝑥𝑁−1 )
15
Example 2.2
Use Lagrange interpolation polynomial of the 1𝑠𝑡 and the 2𝑛𝑑 order to evaluate
𝑓(2) for
𝑥0 = 1 𝑓(𝑥0 ) = 0
𝑥1 = 4 𝑓(𝑥1 ) = 1,386294
𝑥2 = 6 𝑓(𝑥2 ) = 1,791760
Solution
Evaluating using polynomial of the first order
𝑥−𝑥1 𝑥−𝑥0
𝑓1 (𝑥) = 𝑥 × 𝑓(𝑥0 ) + 𝑥 × 𝑓(𝑥1 ) , 𝑓(2) ⇒ 𝑥 = 2
0 −𝑥1 1 −𝑥0
So
2−4 2−1
𝑓1 (2) = .0 + . 1,386294
1−4 4−1
= 0,4620981
Evaluating using polynomial of the second order
(𝑥−𝑥1 )(𝑥−𝑥2 ) (𝑥−𝑥0 )(𝑥−𝑥2 )
𝑓1 (𝑥) = (𝑥 × 𝑓(𝑥0 ) + (𝑥 × 𝑓(𝑥1 )
0 −𝑥1 )(𝑥0 −𝑥2 ) 1 −𝑥0 )(𝑥1 −𝑥2 )
(𝑥−𝑥0 )(𝑥−𝑥2 )
+ × 𝑓(𝑥2 ) , 𝑓(2) ⇒ 𝑥 = 2
(𝑥2 −𝑥0 )(𝑥2 −𝑥1 )
So
(2−4)(2−6) (2−1)(2−6) (2−1)(2−4)
𝑓1 (2) = (1−4)(1−6) . 0 + (4−1)(4−6) . 1,386294 + (4−1)(6−4) . 1,791760
= 0,56584444
Example 2.3
Suppose an experimental data is tabulated for 𝑥 values (inputs) and corresponding
values 𝑦 = 𝑓(𝑥) (outputs) as indicated below. Construct a finite difference scheme
for the data.
𝑥 0 1 2 3 4 5 6 7 8
Solution
The finite difference scheme is as follows
𝑥 𝑓(𝑥)
0 0,00
0,21
1 0,21 0,09
0,30 0,06
2 0,51 0,15 0,04
0,45 0,10 -0,07
3 0,96 0,25 -0,03 0,11
0,70 0,07 0,04 -0,18
4 1,66 0,38 0,01 -0,07 0,32
1,02 0,08 -0,03 0,14
5 2,68 0,40 -0,02 0,07
1,42 0,06 0,04
6 4,10 0,46 0,02
1,88 0,08
7 5,98 0,54
2,42
8 8,40
𝑝(𝑝−1)(𝑝−2)(𝑝−3)…(𝑝−𝑛+1)∆𝑛 𝑦𝑛
+ 𝑛!
Example 2.4
Use Newton’s forward interpolation scheme to determine the polynomial that best fit
the given data and use the polynomial to estimate 𝑓(3,17)
Solution
The forward difference scheme isType equation here.
𝑥 𝑓(𝑥) ∇𝑓 ∆2 𝑓 ∆3 𝑓 ∆4 𝑓 ∆5 𝑓 ∆6 𝑓 ∆7 𝑓
3.1 0
0,6
3.2 0,6 -0,2
0,4 0
3.3 1,0 -0,2 0,1
0,2 0,1
3.4 1.2 -0,1
0,1
3.5 1,3
𝑛 = 5 , 𝑓(3,17) ⇒ 𝑥 = 3,17
𝑏−𝑎 3,5−3.1 𝑥−𝑥0 3,17−3.1
ℎ = 𝑛−1 = = 0,1 𝑝= = = 0,7
4 ℎ 0,1
𝑝(𝑝−1)(𝑝−2)(𝑝−3)…(𝑝−𝑛+1)∆𝑛 𝑦𝑛
+ 𝑛!
Replace ∆′ 𝑠 𝑏𝑦 𝑥, 𝑥 2 , 𝑥 3 𝑎𝑛𝑑 𝑥 4
𝑝𝑥 𝑝(𝑝−1)𝑥 2 𝑝(𝑝−1)(𝑝−2)𝑥 3 𝑝(𝑝−1)(𝑝−2)(𝑝−3)𝑥 4
𝑃(𝑥) = 𝑦0 + + + +
1! 2! 3! 4!
𝑝(𝑝+1)(𝑝+2)(𝑝+3)…(𝑝+𝑛−1)∆𝑛 𝑦𝑛
+ 𝑛!
Example 2.5
Estimate 𝑓(42) from the given data using Newton’s backward interpolation
𝑥 20 25 30 35 40 45
𝑓(𝑥) 354 332 291 260 231 204
Solution
The forward difference scheme isType equation here.
𝑥 𝑓(𝑥) ∇𝑓 ∇2 𝑓 ∇3 𝑓 ∇4 𝑓 ∇5 𝑓 ∇6 𝑓 ∇7 𝑓
20 354
-22
25 332 -19
-41 29
30 291 -10 -37
-31 -8 45
35 260 2 8
-29 0
40 231 2
-27
45 204
𝑛 = 6 , 𝑓(42) ⇒ 𝑥 = 42
𝑏−𝑎 45−20 𝑥−𝑥𝑛 42−45
ℎ = 𝑛−1 = =5 𝑝= = = −0,6
5 ℎ 5
19
Example 2.6
Determine the divided difference polynomial for the data below and then
estimate 𝑓(1).
𝑥 -1 0 2 5
𝑓(𝑥) 7 10 22 235
Solution
The divided difference scheme is as follows
𝑥 𝑓(𝑥) 𝛿1 𝑓 𝛿2 𝑓 𝛿3 𝑓 𝛿4 𝑓 𝛿5 𝑓 𝛿6 𝑓 𝛿7 𝑓
-1 7
3
0 10 1
6 2
2 22 13
71
5 235
20
𝑓(1) ⇒ 𝑥 = 1
𝑓(𝑥) = 7 + (𝑥 + 1) × 3 + (𝑥 + 1)(𝑥) × 1 + (𝑥 + 1)(𝑥)(𝑥 − 2) × 2
= 2𝑥 3 − 𝑥 2 + 10
∴ 𝑓(1) = 2(1)3 − (1)2 + 10
= 11
Activity 2.1
1. Use the data in the table to determine the Lagrange polynomial of the first and
second order and then use both orders to estimate 𝑓(4) 𝑎𝑛𝑑 𝑓(−3).
𝑥 1 0 2 3
𝑓(𝑥) 2 7 8 6
2. Determine the forward difference interpolation polynomial for the data in the table
and then estimate 𝑓ʹ(6)
3. Estimate 𝑓(−1) 𝑎𝑛𝑑 𝑓(6) for the data in the table using the backward interpolation
𝑥 0 1 2 3 4
𝑓(𝑥) 1 3 13 37 81
4. Deduce the divided difference polynomial from the scheme of the data given and
then approximate 𝑓(2)
𝑥 -1,0 0,0 0,5 1,0 2,5
𝑓(𝑥) 3,0 -2,0 -0,375 3,0 16,125
The pattern of how the errors spread resemble the Pascal’s triangle.
1
1 1
1 2 1
The coefficients in the triangle show the pattern of the error magnitude. This
phenomenon is known as error propagation.
Illustration
0 , 𝑖≠𝑘
Consider the function ∈𝑖 = { , which is zero at all grid points except where
∈ , 𝑖=𝑘
it is ∈.The resulting difference scheme is as follows
0
0
0 0
0 0
0 0 ∈
0 ∈
0 ∈ -4∈
∈ -3∈
∈ −2 ∈ 6∈
-∈ 3∈
0 ∈ -4∈
0 −∈
0 0 ∈
0 0
0 0
0
0
Ignoring terms containing ℎ3 and higher by adding (10) and (2) we get
1
𝑦 ″ (𝑥) = ℎ2 [𝑦(𝑥 + ℎ) − 2𝑦(𝑥) + 𝑦(𝑥 − ℎ)] (6)
The right-hand sides of equations (3), (4), (5) and (6) are called difference equations
The general form of a difference equation is given by
𝑦 ″ + 𝑃(𝑥)𝑦ʹ + 𝑄(𝑥)𝑦 = 𝑓(𝑥) (7)
where 𝑦(𝑎) = 𝛼 , 𝑦(𝑏) = 𝛽 and 𝑎 < 𝑥1 < 𝑥2 , … < 𝑎𝑛 ; 𝑥𝑖 = 𝑎 + 𝑖ℎ are interior
𝑏−𝑎
points of [𝑎 ; 𝑏] ; 𝑦𝑖 = 𝑦(𝑥𝑖 ) ; 𝑃𝑖 = 𝑃(𝑥𝑖 ) ; 𝑄𝑖 = 𝑄(𝑥𝑖 ) ; 𝑓𝑖 = 𝑓(𝑥𝑖 ) 𝑎𝑛𝑑 ℎ = 𝑛
Example 2.7
Use the finite difference equation to approximate the solution of the differential
equation at interior mesh points and write down the particular solution.
𝑦 ″ − 4𝑦 = 0 , 𝑦(0) = 0 ; 𝑦(1) = 5 𝑓𝑜𝑟 𝑛 = 4
23
Solution
𝑏−𝑎 1−0 1
𝑃(𝑥) = 0 , 𝑄(𝑥) = −4 , 𝑓(𝑥) = 0 , ℎ = = =4
𝑛 4
1 1
𝑥0 = 𝑎 = 0 , 𝑦0 = 0 . 𝑥𝑖 = 𝑎 + 𝑖ℎ ⇒ 𝑖𝑛𝑡𝑒𝑟𝑖𝑜𝑟 𝑚𝑒𝑠ℎ 𝑝𝑜𝑖𝑛𝑡𝑠 𝑎𝑟𝑒 𝑥1 = 0 + 1 (4) = 4 ,
1 3
𝑥2 = 2 , 𝑥3 = 4 , 𝑥4 = 1 = 𝑏 . The big interval is [𝑎; 𝑏] = [0; 1]
Example 2.8
Use the finite difference equation to solve
𝑦 ″ + 9𝑦 = 0 , 𝑦(1) = 1 ; 𝑦(2) = 2 𝑓𝑜𝑟 𝑛 = 4
Solution
ℎ ℎ
The difference equation is (1 + 2 𝑃𝑖 ) 𝑦𝑖+1 + (−2 + ℎ2 𝑄𝑖 )𝑦𝑖 + (1 − 2 𝑃𝑖 ) 𝑦𝑖−1 = ℎ2 𝑓𝑖
Activity 2.2
1. Use the finite difference method to determine the solution of the differential
equations at interior mesh points
(a) 𝑦 ″ + 9𝑦 = 0 , 𝑦(0) = 4 , 𝑦(2) = 1 , 𝑛 = 4
25
Unit 3
Introduction
The modelling of physical problems may lead to mathematical formulations that give
rise to first order and second order differential equations among many other forms.
Based on the type of differential equation and the order thereof varying methods may
be employed to determine the solution.
A general solution to a differential equation is a function 𝑦(𝑥) that satisfies the given
differential equation. Given a differential equation that is subjected to some initial
condition(s) then the resulting response/solution 𝑦(𝑥) is called a particular solution
or unique solution.
differential equations
Examples
𝑑𝑦
1. −3 = 𝑒 −3𝑥
𝑑𝑥
The first differential equation may be solved by direct integration while the second
one may be solved using the separation of variables method. The third differential
equation is a second order differential equation with initial conditions, this differential
equation can be solved by using D-operator methods to reach the unique solution.
27
In this section this section we shall learn how to obtain solutions of exact differential
equations, homogenous differential equations and Bernoulli equations.
Example 3.1
The determine the solution of (𝑥 + 𝑦 2 )𝑑𝑦 + (𝑦 − 𝑥 2 )𝑑𝑥 = 0
Solution
𝝏𝑴 𝜕𝑁
=1 , =1
𝝏𝒙 𝜕𝑦
𝜕𝑀 𝜕𝑁
Since = the DE is exact.
𝜕𝑥 𝜕𝑦
1
Now ∫(𝑥 + 𝑦 2 )𝑑𝑦 = 𝑥𝑦 + 3 𝑦 3 + 𝐶1 (𝑥)
1
∫(𝑦 − 𝑥 2 )𝑑𝑥 = 𝑥𝑦 − 3 𝑥 3 + 𝐶2 (𝑦)
1 1
∴ 𝐶 = 𝑥𝑦 + 3 𝑦 3 − 3 𝑥 3
Example 3.2
The determine the solution of (𝑐𝑜𝑠𝑦 + 𝑦𝑐𝑜𝑠𝑥)𝑑𝑥 + (𝑠𝑖𝑛𝑥 − 𝑥𝑠𝑖𝑛𝑦)𝑑𝑦 = 0
Solution
(𝑐𝑜𝑠𝑦 + 𝑦𝑐𝑜𝑠𝑥)𝑑𝑥 + (𝑠𝑖𝑛𝑥 − 𝑥𝑠𝑖𝑛𝑦)𝑑𝑦 = 0
𝑀 𝑁
𝜕 𝜕
(𝑐𝑜𝑠𝑦 + 𝑦𝑐𝑜𝑠𝑥) = −𝑠𝑖𝑛𝑦 + 𝑐𝑜𝑠 𝑥 , (𝑠𝑖𝑛𝑥 − 𝑥𝑠𝑖𝑛𝑦) = 𝑐𝑜𝑠 𝑥 − 𝑠𝑖𝑛𝑦
𝜕𝑦 𝜕𝑥
28
𝜕𝑀 𝜕𝑁
= = 𝑐𝑜𝑠𝑥 − 𝑠𝑖𝑛𝑦 ∴ 𝑡ℎ𝑒 𝐷𝐸 𝑖𝑠 𝑒𝑥𝑎𝑐𝑡
𝜕𝑦 𝜕𝑥
Activity 3.1
1. Solve the following differential equations
(𝑎) (𝑥 + 𝑦)𝑑𝑥 + (𝑥 + 4𝑦)𝑑𝑦 = 0
𝑦
(𝑏) 𝑑𝑥 + [ln(𝑥 − 1) + 2𝑦]𝑑𝑦 = 0 , 𝑦(2) = 4
𝑥−1
Example 3.3
Determine the solution of (𝑥 2 + 𝑦 2 )𝑑𝑦 + (4𝑥𝑦)𝑑𝑥 = 0
Solution
The differential equation is homogeneous of degree 𝑛 = 2 in functions
𝑀(𝑥, 𝑦) 𝑎𝑛𝑑 𝑁(𝑥; 𝑦)
The test is as in demonstration above.
𝑑𝑦 −4𝑥𝑦
Rewriting the differential equation as =𝑥 2 +𝑦 2 .
𝑑𝑥
𝑑𝑦 𝑑𝑣
Let 𝑦 = 𝑣𝑥 be the substitution then we obtain =𝑣+𝑥 .
𝑑𝑥 𝑑𝑥
𝑑𝑦 −4𝑥𝑦 −4(𝑥 2 𝑣)
=𝑥 2 +𝑦 2 = 𝑥 2 +(𝑥 2 𝑣2 )
𝑑𝑥
𝑑𝑣 −4𝑣
Now 𝑣 + 𝑥 𝑑𝑥 = 1+𝑣2
𝑑𝑣 −4𝑣
𝑥 𝑑𝑥 = 1+𝑣2 − 𝑣
𝑑𝑣 −5𝑣−𝑣 3
𝑥 𝑑𝑥 = 1+𝑣 2
1+𝑣 2 1
𝑑𝑣 = 𝑥 𝑑𝑥
−𝑣(5+𝑣 2 )
𝑣 2 −1 1
∫ 𝑣(5+𝑣2) 𝑑𝑣 = ∫ 𝑥 𝑑𝑥 (1)
Using partial fraction decomposition for the left-hand side of (1) we get the constants
1 6
𝐴 = − 5 , 𝐵 = 5 𝑎𝑛𝑑 𝐶 = 0
1 𝑑𝑣 6 𝑣 1
It follows that −5∫ + 5 ∫ 5+𝑣2 𝑑𝑣 = ∫ 𝑥 𝑑𝑥
𝑣
3
−𝑙𝑛𝑣 + 5 ln(5 + 𝑣 2 ) = 𝑙𝑛𝑥 + 𝐶
𝑦 3 𝑦 2
∴ −𝑙𝑛 (𝑥 ) + 5 ln (5 + (𝑥 ) ) = 𝑙𝑛𝑥 + 𝐶
Example 3.4
𝑑𝑦
Determine the solution of 𝑥 𝑑𝑥 = 𝑦 + √𝑥 2 + 𝑦 2 , 𝑦(1) = 2
Solution
𝑑𝑦
𝑥 𝑑𝑥 = 𝑦 + √𝑥 2 + 𝑦 2
𝑑𝑦 𝑦+√𝑥 2 +𝑦 2
Rewriting the equation, we have =
𝑑𝑥 𝑥
30
𝑑𝑣 𝑣𝑥+√𝑥2 +(𝑥𝑣)2
Letting 𝑦 = 𝑣𝑥 and differentiating, 𝑣 + 𝑥 𝑑𝑥 = 𝑥
𝑣𝑥+𝑥√1+𝑣 2
= 𝑥
𝑑𝑣
𝑥 𝑑𝑥 = 𝑣 + √1 + 𝑣 2 − 𝑣
𝑑𝑣
𝑥 𝑑𝑥 = √1 + 𝑣 2
𝑑𝑣 𝑑𝑥
∫ √1+𝑣2 = ∫ 𝑥
𝑠𝑖𝑛ℎ−1 𝑣 = 𝑙𝑛𝑥 + 𝐶
𝑦
𝑠𝑖𝑛ℎ−1 (𝑥 ) = 𝑙𝑛𝑥 + 𝐶
2
𝑦(1) = 2 ⇒ 𝑠𝑖𝑛ℎ−1 (1) = 𝑙𝑛1 + 𝐶
⇒ 𝐶 = 1,4436
𝑦
∴ 𝑠𝑖𝑛ℎ−1 (𝑥 ) = 𝑙𝑛𝑥 + 1,4436
The substitution 𝑧 = 𝑦1−𝑛 reduces the differential equation to the linear form which
can be solved by using the integration factor 𝐼𝐹 = 𝑅 = 𝑒 ∫ 𝑃(𝑥)𝑑𝑥 to reach the solution
𝑅𝑦 = ∫ 𝑅𝑄𝑑𝑥
Example 3.5
𝑑𝑦
Solve the following differential equation + 3𝑥 2 𝑦 = 𝑥 2 𝑦 3
𝑑𝑥
Solution
𝑑𝑦
+ 3𝑥 2 𝑦 = 𝑥 2 𝑦 3
𝑑𝑥
𝑑𝑦
Rewriting the equation 𝑦 −3 𝑑𝑥 + 3𝑥 2 𝑦 −2 = 𝑥 2
𝑑𝑧 𝑑𝑦
Let 𝑧 = 𝑦 −2 , = −2𝑦 −3 𝑑𝑥
𝑑𝑥
1 𝑑𝑧 𝑑𝑦
− 2 𝑑𝑥 = 𝑦 −3 𝑑𝑥
31
𝑑𝑦
The differential equation 𝑦 −3 𝑑𝑥 + 3𝑥 2 𝑦 −2 = 𝑥 2
1 𝑑𝑧
is transformed to be − 2 𝑑𝑥 + (3𝑥 2 )𝑧 = 𝑥 2
𝑑𝑧
+ (−6𝑥 2 )𝑧 = −2𝑥 2 (standard linear form)
𝑑𝑥
2 𝑑𝑥 3
𝐼𝐹 = 𝑅 = 𝑒 −6 ∫ 𝑥 = 𝑒 −2𝑥
𝑅𝑧 = ∫ 𝑅𝑄𝑑𝑥
3 3
𝑧𝑒 −2𝑥 = ∫ −2𝑥 2 𝑒 −2𝑥 𝑑𝑥
3 1 −2𝑥 3
𝑧𝑒 −2𝑥 = 𝑒 +𝐶
3
3 1 −2𝑥 3
∴ 𝑦 −2 𝑒 −2𝑥 = 𝑒 +𝐶
3
1 3
𝑦 −2 = + 𝑒 2𝑥 𝐶
3
Activity 3.2
1. Solve the following differential equations
𝑑𝑦
(𝑎) (𝑥 2 + 𝑥𝑦) + 𝑦 2 − 𝑥𝑦 = 0
𝑑𝑥
1
𝑦
(𝑏) 𝑦ʹ + = 5(𝑥 − 2)𝑦 2
𝑥−2
𝑑𝑦 𝜋
(𝑐) 𝑠𝑒𝑐 2 𝑦 + 𝑠𝑒𝑐𝑥𝑡𝑎𝑛𝑦 = 𝑐𝑜𝑠𝑥 , 𝑦 ( ) = 0
𝑑𝑥 2
𝑑𝑦
(𝑑) (2𝑥𝑦 − 𝑥) = 2𝑥 + 𝑦 , 𝑦(2) = 3
𝑑𝑥
𝑑𝑦
(𝑒) 𝑦 − (2𝑦 2 ) = 𝑒 𝑥
𝑑𝑥
𝑑𝑟 𝑟 2 +2𝑟𝜃
(𝑓) =
𝑑𝜃 𝜃2
32
Example 3.5
𝑑𝑃
The rate of change of a population of insects ( 𝑑𝑡 ) is directly proportional to the
number of insects (𝑃) present at any given time. If initially the population is ten and
after two days the population reaches fourty, determine the expected population size
after four days.
Solution
𝑑𝑃 𝑑𝑃
∝𝑃⇒ = 𝑘𝑃 (formulation of DE)
𝑑𝑡 𝑑𝑡
𝒅𝑷
∫ = ∫ 𝑘𝑑𝑡 (after separation of variables)
𝑷
𝑙𝑛𝑃 = 𝑘𝑡 + 𝐴 (1)
𝑒 𝑙𝑛𝑃 = 𝑒 (𝑘𝑡+𝐴)
= 𝒆𝑨 . 𝒆𝒌𝒕
∴ 𝑃 = 𝐶𝑒 𝑘𝑡 (from property 𝑒 𝑙𝑛𝑥 = 𝑥)
40 = 10𝑒 2𝑘
1
𝑙𝑛4 = 2𝑘 ⇒ 𝑘 = 2 𝑙𝑛4 ≈ 0,693 (+𝑣𝑒 𝑘 ⇒ 𝑔𝑟𝑜𝑤𝑡ℎ)
Example 3.6
𝑑𝐹
The rate of change of fertilizer in the soil ( 𝑑𝑡 ) is directly proportional to the amount
of fertilizer present at any instant 𝑡. If initially 10 grams of fertilizer is applied to the
soil and if it takes a day for the fertilizer to reach 5 grams, determine how long it will
take for the fertilizer to be 1 gram.
Solution
𝑑𝐹 𝑑𝐹
∝𝐹⇒ = 𝑘𝐹 (formulation of DE)
𝑑𝑡 𝑑𝑡
𝑑𝐹
∫ = ∫ 𝑘𝑑𝑡 (after separation of variables)
𝐹
𝑙𝑛𝐹 = 𝑘𝑡 + 𝐶
𝑒 𝑙𝑛𝐹 = 𝑒 (𝑘𝑡+𝐴)
= 𝑒 𝐴 . 𝑒 𝑘𝑡
∴ 𝐹 = 𝐶𝑒 𝑘𝑡 (from property: 𝑒 𝑙𝑛𝑥 = 𝑥)
Now introducing conditions
𝑖𝑛𝑖𝑡𝑖𝑎𝑙𝑙𝑦 ⇒ 𝑡 = 0 𝑎𝑛𝑑 𝐹 = 10
Using 𝑙𝑛𝐹 = 𝑘𝑡 + 𝐶
∴ 𝐶 = 𝑙𝑛10
After one day ⇒ 𝑡 = 1 , 𝐹 = 5
ln 𝐹 = 𝑘𝑡 + 𝑙𝑛10
1
𝑙𝑛5 = 𝑘 + 𝑙𝑛10 ⇒ 𝑘 = 𝑙𝑛 2 ≈ −0,693 (−𝑣𝑒 𝑘 ⇒ 𝑑𝑒𝑐𝑎𝑦)
2,303
⇒ 𝑡 = 0,693 = 3,323
⇒ the expected time for the fertilizer to be 1 gram is just over 3 days
Example 3.7
A tank contains 100𝑙 of a salt solution with 20𝑘𝑔 of salt dissolved in it. Fresh water
flows into the tank at a rate of 2,5 𝑙/𝑠𝑒𝑐𝑜𝑛𝑑 and the solution is kept uniform during
stirring and flows out at the same rate. Determine the amount of salt left in the
solution after 1 𝑚𝑖𝑛𝑢𝑡𝑒.
Solution
Let the salt remaining after 𝑡 𝑠𝑒𝑐𝑜𝑛𝑑𝑠 be 𝑥 𝑘𝑔. The rate of change is
𝑑𝑥 −2,5𝑥
= (𝑘 = −1 𝑏𝑒𝑐𝑎𝑢𝑠𝑒 𝑠𝑎𝑙𝑡 𝑓𝑙𝑜𝑤𝑠 𝑜𝑢𝑡)
𝑑𝑡 100
𝑑𝑥 1
∫ = − 40 ∫ 𝑑𝑡
𝑥
1
𝑙𝑛𝑥 = − 40 𝑡 + 𝐶
Given 𝑡 = 0 , 𝑥 = 20 ∴ 𝐶 = ln 20
1
𝑙𝑛𝑥 = − 40 𝑡 + 𝐶
𝑡 = 1 𝑚𝑖𝑛𝑢𝑡𝑒 ⇒ 𝑡 = 60 𝑠𝑒𝑐𝑜𝑛𝑑𝑠
35
3
−60 𝑥
𝑙𝑛𝑥 = + 𝑙𝑛20 and 𝑙𝑛 20 = 𝑒 −2
40
3
∴ 𝑥 = 20. 𝑒 −2 ≈ 4,46 𝑘𝑔
Example 3.8
A large tank with 2000 𝑙𝑖𝑡𝑟𝑒𝑠 of beer contains 4% alcohol (by volume). Beer with 6%
alcohol level is pumped into the tank at a rate of 20 𝑙𝑖𝑡𝑟𝑒𝑠/𝑚𝑖𝑛𝑢𝑡𝑒 and the mixture is
pumped out at the same rate. What is the percentage of alcohol after an hour?
2000𝑙
20𝑙/𝑚𝑖𝑛
Solution 20𝑙/𝑚𝑖𝑛
𝑑𝑦
Let 𝑦(𝑡) be the number of 𝑙𝑖𝑡𝑟𝑒𝑠 of alcohol at any given time 𝑡. is the rate of
𝑑𝑡
𝑑𝑦
change of the number of 𝑙𝑖𝑡𝑟𝑒𝑠 of alcohol, = 𝑟𝑎𝑡𝑒 𝑖𝑛 − 𝑟𝑎𝑡𝑒 𝑜𝑢𝑡.
𝑑𝑡
6 20𝑙
‘Rate in’: the rate at which alcohol enters the tank × 𝑚𝑖𝑛 = 1,2𝑙/𝑚𝑖𝑛.
100
‘Rate out’: the rate at which alcohol leaves the tank. The tank’s capacity is
𝑦(𝑡)
2000 𝑙𝑖𝑡𝑟𝑒𝑠, so the amount of alcohol at any time 𝑡 is . Since the rate at which
2000
the alcohol drains from the tank is 20𝑙𝑖𝑡𝑟𝑒𝑠/𝑚𝑖𝑛𝑢𝑡𝑒, we have
𝑦(𝑡) 20𝑙 𝑦(𝑡)
Rate out = 2000 × 𝑚𝑖𝑛 = 𝑙/𝑚𝑖𝑛
100
𝑑𝑦 𝑦(𝑡) 120−𝑦
∴ = 1,2 − 100 =
𝑑𝑡 100
Activity 3.3
1. A substance decomposes at a rate proportional to the amount present at any
time 𝑡. If half of the original amount decomposes in 1600 years, determine the
amount lost in100 years as well as the percentage loss.
2.The rate of change in the number of fruit flies is proportional to the population
present at any given time 𝑡. If there were 100 flies after the second day and
there were 300 flies after the fourth day, how many flies were there in the
original population.
3. The change in the number of a flock of sheep on a farm is proportional to
650 − 𝑃(𝑡) where 𝑡 is time in years and 𝑃 is the flock present. If initially the
flock had 300 sheep and after two years the flock was 500, determine the size
of the flock after three years.
4. A brine solution of salt flows at a constant rate of 8𝑙/𝑚𝑖𝑛𝑢𝑡𝑒 into a tank that
Initially has 100𝑙 of the solution in which 5 𝑘𝑔 of salt is dissolved. The
solution inside the tank is kept uniform when well stirred and flows out at the
same rate. If the concentration of the salt in the brine entering the tank is
0,5 𝑘𝑔/𝑙, determine the mass of the salt in the tank after 𝑡 𝑚𝑖𝑛𝑢𝑡𝑒𝑠. When will
the concentration of the salt in the tank reach 0,2𝑘𝑔/𝑙.
5. Consider a tank containing 100𝑙 of water into which a brine solution of salt
begins to flow in at a constant rate of 6𝑙/𝑚𝑖𝑛𝑢𝑡𝑒. The solution in the tank is
kept uniform during stirring and flows out at a constant rate of 6𝑙/𝑚𝑖𝑛𝑢𝑡𝑒.
If the concentration of salt in the brine entering the tank is 1 𝑘𝑔/𝑙, determine
when the concentration of the salt in the tank will reach 0,5 𝑘𝑔/𝑙.
37
Example 3.8
𝑑2 𝑦 𝑑𝑦
Determine the solution of + 2 𝑑𝑥 + 𝑦 = 3𝑥
𝑑𝑥 2
Solution
From previous studies we know that the characteristic equation,
𝑚2 + 2𝑚 + 1 = 0
(𝑚 + 1)(𝑚 + 1) = 0
The factors will give us the complementary function
𝑦𝐶𝐹 = 𝐶1 𝑒 −𝑥 + 𝐶2 𝑥𝑒 −𝑥
𝑓(𝑥) = 3𝑥 is a polynomial of degree 1, assume the particular integral to be
𝑦𝑃𝐼 = 𝐴𝑥 + 𝐵 and 𝑦ʹ = 𝐴 𝑎𝑛𝑑 𝑦 ″ = 0
𝑑2 𝑦 𝑑𝑦
Substituting 𝑦ʹ 𝑎𝑛𝑑 𝑦 ″ into the equation + 2 𝑑𝑥 + 𝑦 = 3𝑥 𝑜𝑟 𝑦 ″ + 2𝑦ʹ + 𝑦 = 3𝑥
𝑑𝑥 2
0 + 2(𝐴) + (𝐴𝑥 + 𝐵) = 3𝑥
Equating coefficients of 𝑥1 and 𝑥 0 we get
𝐴=3
2𝐴 + 𝐵 = 0 ⇒ 𝐵 = −6
𝑦𝑃𝐼 = 3𝑥 − 6
Hence 𝑦 = 𝐶1 𝑒 −𝑥 + 𝐶2 𝑥𝑒 −𝑥 + 3𝑥 − 6
38
Example 3.9
Determine the solution of 𝑦 ″ − 4𝑦 ʹ − 12𝑦 = 3𝑒 2𝑥
Solution
𝑚2 − 4𝑚 − 12 = 0 , (𝑚 + 2)(𝑚 − 6) = 0
∴ 𝑦𝐶𝐹 = 𝐶1 𝑒 −2𝑥 + 𝐶2 𝑒 6𝑥
Assume 𝑦𝑃𝐼 = 𝐴𝑒 2𝑥 𝑡ℎ𝑒𝑛 𝑦ʹ𝑃𝐼 = 2𝐴𝑒 2𝑥 , 𝑦″𝑃𝐼 = 4𝐴𝑒 2𝑥
4𝐴𝑒 2𝑥 − 4(2𝐴𝑒 2𝑥 ) − 12(𝐴𝑒 2𝑥 ) = 3𝑒 2𝑥
3
4𝐴 − 8𝐴 − 12𝐴 = 3 ⇒ −16𝐴 = 3 ∴ 𝐴 = − 16
3
𝑦𝑃𝐼 = − 16 𝑒 2𝑥
3
Hence 𝑦 = 𝐶1 𝑒 −2𝑥 + 𝐶2 𝑒 6𝑥 − 16 𝑒 2𝑥
Example 3.10
Solve the differential equation 𝑦 ″ − 𝑦 ʹ + 𝑦 = 2𝑠𝑖𝑛3𝑥
Solution
1±√1−4 1 √3
𝑚2 − 𝑚 + 1 = 0 , 𝑚= =2± 𝑗
2 2
2+8𝐵
From equation (1) 𝐴 = 3
Example 3.11
Use the method of undetermined coefficients to solve the differential equation
𝑦 ″ − 3𝑦 ʹ − 18𝑦 = 2𝑒 3𝑥 + 𝑠𝑖𝑛𝑥
Solution
𝑚2 − 3𝑚 − 18 = 0 , (𝑚 − 6)(𝑚 + 3) = 0
The complementary function/solution is 𝑦𝐶𝐹 = 𝐶1 𝑒 6𝑥 + 𝐶2 𝑒 −3𝑥
Guess 𝑦𝑃𝐼 = 𝐶𝑒 3𝑥 + (𝐷𝑠𝑖𝑛𝑥 + 𝐸𝑐𝑜𝑠𝑥)
𝑦ʹ𝑃𝐼 = 3𝐶𝑒 3𝑥 + 𝐷𝑐𝑜𝑠𝑥 − 𝐸𝑠𝑖𝑛𝑥
𝑦″𝑃𝐼 = 9𝐶𝑒 3𝑥 − 𝐷𝑠𝑖𝑛𝑥 − 𝐸𝑐𝑜𝑠𝑥
(9𝐶𝑒 3𝑥 − 𝐷𝑠𝑖𝑛𝑥 − 𝐸𝑐𝑜𝑠𝑥 ) − 3(3𝐶𝑒 3𝑥 + 𝐷𝑐𝑜𝑠𝑥 − 𝐸𝑠𝑖𝑛𝑥) − 18(𝐶𝑒 3𝑥 + 𝐷𝑠𝑖𝑛𝑥 + 𝐸𝑐𝑜𝑠𝑥)
= 2𝑒 3𝑥 + 𝑠𝑖𝑛𝑥
−18(𝐷𝑠𝑖𝑛𝑥 + 𝐸𝑐𝑜𝑠𝑥) − 18𝐶𝑒 3𝑥 = 2𝑒 3𝑥 + 𝑠𝑖𝑛𝑥
1
−18𝐶𝑒 3𝑥 = 2𝑒 3𝑥 ⇒ 𝐶 = − 9
3
⇒ 𝐸 = 355
1 19 3
𝑦𝑃𝐼 = − 9 𝑒 3𝑥 − 364 𝑠𝑖𝑛𝑥 − 19 𝑐𝑜𝑠𝑥
1 19 3
∴ 𝑦 = 𝐶1 𝑒 6𝑥 + 𝐶2 𝑒 −3𝑥 − (9 𝑒 3𝑥 − 370 𝑠𝑖𝑛𝑥 + 370 𝑐𝑜𝑠𝑥)
Activity 3.4
1. Determine the solution of each of the differential equations using the method of
undetermined coefficients
(a) 𝑦 ″ + 𝑦 ʹ − 6𝑦 = 2𝑥
(b) 𝑦 ″ − 𝑦 ʹ − 6𝑦 = 𝑥 2 − 2𝑥
(c) 𝑦 ″ + 2𝑦 ʹ = 𝑒 −2𝑥
(d) 𝑦 ″ − 4𝑦 ʹ − 5𝑦 = 𝑐𝑜𝑠2𝑥
(e) 𝑦 ″ + 4𝑦 = 24𝑒 −2𝑥 , 𝑦(0) = 0 , 𝑦ʹ(0) = −1
(f) 𝑦 ″ + 𝑦 ʹ = 𝑒 𝑥 𝑐𝑜𝑠𝑥
(g) 𝑦 ″ + 𝑦 ʹ = 6𝑥𝑒 2𝑥 , 𝑦(0) = 0 , 𝑦ʹ(0) = 1
𝑑2 𝑥 𝑘 𝑑2 𝑥 𝑘
+𝑚𝑥 = 0 𝑜𝑟 + 𝜔2 𝑥 = 0, where 𝜔 = √𝑚
𝑑𝑡 2 𝑑𝑡 2
41
𝐴 = √(𝐶1 )2 + (𝐶2 )2
𝐶
To determine the phase angle 𝜑 we use the relationship 𝑡𝑎𝑛𝜑 = 𝐶1
2
2𝜋 𝜔
The period and the natural frequency of the system is given by 𝑃 = 𝑎𝑛𝑑 𝑓 = 2𝜋
𝜔
respectively.
𝑘
The angular frequency is given by 𝜔 = √𝑚 , 𝑚 𝑎𝑛𝑑 𝑘 being the mass and spring
constant respectively.
Example 3.12
Consider an object with mass 𝑚 = 1𝑘𝑔 attached to a spring and being pulled down
10 units below its equilibrium position, where 𝑘 = 16𝑁/𝑚 and holding it until 𝑡 = 0
and then releasing it from rest. The system is then modelled by
𝑑2 𝑥
+ 16𝑥 = 0 , 𝑥(0) = 10 , 𝑥 ′ (0) = 0
𝑑𝑡 2
2𝜋 2
𝐴𝑚𝑝𝑙𝑖𝑡𝑢𝑑𝑒 = 10 , 𝑃 = ≈ 1,571 , 𝑓 = 2𝜋 ≈ 0,318𝐻𝑧
4
𝑏
𝑏
The product 𝐴 = 𝐴𝑒 𝛼𝑡 = 𝐴𝑒 (−2𝑚)𝑡 , 𝛼 = − is called the damping force
2𝑚
Example 3.13
Assume that the motion of a spring mass system with damping is governed by the
differential equation
𝑑2 𝑥 𝑑𝑥
+ 4 𝑑𝑡 + 5𝑥 = 0
𝑑𝑡 2
with initial velocity 𝑥 ′ (0) = 0,5𝑚/𝑠 and initial displacement 𝑥(0) = 0,25𝑚.
Determine the displacement equation of the system, frequency and angular
frequency.
Solution
𝑚2 + 4𝑚 + 5 = 0
−4±√42 −4(1)5
𝑚= = −2 ± 𝑗
2
5
𝐴𝑛𝑔𝑢𝑙𝑎𝑟 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 = √1 = 2,236 𝑟𝑎𝑑/𝑠
Rearranging gives
𝑑2 𝑥 𝑑𝑥
𝑚 𝑑𝑡 2 + 𝛽 𝑑𝑡 + 𝑘𝑥 = 𝐹(𝑡)
or 𝑚𝑥 ″ + 𝛽𝑥 ′ + 𝑘𝑥 = 𝐹(𝑡)
In this case we have a non-homogeneous differential equation with general solution
𝑥𝐺 = 𝑥𝐶𝐹 + 𝑥𝑃𝐼
where 𝑥𝐶𝐹 (complementary solution) is the solution to the free damped case and
𝑥𝑃𝐼 (particular solution) will be found using the method of undetermined
coefficients
It is essential to note that in free, damped case the complementary solution will
approach zero as 𝑡 becomes large. Due to this behaviour the complementary
solution is often called the transient state.
Due to the behaviour of the complementary solution, the displacement will start to
look increasingly more like the particular solution as 𝑡 increases and as a result the
particular solution is often called the steady state solution
44
Example 3.14
An object moves according to the equation
𝑑2 𝑥 𝑑𝑥
+ 2 𝑑𝑡 + 2𝑥 = 2𝑠𝑖𝑛2𝑡
𝑑𝑡 2
−2±√4−20
𝑚= ⇒ 𝑚 = −1 ± 2𝑗
2
3 2 1 2
𝐴 = √(− 7) + (− 7) ≈ 0,4518
𝜔 1
𝑓 = 2𝜋 = 𝜋 ≈ 0,3183
𝐶
Phase angle 𝛼 = 𝑡𝑎𝑛−1 (𝐶1) = 𝑡𝑎𝑛−1 (3) ≈ 1,2491
2
𝐶1 < 0 and 𝐶2 < 0 and 𝑠𝑖𝑛𝛼 < 0 𝑎𝑛𝑑 𝑐𝑜𝑠𝛼 < 0 ⇒ 𝛼 is in the third quadrant
So 𝛼 = 𝜋 + 1,2491 = 4,3907
(𝑐) 𝑥 = 0,4518sin (2𝑡 + 4,3907)
𝑡1 = 2,1954 , 𝑡2 = −0,6246, 𝑡3 = 0,9462
𝑥(𝑡)
−0,4518 −0,4295
Example 3.15
A 5𝑘𝑔 object attached to a spring and stretches the spring 0,7𝑚 by itself. A damper
that exerts a force of 50𝑁 when the velocity is 2𝑚/𝑠 is added to the spring. A force
of the form 𝐹(𝑡) = 10𝑐𝑜𝑠𝜔𝑡 is attached to the object and the system is in resonance.
If the object is initially displaced 0,5𝑚 downward from its equilibrium position and
given an upward velocity of 1𝑚/𝑠, determine the displacement of the object at any
given time 𝑡.
Solution
We start by setting up an IVP for the system
𝑟𝑒𝑠𝑡𝑜𝑟𝑖𝑛𝑔 𝑓𝑜𝑟𝑐𝑒
𝑚 = 5 and 𝑘 = = 𝑤𝑒𝑖𝑔ℎ𝑡
𝑥
49
𝑤𝑒𝑖𝑔ℎ𝑡 = 5 × 9,8 = 49 , 𝑘 = 0,7 = 70
𝑑𝑥
We are given the damping force −𝛽 𝑑𝑡 ⇒50 = 2𝛽 ∴ 𝛽 = 25
𝑘 70
We know that 𝜔 = √𝑚 = √ 5 = √14 ≈ 3,74
−5±√25−4(14) 5 √−31
𝑚= = −2 ±
2 2
= −2,5 ± 2,78𝑗
∴ 𝑥𝐶𝐹 = 𝑒 −2,5𝑡 (𝐶1 𝑐𝑜𝑠2,78𝑡 + 𝐶2 𝑠𝑖𝑛2,78𝑡)
Determining the particular solution using the method of undetermined coefficients
We guess the particular solution
coefficients of 𝑠𝑖𝑛√14𝑡:
coefficients of 𝑐𝑜𝑠√14𝑡:
Activity 3.5
1.A body with mass 20𝑘𝑔 attached to a spring with spring constant 20𝑁/𝑚 is pulled
down 10𝑚 below its equilibrium position, if held until 𝑡 = 0, and then released from
rest and assumes an upward velocity of 10𝑚/𝑠.
Formulate a differential equation model describing the system and determine
displacement equation of the body.
2.The motion of an object is described by the differential equation
𝑑2 𝑥 𝑑𝑥
+ 4 𝑑𝑡 + 5𝑥 = 0 𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥(0) = 0,9 𝑎𝑛𝑑 𝑥 ′ (0) = 0,6
𝑑𝑡 2
𝑑2 𝑥 𝑑𝑥
3.Solve the following differential equation +4 + 5𝑥 = 0 ,
𝑑𝑡 2 𝑑𝑡
Determine the displacement equation and then express the solution as a product
of a damping factor and sine factor.
5.The motion of an object is described by the differential equation
𝑑2 𝑥 𝑑𝑥
+ 10 𝑑𝑡 + 25𝑥 = 𝑐𝑜𝑠𝑡 𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑥(0) = 1 𝑎𝑛𝑑 𝑥 ′ (0) = 0
𝑑𝑡 2
Unit 4
Introduction
There are differential equations that cannot be solved using any of the conventional
techniques learned under elementary methods. In this section we look at
approximating the solution of a differential equation using a set of points. The focus
is on the initial value problems (IVP’s) expressed as follows:
𝑑𝑦 𝑑2 𝑦
= 𝑓(𝑥; 𝑦) , 𝑦(𝑥0 ) = 𝑦0 and = 𝑓(𝑥 ; 𝑦 ; 𝑦 ′ ) , 𝑦(𝑥0 ) = 𝑦0 , 𝑦 ′ (𝑥0 ) = 𝑦0′
𝑑𝑥 𝑑𝑥 2
We study two techniques, namely, Euler’s method and Runge Kutta method.
differential equations
error bounds
If ℎ is a positive increment (step size) on the 𝑥-axis then we can find a point
(𝑥1 ; 𝑦1 ) = (𝑥0 + ℎ ; 𝑦1 ) on the line tangent to the unknown solution to the curve at
the assumed point (𝑥0 ; 𝑦0 ).
Taking a tangent line at the new generated point (𝑥1 ; 𝑦1 ) we get another point which
is closer to the true solution than the previous point. This process is repeated until
the required point is reached.
Geometrically, the approximate solution to the IVP differential equation is a polygon
with first side a tangent to the curve at 𝑥0 (which is the approximation of the solution
curve 𝑦(𝑥) at 𝑥0 ) as the diagram that follows illustrates.
𝑚 = 𝑓(𝑥0 ; 𝑦0 ) 𝑚 = 𝑓(𝑥1 ; 𝑦1 )
𝑚 = 𝑓(𝑥2 ; 𝑦1 )
𝑥0 𝑥1 𝑥2 𝑥
Noting that 𝑦(𝑥𝑛+1 ) = 𝑦𝑛+1 , 𝑦(𝑥𝑛 ) = 𝑦𝑛 𝑒𝑡𝑐., the equation (1) can be rewritten as
(𝑛)
𝑦𝑛″ 𝑦𝑛
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑦𝑛ʹ + ℎ2 + ⋯ + ℎ𝑛
2! 𝑛!
Since 𝑦 ʹ (𝑥) = 𝑓(𝑥; 𝑦), the equation can be rewritten, for small subdivisions (ℎ → 0)
𝑦𝑛+1 ≈ 𝑦𝑛 + ℎ𝑦𝑛ʹ = 𝑦𝑛 + ℎ𝑓(𝑥; 𝑦)
The last result comes from the observation that as ℎ → 0, ℎ𝑛 (𝑛 = 2, 3, … ) becomes
(𝑛)
𝑦𝑛″ 𝑦𝑛
smaller, making ℎ2 + ⋯ + ℎ𝑛 Negligibly small. This gives rise to Euler’s
2! 𝑛!
formula. Euler’s formula
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥𝑛 ; 𝑦𝑛 ), 𝒏 = 𝟎, 𝟏, 𝟐, …
Example 4.1
Use Euler’s method to approximate the solution of the initial-value-problem (𝐼𝑉𝑃)
𝑦 ʹ = 0,2𝑥𝑦 , 𝑦(1) = 1 ; 𝑥 = 1(0,1)1,2
Solution
From the given condition 𝑥 = 1(0,1)1,2
we note that [𝑎; 𝑏] = [1; 1,2] ; ℎ = 0,1 ; 𝑥0 = 1 ; 𝑦0 = 1
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥𝑛 ; 𝑦𝑛 )
Using assumed value first (𝑥0 ; 𝑦0 ) = (1; 1)
𝑦1 = 𝑦0 + ℎ𝑓(𝑥0 ; 𝑦0 )
= 1 + 0,1[0,2(𝑥0 . 𝑦0 )]
= 1 + 0,1[0,2(1.1)]
≈ 1,0200
𝑦2 = 𝑦1 + ℎ𝑓(𝑥1 ; 𝑦1 )
= 1,02 + 0,1[0,2(𝑥1 . 𝑦1 )] , 𝑥1 = 𝑥0 + ℎ = 1 + 0,1 = 1,1
𝑥1 = 1,1 is not yet equal to the upper limit 𝑏 = 1,2 ∴ this iteration step is not the last.
= 1,02 + 0,1{0,2[(1,1). (1,02)]}
51
≈ 1,0224
𝑦2 = 𝑦1 + ℎ𝑓(𝑥1 ; 𝑦1 )
= 1,02 + 0,1[0,2(𝑥1 . 𝑦1 )] , 𝑥2 = 𝑥1 + ℎ = 1,1 + 0,1 = 1,2
𝑥2 = 1,2 is equal to the upper limit 𝑏 = 1,2 ∴ this iteration step is the last.
= 1,0224 + 0,1{0,2[(1,2). (1,0224)]}
≈ 1,0469
𝐻𝑒𝑛𝑐𝑒 𝑦 ≅ 1,0469
Example 4.2
Use Euler’s method to approximate the solution of the following initial-value-problem
𝑦 ʹ = 0,2𝑥𝑦 , 𝑦(1) = 1 ; 𝑥 = 1(0,5)2,0
Solution
From the given condition 𝑥 = 1(0,5)2,0
we note that [𝑎; 𝑏] = [1; 2,0], ℎ = 0,5 ; 𝑥0 = 1 ; 𝑦0 = 1
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥𝑛 ; 𝑦𝑛 )
Firstly, using assumed value (𝑥0 ; 𝑦0 ) = (1; 1)
𝑦1 = 𝑦0 + ℎ𝑓(𝑥0 ; 𝑦0 )
= 1 + 0,5[0,2(𝑥0 . 𝑦0 )]
= 1 + 0,5[0,2(1.1)]
≈ 1,1000
𝑦2 = 𝑦1 + ℎ𝑓(𝑥1 ; 𝑦1 )
= 1,1 + 0,5[0,2(𝑥1 . 𝑦1 )] , 𝑥1 = 𝑥0 + ℎ = 1 + 0,5 = 1,5
= 1,1 + 0,5{0,2[(1,2). (1,1)]}
≈ 1,2320
𝑦3 = 𝑦2 + ℎ𝑓(𝑥2 ; 𝑦2 )
= 1,2320 + 0,5[0,2(𝑥2 . 𝑦2 )] , 𝑥2 = 𝑥1 + ℎ = 1,5 + 0,5 = 2,0
𝑥2 = 2,0 is equal to the upper limit 𝑏 = 2,0 ∴ this iteration step is the last.
= 1,2320 + 0,5{0,2[(2,0). (1,2320)]}
≈ 1,4784
∴ 𝑦 ≅ 1,4784
52
Observation 1: In the two examples above we realize that enlarging the interval and
increasing the step size results into more iteration steps, that is, it takes longer to
arrive at the required solution point.
Class activity:
Using the above examples determine other observations that can be drawn in terms
of step size and interval. Relate these observations to error estimates
Example 4.3
Determine the solution of the differential equation ( 𝐼𝑉𝑃) in example 4.2 over the
interval 1 ≤ 𝑥 ≤ 1,4 and establish the error bound given by
ℎ2
𝑀 where 𝑀 = max |𝑦 ′′ (𝑥)|
2 𝑥𝑛 <𝑥<𝑥𝑛+1
Solution
Given 𝑦 ʹ = 0,2𝑥𝑦 , 𝑦(1) = 1 ; 𝑥 = 1(0,1)1,4
Starting with assumed value (𝑥0 ; 𝑦0 ) = (1; 1)
𝑦1 = 𝑦0 + ℎ𝑓(𝑥0 ; 𝑦0 )
= 1 + 0,1[0,2(𝑥0 . 𝑦0 )]
= 1 + 0,1[0,2(1.1)]
≈ 1,0200
𝑦2 = 1,02 + 0,1[0,2(𝑥1 . 𝑦1 )]
= 1,02 + 0,1{0,2[(1,2). (1,02)]}
≈ 1,0445
𝑦3 = 1 + 0,1[0,2(𝑥2 . 𝑦2 )]
= 1,0445 + 0,1{0,2[(1,3). (1,0445)]}
≈ 1,0717
𝑦4 = 1 + 0,1[0,2(𝑥3 . 𝑦3 )]
= 1,0717 + 0,1{0,2[(1,4). (1,0717)]}
≈ 1,1017
∴ 𝑦 ≅ 1,1017
Self test: Compute the error bound for the iterations
53
Example 4.4
Solve the following differential equation using Euler’s method and establish the error
deviation between the third and the fourth iteration and compare this with the
deviation between the first and second iteration
𝑦ʹ + 2𝑦 = 2 − 𝑒 −4𝑥 , 𝑦(0) = 1 𝑓𝑜𝑟 𝑥 = 0(0,1)0,3
Solution
The differential equation can be written as
𝑦ʹ = 2 − 𝑒 −4𝑥 − 2𝑦 , 𝑦(0) = 1 𝑓𝑜𝑟 𝑥 = 0(0,1)0,3
𝑦𝑛+1 = 𝑦𝑛 + 0,1[2 − 𝑒 −4𝑥𝑛 − 2𝑦𝑛 ]
∴ 𝑦 ≅ 0,8399
Exercise: Establish error deviations between iterates
Activity 4.1
1. Use Euler’s method to determine the solution of the following differential equation
𝑦ʹ = 𝑥𝑦 − 𝑦 , 𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑦(0) = 1 𝑓𝑜𝑟 𝑥 = 0(0,2)0,6
2. Use Euler’s method to approximate the solution of the following differential
equation.
(a) 𝑦ʹ = 𝑥 2 − 1 , 𝑦(0) = 2 , 𝑥 = 0(0,3)1,2
𝑡
(b) 𝑦ʹ − 𝑦 = 𝑒 2 𝑐𝑜𝑠5𝑡 , 𝑦(1) = 1 𝑓𝑜𝑟 𝑡 = 1(0,1)1,5
Example 4.5
Use Euler’s method to approximate the solution to the differential equation
𝑦 ′′ = 𝑥𝑦 ′ − 2𝑦, 𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 𝑦(0) = 0 , 𝑦 ′ (0) = −3 over the interval
0 ≤ 𝑥 ≤ 0,2 , 𝑠𝑡𝑒𝑝 𝑠𝑖𝑧𝑒 ℎ = 0,1
Solution
Adopting formulae based on the differential equation
𝑦𝑛′′ = 𝑥𝑛 𝑦𝑛′ − 2𝑦𝑛 where ℎ = 0,1 , 𝑥0 = 0 , 𝑦0 = 0 , 𝑦0′ = −3
For 𝑛 = 0 ∶ 𝑦0′′ = 𝑥0 𝑦0′ − 2𝑦0
= 0(−3) − 2(0)
=0
ℎ2
𝑦1 = 𝑦0 + ℎ𝑦0′ + 𝑦0′′
2!
(0,1)2
= 0 + 0,1(−3) + (0)
2
= −0,3000
𝑦1′ = 𝑦0′ + ℎ𝑦0′′
= −3 + 0,1(0)
= −3,0000
For 𝑛 = 1 ∶ 𝑦1′′ = 𝑥1 𝑦1′ − 2𝑦1
= 0,1(−3) − 2(−0,3)
= 0,3000
ℎ2
𝑦2 = 𝑦1 + ℎ𝑦1′ + 𝑦1′′
2!
(0,1)2
= −0,3 + 0,1(−3) + (0,3)
2
≈ −0,5985
𝑦2′ = 𝑦1′ + ℎ𝑦1′′
= −3 + 0,1(0,3)
≈ −2,9700
For 𝑛 = 2 ∶ 𝑦2′′ = 𝑥2 𝑦2′ − 2𝑦2
= 0,2(−2,9700) − 2(−0,5985)
≈ 0,6030
55
ℎ2
𝑦3 = 𝑦2 + ℎ𝑦2′ + 𝑦2′′
2!
(0,1)2
= −0,5985 + 0,1(−2,9700) + (0,6030)
2
≈ −0,89255
𝑦3′ = 𝑦2′ + ℎ𝑦2′′
= −2,9700 + 0,1(0,6030)
≈ −2,9097
Example 4.6
Use Euler’s method to approximate the solution of the differential equation
𝑦 ′′ = 2𝑦 ′ − (𝑥 + 2)𝑦 , 𝑦(0) = 1 , 𝑦 ′ (0) = 2 , 𝑥 = 0(0,2)0,6
Solution
𝑦𝑛′′ = 2𝑦𝑛′ − (𝑥𝑛 + 2)𝑦𝑛 where ℎ = 0,2 , 𝑥0 = 0 , 𝑦0 = 1 , 𝑦0′ = 2
For 𝑛 = 0 ∶ 𝑦0′′ = 2𝑦0′ − (𝑥0 + 2)𝑦0
= 2(2) − (0 + 2)(1)
= 2,0000
ℎ2
𝑦1 = 𝑦0 + ℎ𝑦0′ + 𝑦0′′
2!
(0,2)2
= 1 + 0,2(2) + (2)
2
≈ 1,4400
𝑦1′ = 𝑦0′ + ℎ𝑦0′′
= 2 + 0,2(2)
≈ 2,4000
For 𝑛 = 1 ∶ 𝑦1′′ = 2𝑦1′ − (𝑥1 + 2)𝑦1
= 2(2,4) − (0,2 + 2)(1,44)
≈ 1,6320
ℎ2
𝑦2 = 𝑦1 + ℎ𝑦1′ + 𝑦1′′
2!
(0,2)2
= 1,44 + 0,2(2,4) + (1,6320)
2
≈ 1,95926
𝑦2′ = 𝑦1′ + ℎ𝑦1′′
56
= 2,4 + 0,2(1,6320)
≈ 2,7264
For 𝑛 = 2 ∶ 𝑦2′′ = 2𝑦2′ − (𝑥2 +2)𝑦2
= 2(2,7264) − (0,4 + 2)(1,9526)
≈ 0,7666
ℎ2
𝑦3 = 𝑦2 + ℎ𝑦2′ + 𝑦2′′
2!
(0,2)2
= 1,9526 + 0,2(2,7264) + (0,7666)
2
≈ 2,5132
𝑦3′ = 𝑦2′ + ℎ𝑦2′′
= 2,7264 + 0,2(0,7666)
≈ 2,8797
For 𝑛 = 3 ∶ 𝑦3′′ = 2𝑦3′ − (𝑥3 +2)𝑦3
= 2(2,8797) − (0,6 + 2)(2,5132)
≈ −0,7749
ℎ2
𝑦4 = 𝑦3 + ℎ𝑦3′ + 𝑦3′′
2!
(0,2)2
= 2,5132 + 0,2(2,8797) + (−0,7749)
2
≈ 3,0736
𝑦4′ = 𝑦3′ + ℎ𝑦3′′
= 2,8797 + 0,2(−0,7749)
≈ 2,7247
Activity 4.2
1. Use Euler’s method to approximate the solution of the following differential
equations.
(𝑎) 𝑦 ′′ = 𝑥𝑦 ′ − 3𝑦 , 𝑦(0) = 0 , 𝑦 ′ (0) = −2 𝑓𝑜𝑟 𝑥 = 0(0,1)0,3
(𝑏) 𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 𝑥 , 𝑦(0) = 1 , 𝑦 ′ (0) = 2 , 𝑥 = 0(0,2)0,4
(𝑐) 𝑦 ′′ = 1 + 𝑥 − 𝑦 2 , 𝑦(0) = 2 , 𝑦 ′ (0) = 1 , 𝑥 = 0(0,2)0,4
57
We then determine
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑦𝑛′ + 𝐴
and
𝐵
𝑦′𝑛+1 = 𝑦′𝑛 + ℎ
Depending on the interval over which the approximation is to be carried out the steps
can then be repeated.
Example 4.7
Use Runge-Kutta method to approximate the solution of the following differential
equation
𝑦 ′′ = 𝑥 + 𝑦 + 𝑦 ′ , 𝑦(0) = 1 , 𝑦 ′ (0) = 0 , 𝑥 = 0(0,2)0,2
Solution
Adaptation of equations according to the differential equation
𝑦𝑛′′ = 𝑥𝑛 + 𝑦𝑛 + 𝑦𝑛′ , ℎ = 0,2 ; 𝑥0 = 0 ; 𝑦0 = 1 , 𝑦0′ = 0
58
1
For 𝑛 = 0 ∶ 𝑘1 = 2 ℎ2 𝑓(𝑥0 ; 𝑦0 ; 𝑦0′ )
1
= 2 ℎ2 (𝑥0 + 𝑦0 + 𝑦0′ )
1
= 2 (0,2)2 [0 + 1 + 0]
≈ 0,0200
1 ℎ 1 1
𝑘2 = 2 ℎ2 {(𝑥0 + 2) + (𝑦0 + ℎ𝑦0′ + 4 𝑘1 ) + (𝑦0′ + ℎ 𝑘1 )}
1
= 2 (0,2)2 {(0 + 0,1) + (1 + 0 + 0,005) + (0 + 0,1)}
≈ 0,0241
1 ℎ 1 1 1
𝑘3 = 2 ℎ2 {(𝑥0 + 2) + (𝑦0 + 2 ℎ𝑦0′ + 4 𝑘1 ) + (𝑦0′ + ℎ 𝑘2 )}
1
= 2 (0,2)2 {(0 + 0,1) + (1 + 0 + 0,005) + (0 + 0,1205)}
≈ 0,0245
1 2
𝑘4 = 2 ℎ2 {(𝑥0 + ℎ) + (𝑦0 + ℎ𝑦0′ + 𝑘3 ) + (𝑦0′ + ℎ 𝑘3 )}
1
= 2 (0,2)2 {(0 + 0,2) + (1 + 0 + 0,0245) + (0 + 0,2450)}
≈ 0,0294
1
𝐴 = 3 [𝑘1 + 𝑘2 + 𝑘3 ]
1
= 3 (0.0200 + 0,0241 + 0,0245)
≈ 0,0229
1
𝐵 = 3 [𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 ]
1
= 3 [0,0200 + 2(0,0241) + 2(0,0245) + 0,0294]
≈ 0,0489
From 𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑦𝑛′ + 𝐴 ⇒ 𝑦1 = 𝑦0 + ℎ𝑦0′ + 𝐴
= 1 + 0,2(0) + 0,0229
≈ 1,0229
𝐵 𝐵
From 𝑦′𝑛+1 = 𝑦′𝑛 + ℎ ⇒ 𝑦′1 = 𝑦′0 + ℎ
0,0489
= 0+ 0,2
≈ 0,2445
59
Activity 4.3
1. Determine the numerical solutions of the following differential equations using
Runge-Kutta method
𝑦′
(a) 𝑦 ′′ = + 𝑦 , 𝑦(1) = 0 , 𝑦 ′ (1) = 1 𝑜𝑣𝑒𝑟 1 ≤ 𝑥 ≤ 1,1 , ℎ = 0,1
𝑥
𝑦 = 𝑓(𝑥; 𝑦)
0 𝑎 = 𝑥0 𝑥1 𝑥2 𝑥𝑛−1 𝑥𝑛 = 𝑏 𝑥
Summing up the 𝑛 contributions of this type leads to the general trapezoidal rule
𝑏 1 1
∫𝑎 𝑓(𝑥)𝑑𝑥 ≈ 2 [𝑓(𝑥0 ) + 𝑓(𝑥1 )]∆𝑥1 + 2 [𝑓(𝑥1 ) + 𝑓(𝑥2 )]∆𝑥2 + ⋯
1
+ 2 [𝑓(𝑥𝑛−1 ) + 𝑓(𝑥𝑛 )]∆𝑥𝑛 (1)
𝑏−𝑎
If the interval [𝑎; 𝑏] is divided into 𝑛 equal parts of length ℎ = the equation
𝑛
becomes
𝑏 1
∫𝑎 𝑓(𝑥)𝑑𝑥 = ℎ{[2 𝑓(𝑥0 ) + 𝑓(𝑥1 )] + [𝑓(𝑥1 ) + 𝑓(𝑥2 )] + ⋯
1
+ [𝑓(𝑥𝑛−1 ) + 2 𝑓(𝑥𝑛 )]} + ℇ(ℎ)
Example 4.8
21
Use the trapezoidal rule to approximate ∫1 𝑥 𝑑𝑥 , 𝑛 = 5 and state the error bounds
Solution
𝑏−𝑎 2−1 1
𝑛 = 5 ,𝑎 = 1 ,𝑏 = 2 ,∴ ℎ = = = 5 = 0,2
𝑛 5
21 1 1
∫1 𝑥 𝑑𝑥 = ℎ [2 𝑓(1) + 𝑓(1,2) + 𝑓(1,4) + 𝑓(1,6) + 𝑓(1,8) + 2 𝑓(2)]
2(2−1)3 1
For 𝐾1 , ℇ𝑡𝑟 ≤ = 150 = 0.007
12(5)2
0,25(2−1)3 0,25
For 𝐾2 , ℇ𝑡𝑟 ≤ = = 0.0008
12(5)2 300
comprising the first two sub-intervals of [𝑎; 𝑏], and thereafter repeating the process
until the whole interval [𝑎; 𝑏] is covered. The value of the definite integral can now be
estimated by integrating the successive quadratic approximations. This process
leads to the following algorithm.
NB: Observe that the coefficients in Simpson’s rule follow the pattern
1 4 2 4 2 4…4 2 4 1
Example 4.9
𝜋
Use Simpson’s rule with four subintervals (𝑛 = 4) to approximate ∫0 𝑠𝑖𝑛𝑥 𝑑𝑥 and
determine the bounds.
Solution
𝑏−𝑎 𝜋−0 𝜋
𝑛 = 4 ,𝑎 = 0 ,𝑏 = 𝜋 ,∴ ℎ = = = = 0,7854
𝑛 4 4
𝜋 𝜋 3𝜋
0 𝜋
4 2 4
𝜋 𝜋 𝜋 𝜋 3𝜋
∫0 𝑠𝑖𝑛𝑥 𝑑𝑥 = 3(4) [𝑓(0) + 4𝑓 ( 4 ) + 2𝑓 ( 2 ) + 4𝑓 ( 4 ) + 𝑓(𝜋)]
𝜋
Analytically ∫0 𝑠𝑖𝑛𝑥 𝑑𝑥 = [−𝑐𝑜𝑠𝑥]𝜋0 = 𝑙𝑛2 = −(𝑐𝑜𝑠𝜋 − 𝑐𝑜𝑠 0) = 2,0000 (4))
For error bounds, we determine 𝑓 (4) (𝑥) = 𝑠𝑖𝑛𝑥 , 𝑓 (4) (0) = 0 = 𝐾1 , 𝑓 (4) (𝜋) = 0 = 𝐾2
0(𝜋−0)5
For 𝐾1 𝑎𝑛𝑑 𝐾2 , ℰ𝑠𝑝 ≤ = 0 ⇒ lower bound is = 0. For the upper bound we
180(5)4
can consider taking 𝑥𝑖 < 𝜋.
Activity 4.4
1. Use the trapezoidal rule to approximate the definite integrals
𝜋
(a) ∫0 𝑠𝑖𝑛𝑥𝑑𝑥 , 𝑛 = 5
1 2
(b) ∫0 (𝑥+2)2
𝑑𝑥 , 𝑛=4
3 2
(c) ∫2 𝑑𝑥 , 𝑛 = 4
𝑥2
1
(d) ∫0 𝑐𝑜𝑠𝑥𝑑𝑥 , 𝑛 = 6
2. Use the Simpson’s rule to approximate the definite integral and determine the
corresponding error bounds.
𝜋
√2
(a) ∫0 𝑠𝑖𝑛𝑥 2 𝑑𝑥 , 𝑛 = 4
31
(b) ∫1 𝑥 𝑑𝑥 , 𝑛 = 4
1
(c) ∫0 √1 + 𝑥 2 𝑑𝑥 , 𝑛 = 4
𝜋
(d) ∫0 𝑐𝑜𝑠𝑥𝑑𝑥 , 𝑛 = 6
First we shall use the trapezoidal rule for one interval to get a formula for (1) and
then subdivide the interval [𝑎 ; 𝑏] into 𝑛 subintervals and [𝑐 ; 𝑑] into 𝑚
subintervals to get a more general computation formula for (1)
63
𝐹𝑖𝑔𝑢𝑟𝑒 (𝑎)
𝑦
𝑦1 ---------------
𝑦0 ---------------
𝑥0 𝑥1 𝑥
Suppose we want to integrate over a small rectangular region as shown in figure (a)
above. Using the trapezoidal rule considering 𝑦 as fixed we get
𝑥 1 ℎ
∫𝑥0 𝑓(𝑥; 𝑦)𝑑𝑥 = 2 [𝑓(𝑥0 ; 𝑦) + 𝑓(𝑥1 ; 𝑦)]
Using the trapezoidal rule to approximate the integral on the right we get
𝑦
1 1 𝑥 ℎ𝑘
∫𝑦0 ∫𝑥0 𝑓(𝑥; 𝑦)𝑑𝑥𝑑𝑦 = [𝑓(𝑥0 ; 𝑦0 ) + 𝑓(𝑥1 ; 𝑦0 ) + 𝑓(𝑥0 ; 𝑦1 ) + 𝑓(𝑥1 ; 𝑦1 )]
4
Now, considering the more general form (1) divide [𝑎 ; 𝑏] into 𝑛 sub-intervals of
(𝑏−𝑎) (𝑑−𝑐)
length ℎ = and [𝑐 ; 𝑑] into subintervals of length 𝑘 = .
𝑛 𝑚
Using the trapezoidal rule for 𝑚 sub-intervals to approximate the integral on the right
and letting 𝑓𝑖;𝑗 = 𝑓(𝑥𝑖 ; 𝑦𝑗 ) we get the generalized form
𝑑 𝑏
∫𝑐 ∫𝑎 𝑓(𝑥; 𝑦)𝑑𝑑𝑥 𝑑𝑦
𝑛−1 𝑚−1
+4 ∑ ∑ 𝑓𝑖;𝑗
{ 𝑖=1 𝑗=1 }
64
Example 4.10
2 2
Use numerical approximation to compute ∫1 ∫1 (𝑥 + 𝑦)𝑑𝑥𝑑𝑦 over a rectangular
region with sub-intervals 𝑛 = 𝑚 = 2
Solution 2
𝑏−𝑎 1 𝑑−𝑐 1
ℎ= =2 , 𝑘= =2 𝟑
𝑛 𝑚 𝟐
𝟑
𝑎=1 𝑏=2
𝟐
≈3
2 2
Using the analytical method we find that the actual value ∫1 ∫1 (𝑥 + 𝑦)𝑑𝑥𝑑𝑦 = 3
From here we can proceed and determine the error deviation as well as the relative
percentage error deviation.
Activity 4.5
1. Use Numerical methods to approximate the following integrals
2 2
(𝑎) ∫1 ∫1 (𝑥 + 𝑦)𝑑𝑥𝑑𝑦 , 𝑛 = 𝑚 = 3
2 0
(𝑏) ∫0 ∫−2(𝑥 + 𝑦)𝑑𝑥𝑑𝑦 , 𝑛 = 𝑚 = 2
1 1
(𝑐) ∫0 ∫0 (𝑥𝑦 + 1)𝑑𝑥𝑑𝑦 , 𝑛 = 𝑚 = 2
Unit 5
5.Partial Differentiation
Introduction
In engineering applications and other related fields there are physical systems that
depend on more than one variable for analysis. The analysis of systems of this
nature lead to the study of functions of several variables and their behavior under
certain conditions. We will introduce these functions and determine how they can be
used to find extreme values.
Definition 5.1
If 𝑧 = 𝑓(𝑥; 𝑦), the first partial derivatives of 𝑓 with respect to 𝑥 and 𝑦 are functions
𝑓𝑥 and 𝑓𝑦 defined by
𝜕𝑓 𝑓(𝑥+∆𝑥 ; 𝑦)−𝑓(𝑥 ; 𝑦) 𝜕𝑓 𝑓(𝑥 ; 𝑦+∆𝑦)−𝑓(𝑥 ; 𝑦)
= 𝑓𝑥 (𝑥; 𝑦) = lim and = 𝑓𝑦 (𝑥; 𝑦) = lim
𝜕𝑥 ∆𝑥→0 ∆𝑥 𝜕𝑦 ∆𝑦→0 ∆𝑦
Example 5.1
Determine the partial derivatives 𝑓𝑥 and 𝑓𝑦 for the function
𝑧 = 𝑓(𝑥; 𝑦) = 3𝑥 − 𝑥 2 𝑦 2 − 3𝑦 + 2
Solution
𝜕𝑧
= 𝑓𝑥 (𝑥; 𝑦) = 3 − 2𝑥𝑦 2 − 0 = 3 − 2𝑥𝑦 2
𝜕𝑥
𝜕𝑧
= 𝑓𝑦 (𝑥; 𝑦) = 0 − 2𝑥 2 𝑦 = −2𝑥𝑦 2 − 3
𝜕𝑦
Example 5.2
𝜕𝑧 𝜕𝑧
Determine and if
𝜕𝑥 𝜕𝑦
𝜕𝑧 𝜕𝑧
(b) = 4𝑦𝑒 2𝑥𝑦 + 2𝑥𝑦 3 𝑐𝑜𝑠ℎ (𝑥 2 𝑦 3 ) , = 4𝑥𝑒 2𝑥𝑦 + 3𝑥 2 𝑦 2 𝑐𝑜𝑠ℎ (𝑥 2 𝑦 3 )
𝜕𝑥 𝜕𝑦
𝜕 𝜕𝑓 𝜕2 𝑓 𝜕 𝜕𝑓 𝜕2 𝑓
and ( ) = 𝜕𝑥𝑦 = 𝑓𝑥𝑦 = 𝑓𝑦𝑥 = 𝜕𝑦 (𝜕𝑥 ) = 𝜕𝑦𝑥
𝜕𝑥 𝜕𝑦
Example 5.3
𝜕2𝑓 𝜕2𝑓 𝜕2𝑓 𝜕2𝑓 𝑥
Determine , , 𝑎𝑛𝑑 if 𝑧 = 𝑓(𝑥; 𝑦) = 𝑥 2 − 𝑦 2 + 𝑐𝑜𝑠 (𝑦)
𝜕𝑥 2 𝜕𝑦 2 𝜕𝑥𝑦 𝜕𝑦𝑥
67
Solution
𝜕𝑓 1 𝑥 𝜕2𝑓 1 𝑥 𝜕𝑓 𝑥 𝑥 𝜕2𝑓
= 2𝑥 − 𝑦 𝑠𝑖𝑛 (𝑦) ; = 2 − 𝑦 2 𝑐𝑜𝑠 (𝑦) ; = −2𝑦 + 𝑦 2 𝑠𝑖𝑛 (𝑦) ; =
𝜕𝑥 𝜕𝑥 2 𝜕𝑦 𝜕𝑦 2
2𝑥 𝑥 𝑥2 𝑥 𝜕2𝑓 𝑥 𝑥 1 𝑥 𝜕2 𝑓
−2 + [− 𝑦 3 𝑠𝑖𝑛 (𝑦) − 𝑦3 𝑐𝑜𝑠 (𝑦)] ; = (𝑦 3 𝑐𝑜𝑠 (𝑦) + 𝑦 2 𝑠𝑖𝑛 (𝑦)) = 𝜕𝑥𝑦
𝜕𝑦𝑥
Example 5.4
Determine 𝑓𝑦𝑥 at the point (1; 1) if f 𝑧 = 𝑓(𝑥; 𝑦) = ln (sec (𝑥𝑦)
Solution
𝑦𝑠𝑒𝑐(𝑥𝑦)tan (𝑥𝑦)
𝑓𝑥 = = 𝑦𝑡𝑎𝑛(𝑥𝑦) , 𝑓𝑦𝑥 = 𝑥𝑦𝑠𝑒𝑐 2 (𝑥𝑦) + 𝑡𝑎𝑛 (𝑥𝑦)
sec (𝑥𝑦)
2
∴ 𝑓𝑦𝑥 (1; 2) = 𝑐𝑜𝑠2 (2) + 𝑡𝑎 𝑛(2) ≈ −6,991
Activity 5.1
1. Evaluate 𝑓𝑥 and 𝑓𝑦 for the following
𝜕2𝑧 𝜕2 𝑧 𝜕2𝑧
2. Determine ; 𝑎𝑛𝑑 if
𝜕𝑥 2 𝜕𝑥 2 𝜕𝑥𝜕𝑦
(a) 𝑧 = ln(𝑥 − 𝑦)
(b) 𝑧 = 𝑥 2 − 𝑥𝑦 + 𝑦 2 − 5𝑥 + 𝑦
(c 𝑧 = 𝑒 −𝑥 𝑡𝑎𝑛ℎ𝑦
(d) 𝑧 = sech (𝑠𝑖𝑛2𝑥)
𝑦
(e) 𝑧 = 𝑡𝑎𝑛−1 (𝑥 )
68
Definition 5.2
Let 𝑓 have continuous second order partial derivatives on an open region R
containing the point (𝑎; 𝑏) for which 𝑓𝑥 (𝑎; 𝑏) = 0 𝑎𝑛𝑑 𝑓𝑦 (𝑎; 𝑏) = 0.
(a) If 𝑑 > 0 𝑎𝑛𝑑 𝑓𝑥𝑥 (𝑎; 𝑏) > 0, then 𝑓 has a relative minimum at (𝑎; 𝑏)
(b) If 𝑑 > 0 𝑎𝑛𝑑 𝑓𝑥𝑥 (𝑎; 𝑏) < 0, then 𝑓 has a relative maximum at (𝑎; 𝑏)
(c) If 𝑑 < 0 𝑎𝑛𝑑 𝑓𝑥𝑥 (𝑎; 𝑏) < 0, then [(𝑎; 𝑏); 𝑓(𝑎; 𝑏)] is a saddle point
(d) If 𝑑 = 0, the test is inconclusive
Example 5.5
Determine the relative extremum of the following function
𝑓(𝑥; 𝑦) = −𝑥 2 − 5𝑦 2 + 10𝑥 − 10𝑦 + 28
Solution
𝑓𝑥 = −2𝑥 + 10 , 𝑓𝑦 = −10𝑦 − 10
𝑓𝑥 = 0 ⇒ −2𝑥 + 10 = 0 , 𝑓𝑦 = 0 ⇒ −10𝑦 − 10 = 0
⇒𝑥 =5 , 𝑦 = −1
𝑓𝑥𝑥 = −2 , 𝑓𝑦𝑦 = −10 , 𝑓𝑥𝑦 = 0
2
𝑑 = (𝑓𝑥𝑥 (5; −1). 𝑓𝑦𝑦 (5; −1)) − [𝑓𝑥𝑦 (5; −1)]
= (−2 × −10) − 0
= 20 > 0
Since 𝑑 > 0 𝑎𝑛𝑑 𝑓𝑥𝑥 = −2 < 0, 𝑓(𝑥; 𝑦) has a relative maximum at (5; −1)
69
Example 5.6
Investigate the existence of relative extremum for the following function
𝑓(𝑥; 𝑦) = 𝑥 2 − 3𝑥𝑦 − 𝑦 2
Solution
𝑓𝑥 = 2𝑥 − 3𝑦 , 𝑓𝑦 = −3𝑥 − 2𝑦
𝑓𝑥 = 0 ⇒ 2𝑥 − 3𝑦 = 0 , 𝑓𝑦 = 0 ⇒ −3𝑥 − 2𝑦 = 0
⇒ 2𝑥 = 3𝑦
3𝑦
⇒𝑥 = 2
3𝑦
substituting 𝑥 = into −3𝑥 − 2𝑦 = 0
2
3𝑦
we have −3 ( 2 ) = 2𝑦 ⇒ 𝑦 = 0 ∴ 𝑥 = 0
= (2 × −3) − 0
= −6 > 0
Since 𝑑 > 0 𝑎𝑛𝑑 𝑓𝑥𝑥 = −2 < 0, 𝑓(𝑥; 𝑦) has a relative maximum at (0; 0)
Example 5.7
Test for the existence of relative extremum for the following function
𝑓(𝑥; 𝑦) = 𝑥 3 + 𝑦 3
Solution
𝑓𝑥 = 3𝑥 2 , 𝑓𝑦 = 3𝑦 2
𝑓𝑥 = 0 ⇒ 3𝑥 2 = 0 , 𝑓𝑦 = 0 ⇒ 3𝑦 2 = 0
∴𝑥=0 , ∴𝑦=0
𝑓𝑥𝑥 = 6𝑥 , 𝑓𝑦𝑦 = 6𝑦 , 𝑓𝑦𝑥 = 0
2
𝑑 = (𝑓𝑥𝑥 (0; 0). 𝑓𝑦𝑦 (0; 0)) − [𝑓𝑥𝑦 (0; 0)]
= (0 × 0) − 0
=0
Since 𝑑 = 0 , the test is inconclusive
70
Activity 5.2
1. Determine the relative extremum of the following functions
(a) 𝑓(𝑥; 𝑦) = −𝑥 3 + 4𝑥𝑦 − 2𝑦 2 + 1
(b) 𝑓(𝑥; 𝑦) = 3𝑥 2 + 2𝑦 2 − 6𝑥 − 4𝑦 + 16
(c) 𝑓(𝑥; 𝑦) = −5𝑥 2 + 4𝑥𝑦 − 𝑦 2 + 16𝑥 + 10
(d) 𝑓(𝑥; 𝑦) = 80𝑥 + 80𝑦 − 𝑥 2 − 𝑦 2
2. Examine the function for relative extremum and saddle point
(a) 𝑓(𝑥; 𝑦) = 𝑥 2 − 𝑦 2 − 𝑥 − 𝑦
(b) 𝑓(𝑥; 𝑦) = 𝑥 2 − 3𝑥𝑦 − 𝑦 2
and
𝑓(𝑥 ; 𝑦+ℎ)−𝑓(𝑥 ; 𝑦)
𝑓𝑦 (𝑥; 𝑦) = lim
ℎ→0 ℎ
Now suppose 𝑓(𝑥; 𝑦) is the temperature at the point 𝑃(𝑥; 𝑦) of a flat metal plate in
the 𝑥, 𝑦-plane, then 𝑓𝑥 (𝑥; 𝑦) and 𝑓𝑦 (𝑥; 𝑦) give us instantaneous rates of change of
the temperature with respect to the distance in the horizontal and vertical directions.
Observe the diagrams to have an idea of the propagations.
𝑦 𝑦 𝑄(𝑥 ; 𝑦 + ℎ)
𝑃(𝑥 ; 𝑦) 𝑄(𝑥 + ℎ ; 𝑦)
𝑃(𝑥 ; 𝑦)
𝑥 𝑥
If 𝒂 is any vector that has the same direction as 𝒖 then 𝐷𝒂 𝑓(𝑥; 𝑦) is referred to as
the directional derivative of 𝑓 in the direction of vector 𝒂.
Theorem 5.1
If 𝑓 is a differentiable function of two variables and 𝒖 = 𝑢1 𝒊 + 𝑢2 𝒋 is a unit vector,
then
𝐷𝒖 𝑓(𝑥; 𝑦) = 𝑓𝑥 (𝑥; 𝑦)𝑢1 + 𝑓𝑦 (𝑥; 𝑦)𝑢2
Example 5.8
Let 𝑓(𝑥; 𝑦) = 𝑥 3 𝑦 2
(a) Determine the directional derivative of 𝑓 at the point 𝑃(−1; 2) in the direction of
the 𝒂 = 4𝒊 − 3𝒋
(b) Discuss the significance of part (a) if 𝑓(𝑥; 𝑦) is the temperature at (𝑥; 𝑦).
Solution
𝟏 𝟏 𝟒 𝟑
(a) 𝒖 = ‖𝒂‖ 𝒂 = 𝟓 (4𝒊 − 3𝒋) = 𝟓 𝒊 − 𝟓 𝒋
(b) If 𝑓(𝑥; 𝑦) is the temperature at (𝑥; 𝑦) then 𝐷𝒖 𝑓(−1; 2) = 12 means if the point
moves in the direction of 𝒖 , the temperature at P increases at a rare of 120 per unit
change in distance.
𝑓𝑥 (−1; 2) = 12 𝑎𝑛𝑑 𝑓𝑦 (−1; 2) = −4 are the rates of change in the horizontal and
vertical directions respectively.
72
Example 5.9
Let 𝑧 = 𝑓(𝑥; 𝑦) = 14 − 𝑥 2 − 𝑦 2 and let 𝑃 = 𝑃(1; 2). Determine the directional
derivative of 𝑓 𝑎𝑡 𝑃,
(a) towards the point 𝑄 = 𝑄(3; 4),
(b) in the direction of 𝒗 = 2𝒊 − 𝒋 and
(c) towards the origin.
Solution
The surface is plotted in the figure above where the point 𝑃 = 𝑃(1; 2) is indicated on
the 𝑥, 𝑦-plane and the point 𝑷(𝟏; 𝟐; 𝟗) lies on the surface of 𝑓. We find that
𝑓𝑥 (𝑥; 𝑦) = −2𝑥 , 𝑓𝑦 (𝑥; 𝑦) = −2𝑦 and 𝑓𝑥 (1; 2) = −2 , 𝑓𝑦 (𝑥; 𝑦) = −4
(a) Let 𝒖𝟏 be the unit vector that points from the point 𝑃(1; 2) towards 𝑄(3; 4).
⃗⃗⃗⃗⃗⃗ = 2𝒊 + 2𝒋. The unit vector in this direction is 𝒖𝟏 = 𝟏 (𝒊 + 𝒋).
The vector 𝑷𝑸
√𝟐
Thus the directional derivative of 𝑓 at 𝑃(1; 2) in the direction of 𝒖𝟏 is
1 1 6
𝐷𝒖𝟏 𝑓(1; 2) = −2( ) + (−4)( )) = − ≈ −4,2426
√2 √2 √5
2 −1
𝐷𝒖𝟐 𝑓(1; 2) = −2( ) + (−4)( )) = 0
√5 √5
𝟐
Starting on the surface of 𝑓 at the point (1; 2) in the direction of 𝒖𝟐 = (𝒊 − 𝒋)
√𝟓
results in no instantaneous change in 𝑧-values.
(c) At 𝑃 = 𝑃(1; 2), the direction towards the origin is given by the vector
73
𝟏
⃗⃗⃗⃗⃗⃗ = 𝒘 = −𝒊 − 2𝒋. The unit vector in this direction is 𝒖𝟑 =
𝑷𝑶 (−𝒊 − 𝟐𝒋)
√𝟓
Definition 5.4
Let 𝑓 be a function of two variables. The gradient of 𝑓 is the vector
𝛁𝑓(𝑥; 𝑦) = 𝑓𝑥 (𝑥; 𝑦)𝒊 + 𝑓𝑦 (𝑥; 𝑦)𝒋
Example 5.10
1
Determine the directional derivative of 𝑓(𝑥; 𝑦) = 4 − 𝑥 2 − 4 𝑦 2 at (1; 2) in the
𝜋 𝜋
direction of 𝒖 = (𝑐𝑜𝑠 3 ) 𝒊 + (𝑠𝑖𝑛 3 ) 𝒋
Solution
𝐷𝒖 𝑓(𝑥; 𝑦) = 𝛁𝑓(𝑥; 𝑦). 𝒖
= [𝑓𝑥 (𝑥; 𝑦)𝒊 + 𝑓𝑦 (𝑥; 𝑦)𝒋]. 𝒖
𝟏 𝜋 𝜋
= [−2𝑥𝒊 − 𝑦𝒋]. (𝑐𝑜𝑠 ) 𝒊 + (𝑠𝑖𝑛 ) 𝒋
𝟐 3 3
𝜋 𝑦 𝜋
= (−2𝑥)𝑐𝑜𝑠 3 + (− 2)𝑠𝑖𝑛 3
1 2 √3
Then 𝐷𝒖 𝑓(1; 2) = (−2 × 1) (2) + (− 2) ( 2 ) = −1,8660
74
Example 5.11
𝜋 𝜋
Let 𝑓(𝑥; ) = 𝑠𝑖𝑛𝑥𝑐𝑜𝑠𝑦 and let 𝑃 = 𝑃 ( 3 ; 3 ). Determine the direction of
maximal/minimal increase.
Solution
We have 𝑓𝑥 = 𝑐𝑜𝑠𝑥𝑐𝑜𝑠𝑦 , 𝑓𝑥 = −𝑠𝑖𝑛𝑥𝑠𝑖𝑛𝑦
𝜋 𝜋 1
𝛁𝑓 = (𝑐𝑜𝑠𝑥𝑐𝑜𝑠𝑦)𝒊 − (𝑠𝑖𝑛𝑥𝑠𝑖𝑛𝑦)𝒋 , and at 𝑃, 𝛁𝑓 ( 3 ; 3 ) = 4 (𝒊 − 3𝒋)
1
Thus the direction of maximal increase is (𝒊 − 3𝒋) and the instantaneous rate of
4
𝜋 𝜋 1 1 2 3 2 √10
increase is ‖𝛁𝑓 ( ; )‖ = ‖ (𝒊 − 3𝒋)‖ = √( ) + ( ) = ≈ 0,7906
3 3 4 4 4 4
Example 5.12
𝜋
Determine the gradient of the function ℎ(𝑥; 𝑦) = 𝑥𝑡𝑎𝑛𝑦 at the point 𝑄(2; 4 ) and then
𝜋
compute the maximum value of the directional derivative at this point 𝑄 (2; 4 ).
Solution
𝜵ℎ(𝑥; 𝑦) = ℎ𝑥 𝒊 + ℎ𝑦 𝒋 = 𝑡𝑎𝑛𝑦𝒊 + 𝑥𝑠𝑒𝑐 2 𝑦𝒋
𝜋 𝜋 𝜋
𝜵ℎ (2; ) = tan ( )𝒊 + 2𝑠𝑒𝑐 2 ( )𝒋
4 4 4
= 𝒊 + 4𝒋
𝜋
‖ 𝜵ℎ (2; 4 )‖ = ‖𝒊 + 4𝒋‖ = √(1)2 + (4)2 ≈ 4,1231
Activity 5.3
1. Determine the directional derivative of 𝑓(𝑥 ; 𝑦) at the indicated point 𝑃 in the
indicated direction
(𝑎) 𝑓(𝑥; 𝑦) = 𝑥 2 + 5𝑥𝑦 + 3𝑦 2 , 𝑃(3 ; −1) , 𝒂 = 2𝒊 + 𝒋
𝑦
(𝑏) 𝑓(𝑥; 𝑦) = 𝑡𝑎𝑛−1 , 𝑃(4 ; −4) , 𝒂 = 2𝒊 − 3𝒋
𝑥
𝜋 𝜋
2. Let 𝑇(𝑥 ; 𝑦) = sin(2𝑥 − 𝑦) , 𝑃 (− 3 ; 6 ) 𝑎𝑛𝑑 𝑄(0 ; 0)
Example 5.10
𝜕2𝑢 𝜕2𝑢
1. 𝜕𝑥 2 + 3 𝜕𝑦 2 − 2𝑢 = 0 is homogeneous
𝜕2𝑢 𝜕2𝑢
2. 𝜕𝑥 2 − 𝜕𝑦 2 = −3𝑥 2 is nonhomogeneous
𝜕𝑢 𝜕𝑢 𝜕2𝑢 𝜕2𝑢
Note that: = 𝑋′𝑌 , = 𝑋𝑌 ′ 𝑎𝑛𝑑 = 𝑋 ′′ 𝑌 , = 𝑋𝑌 ′′
𝜕𝑥 𝜕𝑦 𝜕𝑥 2 𝜕𝑦 2
Example 5.11
Find the product solution of the partial differential equation
𝜕2𝑢 𝜕𝑢
. 𝜕𝑥 2 = 4 𝜕𝑦
Solution
Since we need the product 𝑢(𝑥; 𝑦) = 𝑋(𝑥)𝑌(𝑦) the given equation becomes
𝑋′′𝑌 = 4𝑋𝑌 ′ (1)
Dividing both sides of the equating by 4𝑋𝑌 to separate the variables we get
𝑋 ′′ 𝑌′
=
4𝑋 𝑌
Both sides of equation (1) are independent of 𝑥 and 𝑦 so each side of the equation
must be a constant. For convenience we choose the constant as 𝜆2 𝑜𝑟 − 𝜆2 .
Case I: If 𝜆2 > 0 then
𝑋 ′′ 𝑌′
= = 𝜆2
4𝑋 𝑌
Example 5.12
Classify the following partial differential equations
𝜕2𝑢 𝜕𝑢 𝜕2𝑢 𝜕2𝑢 𝜕2𝑢 𝜕2𝑢
1. 3 𝜕𝑥 2 = 𝜕𝑦 2. = 𝜕𝑦 2 3. + 4 𝜕𝑦 2 = 0
𝜕𝑥 2 𝜕𝑥 2
Solution
𝜕2𝑢 𝜕𝑢
1. Writing 3 𝜕𝑥 2 − 𝜕𝑦 = 0, we identify 𝐴 = 3 , 𝐵 = 0 𝑎𝑛𝑑 𝐶 = 0
Activity 5.4
1. Use the separation of variables to determine the product solution of the following
𝜕𝑢 𝜕𝑢
(a) = 𝜕𝑦
𝜕𝑥
𝜕𝑢 𝜕𝑢
(b) + 3 𝜕𝑦 = 0
𝜕𝑥
𝜕2𝑢 𝜕2𝑢
(𝑐) = 𝜕𝑦 2
𝜕𝑥 2
Insulated conductor
𝑥=0 𝑥=𝐿
𝜕2𝑢 𝜕𝑢
𝑘 𝜕𝑥 2 = , 𝑘 > 0 ,0 < 𝑥 < 𝐿
𝜕𝑡
The function 𝑢(𝑥; 𝑡) denotes the temperature at point 𝑥. The insulated ends are
represented by the boundary conditions (BC’s)
𝑢(0; 𝑡) = 0 , (𝐿; 𝑡) = 0, 𝑡 > 0
The initial condition (IC) is given by 𝑢(𝑥; 0) = 𝑓(𝑥). We assume that at time 𝑡 = 0 the
temperature is known, for example, to be some function 𝑓(𝑥). Using separation of
variables results into the solution of the equation of the form 𝑢(𝑥; 𝑡) = 𝑋(𝑥)𝑇(𝑡).
79
Example 5.13
Suppose a thin wire of length 𝐿 = 4 has initial temperature 𝑓(𝑥) = 𝑥 and the ends
are at temperature zero for all time 𝑡 = 0. If the system is modelled by the equation
𝜕2 𝑢 𝜕𝑢
2 𝜕𝑥 2 = , 𝑡 > 0 ,0 < 𝑥 < 4
𝜕𝑡
The equation is expected to hold for all 𝑥 and all 𝑡. We observe that the left-hand
side is independent of 𝑡 and the right-hand side is independent of 𝑥. As aresult each
side must be a constant. For convenience, we let the constant to be −𝜆2 . We call this
the separation constant. We choose −𝜆2 𝑏𝑒𝑐𝑎𝑢𝑠𝑒 𝜆2 = 0 or 𝜆2 > 0 will give us a
trivial solution. (Check)
We can now setup equations (1) and (2) as follows:
𝑋″
= −𝜆2 (1)
𝑋
𝑋 ″ = −𝜆2 𝑋
⇒ 𝑋 ″ + 𝜆2 𝑋 = 0
⇒ 𝑋̅(𝑚2 + 𝜆2 ) = 0
The characteristic equation is
𝑚2 + 𝜆2 = 0 ⇒ 𝑚 = ±√−𝜆2
⇒ 𝑚 = ±𝜆𝑗
∴ 𝑋𝐶𝐹 = 𝐴𝑐𝑜𝑠𝜆𝑥 + 𝐵𝑠𝑖𝑛𝜆𝑥
𝑇ʹ
= −2𝜆2 (2)
𝑇
𝑇 ʹ = −2𝜆2 𝑇
⇒ 𝑇 ʹ + 2𝜆2 𝑇 = 0
⇒ 𝑇̅(𝑚 + 2𝜆2 ) = 0
The characteristic equation is
𝑚 + 2𝜆2 = 0 ⇒ 𝑚 = −2𝜆2
2
∴ 𝑇𝐶𝐹 = 𝐶𝑒 −2𝜆
2𝑡
𝑢(𝑥; 𝑡) = (𝐴𝑐𝑜𝑠𝜆𝑥 + 𝐵𝑠𝑖𝑛𝜆𝑥)𝐶𝑒 −2𝜆
𝑢(0; 𝑡) = 0 ⇒ 𝐴 = 0
80
Activity 5.5
1. Solve the following heat transfer equations
𝜕2𝑢 𝜕𝑢
(a) = ; 0<𝑥<𝜋 , 𝑡>0
𝜕𝑥 2 𝜕𝑡
subject to
𝑢(𝑥; 𝑡) = 0 , 𝑢(𝜋; 𝑡) = 0 , 𝑡 > 0
𝑢(𝑥; 0) = 100 , 0 < 𝑥 < 𝜋
𝜕2𝑢 𝜕𝑢
(b) = ; 0<𝑥<2 , 𝑡>0
𝜕𝑥 2 𝜕𝑡
subject to
𝑢(𝑥; 𝑡) = 0 , 𝑢(2; 𝑡) = 0 , 𝑡 > 0
𝑢(𝑥; 0) = 2 − 𝑥 , 0 < 𝑥 < 2
𝜕2𝑢 1 𝜕𝑢
(c) = 16 𝜕𝑡 ; 0 < 𝑥 < 2 , 𝑡 > 0
𝜕𝑥 2
subject to
𝑢(𝑥; 𝑡) = 0 , 𝑢(2; 𝑡) = 0 , 𝑡 > 0
𝑢(𝑥; 0) = 2 − 𝑥 , 0 < 𝑥 < 2
81
0 𝐿=2 𝑥
𝑢(0; 𝑡) = 0 𝑥(𝐿; 𝑡) = 0
When the string is pulled up and starts to vibrate, the vertical displacement at any
point is represented by 𝑢(𝑥; 𝑡) and is modelled by the following differential equation
𝜕2𝑢 𝜕2 𝑢
𝛼 2 𝜕𝑥 2 = , 𝑡 > 0 , 0 < 𝑥 < 𝐿, 𝑡 > 0
𝜕𝑡 2
𝑖𝑛𝑖𝑡𝑖𝑎𝑙 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦
Example 5.9
Determine the vertical displacement 𝑢(𝑥; 𝑡) of a string of length 𝐿 = 5 attached at
the ends 𝑥 = 0 𝑎𝑛𝑑 𝑥 = 𝐿 = 5 and characterised by the differential equation
𝜕2 𝑢 𝜕2𝑢
9 𝜕𝑥 2 = , 𝑡 > 0 ,0 < 𝑥 < 5 ,𝑡 > 0
𝜕𝑡 2
Solution:
Separating the variables, we have
𝑋 ″ (𝑥) 𝑇 ″ (𝑡)
= = −𝜆2
𝑋(𝑥) 9𝑇(𝑡)
4 −5 𝜋(5−𝑛) 5 4 −5 𝜋(5+𝑛) 5
= 5 [𝜋(5−𝑛) 𝑐𝑜𝑠 ( )] + 5 [𝜋(5+𝑛) 𝑐𝑜𝑠 ( )]
5 0 5 0
4 −5 5 4 −5 5
= 5 [𝜋(5−𝑛) cos(5 − 𝑛) + 𝜋(5−𝑛)] + 5 [𝜋(5+𝑛) cos(5 + 𝑛) + 𝜋(5+𝑛)]
0 , 𝑓𝑜𝑟 𝑛 𝑜𝑑𝑑
∴ 𝐸𝑛 = { 8 8
+ 𝜋(5+𝑛) , 𝑓𝑜𝑟 𝑛 𝑒𝑣𝑒𝑛
𝜋(5−𝑛)
Activity 5.6
subject to
𝑢(𝑥; 𝑡) = 0 , 𝑢(𝜋; 𝑡) = 0 , 𝑡 > 0
𝜕𝑢
𝑢(𝑥; 0) = 0 , = 𝑠𝑖𝑛𝑥
𝜕𝑡 𝑡=0
83
𝜕2𝑢 𝜕2 𝑢
(b) = ; 0<𝑥<1 , 𝑡>0
𝜕𝑥 2 𝜕𝑡 2
subject to
𝑢(𝑥; 𝑡) = 0 , 𝑢(1; 𝑡) = 0 , 𝑡 > 0
𝜕𝑢
𝑢(𝑥; 0) = 𝑠𝑖𝑛𝑥 , =0
𝜕𝑡 𝑡=0
Example 5.14
Suppose we want to determine the steady-state temperature 𝑢(𝑥; 𝑦) in a rectangular
plate with insulated boundaries as in the figure shown below. When no heat escapes
from the lateral faces of the plate.
𝑦
𝑢 = 𝑓(𝑥)
(𝑎; 𝑏)
𝐼𝑛𝑠𝑢𝑙𝑎𝑡𝑒𝑑 𝑖𝑛𝑠𝑢𝑙𝑎𝑡𝑒𝑑
𝑢=0 𝑥
Subject to
𝑢𝑥 (0; 𝑦) = 0 , 𝑢𝑥 (𝑎; 𝑦) = 0 , 0 < 𝑦 < 𝑏
𝑢𝑥 (𝑥; 0) = 0 , 𝑢𝑥 (𝑥; 𝑏) = 0 , 0 < 𝑥 < 𝑎
84
Solution
Separation of variables leads to
𝑋 ″ (𝑥)
= −𝜆2
𝑋(𝑥)
𝑋 ′′ + 𝜆2 𝑋 = 0 (1)
𝑌 ″ (𝑥)
− = −𝜆2
𝑌(𝑥)
𝑌 ′ − 𝜆2 𝑌 = 0 (2)
From equation (1) 𝑚2 = −𝜆2 ⇒ 𝑚 = ±𝜆𝑗
∴ 𝑋𝐶𝐹 = 𝐶1 𝑐𝑜𝑠𝜆𝑥 + 𝐶2 𝑠𝑖𝑛𝜆𝑥 (3)
Since 0 < 𝑦 < 𝑏 is a finite interval from equation (2) we can write the solution as
𝑌𝐶𝐹 = 𝐶3 𝑐𝑜𝑠ℎ𝜆𝑦 + 𝐶4 𝑠𝑖𝑛ℎ𝜆𝑦 (4)
The first three boundary conditions translate into 𝑋 ′ (0) = 0, 𝑋 ′ (𝑎) = 0, 𝑌(0) = 0.
Differentiating 𝑋 and setting 𝑥 = 0 ⇒ 𝐶2 = 0 ⇒ 𝑋 = 𝐶1 𝑐𝑜𝑠𝜆𝑥.
Differentiating 𝑋 = 𝐶1 𝑐𝑜𝑠𝜆𝑥 gives 𝑋 ′ = −𝐶1 𝜆𝑠𝑖𝑛𝜆𝑥.
Setting 𝑥 = 𝑎 in 𝑋 ′ = −𝐶1 𝜆𝑠𝑖𝑛𝜆𝑥 ⇒ −𝐶1 𝜆𝑠𝑖𝑛𝜆𝑎 = 0. This last condition is satisfied
𝑛𝜋
when 𝜆 = 0 𝑜𝑟 𝑤ℎ𝑒𝑛 𝜆𝑎 = 𝑛𝜋 𝑜𝑟 𝜆 = 𝑎 , 𝑛 = 1, 2, …
Note that 𝜆 = 0 in (1) ⇒ 𝑋 ′′ = 0 and the general solution of this equation is given by
𝑋 = 𝐶1 + 𝐶2 𝑥 and not by equation (3) hence 𝜆 = 0 is an eigenvalue.
Corresponding to 𝜆 = 0 𝑤𝑖𝑡ℎ 𝑛 = 0 we get the eigenfunctions
𝑛𝜋𝑥
𝑋 = 𝐶1 , 𝑛 = 0 𝑎𝑛𝑑 𝑋 = 𝐶1 𝑐𝑜𝑠 , 𝑛 = 1, 2, …
𝑎
𝑎0 𝑛𝜋𝑏
If we let 𝐴0 𝑏 = and 𝐴𝑛 𝑠𝑖𝑛ℎ ( ) = 𝑎𝑛 , 𝑛 = 1, 2, … it follows that
2 𝑎
2 𝑎
2𝐴0 𝑏 = 𝑎 ∫0 𝑓(𝑥)𝑑𝑥
𝟐 𝒂
𝑨𝟎 = 𝒂𝒃 ∫𝟎 𝒇(𝒙)𝒅𝒙 (6)
𝑛𝜋𝑏 2 𝑎 𝑛𝜋𝑥
𝐴𝑛 𝑠𝑖𝑛ℎ = 𝑎 ∫0 𝑓(𝑥)𝑐𝑜𝑠 𝑑𝑥
𝑎 𝑎
𝟐 𝒂 𝒏𝝅𝒙
𝑨𝒏 = 𝒏𝝅𝒃 ∫𝟎 𝒇(𝒙)𝒄𝒐𝒔 𝒅𝒙 (7)
𝑨𝒏 𝒔𝒊𝒏𝒉 𝒂
𝒂
The solution of the differential equation is then given by the series in equation (5)
where 𝐴0 𝑎𝑛𝑑 𝐴𝑛 are as in equation (6) and (7).
Example 5.15
Determine the solution of the following Laplace equation
𝜕2𝑢 𝜕2 𝑢
+ 𝜕𝑦 2 = 0
𝜕𝑥 2
𝑢(0; 𝑦) = 0 , 𝑢(5; 𝑦) = 0 , 0 ≤ 𝑦 ≤ 5
𝑢(𝑥; 5) = 0 , 0 ≤ 𝑥 ≤ 5
𝑢(𝑥; 0) = 𝑓(𝑥) = 5 , 0 ≤ 𝑥 ≤ 5
Solution:
After separating the variables we get
𝑋 ″ (𝑥)
= −𝜆2 (1)
𝑋(𝑥)
𝑌 ″ (𝑥)
− = −𝜆2 (2)
𝑌(𝑥)
𝑛𝜋𝑥
From (3) and using 𝑢(𝑥; 0) = 𝑓(𝑥) we get 𝑢(𝑥; 0) = 5 = ∑∞
𝑛=1 𝐵𝑛 𝑠𝑖𝑛 5
2 5 𝑛𝜋
𝐵𝑛 = 𝑏𝑛 = 5 ∫0 5𝑠𝑖𝑛 𝑥𝑑𝑥
5
10 𝑛𝜋𝑥 5
= −[𝑛𝜋 𝑐𝑜𝑠 ]
5 0
10
= − 𝑛𝜋 (𝑐𝑜𝑠𝑛𝜋 − 1)
10 −2 , 𝑛 𝑜𝑑𝑑
= − 𝑛𝜋 {
0 , 𝑛 𝑒𝑣𝑒𝑛
𝑛𝜋 𝑛𝜋
20 1 𝑛𝜋𝑥
∴ 𝑢(𝑥; 𝑦) = (∑∞
𝑛=2 ,4,… 𝑛 𝑠𝑖𝑛 )(𝑒 ( 5 )𝑦 + 𝑒 −( 5 )𝑦 )
𝜋 5
40 1 𝑛𝜋𝑥 𝑛𝜋
= (∑∞
𝑛=2 ,4,… 𝑛 𝑠𝑖𝑛 )𝑐𝑜𝑠 𝑦
𝜋 5 5
Example 5.17
Suppose we want to determine the steady state temperature 𝑢(𝑥; 𝑦) is the
semi-circular plate governed by the following partial differential equation.
𝜕2𝑢 1 𝜕𝑢 1 𝜕2𝑢
+ 𝑟 𝜕𝑟 + 𝑟 2 𝜕𝜃2 = 0 , 0 < 𝜃 < 𝜋 , 0 < 𝑟 < 𝑐
𝜕𝑟 2
𝑢 = 𝑢0
𝑐
𝜃=𝜋
𝑢=0 𝑢=0
at 𝜃 = 𝜋 at 𝜃 = 𝜋
Solution
Define 𝑢 = 𝑅(𝑟); 𝜑(𝜃), then the separation of variables gives
𝑟 2 𝑅 ′′ +𝑟𝑅 ′ 𝜑 ′′
=− = −𝜆2
𝑅 𝜑
𝑟 2 𝑅 ′′ + 𝑟𝑅 ′ + 𝜆2 𝑅 = 0 (1)
𝜑 ′′ + 𝜆2 𝜑 = 0 (2)
Applying boundary conditions 𝜑(0) = 0 𝑎𝑛𝑑 𝜑(𝜋) = 0 to the solution
𝜑 = 𝐶1 𝑐𝑜𝑠𝜆𝜃 + 𝐶2 𝑠𝑖𝑛𝜆𝜃 of equation (2) gives 𝐶1 = 0 𝑎𝑛𝑑 𝜆 = 𝑛 , 𝑛 = 1, 2, …
Hence 𝜑 = 𝐶2 𝑠𝑖𝑛𝑛𝜃. Note that in this case 𝑛 = 0 does not produce an eigenvalue.
For 𝜆 = 𝑛 the solution of equation (1) is
𝑅 = 𝐶3 𝑟 𝑛 + 𝐶4 𝑟 −𝑛
The idea that 𝑢(𝑟; 𝜃) is bounded at 𝑟 = 0 leads to 𝐶4 = 0. Therefore
𝑢𝑛 = 𝑅(𝑟)𝜑(𝜃) = 𝐴𝑛 𝑟 𝑛 𝑠𝑖𝑛𝑛𝜃 and 𝑢(𝑟; 𝜃) = ∑∞ 𝑛
𝑛=1 𝐴𝑛 𝑟 𝑠𝑖𝑛𝑛𝜃
Activity 5.7
𝜕2𝑢 𝜕2𝑢
(a) = 𝜕𝑦 2 ; 0 < 𝑥 < 1 , 0 < 𝑦 < 1
𝜕𝑥 2
subject to
𝑢(𝑥; 𝑦) = 0 , 𝑢(1; 𝑡) = 0 , 0 < 𝑥 < 1 , 0 < 𝑦 < 1
𝑢(𝑥; 0) = 0 , 𝑢(𝑥; 1) = 0
𝜕2𝑢 𝜕2𝑢
(b) = 𝜕𝑦 2 ; 0 < 𝑥 < 1 , 0 < 𝑦 < 1
𝜕𝑥 2
subject to
𝑢(0; 𝑦) = 0 , 𝑢(1; 𝑦) = 1 − 𝑦 , 0 < 𝑦 < 1
𝑢𝑦 (𝑥; 0) = 1 , 𝑢𝑦 (𝑥; 1) = 0 , 0 < 𝑥 < 1
𝜕2𝑢 𝜕2𝑢
(c) + 𝜕𝑦 2 = 0 ; 0 ≤ 𝑥 ≤ 5 , 0 ≤ 𝑦 ≤ 10
𝜕𝑥 2
subject to
𝑢(0; 𝑦) = 𝑢(5; 𝑦) = 0 ; 0 ≤ 𝑦 ≤ 10
𝜕𝑢
(𝑥; 0) = 0 ; 0 ≤ 𝑥 ≤ 5
𝜕𝑦
𝑢(𝑥; 0) = 5𝑠𝑖𝑛2𝜋𝑥 ; 0 ≤ 𝑥 ≤ 5
Unit 6
6. Laplace Transforms
Introduction
In this Unit we discuss commonly used properties of Laplace transforms and use these
properties to evaluate Laplace transforms of given functions.
We revisit the use of Laplace transforms to solve ordinary differential equations.
We then discuss how to determine the transfer function of a system and use the
characteristic equation to check its stability.
We proceed by determining the impulse response of a system and check its stability.
The concept of Laplace transforms was introduced in Mathematics III and some
properties were discussed and used to evaluate transforms of a variety of given
functions. Laplace transforms techniques were also used to solve differential
equations. The techniques learnt remain relevant we however extend the theory
further, specifically we bring into focus the concept of stability and the impulse
response of systems. Central to this unit are the following definitions and properties:
Definition 6.1
Given an integrable function 𝑓(𝑡) on [0; ∞) the Laplace transform of 𝑓(𝑡) is given by
∞
ℒ{𝑓(𝑡)} = ∫0 𝑒 −𝑝𝑡 𝑓(𝑡)𝑑𝑡 = 𝐹(𝑝) where 𝑝 may be a real or complex parameter.
For this integral to exist, and if it does, whether it converges, we need to state sufficient
conditions on 𝑓(𝑡) for the existence of 𝐿{𝑓(𝑡)} by introducing the definition of a
function of exponential order and a causal function.
Definition 6.2
A function 𝑓(𝑡) is of exponential order as 𝑡 → ∞ if there exists a real number 𝜎 and
positive constants 𝑀 and 𝑇 such that
|𝑓(𝑡)| < 𝑀𝑒 𝜎𝑡 for all 𝑡 > 𝑇
2
An example of a function which is not of exponential order is 𝑓(𝑡) = 𝑒 𝑡 , since the
function grows faster than 𝑀𝑒 𝜎𝑡 no matter how large 𝑀 and 𝜎 might be.
Definition 6.3
A function is causal if 𝑓(𝑡) = 0 for 𝑡 < 0. Throughout this unit 𝑓(𝑡) will be assumed
as being causal. Most of the formulae appearing in the Laplace transform table were
derived using definition 6.1.
Example 6.1
Determine ℒ{−3𝑒 −2𝑡 + 5𝑠𝑖𝑛ℎ3𝑡}
Solution:
ℒ{−3𝑒 −2𝑡 + 5𝑠𝑖𝑛ℎ3𝑡} = −3ℒ{𝑒 −2𝑡 } + 5ℒ{𝑠𝑖𝑛ℎ3𝑡}
1 3
= −3 (𝑝+2) + 5 (𝑝2 −9)
91
Example 6.2
Solution:
𝑝
ℒ{{𝑒 5𝑡 𝑐𝑜𝑠ℎ2𝑡}} = ( 2 )
𝑝 − 4 𝑝→𝑝−5
𝑝−5
= ((𝑝−5)2−4)
𝑝−5
= 𝑝2−10𝑝+21
Example 6.3
Determine ℒ{𝑠𝑖𝑛3𝑡} using the change of scale property.
Solution:
1 3 1 9 3
ℒ{𝑠𝑖𝑛3𝑡} = . ( 2 )= ( 2 )= 2
3 𝑝 3 𝑝 +9 𝑝 +9
( 3) + 9
If ℒ{𝑓(𝑡)} = 𝐹(𝑝) and 𝑓(𝑡) ; 𝑓 ′ (𝑡) ; 𝑓 ″(𝑡) ; … ; 𝑓 (𝑛−1) (𝑡) are continuous on [0 ; ∞)
and are of exponential order and if 𝑓 (𝑛) (𝑡) is piecewise continuous on [0 ; ∞), then
ℒ{𝑓 (𝑛) (𝑡)} = 𝑝𝑛 𝐹(𝑝) − 𝑝𝑛−1 𝑓(0) − 𝑝𝑛−2 𝑓′(0) − ⋯ − 𝑝𝑓 (𝑛−2) (0) − 𝑓 (𝑛−1 )(0)
92
This form necessitates the need to obtain Laplace transforms of integrals such as
𝑡
∫0 𝑓(𝜏)𝑑𝜏.
𝑡 𝑑𝑔
If we write 𝑔(𝑡) = ∫0 𝑓(𝜏)𝑑𝜏, then we have = 𝑓(𝑡) , 𝑔(0) = 0
𝑑𝑡
𝑑𝑔
Taking Laplace transforms ℒ { 𝑑𝑡 } = ℒ{𝑓(𝑡)} which leads to 𝑝𝐺(𝑝) = 𝐹(𝑝)
Example 6.4
Determine ℒ{𝑠𝑖𝑛4𝑡} using the Laplace transform of integrals formula
Solution:
4
ℒ{𝑠𝑖𝑛4𝑡} = 𝑝2 +16 ,
𝑡 4
Thus ℒ {∫0 𝑠𝑖𝑛4𝑢𝑑𝑢 } = 𝑝(𝑝2+16)
Example 6.5
Determine ℒ{𝑡𝑐𝑜𝑠ℎ2𝑡}
Solution:
𝑝 𝑑 𝑝
Since ℒ{𝑐𝑜𝑠ℎ2𝑡} = , it follows that ℒ{𝑡𝑐𝑜𝑠ℎ2𝑡} = − 𝑑𝑝 (𝑝2−4)
𝑝2 −4
𝑝2 +4
= (𝑝2−4)2
93
Example 6.6
∞
Evaluate ∫0 𝑡𝑒 3𝑡 𝑐𝑜𝑠ℎ2𝑡𝑑𝑡
Solution:
𝑝2 +4
From example 6.5 we have ℒ{𝑡𝑐𝑜𝑠ℎ2𝑡} = (𝑝2−4)2,
∞ 𝑝2 +4 13
Therefore ∫0 𝑡𝑒 3𝑡 𝑐𝑜𝑠ℎ2𝑡𝑑𝑡 = [(𝑝2−4)2 ] = 25
𝑝=−3
Example 6.77
𝑆𝑖𝑛3𝑡
Evaluate ℒ { }
𝑡
Solution:
𝑠𝑖𝑛3𝑡
Testing for existence of the limit we proceed as follows: 𝑙𝑖𝑚 = 𝑙𝑖𝑚 3𝑐𝑜𝑠3𝑡 = 3
𝑡→0 𝑡 𝑡→0
Example 6.8
∞ 𝑒 𝑡 (1−𝑐𝑜𝑠3𝑡)
Evaluate ∫0 𝑑𝑡
𝑡
1 𝑝
ℒ{1 − 𝑐𝑜𝑠3𝑡} = 𝑝 − 𝑝2+9
1−𝑐𝑜𝑠3𝑡
lim = lim 3𝑠𝑖𝑛3𝑡 = 0 𝑦
𝑡→0 𝑡 𝑡→0
1−𝑐𝑜𝑠3𝑡 ∞ 1 𝑢
So ℒ { } = ∫𝑝 ( − 2 ) 𝑑𝑢 𝑦 = 𝑙𝑛𝑡
𝑡 𝑢 𝑢 +9
1
= [𝑙𝑛(𝑢) − 2 ln(𝑢2 + 9)]∞
𝑝 𝑡
1
= 0 − (𝑙𝑛𝑝 − 2 ln (𝑝2 + 9)) Behaviour of 𝑦 = 𝑙𝑛𝑡 as 𝑡 → ∞
√𝑝2 +9
= 𝑙𝑛 𝑝
94
∞ 𝑒 𝑡 (1−𝑐𝑜𝑠3𝑡) √𝑝2 +9
∴ ∫0 𝑑𝑡 = ⦗𝑙𝑛 ⦘𝑝=−1 = 𝑙𝑛√10 ≈ 1,1513
𝑡 𝑝
Example 6.9
𝑡 𝑒 𝑢 𝑠𝑖𝑛ℎ3𝑢
Determine ℒ {∫0 𝑑𝑢}
𝑢
Solution:
3
ℒ{𝑒 𝑡 𝑠𝑖𝑛ℎ3𝑡} =
(𝑝 − 1)2 − 9
𝑒 𝑡 𝑠𝑖𝑛ℎ3𝑡
Since 𝑙𝑖𝑚 = 𝑙𝑖𝑚(3𝑒 𝑡 𝑐𝑜𝑠ℎ3𝑡 + 𝑒 𝑡 𝑠𝑖𝑛ℎ3𝑡) = 3
𝑡→0 𝑡 𝑡→0
𝑒 𝑡 𝑠𝑖𝑛ℎ3𝑡 ∞ 3
It follows that ℒ{ } = ∫𝑝 (𝑢−1)2 −9
𝑑𝑢
𝑡
1 ∞ 1 1
= ∫𝑝
( − ) 𝑑𝑢
2 𝑢−4 𝑢+2
1
= 2 [𝑙𝑛(𝑢 − 4) − 𝑙𝑛(𝑢 + 2)]∞
𝑝
1 𝑢−4 ∞
= 2 𝑙𝑛 [𝑢+2]
𝑝
1 𝑝+2
= 2 𝑙𝑛 (𝑝−4)
𝑡 𝑒 𝑢 𝑠𝑖𝑛ℎ3𝑢 1 𝑝+2
∴ ℒ {∫0 𝑑𝑢} = 2𝑝 𝑙𝑛 (𝑝−4)
𝑢
Activity 6.1
1. Determine the Laplace transforms of the following:
(a) 𝑓(𝑡) = 𝑡 2 𝑒 −2𝑡
(b) 𝑓(𝑡) = (𝑠𝑖𝑛2𝑡 − 𝑐𝑜𝑠2𝑡)2
(c) 𝑓(𝑡) = 2𝑒 3𝑡 𝑐𝑜𝑠3𝑡
(d) 𝑓(𝑡) = 4𝑠𝑖𝑛ℎ2 𝑡
𝑐𝑜𝑠ℎ𝑡
(e) 𝑓(𝑡) = 𝑡
2. Evaluate
∞
(a) ∫0 𝑡𝑒 −𝑡 𝑐𝑜𝑠2𝑡 𝑑𝑡
∞
(b) ∫0 𝑢𝑒 −2𝑢 𝑠𝑖𝑛ℎ (𝑢)𝑑𝑢
∞ 𝑒 3𝑡 𝑠𝑖𝑛ℎ2𝑡
(c) ∫0 𝑑𝑡
𝑡
∞ 𝑒 3𝑡 𝑠𝑖𝑛2𝑡
(d) ∫0 𝑑𝑡
𝑡
𝑡 𝑒 𝑢 𝑐𝑜𝑠ℎ2𝑢
(e) ℒ {− ∫0 𝑑𝑢}
𝑢
𝑡 𝑒 𝑢 𝑐𝑜𝑠3𝑢
(f) ℒ {∫0 𝑢 𝑑𝑢}
𝑡 𝑐𝑜𝑠ℎ𝑢−𝑐𝑜𝑠ℎ2𝑢
(g) ℒ {∫0 𝑑𝑢}
𝑢
95
Example 6.10
2
Determine ℒ −1 {𝑝2+16}
Solution:
𝑎
From the table we use the formula ℒ{𝑠𝑖𝑛𝑎𝑡} = 𝑝2+𝑎2 ⟹ 𝑎2 = 16 ∴ 𝑎 = 4
2 1 2.𝟐
So ℒ −1 {𝑝2+16} = 𝟐 ℒ −1 {𝑝2+16}
1
= 𝑠𝑖𝑛2𝑡
2
Example 6.11
1
Determine ℒ −1 {𝑝(𝑝2−1}
Solution:
1
Resolving into partial fractions first we have
𝑝(𝑝2 −1)
1 1 𝐴 𝐵 𝐶
𝑝(𝑝2 −1)
= 𝑝(𝑝−1)(𝑝+1) = 𝑝 + 𝑝−1 + 𝑝+1
1 = 𝐴(𝑝 − 1)(𝑝 + 1) + 𝐵𝑝(𝑝 + 1) + 𝐶𝑝(𝑝 − 1)
𝑝 = 0: 1 = −𝐴 ⟹ 𝐴 = −1
1
𝑝 = 1: 1 = 2𝐵 ⟹ 𝐵 =
2
1
𝑝 = −1: 1 = 2𝐶 ⟹ 𝐶 = 2
Taking inverse transforms:
1 −1 1 1
ℒ −1 {𝑝(𝑝2−1} = ℒ −1 { 𝑝 } + ℒ −1 {2(𝑝−1)} + ℒ −1 {2(𝑝+1)}
1 1
= −1 + 2 𝑒 𝑡 + 2 𝑒 −𝑡
96
Activity 6.2
1. Determine the inverse Laplace transforms of the following:
1
(a) 𝑝2 (𝑝2 +25)
𝑝+4
(b) 𝑝2 (𝑝2 +1)
1
(c) 𝑝(𝑝2 +1)(𝑝−1)
1
(d) (𝑝+2)3
2
(e) (𝑝2 +2)2
2. Determine:
2𝑃 2
(a) ℒ −1 {𝑃2−𝑝−6}
𝑝4
(b) ℒ −1 {𝑝4−1}
Example 6.12
Solve 𝑦 ″ + 5𝑦 ′ + 6𝑦 = 2𝑒 −𝑡 subject to 𝑦(0) = 1 and 𝑦 ′ (0) = 0
Solution:
2
𝑝2 𝑦̃ − 𝑝𝑦(0) − 𝑦 ′ (0) + 5[𝑝 − 𝑦(0)] + 6𝑦̃ =
𝑝+1
2
𝑦̃ [𝑝2 + 5𝑝 + 6] = +𝑝+5
𝑝+1
7 + 6𝑝 + 𝑝2 𝐴 𝐵 𝐶
𝑦̃ = = + +
(𝑝 + 1)(𝑝 + 2)(𝑝 + 3) 𝑝 + 1 𝑝 + 2 𝑝 + 3
7 + 6𝑝 + 𝑝2 = 𝐴(𝑝 + 2)(𝑝 + 3) + 𝐵(𝑝 + 1)(𝑝 + 3) + 𝐶(𝑝 + 1)(𝑝 + 2)
𝑝 = −1: 2 = 2𝐴 ⟹ 𝐴 = 1
𝑝 = −2: − 1 = −𝐵 ⟹ 𝐵 = 1
𝑝 = −3: − 2 = 2𝐶 ⟹ 𝐶 = −1
1 1 1
∴ 𝑦(𝑡) = ℒ −1 { + − } = 𝑒 −𝑡 + 𝑒 −2𝑡 − 𝑒 −3𝑡
𝑝+1 𝑝+2 𝑝+3
97
Example 6.13
Solve 𝑥 ‴ + 5𝑥 ″ + 17𝑥 ′ + 13𝑥 = 1 subject to 𝑥(0) = 𝑥 ′ (0) = 1 and 𝑥 ″ (0) = 0
Solution:
1
𝑝3 𝑥̃ − 𝑝2 𝑥(0) − 𝑝𝑥 ′ (0) − 𝑥 ″ (0) + 5[𝑝2 𝑥̃ − 𝑝𝑥(0) − 𝑥 ′ (0)] + 17[𝑝𝑥̃ − 𝑥(0)] + 13𝑥̃ =
𝑝
1
𝑥̃[𝑝3 + 5𝑝2 + 17𝑝 + 13] = + 𝑝2 + 6𝑝 + 22
𝑝
𝑝3 + 6𝑝2 + 22𝑝 + 1 𝐴 𝐵 𝐶𝑝 + 𝐷
𝑥̃ = = + +
𝑝(𝑝3 + 5𝑝2 + 17𝑝 + 13) 𝑝 𝑝 + 1 𝑝2 + 4𝑝 + 13
𝑝 + 6𝑝 + 22𝑝 + 1 = 𝐴(𝑝 + 1)(𝑝2 + 4𝑝 + 13) + 𝐵𝑝(𝑝2 + 4𝑝 + 13)
3 2
+(𝐶𝑝 + 𝐷)(𝑝)(𝑝 + 1)
Equating linear factors to zero we have
8 1
𝑝 = −1 ∶ −16 = −10𝐵 ⟹ 𝐵 = 5, 𝑝 = 0 ∶ 1 = 13𝐴 ⟹ 𝐴 = 13
Comparing coefficients of 𝑝𝑛 , 𝑛 = 3 𝑎𝑛𝑑 2 we have,
𝑝3 : 1 = 𝐴 + 𝐵 + 𝐶
1 8 44
1 = 13 + 5 + 𝐶 ⟹ 𝐶 = − 65
5 32 44 7
𝑝2 : 6 = 13 + − 65 + 𝐷 ⟹ 𝐷 = − 65
5
1 8
−1 13 5 1 44𝑝+7
𝑥=ℒ {𝑝 + − 65 𝑝2+4𝑝+13}
𝑝+1
1 8 1 44(𝑝+2)−27(3)
= 13 + 5 𝑒 −𝑡 − 65 ℒ −1 { (𝑝+2)2 +32
}
1 8 1
∴ 𝑥(𝑡) = 13 + 5 𝑒 −𝑡 − 65 𝑒 −2𝑡 [44𝑐𝑜𝑠3𝑡 − 27𝑠𝑖𝑛3𝑡]
𝐴 𝑘1
𝑥1 = 0 𝑚1 𝑥1
𝐵 𝑘2
𝑥2 = 0 ----------------𝑚2 𝑥2
We shall now use some known laws to formulate general equations from the analysis
of the above system. When the system is perturbed, spring 𝐵 is subjected to both
expansion and compression. Its net expansion is 𝑥2 − 𝑥1 . As a result, from Hooke’s
law springs, 𝐴 and 𝐵 exert the forces −𝑘1 𝑥1 and 𝑘2 (𝑥2 − 𝑥1) on mass 𝑚1 . In the
absence of external force and damping force on the system, then the net force
becomes,
−𝑘1 𝑥1 + 𝑘2 (𝑥2 − 𝑥1 )
From Newton’s second law an equation may be formulated as follows:
𝑑 2 𝑥1
𝑚1 = −𝑘1 𝑥1 + 𝑘2 (𝑥2 − 𝑥1 ).
𝑑𝑡 2
Similarly, the net force exerted on mass 𝑚2 is due only to the net force of the
expansion of spring 𝐵, which is
𝑘2 (𝑥2 − 𝑥1 )
𝑑 2 𝑥2
As a result, the other formula becomes 𝑚2 = −𝑘2 (𝑥2 − 𝑥1 )
𝑑𝑡 2
Combining these two formulae for the coupled spring gives rise to the following
system of equations,
𝑑 2 𝑥1
𝑚1 = −𝑘1 𝑥1 + 𝑘2 (𝑥2 − 𝑥1 )
𝑑𝑡 2
2
𝑑 𝑥2
𝑚2 = −𝑘2 (𝑥2 − 𝑥1 )
𝑑𝑡 2
99
Example 6.14
The mass of a system is subjected to an externally applied force of 𝐹(𝑡) = 4𝑠𝑖𝑛𝜔𝑡 at
time 𝑡 = 0. Determine the resulting displacement 𝑥(𝑡) of the mass at time 𝑡, given
that 𝑥(0) = 𝑥 ′ (0) = 0 for the two cases (a) 𝜔 = 2 𝑎𝑛𝑑 (𝑏) 𝜔 = 5. The illustration
of the system is as follows:
Figure (a) Figure (b)
𝐹1 = 𝑘𝑥 ; 𝐹2 = 𝛽𝑥′
𝑘 = 25 𝛽=6 resolution of forces
𝑚=1 𝐹(𝑡) = 4𝑠𝑖𝑛𝜔𝑡 𝑚=1
𝐹(𝑡) = 4 𝑠𝑖𝑛 𝜔𝑡
Solution:
Formulating a differential equation from the figures above we have,
𝑚𝑥 ″ (𝑡) = 𝐹(𝑡) − 𝐹1 (𝑡) − 𝐹2 (𝑡), where 𝑚 = 1 ; 𝐹1 = 𝑘𝑥(𝑡) = 25𝑥 ; 𝐹2 = 𝛽𝑥 ′ (𝑡) = 6𝑥′
So, the equation becomes 𝑥 ″ + 6𝑥 ′ + 25𝑥 = 4 𝑠𝑖𝑛 𝜔𝑡
(a) For 𝜔 = 2: 𝑥 ″ + 6𝑥 ′ + 25𝑥 = 4 𝑠𝑖𝑛 2𝑡 where 𝑥(0) = 𝑥 ′ (0) = 0
8
𝑥̃[𝑝2 + 6𝑝 + 25] = 𝑝2+4
8 𝐴𝑝+𝐵 𝐶𝑝+𝐷
𝑥̃ = (𝑝2+6𝑝+25)(𝑝2+4) = 𝑝2+6𝑝+25 + 𝑝2 +4
2 2
From this we have 8 = (𝐴𝑝 + 𝐵)(𝑝 + 4) + (𝐶𝑝 + 𝐷)(𝑝 + 6𝑝 + 25)
On comparing coefficients we have 𝑝3 : 0 = 𝐴 + 𝐶 (1)
𝑝2 : 0 = 𝐵 + 6𝐶 + 𝐷 (2)
𝑝1 : 0 = 4𝐴 + 25𝐶 + 6𝐷 (3)
𝑝0 : 8 = 4𝐵 + 25𝐷 (4)
16 8 −16 56
From the above equations verify that 𝐴 = 195 ; 𝐵 = 39 ; 𝐶 = 𝑎𝑛𝑑 𝐷 = 195
195
The result is
1 16𝑝 + 40 16𝑝 − 56
𝑥̃ = [ 2 − 2 ]
195 𝑝 + 6𝑝 + 25 𝑝 +4
1 16(𝑝 + 3) − 8 16𝑝 − 56
= [ − 2 ]
195 (𝑝 + 3)2 + 16 𝑝 +4
1
∴ 𝑥(𝑡) = [2𝑒 −3𝑡 (8𝑐𝑜𝑠4𝑡 − 2𝑠𝑖𝑛4𝑡) − 16𝑐𝑜𝑠2𝑡 + 28𝑠𝑖𝑛2𝑡]
195
20
(b) For 𝜔 = 5, 𝑥̃ = (𝑝2+6𝑝+25)(𝑝2+25)
1 2(𝑝+3)+6 2𝑝
= 15 [(𝑝+3)2+16 − 𝑝2+25]
100
1 −3𝑡 3
∴ 𝑥(𝑡) =[𝑒 (2𝑐𝑜𝑠4𝑡 + 𝑠𝑖𝑛4𝑡) − 2𝑐𝑜𝑠5𝑡]
15 2
For an interesting observation suppose for 𝜔 = 5 the damping term was missing, then
20 20
𝑥̃ = 2 = 2
(𝑝 + 25)(𝑝 + 25) (𝑝 + 25)2
2
𝑑 𝑝 (𝑝2 +25)−2𝑝2 𝑝2 −25 𝑝2 +25−50
Since ℒ{𝑡 𝑐𝑜𝑠5𝑡} = − 𝑑𝑡 (𝑝2+25) = − (𝑝2 +25)2
= (𝑝2+25)2 = (𝑝2 +25)2
1 50 1
So ℒ{𝑡 𝑐𝑜𝑠5𝑡} = 𝑝2+25 − (𝑝2+25)2 = ℒ {5 𝑠𝑖𝑛5𝑡} − ℒ{𝑡𝑐𝑜𝑠5𝑡}
50 1
Now (𝑝2 +25)2
= ℒ {5 𝑠𝑖𝑛5𝑡} − ℒ{𝑡𝑐𝑜𝑠5𝑡}
20 2 1
𝑥̃ = = ℒ { 𝑠𝑖𝑛5𝑡} − ℒ{𝑡𝑐𝑜𝑠5𝑡}
(𝑝2 + 25) 2 5 5
2
∴ 𝑥(𝑡) = (𝑠𝑖𝑛5𝑡 − 5𝑡𝑐𝑜𝑠5𝑡)
25
Because of the term 𝑡𝑐𝑜𝑠5𝑡 , 𝑥 → ∞ 𝑎𝑠 𝑡 → ∞ 𝑎𝑛𝑑 𝑡ℎ𝑖𝑠 ⟹ 𝑥(𝑡) is unbounded. This
shows that the applied force 𝐹(𝑡) = 4𝑠𝑖𝑛5𝑡 is in resonance with the system.
Example 6.15
The system shown below consists of two masses, 𝑚1 = 1 𝑘𝑔 𝑎𝑛𝑑 𝑚2 = 2 𝑘𝑔 each
attached to a fixed base by a spring having constants 𝑘1 = 1 𝑎𝑛𝑑 𝑘2 = 2 respectively.
These masses are attached to each other by a third spring with constant 𝑘3 = 2. The
system is released from rest at time 𝑡 = 0 such that 𝑚1 is displaced 1 unit to the left
of its equilibrium position and 𝑚2 is displaced 2 units to the right of its equilibrium
position. Neglecting all frictional effects, determine the position of the masses at time 𝑡.
Figure (a)
𝑘1 𝑘3 𝑘2
𝑚1 𝑚2
𝑥1 𝑥2
Resolution of forces
Figure (b)
𝐹1 = 𝑘1 𝑥1 𝐹3 = 𝑘3 (𝑥2 − 𝑥1 ) 𝐹2 = 𝑘2 𝑥2
𝑚1 𝑚2
𝑥″1 𝑥″2
101
Solution:
Let 𝑥′1 (𝑡) and 𝑥′2 (𝑡) be displacements of the masses to the right from equilibrium
positions. The only forces acting on the masses are restoring forces due to springs
(Frictional forces are ignored). Applying Newton’s law on the masses 𝑚1 and 𝑚2
respectively the following equations are obtained.
𝑚1 𝑥″1 = 𝐹2 − 𝐹1 = 𝑘2 (𝑥2 − 𝑥1 ) − 𝑘1 𝑥1
𝑚2 𝑥 ″ 2 = −𝐹3 − 𝐹2 = −𝑘3 𝑥2 − 𝑘2 (𝑥2
Substituting the given values leads to the following equations:
𝑥″1 + 3𝑥1 − 2𝑥2 = 0
𝑥″2 − 𝑥1 + 2𝑥2 = 0
Class Activity
Now, introduce Laplace transforms on both sides and inset initial conditions
𝑥1 (0) = 𝑥ʹ1 (0) = 𝑥ʹ2 (0) = 0 𝑎𝑛𝑑 𝑥2 (0) = 2 to solve the system.
Activity 6.3
𝑘1 𝑘3 𝑘2
𝑚1 𝑚2
𝑥1 𝑥2
2. A coupled mass spring system is defined by the following equations:
𝑥″1 + 10𝑥1 − 4𝑥2 = 0
𝑥 ″ 2 − 4𝑥1 + 4𝑥2 = 0,
subject to 𝑥1 (0) = 𝑥2 (0) = 0 ; 𝑥 ′1 (0) = 1 𝑎𝑛𝑑 𝑥 ′ 2 (0) = −1
Determine the displacements 𝑥1 (𝑡) 𝑎𝑛𝑑 𝑥2 (𝑡) of the system.
Example 6.16
𝑑𝑥 𝑑𝑦 𝑑𝑥 𝑑𝑦
Solve + 𝑑𝑡 + 5𝑥 + 3𝑦 = 𝑒 −𝑡 ; 2 𝑑𝑡 + 𝑑𝑡 + 𝑥 + 𝑦 = 3 subject to 𝑥 = 2
𝑑𝑡
and 𝑦 = 1, when 𝑡 = 0 .
Solution:
1
𝑝𝑥̃ − 𝑥(0) + 𝑝𝑦̃ − 𝑦(0) + 5𝑥̃ + 3𝑦̃ = 𝑝+1 (1)
3
2[𝑝𝑥̃ − 𝑥(0)] + 𝑝𝑦̃ − 𝑦(0) + 𝑥̃ + 𝑦̃ = 𝑝 (2)
Eliminating 𝑦̃ we have
𝑥̃[𝑝 + 5](𝑝 + 1) + 𝑦̃[𝑝 + 3](𝑝 + 1) = 1 + 3(𝑝 + 1)
3
𝑥̃[2𝑝 + 1](𝑝 + 3) + 𝑦̃[𝑝 + 1](𝑝 + 3) = [𝑝 + 5] (𝑝 + 3)
Now we have
9
𝑥̃{[(2𝑝 + 1)(𝑝 + 3)] − [(𝑝 + 5)(𝑝 + 1)]} = 𝑝 + 14 + 2𝑝
2𝑝2 +14𝑝+9 𝐴 𝐵 𝐶
∴ 𝑥̃ = = + +
𝑝(𝑝+2)(𝑝−1) 𝑝 𝑝+2 𝑝−1
Activity 6.4
1. Use Laplace transforms to solve the following differential equations.
(a) 𝑥 ′ − 𝑦 ′ + 𝑦 = 𝑡 𝑎𝑛𝑑 𝑦 ′ − 4𝑥 ′ + 𝑥 = 1 , 𝑥(00 = 0 , 𝑦(0) = 1
𝑑𝑥 𝑑𝑦 𝑑𝑥 𝑑𝑦
(b) 𝑑𝑡
+ 𝑑𝑡 + 𝑦 = 𝑡 and 𝑑𝑡
+ 4 𝑑𝑡 + 𝑥 = 1 ; 𝑥(0) = 1 ; 𝑦(0) = 0
(c) 𝑥 = 𝑥 − 𝑦 𝑎𝑛𝑑 𝑦 ′′ = 𝑦 − 𝑥 , 𝑥(0) = 1 , 𝑦(0) = −2 , 𝑥 ′ (0) = 𝑦 ′ (0) = 0
′′
The 𝑧𝑖 ’s are the zeros of the system and 𝑎𝑖 ’s are the poles. A plot of the poles and
zeros is used as an aid in the graphical analysis of the transfer function. The position
of a zero is marked by a circle (o) and the pole by a cross (×). Since the coefficients
of 𝑋(𝑝) and 𝑈(𝑝) are real, all complex roots occur in conjugate pairs. Hence the pole
zero plot is symmetrical about the real axis.
We now use an example to illustrate the concepts outlined above.
Example 6.17
The response 𝑥(𝑡) of a system to an input 𝑢(𝑡) is determined by the differential
equation
9𝑥 ″ + 12𝑥 ′ + 13𝑥 = 2𝑢′ + 3𝑢
First determine the transfer function of the system and then
(a) write down the characteristic equation of the system and state its order.
(b) determine the transfer function poles, zeros and plot them on the p-plane.
104
Solution:
Taking Laplace transforms with initial conditions zero:
𝑋(𝑝)[9𝑝2 + 12𝑝 + 13] = 𝑈(𝑝)[2𝑝 + 3]
𝑋(𝑝) 2𝑝 + 3
𝐺(𝑝) = = 2
𝑈(𝑝) 9𝑝 + 12𝑝 + 13
(a) The characteristic equation is 9𝑝2 + 12𝑝 + 13 = 0 and the order is two.
−𝑏±√𝑏2 −4𝑎𝑐
(b) The poles are the roots of 9𝑝2 + 12𝑝 + 13 = 0 , 𝑝 = 2𝑎
−12±√144−4.9.13 −2±3𝑗
= =
18 3
3
The zeros are the roots of 2𝑝 + 3 = 0 ⟹ 𝑝 = − 2 . Plotting these on the
p- plane we have
𝐼𝑚(𝑧)
× 1
3 1 1
−2 −1 −2 0 1
2
× -1
6.7 Stability
A stable system is one that remains at rest unless it is excited by an external source
and returns to normal when the external source is removed. This ensures that a
bounded input produces a bounded output. This property is often taken as the
definition of a stable linear system.
The stability of a system is a property of the system itself and does not depend on the
input. The stability of a system depends on the nature of its poles. The roots of the
characteristic equation can take several forms:
1. For a simple factor of the form 𝑝 + 𝛼 where 𝛼 is real.
𝐴
This corresponds to a simple pole at 𝑝 = −𝛼 and the partial fraction form is 𝑝+𝛼
leading to a time response of 𝐴𝑒 −𝛼𝑡 𝐻(𝑡).
If 𝛼 > 0, the pole lies in the left half of the p-plane and the response will tend to
zero as 𝑡 → ∞. Clearly, if 𝛼 < 0, the response tends to infinity as 𝑡 → ∞.Thus
a stable system must have real-valued simple poles that occur on the left half of
the p-plane.
105
𝐴
If 𝛼 = 0, then has time response 𝐴𝐻(𝑡) and we say the system is marginally
𝑝
stable. This means that a bounded input does not ensure a bounded output.
2. Repeated simple factors of the form (𝑝 + 𝛼)𝑛 where 𝛼 is real.
Again, the system will only be stable if 𝛼 > 0, thus a stable system must therefore have
complex conjugate poles in the left half of the p-plane, that is, all complex poles must
have negative real parts.
To prove stability thus we have to show that all roots of the characteristic equation
𝑈(𝑝) = 𝑎𝑛 𝑝𝑛 + 𝑎𝑛−1 𝑝𝑛−1 + ⋯ + 𝑎1 𝑝 + 𝑎0
have negative real parts.
In terms of the poles of the transfer function, its abscissa of convergence 𝜎𝑐
corresponds to the real part that is located furthest to the right in the p-plane. For
𝑝+3
example, if 𝐺(𝑝) = (𝑝+2)(𝑝+4) then the abscissa of convergence is 𝜎𝑐 = −2.
N.B. All the a’s with subscripts that are negative or greater than 𝒏 are replaced by
zeros.
106
Example 6.18
Use Routh-Hurwitz criterion to show that the roots of 𝑝4 + 9𝑝3 + 33𝑝2 + 51𝑝 + 26 = 0
have negative real parts.
Solution:
𝑛 = 4 ; 𝑎4 = 1 ; 𝑎3 = 9 ; 𝑎2 = 33 ; 𝑎1 = 51 ; 𝑎0 = 26
𝑎𝑖 = 0 (𝑖 > 4 𝑜𝑟 𝑖 < 0)
∆1 = |𝑎𝑛−1 ||𝑎3 | = |9| = 9
𝑎3 𝑎4 9 1
∆2 = | 𝑎 𝑎2 | = |51 | = 9(33) − 1(51) = 256
1 33
𝑎3 𝑎4 0 9 1 0
33 9 51 9
∆3 = | 𝑎1 𝑎2 𝑎3 | = |51 33 9 | = 9 | | −1| |
𝑎−1 𝑎0 𝑎1 26 51 0 51
0 26 51
= 9(33.51 − 9.26) − 1(51.51 − 0)
= 10440
9 1 0 0
51 33 9 1
∆4 = | | = 26 . ∆3 = 271440
0 26 51 33
0 0 0 26
Since ∆𝑖 > 0 𝑓𝑜𝑟 𝑖 = 1 ; 2; 3 𝑎𝑛𝑑 4. It then follows that all roots of the equation have
negative real parts.
Activity 6.5
1. Suppose the response 𝑥(𝑡) of a system with input 𝑢(𝑡) is determined by the
differential equation,
𝑥 (𝑖𝑣) − 𝑥 = 𝑢′
(a) Determine the transfer function characterizing the system.
(b) Given that all initial conditions are zero, show that the response is given by
1
ℎ(𝑡) = (𝑐𝑜𝑠ℎ𝑡 − 𝑐𝑜𝑠𝑡)
2
1
(c) Investigate the stability of the system ℎ(𝑡) = 2 (𝑐𝑜𝑠ℎ𝑡 − 𝑐𝑜𝑠𝑡) as impulse
response.
2. Let the response 𝑥(𝑡) of a system to a forcing function 𝑢(𝑡) be determined by
the differential equation model
𝑥 ″ + 2𝑥 ′ + 5𝑥 = 3𝑢′ + 2𝑢
(a) Determine the transfer function characterizing the system.
(b) Write down the characteristic equation of the system and state the order of
the system.
(c) Determine the transfer poles and zeros and illustrate them on the p-plane.
107
3. Which of the following transfer functions represent stable and unstable systems?
𝑝−1
(a) (𝑝+2)(𝑝2 +4)
(𝑝+2)(𝑝−2)
(b) (𝑝2 −1)(𝑝+4)
𝑝−4
(c) (𝑝+3)(𝑝+6)
8
(d) (𝑝2 +𝑝+4)(𝑝+2)2
4(𝑝+10)
(e) (𝑝2 −𝑝+10)(𝑝+5)
Definition 6.4
The impulse response to a linear time –invariant system is the response of the system
to a unit impulse applied at time 𝑡 = 0 when all initial conditions are zero. It is such
that ℒ{ℎ(𝑡)} = 𝐺(𝑝) where 𝐺(𝑝) is the system’s transfer function.
Since the impulse response is the inverse Laplace transform of the transfer function,
it follows that both the impulse response and transfer function carry the same
information about the dynamics of the system. Therefore, it is theoretically possible to
obtain the complete information about the system by exciting it with and impulse and
measuring the response. For this reason, it is common practice in engineering to
regard the transfer function as the Laplace transform of the impulse response, since
this places greater emphasis on the parameters of the system when considering
system design.
Characterizing a system by its impulse response, we can say that the system is stable
if its impulse response tends to zero when 𝑡 → ∞.
108
Example 6.19
Determine the impulse response to a linear system whose response 𝑥(𝑡) to an input
𝑢(𝑡) is determined by
𝑥 ″ + 5𝑥 ′ + 6𝑥 = 5𝑢(𝑡)
Solution:
The impulse response ℎ(𝑡) is the system’s response to 𝑢(𝑡) = 𝛿(𝑡) when initial
conditions are zero. Thus ℎ″ + 5ℎ′ + 6ℎ = 5𝛿(𝑡) subject to ℎ′ (0) = ℎ(0) = 0.
5
Clearly, (𝑝2 + 5𝑝 + 6)ℎ̃ = 5 and as a result ℎ̃ = (𝑝+2)(𝑝+3)
From 𝐻(𝑝) = 𝐺(𝑝) it follows that the system is stable since the poles 𝑝 = −2 and
𝑝 = −3 lie in the left half of the p-plane.
5 5 5
Now ℎ̃ = (𝑝+2)(𝑝+3) = 𝑝+2 − 𝑝+3 ⟹ ℎ(𝑡) = 5𝑒 −2𝑡 − 5𝑒 −3𝑡 and 5[𝑒 −2𝑡 − 𝑒 −3𝑡 ] → 0 as
𝑡 → ∞ which once again proves the stability of the system.
Example 6.20
Determine the impulse response 𝑥(𝑡) of a system with input 𝑢(𝑡) described
by the differential equation
𝑥 ‴ − 𝑥 ″ + 2𝑥ʹ = 2𝑢ʹ − 𝑢
Solution
𝑥 ‴ − 𝑥 ″ + 2𝑥ʹ = 2𝑢ʹ − 𝑢
𝑋(𝑝)[𝑝3 − 𝑝2 + 2𝑝] = 𝑈(𝑝)[2𝑝 − 1]
2𝑝−1 𝐴 𝐵𝑝+𝐶
𝐻(𝑝) = 𝑝(𝑝2 −𝑝+2) = 𝑝 + 𝑝2 −𝑝+2
1 1
1 1 √7 7 √7
Finally, ℎ(𝑡) = − 2 + 2 𝑒 2𝑡 𝑐𝑜𝑠 𝑡 + 2√7 𝑒 2 𝑡 𝑠𝑖𝑛 𝑡
2 2
109
Activity 6.6
1. Determine the impulse response 𝑥(𝑡) of the given linear system whose reaction
to an input 𝑢(𝑡) is determined by the following differential equation:
(a) 𝑥 ″ + 15𝑥 ′ + 56𝑥 = 3𝑢(𝑡)
(b) 𝑥 ″ + 8𝑥 ′ + 25𝑥 = 𝑢(𝑡)
(c) 𝑥 ″ − 2𝑥 ′ − 8𝑥 = 4𝑢(𝑡)
(d) 𝑥 ″ − 4𝑥 ′ + 13𝑥 = 𝑢(𝑡)
2. Investigate the stability of each of the systems in exercise above.
3. Use the Routh-Hurwitz criterion to investigate the stability of systems having
the following characteristic equations:
(a) 24𝑝4 + 11𝑝3 + 26𝑝2 + 45𝑝 + 36 = 0
(b) 𝑝4 + 3𝑝3 + 32𝑝2 + 50𝑝 + 23 = 0
(c) 𝑝3 + 2𝑝2 + 4𝑝 + 8 = 0
The quantity 𝐸𝐼 is called the flexural rigidity of the beam and we assume it to be
constant. The quantities 𝐸𝐼𝑌 ″ (𝑥) 𝑎𝑛𝑑 𝐸𝐼𝑌‴(𝑥) are called the bending moment and
𝑑3 𝑦
vertical shear at 𝑥. Finally the function 𝐹(𝑥) = 𝐸𝐼(𝑑𝑥 3 ) is called the shear force.
Note that the 𝑦 − 𝑎𝑥𝑖𝑠 is taken as positive downward so that deflections are positive
downward.
110
Boundary conditions associated with the differential equation depend on the way in
which the beam is supported. The following are some common forms of support.
1. Simply supported ends
𝑦(0) = 𝑦 ″ (0) = 0
𝑦(𝑙) = 𝑦 ″ (𝑙) = 0
𝑥=0 𝑥=𝑙
2. Fixed ends
𝑦(0) = 𝑦 ʹ (0) = 0
𝑦(𝑙) = 𝑦 ʹ (𝑙) = 0
𝑥=0 𝑥=𝑙
3. Free end
𝑦 ″ (0) = 𝑦 ‴ (0) = 0
𝑦″(𝑙) = 𝑦 ‴ (𝑙) = 0
𝑥=0 𝑥=0
𝑦(0) = 𝑦 ʹ (0) = 0
Example 6.21
A horizontal beam of length 𝑙 in metres is hinged at 𝑥 = 2 𝑎𝑛𝑑 𝑥 = 2 and carries a
uniform load 𝑊(𝑥) = 𝐻(𝑥 − 2) per unit length defined by
𝑑4 𝑦 𝐻(𝑥−2)
= , 2<𝑥<6
𝑑𝑥 4 100
3 1
subject to the boundary conditions 𝑦(0) = 𝑦 ʹ (0) = 0, 𝑦 ″ (0) = 40 , 𝑦 ‴ (0) = − 100
111
Determine,
(a) the deflection (sag) equation of the beam
(b) the defection when 𝑥 = 1 𝑚
(c) the bending moment when 𝑥 = 4 𝑚
Solution
𝑑4 𝑦 𝐻(𝑥−2) 3 1
= , 2 < 𝑥 < 6, 𝑦(0) = 𝑦 ʹ (0) = 0, 𝑦 ″ (0) = 40 , 𝑦 ‴ (0) = − 100
𝑑𝑥 4 100
1
𝑝4 𝑌(𝑝) − 𝑝3 𝑦(0) − 𝑝2 𝑦ʹ(0) − 𝑝𝑦 ″ (0) − 𝑦 ‴ (0) = 100𝑝 𝑒 −2𝑝
1 3 1
𝑝4 𝑌(𝑝) = 100𝑝 𝑒 −2𝑝 + 40 𝑝 − 100
1 3 1
𝑌(𝑝) = 100𝑝5 𝑒 −2𝑝 + 40𝑝3 − 100𝑝4
1 4! 3 2! 1 3!
(a) 𝑦(𝑥) = 100×4! ℒ −1 {𝑝5 𝑒 −2𝑝 } + 40×2! ℒ −1 {𝑝3} − 100×3! ℒ −1 {𝑝4}
1 3 1
= 2400 (𝑥 − 2)4 + 80 𝑥 2 − 600 𝑥 3
3 1
𝑥 2 − 600 𝑥 3 , 0 < 𝑥 ≤ 2
80
= {3 1 1
𝑥 2 − 600 𝑥 3 + 2400 (𝑥 − 2)4 , 2 < 𝑥 ≤ 6
80
3 1
(b) 𝑦(1) = 80 (1)2 − 600 (1)3 ≈ 0,036 𝑚
6 3 4(𝑥−2)3
(c) 𝑦ʹ(𝑥) = 80 𝑥 − 600 𝑥 2 + 2400
6 6 12(𝑥−2)2
𝑦″(𝑥) = 80 − 600 𝑥 + 2400
6 6 12(4−2)2
𝑦″(4) = 80 − 600 (4) + ≈ 0,055
2400
Activity 6.7
1. A horizontal beam of length 𝑙 = 10 in meters is hinged at 𝑥 = 0 𝑎𝑛𝑑 𝑥 = 10 and
carries a uniform load 𝑊(𝑥) = 𝐻(𝑥 − 5) per unit length defined by
𝑑4 𝑦 𝐻(𝑥−5)
= , 0 < 𝑥 < 10
𝑑𝑥 4 5000
3 1
subject to the boundary conditions 𝑦(0) = 𝑦 ʹ (0) = 0, 𝑦 ″ (0) = 400 , 𝑦 ‴ (0) = − 1000
Determine,
(a) the deflection (sag) 𝑦(𝑥) of the beam
112
Determine,
(a) the deflection 𝑦(𝑥) of the beam
(b) the defection when 𝑥 = 6 𝑚
(c) the vertical shear when 𝑥 = 4 𝑚
(d) the shear force at 𝑥 = 4 𝑚
113
FORMULA SHEET
𝑥−𝑥1 𝑥−𝑥0
where 𝐿0 = 𝑥 , 𝐿1 = 𝑥
0 −𝑥1 1 −𝑥0
𝑝(𝑝+1)(𝑝+2)(𝑝+3)…(𝑝+𝑛−1)∆𝑛 𝑦𝑛
+ 𝑛!
𝑏−𝑎 𝑥−𝑥𝑛
where ℎ = 𝑛−1 and 𝑝 = ℎ
114
Euler’s method
𝒚𝒏+𝟏 = 𝒉𝒇(𝒙𝒏 ; 𝒚𝒏 ), 𝒏 = 𝟎, 𝟏, 𝟐, …
𝟏
𝒚𝒏+𝟏 = 𝒚𝒏 + 𝟐 (𝒌𝟏 + 𝒌𝟐 ) , 𝒏 = 𝟎, 𝟏, 𝟐, …
Euler’s method
From Euler’s formula for first order differential equations the corresponding second
order form starts with
𝒉𝟐
𝒚𝒏+𝟏 = 𝒚𝒏 + 𝒉𝒚′𝒏 + 𝒚′′
𝒏 , 𝒏 = 𝟎, 𝟏 𝟐, …
𝟐!
Runge-Kutta
Given the differential equation 𝑦 ′′ = 𝑓(𝑥; 𝑦; 𝑦 ′ )
subject to the conditions 𝑦(𝑥0 ) = 𝑦0 and 𝑦 ′ (𝑥0 ) = 𝑦0′
The range of initial iteration steps are given by
1
𝑘1 = 2 ℎ2 𝑓(𝑥𝑛 ; 𝑦𝑛 ; 𝑦𝑛′ )
1 ℎ ℎ 1 𝑘1
𝑘2 = 2 ℎ2 𝑓(𝑥𝑛 + 2 ; 𝑦𝑛 + 2 𝑦𝑛′ + 4 𝑘1 ; 𝑦𝑛′ + )
ℎ
1 ℎ ℎ 1 𝑘2
𝑘3 = 2 ℎ2 𝑓(𝑥𝑛 + 2 ; 𝑦𝑛 + 2 𝑦𝑛′ + 4 𝑘1 ; 𝑦𝑛′ + )
ℎ
1 ℎ 2𝑘3
𝑘4 = 2 ℎ2 𝑓(𝑥𝑛 + ℎ ; 𝑦𝑛 + 2 𝑦𝑛′ + 𝑘3 ; 𝑦𝑛′ + )
ℎ
115
Then
𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑦𝑛′ + 𝐴
and
𝐵
𝑦′𝑛+1 = 𝑦′𝑛 + ℎ
𝒇(𝒙) 𝒚𝑷𝑰
1. 𝑘 (𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡) 𝐴
2. 𝑘𝑥 + 𝑏 𝐴𝑥 + 𝐵
3. 𝑘𝑥 2 𝐴𝑥 2 + 𝐵𝑥 + 𝐶
4. 𝐴𝑒 𝑏𝑥 , 𝐴𝑒 −𝑏𝑥
𝑘𝑒 𝑏𝑥 , 𝑘𝑒 −𝑏𝑥
5 𝑐𝑜𝑠𝑎𝑡 𝑝
𝑝2 + 𝑎2
6 𝑠𝑖𝑛ℎ𝑎𝑡 𝑎
𝑝2 − 𝑎2
7 𝑐𝑜𝑠ℎ𝑎𝑡 𝑝
𝑝2 − 𝑎2
8 𝑡 𝑛 𝑒 𝑏𝑡 𝑛!
(𝑝 − 𝑏)𝑛+1
9 𝑒 𝑏𝑡 𝑠𝑖𝑛𝑎𝑡 𝑎
(𝑝 − 𝑏)2 + 𝑎2
10 𝑒 𝑏𝑡 𝑐𝑜𝑠𝑎𝑡 𝑝−𝑏
(𝑝 − 𝑏)2 + 𝑎2
11 𝑒 𝑏𝑡 𝑠𝑖𝑛ℎ𝑎𝑡 𝑎
(𝑝 − 𝑏)2 − 𝑎2
12 𝑒 𝑏𝑡 𝑐𝑜𝑠ℎ𝑎𝑡 𝑝−𝑏
(𝑝 − 𝑏)2 − 𝑎2
13
𝐻(𝑡 − 𝑘) = {
0 , 𝑖𝑓 𝑡 < 𝑘 𝑒 −𝑘𝑝
1 , 𝑡≥𝑘 𝑝
𝑓(𝑡 − 𝑘)𝐻(𝑡 − 𝑘) −𝑘𝑝
14 𝑒 ℒ{𝑓(𝑡)}
15 𝛿(𝑡 − 𝑘) 𝑒 −𝑘𝑝
16 𝑑𝑦 𝑝ℒ{𝑦} − 𝑦(0) = 𝑝𝑦̃ − 𝑦(0)
𝑑𝑡
17 𝑑2𝑦 𝑝2 𝑦̃ − 𝑝𝑦(0) − 𝑦ʹ(0)
𝑑𝑡 2
18 𝑑3𝑦 𝑝3 𝑦̃ − 𝑝2 𝑦(0) − 𝑝𝑦ʹ(0) − 𝑦″(0)
𝑑𝑡 3
19 𝑑4𝑦 𝑝4 𝑦̃ − 𝑝3 𝑦(0) − 𝑝2 𝑦ʹ(0) − 𝑝𝑦 ″ (0) − 𝑦‴(0)
𝑑𝑡 4
117