Mathematica Particularis 1 ST Edition
Mathematica Particularis 1 ST Edition
net/publication/322746972
Mathematica Particularis
CITATIONS READS
0 431
1 author:
SEE PROFILE
All content following this page was uploaded by Hui Huang Hoe on 27 January 2018.
First Edition
By
Hui Huang
ii
Table of Contents
Table of Contents ........................................................................................................................... iii
Chapter 1 Precalculus.......................................................................................................................1
Chapter 5 Epilogue.......................................................................................................................111
References ....................................................................................................................................112
iv
List of Tables
Table 1 Newton-Raphson Scheme for 𝒇−𝟏 {𝒙} = 𝒆𝒙 at 𝒙 = 𝟎. 𝟓 ...................................................56
Table 8 Membrane Separation Calculation Formulae List using Triple H Notation .....................94
v
List of Figures
Figure 1 Geometrical Interpretation of Integration of Inverse Function .......................................22
Figure 4 The actual 𝒈{𝒑} obtained by evaluating the limit at various values of 𝒑........................51
Figure 7 Resultant plot of 𝒇𝑬𝑩 against 𝑻 in agreement with textbook answer ..............................65
Figure 17 Arrow Diagram with Exact Formulas for Membrane Separation Calculation ..............91
Figure 22 Loop relation highlighted in red indicates circular argument warranting iteration
method............................................................................................................................................99
Figure 23 The further explained calculation procedure for fluidized bed reactor sizing .............100
vii
MATHEMATICA PARTICULARIS
Chapter 1
Precalculus
We have to learn to walk before we can run.
-E.L. James, Fifty Shades Darker
Because the algebraic identities are already well understood, there is little content in this
chapter since there is no much to discover. This chapter discusses some precalculus algebra and
evaluation techniques, as an appetizer to the heavy calculus topics.
1.1 Algebra
1.1.1 Equivalent Logarithm
If you can’t see a solution it does not mean it doesn’t exist, you are just blind to it.
― Harrish Sairaman
Summary:
𝑙𝑜𝑔𝑎 𝑏 = 𝑙𝑜𝑔𝑎𝑛 𝑏𝑛 , 𝑛≠0
The logarithm of a number remains the same if both the base and the number are raised to a
common power other than zero, equivalent to the case of a fraction remaining the same if both
numerator and denominator are multiplied by a common factor other than zero.
Derivation:
The proof is easy to be shown by working from the right-hand-side and reduce to left-hand-side.
Define a dummy variable 𝑐, and switching the base to 𝑐:
𝑙𝑜𝑔𝑐 𝑏𝑛
𝑙𝑜𝑔 𝑎𝑛 𝑏𝑛 =
𝑙𝑜𝑔𝑐 𝑎𝑛
For logarithm, the exponent can be rewritten as the multiple:
𝑙𝑜𝑔𝑐 𝑏𝑛 𝑛 𝑙𝑜𝑔𝑐 𝑏
=
𝑙𝑜𝑔𝑐 𝑎𝑛 𝑛 𝑙𝑜𝑔𝑐 𝑎
Obviously, the multiple cancels off in numerator and denominator:
𝑛 𝑙𝑜𝑔𝑐 𝑏 𝑙𝑜𝑔𝑐 𝑏
=
𝑛 𝑙𝑜𝑔𝑐 𝑎 𝑙𝑜𝑔𝑐 𝑎
Switching the base back to 𝑎:
𝑙𝑜𝑔𝑐 𝑏
= 𝑙𝑜𝑔𝑎 𝑏
𝑙𝑜𝑔𝑐 𝑎
Therefore, the right-hand-side is equal to the left-hand-side and the identity holds.
1
MATHEMATICA PARTICULARIS
Example:
Example 1: The first example is encountered often in high school mathematics and sometimes
in Mathematical Olympiad competitions:
If
𝒍𝒐𝒈𝟐 𝟖 = 𝟑
Find
𝒍𝒐𝒈𝟏𝟔 𝟖
On the first sight of the question, it seems very intuitive to try to convert everything in terms of
base 2, noting that:
16 = 24
So that the base looks something similar (while not exactly yet) to a base of 2:
𝑙𝑜𝑔16 8 = 𝑙𝑜𝑔24 8
1
Invoking the equation by raising both the base and the number to a power of 4:
1
𝑙𝑜𝑔 24 8 = 𝑙𝑜𝑔2 84
The very basic logarithmic identity can be used to proceed:
𝑙𝑜𝑔𝑎 𝑏𝑛 = 𝑛 𝑙𝑜𝑔𝑎 𝑏
Thus, the final answer is:
1 1 1 3
𝑙𝑜𝑔2 84 = 𝑙𝑜𝑔2 8 = (3) =
4 4 4
Example 2: The second example involves the combination with the well-known formula of
changing base.
Knowing the following identities:
𝒄𝒍𝒐𝒈𝒄 𝒃 = 𝒃
𝟏
𝒍𝒐𝒈𝒂 𝒄 =
𝒍𝒐𝒈𝒄 𝒂
Express a general logarithm 𝒍𝒐𝒈𝒂 𝒃 in terms of logarithms with arbitrary base 𝒄.
Invoking the equation by raising both the number and the base to logarithm with base 𝑎:
log 𝑎 𝑏 = 𝑙𝑜𝑔 𝑎𝑙𝑜𝑔𝑎 𝑐 𝑏𝑙𝑜𝑔𝑎 𝑐
Noting that
𝑎 𝑙𝑜𝑔𝑎 𝑐 = 𝑐
The equation becomes:
𝑙𝑜𝑔𝑎 𝑙𝑜𝑔𝑎 𝑐 𝑏𝑙𝑜𝑔𝑎 𝑐 = 𝑙𝑜𝑔𝑐 𝑏𝑙𝑜𝑔𝑎 𝑐
2
MATHEMATICA PARTICULARIS
Noting, as previous example, that the exponent of logarithm can be pulled down as a multiple:
𝑙𝑜𝑔𝑐 𝑏 𝑙𝑜𝑔𝑎 𝑐 = 𝑙𝑜𝑔𝑎 𝑐 𝑙𝑜𝑔𝑐 𝑏
Noting that the number and base can be flipped as reciprocity:
1
𝑙𝑜𝑔𝑎 𝑐 =
𝑙𝑜𝑔𝑐 𝑎
The equation becomes a quotient of two logarithms:
𝑙𝑜𝑔𝑐 𝑏
𝑙𝑜𝑔𝑎 𝑐 𝑙𝑜𝑔𝑐 𝑏 =
𝑙𝑜𝑔𝑐 𝑎
This results in the very famous identity to change the base of logarithm:
𝑙𝑜𝑔𝑐 𝑏
log 𝑎 𝑏 =
𝑙𝑜𝑔𝑐 𝑎
Remark:
The equivalent logarithm identity is a special case of base changing identity. However,
this formula allows us to change the base faster than the longer simplification procedure using
base-changing identity that is also more error-prone. In high school mathematics exam and
Mathematical Olympiads, the more cumbersome base-changing identity is often not needed as
many of those problems do not require evaluating the irrational logarithms using calculators. As
such, this formula is very useful because it is faster and less error-prone.
The equivalent logarithm identity is analogous to the equivalent fraction identity:
𝑛𝑎 𝑎
= , 𝑛≠0
𝑛𝑏 𝑏
This analogy is noted during my high school (Grade 10), when I learnt about logarithm, I noted
1
that raising the power of base by a factor of 𝑛 would result in 𝑛 times the original value, while
obviously raising the power of the number by a factor of 𝑛 would result in 𝑛 times the original
number. Thus, I postulated that if we raise the power of both the base and the number, it will still
be the same number. This formula improved my problem-solving speed and accuracy in dealing
with logarithms, contributing partly to my success in mathematics exam.
3
MATHEMATICA PARTICULARIS
1.2 Evaluation
1.2.1 Limit Evaluation by Polar Coordinate
Think outside the square. Think for yourself don't just follow the herd. Think multidisciplinary!
Problems by definition, cross many academic disciplines.
― Lucas Remmerswaal
Summary: The limit of a multivariable function can be evaluated systematically by change of
Cartesian coordinate to polar coordinate.
lim 𝑓(𝑥, 𝑦) = 𝑙𝑖𝑚 ℎ (𝑟, 𝜃 )
(𝑥,𝑦)→(𝑥0 ,𝑦0 ) 𝑟→0
𝜃∈[0,2𝜋]
limcos 𝑍 = 1
𝑍→0
The limit exists if and only if lim ℎ (𝑟, 𝜃 ) reduces to a constant independent of 𝜃 for any path,
𝑟→0
𝜃∈[0,2𝜋]
First, translate the coordinate so the limit points becomes (0,0), by substituting:
𝑥 ′ = 𝑥 − 𝑥0
𝑦 ′ = 𝑦 − 𝑦0
So that the limit becomes:
lim 𝑓(𝑥, 𝑦) = lim 𝑓 (𝑥 ′ + 𝑥0 , 𝑦 ′ + 𝑦0 ) = lim 𝑔 (𝑥 ′ , 𝑦 ′ )
(𝑥,𝑦)→(𝑥0 ,𝑦0 ) (𝑥′ ,𝑦′ )→(0,0) (𝑥′ ,𝑦′ )→(0,0)
4
MATHEMATICA PARTICULARIS
To evaluate the limit, evaluate the limit as r approaches 0, while holding 𝜃 constant. This can be
done similar to single variable limit such as using L'Hôpital's rule. The limit exists if and only if
lim ℎ (𝑟, 𝜃 ) reduces to a constant independent of 𝜃 for any path, else the limit does not exist.
𝑟→0
𝜃∈[0,2𝜋]
If lim Γ(𝑟)Θ(𝜃) is equal to a term independent of 𝜃, the limits exists. If the term is still a
𝑟→0
𝜃∈[0,2𝜋]
1) Substitute r=0 into the term and see if it gives a term independent of 𝜃. If it does not, the
limit does not exist.
2) If it goes to a constant independent of 𝜃, equate the numerator and denominator:
N(r, θ) = 𝐷(r, θ)
Then check if such polar path is possible:
a) The path must pass through the origin; substitute r=0 into the polar equation and
solve for 𝜃. If no real 𝜃 can be obtained, the limit exists.
b) If the path is possible, evaluate the limit along the path, by substituting
N(r,θ)
N(r,θ)= 𝐷(r, θ) into ℎ (𝑟, 𝜃 ) = , if the same limit is obtained, the limit exists,
𝐷(r,θ)
5
MATHEMATICA PARTICULARIS
Theorem 1 and 2 and very useful if the limit encountered involves trigonometric functions, by
using these theorems, the trigonometric part of the limit can be changed to algebraic functions
very easily.
Example 1: The first example demonstrates the polar equivalence with conventional method.
Evaluate:
𝟏 + 𝒚𝟐
𝒍𝒊𝒎 𝒍𝒏 𝟐
(𝒙,𝒚)→(𝟏,𝟎) 𝒙 + 𝒙𝒚
Since only 𝑥 is not at zero, only 𝑥 is needed to be shifted, substituting:
𝑥′ = 𝑥 − 1
𝑥 = 𝑥′ + 1
The limit becomes
1 + 𝑦2
lim ln
(𝑥,𝑦)→(1,0) 𝑥 2 + 𝑥𝑦
1 + 𝑦2 1 + 𝑦2
= lim ln = lim ln
(𝑥′,𝑦)→(0,0) ( 𝑥 ′ + 1)2 + (𝑥 ′ + 1)𝑦 (𝑥′,𝑦)→(0,0) 𝑥 ′2 + 2𝑥 ′ + 1 + 𝑥 ′ 𝑦 + 𝑦
Transforming the coordinates to Polar coordinates:
𝑥 ′ = 𝑟 cos 𝜃
𝑦 = 𝑟 sin 𝜃
The limit in polar coordinate becomes
1 + 𝑦2
lim ln
(𝑥′,𝑦)→(0,0) 𝑥 ′2 + 2𝑥 ′ + 1 + 𝑥 ′ 𝑦 + 𝑦
1 + 𝑟 2 sin2 𝜃
= lim ln 2
𝑟→0 𝑟 cos2 𝜃 + 2𝑟𝑐𝑜𝑠𝜃 + 1 + 𝑟 2 cos 𝜃 sin𝜃 + 𝑟 sin 𝜃
𝜃∈[0,2𝜋]
Note that the limit has become determinate after transformation, so by substituting r=0 into the
equation:
1 + 02 sin2 𝜃
lim ln 2 = ln 1 = 0
𝑟→0 0 cos 2 𝜃 + 2(0)𝑐𝑜𝑠𝜃 + 1 + 02 cos 𝜃 sin 𝜃 + 0 sin 𝜃
𝜃∈[0,2𝜋]
Since the resulting term does not contain 𝜃, the limit is independent of 𝜃. Let us now see if the
polar curve for which the numerator and denominator cancels exists:
1 + 𝑟 2 sin2 𝜃 = 𝑟 2 cos 2 𝜃 + 2𝑟𝑐𝑜𝑠𝜃 + 1 + 𝑟 2 cos 𝜃 sin 𝜃 + 𝑟 sin𝜃
Substituting r=0 into the equation, we get:
1 + 02 sin2 𝜃 = 02 cos2 𝜃 + 2(0)𝑐𝑜𝑠𝜃 + 1 + 02 cos 𝜃 sin 𝜃 + 0 sin𝜃 ⇒ 1 = 1
6
MATHEMATICA PARTICULARIS
The paths are possible (in this case, they actually means that 𝜃 can be any value), so evaluating
the limit along the paths:
1 + 𝑟 2 sin2 𝜃 1 + 𝑟 2 sin2 𝜃
lim ln = lim ln
𝑟→0 𝑟 2 cos 2 𝜃 + 2𝑟𝑐𝑜𝑠𝜃 + 1 + 𝑟 2 cos 𝜃 sin 𝜃 + 𝑟 sin𝜃 𝑟→0 1 + 𝑟 2 sin2 𝜃
𝜃∈[0,2𝜋] 𝜃∈[0,2𝜋]
Note that the limit is already evaluated to the origin, so no translation is required.
5𝑦 4 cos 2 𝑥 5𝑟 4 sin4 𝜃 cos 2(𝑟 cos 𝜃) 5 sin4 𝜃 cos 2(𝑟 cos 𝜃)
lim = lim = lim
(𝑥,𝑦)→(0,0) 𝑥 4 + 𝑦 4 𝑟→0 𝑟 4 (cos4 𝜃 + sin4 𝜃) 𝑟→0 cos4 𝜃 + sin4 𝜃
𝜃∈[0,2𝜋] 𝜃∈[0,2𝜋]
The denominator cannot go to zero after simplification, so there is no need to check for possible
polar curve that may yield different limit.
7
MATHEMATICA PARTICULARIS
Note that as 𝑅(𝑟) = 𝑟 vanishes, the angle becomes unable to influence the limit from a specific
path. Therefore the limit exists and:
𝑥𝑦
lim =0
(𝑥,𝑦)→(0,0) √𝑥 2 + 𝑦2
Example 4: 𝜽 term can become indeterminate when the limit does not exist.
Evaluate:
𝒙𝒚𝟒
𝒍𝒊𝒎
(𝒙,𝒚)→(𝟎,𝟎) 𝒙 𝟐 + 𝒚𝟖
At a first glance, one could even guess that as r vanishes, the limit goes to infinity and therefore
does not exist. However, let’s see if this is really the case:
Method 1:
First try substituting r=0:
𝑥𝑦 4 𝑟 3 cos 𝜃 sin4 𝜃 03 cos 𝜃 sin4 𝜃 0
lim 2 8
= lim = =
(𝑥,𝑦)→(0,0) 𝑥 + 𝑦 𝑟→0 cos 𝜃 + 𝑟 sin 𝜃 cos 𝜃 + 0 sin 𝜃 cos2 𝜃
2 6 8 2 6 8
𝜃∈[0,2𝜋]
Warning: At this stage, it seems tempting to directly assume that the limit is 0, However, the
above equation is not defined at 𝑐𝑜𝑠 𝜃 = 0. So we need to check for indeterminate case:
Equating numerator and denominator:
𝑟 3 cos 𝜃 sin4 𝜃 = cos 2 𝜃 + 𝑟 6 sin8 𝜃
Substituting r=0:
03 cos 𝜃 sin4 𝜃 = cos 2 𝜃 + 06 sin8 𝜃
0 = cos 2 𝜃
𝜋 3𝜋
Such path is possible: The equation can be satisfied for 𝜃 = , , which may give us:
2 2
8
MATHEMATICA PARTICULARIS
Method 2:
𝜕
By applying L'Hôpital's rule repeatedly (applying 𝜕𝑟 to both numerator and denominator
6 cos 𝜃 cos 𝜃
= lim 3 4 = lim
𝑟→0 120𝑟 sin 𝜃 𝑟→0 20𝑟 3 sin4 𝜃
𝜃∈[0,2𝜋] 𝜃∈[0,2𝜋]
Up to here, the limit cannot be evaluated anymore since it involves division of a finite constant
by zero; the limit diverges. The limit does not exist by definition that the limit must be finite if it
exists. Furthermore, the functions of 𝜃 are still present in the terms. Therefore the limit does not
exist.
Example 5: Contradiction is easily seen when the limit does not exist.
Evaluate:
𝒙𝒚𝟐 𝒄𝒐𝒔 𝒚
𝒍𝒊𝒎
(𝒙,𝒚)→(𝟎,𝟎) 𝒙 𝟐 + 𝒚𝟒
9
MATHEMATICA PARTICULARIS
𝜋 3𝜋
This equation is possible (𝜃 = 2 , ). The limit does not exist (Up to this point it is already
2
sufficient to conclude that the limit does not exist, since curve exists, I will explain further why
so). Since evaluated along the polar curve:
𝑟 cos 𝜃 sin2 𝜃 = cos 2 𝜃 + 𝑟 sin4 𝜃
𝑟 cos 𝜃 sin2 𝜃 𝑟 cos 𝜃 sin2 𝜃
lim = lim =1
𝑟→0 cos 2 𝜃 + 𝑟 sin4 𝜃 𝑟→0 𝑟 cos 𝜃 sin2 𝜃
𝜃∈[0,2𝜋] 𝜃∈[0,2𝜋]
We get 1 rather than 0, which is why the limit does not exist.
Example 6: This example demonstrates some common pitfalls in direct substitution.
Evaluate:
𝒚 𝒔𝒊𝒏 𝒙𝟐 𝒄𝒐𝒔 𝒙𝟐 𝒚𝟐
𝒍𝒊𝒎
(𝒙,𝒚)→(𝟎,𝟎) 𝒙 + 𝒙𝒚𝟒
Method 1:
First, we get rid of the trigonometric functions:
𝑦 sin 𝑥 2 cos 𝑥 2 𝑦 2 𝑦
lim 4 = lim lim sin 𝑥 2 lim cos 𝑥 2 𝑦 2
(𝑥,𝑦)→(0,0) 𝑥 + 𝑥𝑦 (𝑥,𝑦)→(0,0) 𝑥 + 𝑥𝑦 4 (𝑥,𝑦)→(0,0) (𝑥,𝑦)→(0,0)
𝑦 𝑦𝑥 2 𝑦𝑥
= lim (𝑥 2 )(1) = lim = lim
(𝑥,𝑦)→(0,0) 𝑥 + 𝑥𝑦 4 (𝑥,𝑦)→(0,0) 𝑥 + 𝑥𝑦 4 (𝑥,𝑦)→(0,0) 1 + 𝑦 4
𝑦𝑥 𝑟 2 cos 𝜃 sin𝜃
lim = lim =0
(𝑥,𝑦)→(0,0) 1 + 𝑦 4 𝑟→0 1 + 𝑟 4 sin4 𝜃
𝜃∈[0,2𝜋]
10
MATHEMATICA PARTICULARIS
cos 𝜃 ≠ 0
Now we try the polar curve:
sin 𝜃 sin(𝑟 2 cos2 𝜃) cos(𝑟 4 cos 2 𝜃 sin2 𝜃) = cos 𝜃(1 + 𝑟 2 sin2 𝜃)
0 = cos 𝜃
𝜋 3𝜋
𝜃= ,
2 2
The limit does not exists? What is wrong?
You have neglected the cos 2 𝜃 inside sine function by directly substituting sin(𝑟 2 cos 2 𝜃) = 0.
Substituting the equation and taking the limit, while noting that lim sin(𝑟 2 cos 2 𝜃) =
𝑟→0
𝜃∈[0,2𝜋]
lim 𝑟 2 cos 2 𝜃:
𝑟→0
𝜃∈[0,2𝜋]
11
MATHEMATICA PARTICULARIS
However, note that we have reached the conclusion that along the defined polar curve, cos 𝜃 = 0
at the origin:
sin 𝜃 (𝑟 2 cos 𝜃) cos(𝑟 4 cos 2 𝜃 sin2 𝜃) sin 𝜃 (02 [0])cos(04 [02 ] sin2 𝜃) 0
lim = = =0
𝑟→0 1 + 𝑟 2 sin2 𝜃 1 + 02 sin2 𝜃 1
𝜃∈[0,2𝜋]
We have reached the same conclusion, as long as we evaluated the limit correctly. From this,
Direct substitution from defined polar curve can only be done when there is no common product
between numerator and denominator.
This is consistent with our knowledge of limit evaluation, at least for single variable limit, that
one has to cancel off the common products during limit evaluation.
From the case, it can be seen that:
The safest and fastest strategy is to simplify the limit before evaluating them.
Method 2:
By decomposing the limit into products:
𝑦 sin𝑥2 cos 𝑥2 𝑦2 𝑦 sin 𝑥2
lim 𝑥+𝑥𝑦4
= lim lim lim cos 𝑥 2 𝑦 2 = (0)(0)(1) = 0,
(𝑥,𝑦)→(0,0) (𝑥,𝑦)→(0,0) 1+𝑦4 (𝑥,𝑦)→(0,0) 𝑥 (𝑥,𝑦)→(0,0)
the indeterminate case is simplified by splitting the function into products which results here in
single variable indeterminate limit (can thus can be determined here using L'Hôpital's rule or
other methods), the limit exists.
Remark:
This method is particularly useful if the function is indeterminate at (𝑥0 , 𝑦0 ), as
conventional limit evaluation method involves using power function path through the origin to
show if the limit does not exist, or using Squeeze Theorem to determine the limit if it exists. As
such, the conventional method is less robust because both approaches need to be attempted in
trial-and-error fashion. On the other hand, power function path can be tedious to calculate and
therefore error-prone, while the interval for which to squeeze the limit (for Squeeze Theorem) is
more of an art and can be difficult to guess without much practice.
The polar coordinate transformation offers a mechanical way of evaluating the limit if it
exists, or demonstrate that no limit exists, both at once, while dealing with equations in a more
doable way. Although the polar coordinate method is sometimes slower than conventional
method (power function path and squeeze theorem), this can be extremely rapid if coupled with
the simplifying theorems of sine and cosine. Often, the limit becomes much easier to evaluate in
polar coordinate because 𝑥 and 𝑦 can be grouped together as 𝑥 2 + 𝑦 2 = 𝑟 2.
12
MATHEMATICA PARTICULARIS
13
MATHEMATICA PARTICULARIS
Chapter 2
Calculus
It is far better to foresee even without certainty than not to foresee at all.
-Henri Poincare
This chapter outlines the various topics encountered in calculus, particularly in
differentiation, integration, ordinary and partial differentiation equations.
Because differentiation is well understood and usually mechanical in nature, emphasis is
placed on miscellaneous techniques of symbolic integration because integration is fundamentally
not mechanical in nature and would require case by case study. As such, there is an arsenal of
topics to be discussed as supplementary tools for engineering mathematics to bypass various
difficulties usually encountered. In addition, interesting cases in ordinary differential equation
and partial differential equation is discussed.
2.1 Differentiation
2.1.1 Differentiation of Inverse Function
Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime.
-Anne Isabella Richie
Summary: If the derivative of a function 𝑓 (𝑥 ) is known, the derivative of the inverse function
can also be evaluated:
𝑑 ′ 1
𝑓 {𝑥} = ′ −1
𝑑𝑥 𝑓 {𝑓 {𝑥}}
Derivation: Given a known original function 𝑓{𝑥 }
𝑦 = 𝑓{ 𝑥 }
Defining an inverse function 𝑧:
𝑧 = 𝑓 −1 {𝑥}
Applying chain rule to differentiate 𝑧 with respect to 𝑥 gives:
𝑑𝑧 𝑑𝑧 𝑑𝑦
=
𝑑𝑥 𝑑𝑦 𝑑𝑥
14
MATHEMATICA PARTICULARIS
𝑑𝑦 𝑑𝑧
Because both 𝑓 {𝑥 } and = 𝑓 ′ {𝑥} are known, the challenge now is to find the term 𝑑𝑦. This can
𝑑𝑥
be done by comparison with an alternative formulation. Applying the original function to 𝑧 gives
𝑥:
Now, applying chain rule to this alternative formulation for implicit differentiation:
𝑑𝑧 𝑑𝑥 1
𝑓 ′ {𝑧} = = ′
𝑑𝑦 𝑑𝑦 𝑓 {𝑥}
𝑑𝑧
Rearranging gives the needed :
𝑑𝑦
𝑑𝑧 1
= ′
𝑑𝑦 𝑓 {𝑥}𝑓 ′ {𝑧}
Substituting back and simplifying gives the very elegant equation:
𝑑𝑧 1 1
= ′ ′
𝑓 ′ {𝑥 } = ′
𝑑𝑥 𝑓 {𝑥}𝑓 {𝑧} 𝑓 {𝑧}
Or, in terms of 𝑓{𝑥 } and 𝑓 −1 {𝑥}:
𝑑 ′ 1
𝑓 {𝑥} =
𝑑𝑥 𝑓 ′ {𝑓 −1 {𝑥}}
Example:
Example 1: The very first example is the very classic problem of differentiating a natural
logarithm function.
Let
𝒅𝒚
= 𝒆𝒙
𝒅𝒙
𝒇 (𝒙) = 𝒆𝒙
Differentiate
𝒛 = 𝒍𝒏 𝒙
For exponential function,
𝑓 ′ {𝑥 } = 𝑒 𝑥 ⇒ 𝑓 ′ {𝑧 } = 𝑒 𝑧
𝑑𝑧 1 1
= ′ = 𝑧
𝑑𝑥 𝑓 {𝑧} 𝑒
15
MATHEMATICA PARTICULARIS
𝑑𝑧 1 1
= =
𝑑𝑥 𝑐𝑜𝑠 𝑧 𝑐𝑜𝑠 (𝑠𝑖𝑛−1 𝑥 )
Remark:
Traditionally, the derivative of inverse function is obtained by non-mechanical
approaches, such as those methods often appears out of thin air simply because they happened to
work. This is a systematic way of evaluating the inverse function, if the original function is
known.
For instance, the conventional method for Example 2 is to first convert into some doable
form using trigonometric identities and then differentiate accordingly. However, such approach
is less mechanical such that it is not easy to come up with these kinds of “ingenious” solution in
an exam setting.
This technique was developed during my early years of undergraduate when I liked to
play with formulas on my notebook during class.
16
MATHEMATICA PARTICULARIS
2.2 Integration
2.2.1 Integration by Differential Equation
Information is the resolution of uncertainty.
― Claude Shannon
Summary: Symmetry of a derivative can be used to aid integral evaluation:
𝑦 𝑦
∫ 𝑦 𝑑𝑥 = ∫ 𝑑𝑦 = ∫ 𝑑𝑦
𝑑𝑦 ℎ{𝑦}
( )
𝑑𝑥
Derivation:
Suppose the function to be integrated (integrand) demonstrates differential symmetry:
𝑑𝑦
= ℎ {𝑦}
𝑑𝑥
Rearranging for 𝑑𝑥:
1
𝑑𝑥 = 𝑑𝑦
ℎ{𝑦}
Using integration by substitution:
𝑦 𝑦
∫ 𝑦 𝑑𝑥 = ∫ 𝑑𝑦 = ∫ 𝑑𝑦
𝑑𝑦 ℎ{𝑦}
( )
𝑑𝑥
The integral will be in terms of 𝑦 only, which may be of computational use. To obtain the
integral explicitly in terms of 𝑥, obtain 𝑦 = 𝑓(𝑥) and substitute into the integral.
Example 1: This is a very common example.
Given
𝒚 = 𝟐𝒆𝟑𝒙
Find
∫ 𝒚 𝒅𝒙
17
MATHEMATICA PARTICULARIS
𝒅𝒚
= 𝟑𝒚𝟐
𝒅𝒙
∫ 𝒚 𝒅𝒙
𝑦 1
∫ 𝑦 𝑑𝑥 = ∫ 2
𝑑𝑦 = ∫ 𝑑𝑦
3𝑦 3𝑦
1 1
∫ 𝑑𝑦 = ln|𝑦| + 𝐶
3𝑦 3
Note that the antiderivative is obtained without even solving the ordinary differential equation.
Example 3: This technique is also useful for implicit function when one cannot easily write 𝒚
in terms of 𝒙.
Given 𝒙 = 𝟐𝒚𝟐 + 𝒚,
∫ 𝒚 𝒅𝒙
By implicit differentiation:
𝑑𝑦 𝑑𝑦
1 = 4𝑦 +
𝑑𝑥 𝑑𝑥
𝑑𝑦
1= (4𝑦 + 1)
𝑑𝑥
18
MATHEMATICA PARTICULARIS
𝑑𝑦 1
=
𝑑𝑥 4𝑦 + 1
𝑦
∫ 𝑦 𝑑𝑥 = ∫ 𝑑𝑦 = ∫ 𝑦(4𝑦 + 1) 𝑑𝑦 = ∫ 4𝑦 2 + 𝑦𝑑𝑦
1
4𝑦 + 1
4 3 1 2
∫ 4𝑦 2 + 𝑦𝑑𝑦 = 𝑦 + 𝑦 +𝐶
3 2
Remark:
This technique works by making use of any information from the derivative of the function,
𝑦
and can be used if resulting can be integrated easily with respect to 𝑦. This involves a
ℎ(𝑦)
While the integral may not be able to be written explicitly in terms of 𝑥 due to the nature of
the function, this can be attempted by substituting 𝑦 in terms of 𝑥, often involving solving the
differential equation and substituting the obtained 𝑦 = 𝑓{𝑥 } into the integral.
This method was also developed when I played with formulas in my class in my second year
of undergraduate. The beauty of this method, as you can see from the examples, is that the ODE
may not even need to be solved to know the integral, which is often useful in numerical analysis.
In other words, if we can obtain the integral from 𝑦 easier, we probably do not have to obtain the
integral through 𝑥.
19
MATHEMATICA PARTICULARIS
If the integral of a function 𝑓 (𝑥 ) is known, the integral of the corresponding inverse function can
also be readily evaluated.
Derivation: Using integration by parts:
∫ 𝑣 𝑑𝑢 = 𝑢𝑣 − ∫ 𝑢 𝑑𝑣
∫ 𝑦 𝑑𝑥 = 𝑥𝑦 − ∫ 𝑥 𝑑𝑦
Example:
Example 1: The first example is the very simple illustration:
𝒇{𝒙} = 𝒆𝒙
𝒇 −𝟏 {𝒙} = 𝒍𝒏 𝒙
Applying the formula:
∫ ln 𝑥 𝑑𝑥 = 𝑥 ln 𝑥 − ∫ 𝑒 𝑦 𝑑𝑦
𝑥 𝑙𝑛 𝑥 − ∫ 𝑒 𝑦 𝑑𝑦 = 𝑥 ln 𝑥 − 𝑒 𝑦
20
MATHEMATICA PARTICULARIS
Substituting 𝑦 in terms of 𝑥:
𝑥 𝑙𝑛 𝑥 − 𝑒 𝑦 = 𝑥 ln 𝑥 − 𝑒 ln 𝑥
Simplifying:
∫ 𝑙𝑛 𝑥 𝑑𝑥 = 𝑥 ln 𝑥 − 𝑥 + 𝐶
Remark:
This technique is very useful to integrate inverse function. Geometrically, the formula
represents a balance of area between the original function and inverse function. Applying limits
of integration to the formula yields:
𝑦2 𝑥2
∫ 𝑦𝑑𝑥 = 𝑥2 𝑦2 − 𝑥1 𝑦1 − ∫ 𝑥𝑑𝑦
𝑦1 𝑥1
21
MATHEMATICA PARTICULARIS
𝑦2
𝑦1
y
0 x
𝑥1 𝑥2
𝑥2 𝑦2 − 𝑥1 𝑦1 = ∫ 𝑦𝑑𝑥 − ∫ 𝑥𝑑𝑦
𝑦1 𝑥1
Or alternatively, if we set one point to be origin and another limit to be arbitrary 𝑥 and 𝑦:
𝑦 𝑥
∫ 𝑦 𝑑𝑥 = 𝑥𝑦 − ∫ 𝑥 𝑑𝑦
Note that this equation guarantees the integrability of the inverse function in terms of original
function.
22
MATHEMATICA PARTICULARIS
𝑒 𝑖𝑥 = 𝑐𝑜𝑠 𝑥 + 𝑖 𝑠𝑖𝑛 𝑥
𝑒 𝑖𝑥 + 𝑒 −𝑖𝑥 1 𝑖𝑥 1 −𝑖𝑥
𝑐𝑜𝑠 𝑥 = = 𝑒 + 𝑒
2 2 2
𝑒 𝑖𝑥 − 𝑒 −𝑖𝑥 1 1
𝑠𝑖𝑛 𝑥 = = 𝑒 𝑖𝑥 − 𝑒 −𝑖𝑥
2𝑖 2𝑖 2𝑖
23
MATHEMATICA PARTICULARIS
The challenge is then to convert this complex equation into a form that is easy to manage. First,
pulling out the common 𝑒 𝑎𝑥 factor:
1 1 1 1
𝑒 (𝑎+𝑏𝑖 )𝑥 − 𝑒 (𝑎−𝑏𝑖 )𝑥 = 𝑒 𝑎𝑥 [ 𝑒 𝑏𝑖𝑥 − 𝑒 −𝑏𝑖𝑥 ]
2𝑖 (𝑎 + 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 ) 2𝑖 (𝑎 + 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )
Applying Euler’s Identity again to convert complex exponential functions into trigonometric
functions:
1 1
𝑒 𝑎𝑥 [ 𝑒 𝑏𝑖𝑥 − 𝑒 −𝑏𝑖𝑥 ]
2𝑖(𝑎 + 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )
1 1
= 𝑒 𝑎𝑥 [ [cos 𝑏𝑥 + 𝑖 sin 𝑏𝑥 ] − [cos(−𝑏𝑥 ) + 𝑖 sin(−𝑏𝑥)]]
2𝑖 (𝑎 + 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )
Noting that cos −𝑏𝑥 = cos 𝑏𝑥 while sin−𝑏𝑥 = − sin𝑏𝑥:
1 1
𝑒 𝑎𝑥 [ [cos 𝑏𝑥 + 𝑖 sin𝑏𝑥 ] − [cos(−𝑏𝑥 ) + 𝑖 sin(−𝑏𝑥)]]
2𝑖 (𝑎 + 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )
1 1
= 𝑒 𝑎𝑥 [ [𝑐𝑜𝑠 𝑏𝑥 + 𝑖 𝑠𝑖𝑛 𝑏𝑥 ] − [𝑐𝑜𝑠 𝑏𝑥 − 𝑖 𝑠𝑖𝑛 𝑏𝑥 ]]
2𝑖 (𝑎 + 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )
Collecting like terms for cosine and sine terms:
1 1
𝑒 𝑎𝑥 [ [𝑐𝑜𝑠 𝑏𝑥 + 𝑖 𝑠𝑖𝑛 𝑏𝑥 ] − [𝑐𝑜𝑠 𝑏𝑥 − 𝑖 𝑠𝑖𝑛 𝑏𝑥 ]]
2𝑖 (𝑎 + 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )
1 1 𝑖 𝑖 (−1)
= 𝑒 𝑎𝑥 [[ − ] 𝑐𝑜𝑠 𝑏𝑥 + [ − ]sin 𝑏𝑥]
2𝑖(𝑎 + 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 ) 2𝑖 (𝑎 + 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )
(𝑎 − 𝑏𝑖 ) (𝑎 + 𝑏𝑖 )
= 𝑒 𝑎𝑥 [[ − ] 𝑐𝑜𝑠 𝑏𝑥
2𝑖 (𝑎 + 𝑏𝑖 )(𝑎 − 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )(𝑎 + 𝑏𝑖 )
𝑖 (𝑎 − 𝑏𝑖 ) 𝑖 ( −1)(𝑎 + 𝑏𝑖 )
+[ − ] 𝑠𝑖𝑛 𝑏𝑥]
2𝑖 (𝑎 + 𝑏𝑖 )(𝑎 − 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )(𝑎 + 𝑏𝑖 )
24
MATHEMATICA PARTICULARIS
Simplifying:
(𝑎 − 𝑏𝑖 ) (𝑎 + 𝑏𝑖 )
𝑒 𝑎𝑥 [[ − ] 𝑐𝑜𝑠 𝑏𝑥
2𝑖 (𝑎 + 𝑏𝑖 )(𝑎 − 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )(𝑎 + 𝑏𝑖 )
𝑖 (𝑎 − 𝑏𝑖 ) 𝑖 ( −1)(𝑎 + 𝑏𝑖 )
+[ − ] 𝑠𝑖𝑛 𝑏𝑥]
2𝑖 (𝑎 + 𝑏𝑖 )(𝑎 − 𝑏𝑖 ) 2𝑖 (𝑎 − 𝑏𝑖 )(𝑎 + 𝑏𝑖 )
(𝑎 − 𝑏𝑖 ) − (𝑎 + 𝑏𝑖 ) 𝑖(𝑎 − 𝑏𝑖 ) − (𝑖 )(−1)(𝑎 + 𝑏𝑖 )
= 𝑒 𝑎𝑥 [[ ] 𝑐𝑜𝑠 𝑏𝑥 + [ ] 𝑠𝑖𝑛 𝑏𝑥]
2𝑖 (𝑎 + 𝑏𝑖 )(𝑎 − 𝑏𝑖 ) 2𝑖 (𝑎 + 𝑏𝑖 )(𝑎 − 𝑏𝑖 )
−2𝑏𝑖 𝑎𝑖 − 𝑏𝑖 2 + 𝑖 (𝑎 + 𝑏𝑖 )
= 𝑒 𝑎𝑥 [[ ] 𝑐𝑜𝑠 𝑏𝑥 + [ ] 𝑠𝑖𝑛 𝑏𝑥]
2𝑖( 𝑎2 − 𝑎𝑏𝑖 + 𝑎𝑏𝑖 − 𝑏2 𝑖 2 ) 2𝑖 (𝑎2 − 𝑎𝑏𝑖 + 𝑎𝑏𝑖 − 𝑏2 𝑖 2 )
−𝑏 𝑎𝑖 − 𝑏𝑖 2 + 𝑎𝑖 + 𝑏𝑖 2
= 𝑒 𝑎𝑥 [[ ] 𝑐𝑜𝑠 𝑏𝑥 + [ ] 𝑠𝑖𝑛 𝑏𝑥]
(𝑎2 + 𝑏2 ) 2𝑖 (𝑎2 + 𝑏2 )
25
MATHEMATICA PARTICULARIS
Example 2:
The second example is integration of a rational function of trigonometric function:
𝟐 𝒔𝒊𝒏 𝒙
∫ 𝒅𝒙
𝟏 + 𝒄𝒐𝒔 𝒙
Converting the function into complex form:
1 1 1 1
2 sin 𝑥 2 (2𝑖 𝑒 𝑖𝑥 − 2𝑖 𝑒 −𝑖𝑥 ) ( 𝑖 𝑒 𝑖𝑥 − 𝑖 𝑒 −𝑖𝑥 )
∫ 𝑑𝑥 = ∫ 𝑑𝑥 = ∫ 𝑑𝑥
1 + cos 𝑥 1 𝑖𝑥 1 −𝑖𝑥 1 𝑖𝑥 1 −𝑖𝑥
1+( 𝑒 + 𝑒 ) 1+( 𝑒 + 𝑒 )
2 2 2 2
Now, using integration by substitution:
𝑧 = 𝑒 𝑖𝑥
𝑑𝑧
= 𝑖𝑒 𝑖𝑥
𝑑𝑥
1 −𝑖𝑥 1
𝑑𝑥 = 𝑒 𝑑𝑧 = 𝑧 −1 𝑑𝑧
𝑖 𝑖
This converts the function into a rational function:
1 1
( 𝑖 𝑧 − 𝑖 𝑧 −1 ) 1 (−1 + 𝑧 −2 ) ( −𝑧 2 + 1)
∫ 𝑧 −1 𝑑𝑧 = ∫ 𝑑𝑧 = ∫ 𝑑𝑧
1 1 1 1 1 1
1 + (2 𝑧 + 2 𝑧 −1 ) 𝑖 1 + (2 𝑧 + 2 𝑧 −1 ) 𝑧 2 + (2 𝑧 3 + 2 𝑧)
Such rational function can be integrated by partial fraction decomposition. First factorizing the
terms and trying to write them as a sum of 2 fractions:
(−𝑧 2 + 1) (1 + 𝑧)(1 − 𝑧) (1 + 𝑧)(1 − 𝑧) 2 − 2𝑧 2 2
= =2 = = −
1 1 1 𝑧(𝑧 + 1) 2 𝑧(𝑧 + 1) 𝑧(𝑧 + 1) 𝑧 + 1
𝑧 2 + (2 𝑧 3 + 2 𝑧) 2 𝑧(2𝑧 + 𝑧 2 + 1)
26
MATHEMATICA PARTICULARIS
Simplifying gives 𝐵:
𝐵 = −2
The partial fraction is thus:
(−𝑧 2 + 1) 2 2 2 2 2 2 4
= − = − − = −
1 1 ( ) 𝑧+1 𝑧 𝑧+1 𝑧 +1 𝑧 𝑧 +1
𝑧 2 + (2 𝑧 3 + 2 𝑧) 𝑧 𝑧 + 1
The challenge is now to converting such substituted antiderivative back to real form. Substituting
back in terms of 𝑥:
2 ln 𝑧 − 4 ln (𝑧 + 1) = 2 𝑙𝑛 𝑒 𝑖𝑥 − 4 𝑙𝑛(𝑒 𝑖𝑥 + 1)
Simplifying:
𝑒 2𝑖𝑥 𝑒 𝑖𝑥 + 1
2 𝑙𝑛 𝑒 𝑖𝑥 − 4 𝑙𝑛(𝑒 𝑖𝑥 + 1) = ln = −4 𝑙𝑛
( 𝑒 𝑖𝑥 + 1)4 𝑖𝑥
𝑒2
Applying Euler’s Identity to convert complex exponential into trigonometric functions:
𝑒 𝑖𝑥 + 1 cos 𝑥 + 𝑖 sin 𝑥 + 1
−4 𝑙𝑛 𝑖𝑥
= −4 𝑙𝑛 𝑥 𝑥
𝑒2 𝑐𝑜𝑠 + 𝑖 𝑠𝑖𝑛
2 2
It is better to convert the function in form of same angle/argument for simplification. Using half
angle formulas:
𝑥 𝑥
cos 𝑥 = cos2 − sin2
2 2
𝑥 𝑥
sin 𝑥 = 2 sin cos
2 2
Substituting these half-angle formulas and simplifying gives:
2𝑥 2𝑥 𝑥 𝑥 2𝑥 2𝑥
cos 𝑥 + 𝑖 sin 𝑥 + 1 𝑐𝑜𝑠 2 − 𝑠𝑖𝑛 2 + 2𝑖 𝑠𝑖𝑛 2 𝑐𝑜𝑠 2 + cos 2 + sin 2
𝑥 𝑥 = 𝑥 𝑥
𝑐𝑜𝑠 2 + 𝑖 𝑠𝑖𝑛 2 𝑐𝑜𝑠 2 + 𝑖 𝑠𝑖𝑛 2
𝑥 𝑥 𝑥 𝑥 𝑥
2 𝑐𝑜𝑠 2 2 + 2𝑖 𝑠𝑖𝑛 2 𝑐𝑜𝑠 2 𝑥 𝑐𝑜𝑠 2 + 𝑖 𝑠𝑖𝑛 2 𝑥
= 𝑥 𝑥 = 2 𝑐𝑜𝑠 = 2 𝑐𝑜𝑠
𝑐𝑜𝑠 2 + 𝑖 𝑠𝑖𝑛 2 2 𝑐𝑜𝑠 𝑥 + 𝑖 𝑠𝑖𝑛 𝑥 2
2 2
Thus, the antiderivative function can be written in more compact form:
cos 𝑥 + 𝑖 sin 𝑥 + 1 𝑥 𝑥
−4 𝑙𝑛 𝑥 𝑥 = −4 𝑙𝑛 (2 𝑐𝑜𝑠 ) = −4 𝑙𝑛 (𝑐𝑜𝑠 ) − 4 𝑙𝑛 2
𝑐𝑜𝑠 2 + 𝑖 𝑠𝑖𝑛 2 2 2
27
MATHEMATICA PARTICULARIS
28
MATHEMATICA PARTICULARIS
The problem is actually to find the solution 𝐹 (𝑥 ) of the ordinary differential equation:
𝑑
𝑔 {𝑡} = 𝑔′ {𝑡} = 𝑓 {𝑡}
𝑑𝑡
Performing Laplace transform:
𝑠𝐺 {𝑠} − 𝑔{0} = ℒ{𝑓 {𝑡}}
29
MATHEMATICA PARTICULARIS
Since 𝑔 (0) is some constant that is not of interest, it can be rewritten as a generic constant of
integration 𝐶:
1
∫ 𝑓{𝑡}𝑑𝑡 = ℒ −1 { ℒ{𝑓{𝑡}}} + 𝐶
𝑠
Example:
Example 1: This is a trivial example to demonstrate the concept.
Integrate
𝒇 {𝒕} = 𝒄𝒐𝒔 𝒂𝒕
Applying Laplace Transform to the function:
𝑠
ℒ{𝑓{𝑡}} =
𝑠2 + 𝑎2
Applying the formula:
1 𝑠 1
∫ 𝑓{𝑡}𝑑𝑡 = ℒ −1 { 2 2 } = ℒ −1 { 2 }
𝑠𝑠 +𝑎 𝑠 + 𝑎2
Looking up Laplace Transform Table gives:
1 1
ℒ −1 { } = sin𝑎𝑡
𝑠2 +𝑎2 𝑎
Thus, the antiderivative is:
1
∫ 𝑓{𝑡}𝑑𝑡 = 𝑠𝑖𝑛 𝑎𝑡 + 𝐶
𝑎
Example 2: The second example is a more complicated case where this technique is often
useful.
Integrate:
30
MATHEMATICA PARTICULARIS
The challenge now is then to solve for the inverse Laplace Transform of the above 𝑠 domain
function. This has 2 solution approaches:
Such rational function can be broken down with partial fraction, by definition:
1 𝑏 𝐴 𝐵𝑠 + 𝐶
2 2
= +
𝑠 (𝑠 − 𝑎) + 𝑏 𝑠 (𝑠 − 𝑎) 2 + 𝑏2
To compare these constants to the original rational function, they must be written in the same
form:
𝐴[(𝑠 − 𝑎) 2 + 𝑏2 ] + 𝑠 (𝐵𝑠 + 𝐶 ) = 𝑏
The undetermined constants can be determined by setting the 𝑠 to arbitrary values and solve,
because both forms must be the same at all values of 𝑠. Because there are 3 constants (𝐴, 𝐵 and
𝐶), 3 values are needed of 3 equations to solve for 3 unknowns, chosen to be 0, 1 and −1:
𝐴[𝑎2 + 𝑏2 ] = 𝑏
𝑏
𝐴=
𝑎2 + 𝑏2
𝑏
[(1 − 𝑎) 2 + 𝑏2 ] + 1(𝐵 (1) + 𝐶 ) = 𝑏
𝑎2 + 𝑏2
31
MATHEMATICA PARTICULARIS
Simplifying:
𝑏
[1 − 2𝑎 + 𝑎2 + 𝑏2 ] + 𝐵 + 𝐶 = 𝑏
𝑎2 + 𝑏2
𝑏
𝐵+𝐶 =𝑏− [1 − 2𝑎 + 𝑎2 + 𝑏2 ]
𝑎2 + 𝑏2
𝑏
[(−1 − 𝑎) 2 + 𝑏2 ] − 1(𝐵 (−1) + 𝐶 ) = 𝑏
𝑎2 + 𝑏2
Simplifying:
𝑏
[1 + 2𝑎 + 𝑎2 + 𝑏2 ] + 𝐵 − 𝐶 = 𝑏
𝑎2 + 𝑏2
𝑏
𝐵−𝐶 =𝑏− [1 + 2𝑎 + 𝑎2 + 𝑏2 ]
𝑎2 + 𝑏2
With 2 equations and 2 variables (𝐵 and 𝐶), both 𝐵 and 𝐶 can be solved. Summing the 2
equations gives:
𝑏 𝑏
2𝐵 = 𝑏 − [1 − 2𝑎 + 𝑎2 + 𝑏2 ] + 𝑏 − 2 [1 + 2𝑎 + 𝑎2 + 𝑏2 ]
𝑎2 +𝑏 2 𝑎 + 𝑏2
Simplifying:
𝑏
2𝐵 = 2𝑏 − [[1 − 2𝑎 + 𝑎2 + 𝑏2 ] + [1 + 2𝑎 + 𝑎2 + 𝑏2 ]]
𝑎2 + 𝑏2
𝑏 2 + 2𝑏2 ] = 2𝑏 −
2𝑏 2𝑏 [𝑎2 + 𝑏2 ]
= 2𝑏 − [2 + 2𝑎 −
𝑎2 + 𝑏2 𝑎2 + 𝑏2 𝑎2 + 𝑏2
32
MATHEMATICA PARTICULARIS
𝑏
𝐵=−
𝑎2 + 𝑏2
This 𝐵 can then be substituted into either equation to obtain 𝐶. For convenience, the equation
with 𝐵 on the right-hand-side as positive sign is chosen to reduce chance of human error dealing
with negative signs:
𝑏
𝐶 = 𝐵−𝑏+ [1 + 2𝑎 + 𝑎2 + 𝑏2 ]
𝑎2 + 𝑏2
𝑏 𝑏
𝐶 =− −𝑏+ 2 [1 + 2𝑎 + 𝑎2 + 𝑏2 ]
𝑎2 +𝑏 2 𝑎 + 𝑏2
𝑏 𝑏 2𝑎𝑏
𝐶 =− −𝑏+ 2 + 2 +𝑏
𝑎2 +𝑏 2 𝑎 +𝑏 2 𝑎 + 𝑏2
Simplifying gives 𝐶:
2𝑎𝑏
𝐶=
𝑎2 + 𝑏2
1 𝑏 2𝑎𝑏 𝑏𝑠 𝑏
= − +
𝑠 (𝑠 − 𝑎) 2 + 𝑏2 (𝑎2 + 𝑏2 )((𝑠 − 𝑎) 2 + 𝑏2 ) (𝑎2 + 𝑏2 )((𝑠 − 𝑎) 2 + 𝑏2 ) 𝑠 (𝑎2 + 𝑏2 )
2𝑎𝑏 2𝑎
ℒ −1 { }= 2 𝑒 𝑎𝑡 sin 𝑏𝑡
(𝑎2 + 𝑏2 )((𝑠 2 2
− 𝑎) + 𝑏 ) ( 𝑎 + 𝑏2 )
𝑏 𝑏
ℒ −1 { }= 2
𝑠(𝑎2 2
+𝑏 ) ( 𝑎 + 𝑏2 )
33
MATHEMATICA PARTICULARIS
𝑏𝑠 𝑏 𝑠−𝑎+𝑎
ℒ −1 {− }=− 2 ℒ −1 { }
( 𝑎2 + 𝑏2 )((𝑠 2 2
− 𝑎) + 𝑏 ) 2
(𝑎 + 𝑏 ) ((𝑠 − 𝑎) 2 + 𝑏2 )
𝑏 𝑎
𝑎𝑡 cos 𝑏𝑡 + 𝑒 𝑎𝑡 𝑠𝑖𝑛 𝑏𝑡]
=− [𝑒
(𝑎2 + 𝑏2 ) 𝑏
1 𝑏
ℒ −1 { }
𝑠 (𝑠 − 𝑎)2 + 𝑏2
2𝑎 𝑏 𝑎 𝑏
= 𝑒 𝑎𝑡 𝑠𝑖𝑛 𝑏𝑡 − 2 [𝑒 𝑎𝑡 𝑐𝑜𝑠 𝑏𝑡 + 𝑒 𝑎𝑡 𝑠𝑖𝑛 𝑏𝑡] + 2
(𝑎2 2
+𝑏 ) 2
(𝑎 + 𝑏 ) 𝑏 𝑎 + 𝑏2
𝑎
1 𝑏 2𝑎 𝑏𝑒 𝑎𝑡 𝑐𝑜𝑠 𝑏𝑡 𝑏 𝑏 𝑒 𝑎𝑡 𝑠𝑖𝑛 𝑏𝑡 𝑏
ℒ −1 { 2 2 }= 2 2 𝑒 𝑎𝑡 𝑠𝑖𝑛 𝑏𝑡 − 2 2 − 2 2 + 2
𝑠 (𝑠 − 𝑎) + 𝑏 (𝑎 + 𝑏 ) (𝑎 + 𝑏 ) (𝑎 + 𝑏 ) 𝑎 + 𝑏2
𝑎 𝑏 𝑏
= 𝑒 𝑎𝑡 𝑠𝑖𝑛 𝑏𝑡 − 2 𝑒 𝑎𝑡 𝑐𝑜𝑠 𝑏𝑡 + 2
( 𝑎2 2
+𝑏 ) 2
(𝑎 + 𝑏 ) 𝑎 + 𝑏2
𝑒 𝑎𝑡 𝑏
= 2 2
(𝑎 𝑠𝑖𝑛 𝑏𝑡 − 𝑏 𝑐𝑜𝑠 𝑏𝑡) + 2
(𝑎 + 𝑏 ) 𝑎 + 𝑏2
𝑒 𝑎𝑡 𝑏
∫ 𝑓 {𝑡}𝑑𝑡 = 2 2
(𝑎 𝑠𝑖𝑛 𝑏𝑡 − 𝑏 𝑐𝑜𝑠 𝑏𝑡 ) + 2 +𝑐
(𝑎 + 𝑏 ) 𝑎 + 𝑏2
𝑏
Note that the term is a constant that can be grouped into the integration constant, by
𝑎2 +𝑏2
defining:
𝑏
𝑐′ = 𝑐 +
𝑎2 + 𝑏2
Thus,
𝑒 𝑎𝑡
∫ 𝑓{𝑡}𝑑𝑡 = (𝑎 𝑠𝑖𝑛 𝑏𝑡 − 𝑏 𝑐𝑜𝑠 𝑏𝑡) + 𝑐 ′
( 𝑎2 + 𝑏2 )
This antiderivative is consistent with the integral obtained from the Example 1 of Integration by
Euler’s Identity.
34
MATHEMATICA PARTICULARIS
B) Heaviside Expansion:
Alternatively, such inverse Laplace Transform can be performed more systematically using
Heaviside Expansion. The following is the excerpt from CHE471 Exam [1] that outlines such
method:
𝑝(𝑠 )
Heaviside Expansion: To determine the inverse Laplace ℒ −1 { }
𝑞 (𝑠 )
∑ 𝜑𝑛 (𝑎𝑛 )𝑒 𝑎𝑛𝑡
𝑛=1
Or equivalently:
𝑁
𝑝 (𝑎𝑛 ) 𝑎 𝑡
∑ 𝑒 𝑛
𝑞 ′ (𝑎𝑛 )
𝑛=1
The actual implementation will be demonstrated as follows. First, noting that the roots of the
denominator are:
35
MATHEMATICA PARTICULARIS
1 𝑏 𝑏
2 2 =
𝑠 (𝑠 − 𝑎) + 𝑏 𝑠(𝑠 − [𝑎 + √−𝑏2 ])(𝑠 − [𝑎 − √−𝑏2 ])
Performing Heaviside Expansion following the quoted outline, noting that all 3 roots are distinct
for this case:
1 𝑏
ℒ −1 { }=
𝑠 (𝑠 − 𝑎) 2 + 𝑏2
𝑏 (𝑠 − 0)
| 𝑒 0𝑡
𝑠(𝑠 − [𝑎 + √−𝑏2 ])(𝑠 − [𝑎 − √−𝑏2 ]) 𝑠→0
𝑏(𝑠 − [𝑎 + √−𝑏2 ]) 2 ]𝑡
+ | 𝑒 [𝑎+√−𝑏
𝑠(𝑠 − [𝑎 + √−𝑏2 ])(𝑠 − [𝑎 − √−𝑏2 ]) 𝑠→𝑎+√−𝑏2
𝑏(𝑠 − [𝑎 − √−𝑏2 ]) 2 ]𝑡
+ | 𝑒 [𝑎−√−𝑏
𝑠(𝑠 − [𝑎 + √−𝑏2 ])(𝑠 − [𝑎 − √−𝑏2 ]) 𝑠→𝑎−√−𝑏2
1 𝑏
ℒ −1 { }=
𝑠 (𝑠 − 𝑎) 2 + 𝑏2
𝑏 𝑏
| + | 𝑒 [𝑎+𝑖𝑏] 𝑡
(𝑠 − [𝑎 + √−𝑏2 ])(𝑠 − [𝑎 − √−𝑏2 ]) 𝑠→0
𝑠(𝑠 − [𝑎 − √−𝑏2 ]) 𝑠→𝑎+√−𝑏2
𝑏
+ | 𝑒 [𝑎−𝑖𝑏] 𝑡
𝑠(𝑠 − [𝑎 + √−𝑏2 ]) 𝑠→𝑎−√−𝑏2
1 𝑏
ℒ −1 { }=
𝑠 (𝑠 − 𝑎) 2 + 𝑏2
𝑏 𝑏
+ 𝑒 [𝑎+𝑖𝑏] 𝑡
(0 − [𝑎 + √−𝑏2 ])(0 − [𝑎 − √−𝑏2 ]) (𝑎 + √−𝑏2 )(𝑎 + √−𝑏2 − [𝑎 − √−𝑏2 ])
𝑏
+ 𝑒 [𝑎−𝑖𝑏]𝑡
(𝑎 − √−𝑏2 )(𝑎 − √−𝑏2 − [𝑎 + √−𝑏2 ])
36
MATHEMATICA PARTICULARIS
Simplifying:
1 𝑏
ℒ −1 { }=
𝑠 (𝑠 − 𝑎) 2 + 𝑏2
𝑏 𝑏 𝑏
+ 𝑒 [𝑎+𝑖𝑏]𝑡 + 𝑒 [𝑎−𝑖𝑏] 𝑡
[𝑎 + √−𝑏2 ][𝑎 − √−𝑏2 ] (𝑎 + √−𝑏2 )(2√−𝑏2 ) (𝑎 − √−𝑏2 )(−2√−𝑏2 )
1 𝑏 𝑏 𝑏 𝑏
ℒ −1 { 2 2 }= 2 2 + 𝑒 [𝑎+𝑖𝑏]𝑡 + 𝑒 [𝑎−𝑖𝑏]𝑡
𝑠 (𝑠 − 𝑎) + 𝑏 𝑎 +𝑏 (𝑎 + 𝑖𝑏) 2𝑏𝑖 (𝑎 − 𝑏𝑖 )( −2𝑏𝑖 )
𝑏 𝑏 𝑏
= + 𝑒 𝑎𝑡 [ 𝑒 [𝑖𝑏]𝑡 + 𝑒 [−𝑖𝑏]𝑡 ]
𝑎2 +𝑏 2 (𝑎 + 𝑖𝑏) 2𝑏𝑖 (𝑎 − 𝑏𝑖 )(−2𝑏𝑖 )
Substituting the famous Euler’s formula to convert the complex exponentials into trigonometric
functions:
1 𝑏
ℒ −1 { }=
𝑠 (𝑠 − 𝑎) 2 + 𝑏2
𝑏 𝑎𝑡 [
𝑏 𝑏
+ 𝑒 [ cos 𝑏𝑡 + 𝑖 sin 𝑏𝑡 ] + [𝑐𝑜𝑠 (−𝑏𝑡) + 𝑖 𝑠𝑖𝑛( −𝑏𝑡)]]
𝑎2 + 𝑏2 (𝑎 + 𝑖𝑏)2𝑏𝑖 (𝑎 − 𝑏𝑖 )(−2𝑏𝑖 )
1 𝑏
ℒ −1 { }
𝑠 (𝑠 − 𝑎) 2 + 𝑏2
𝑏 𝑏 𝑏
= + 𝑒 𝑎𝑡 [ [𝑐𝑜𝑠 𝑏𝑡 + 𝑖 𝑠𝑖𝑛 𝑏𝑡] + [𝑐𝑜𝑠 𝑏𝑡 − 𝑖 𝑠𝑖𝑛 𝑏𝑡]]
𝑎2 +𝑏 2 (𝑎 + 𝑖𝑏) 2𝑏𝑖 (𝑎 − 𝑏𝑖 )(−2𝑏𝑖 )
37
MATHEMATICA PARTICULARIS
1 𝑏
ℒ −1 { }
𝑠 (𝑠 − 𝑎) 2 + 𝑏2
𝑏 𝑎𝑡
𝑏 (𝑎 − 𝑏𝑖 )
= + 𝑒 [ [𝑐𝑜𝑠 𝑏𝑡 + 𝑖 𝑠𝑖𝑛 𝑏𝑡 ]
𝑎2 + 𝑏2 (𝑎 + 𝑖𝑏)(𝑎 − 𝑏𝑖 )2𝑏𝑖
𝑏 (𝑎 + 𝑖𝑏)
+ [𝑐𝑜𝑠 𝑏𝑡 − 𝑖 𝑠𝑖𝑛 𝑏𝑡]]
(𝑎 − 𝑏𝑖 )(𝑎 + 𝑖𝑏)(−2𝑏𝑖 )
𝑏 𝑒 𝑎𝑡 (𝑎 − 𝑏𝑖 ) (𝑎 + 𝑖𝑏)
= 2 + [ [ 𝑐𝑜𝑠 𝑏𝑡 + 𝑖 𝑠𝑖𝑛 𝑏𝑡 ] + [𝑐𝑜𝑠 𝑏𝑡 − 𝑖 𝑠𝑖𝑛 𝑏𝑡]]
𝑎 + 𝑏2 𝑎2 + 𝑏2 2𝑖 (−2𝑖 )
Collecting like terms for sine and cosine terms and rearranging:
1 𝑏
ℒ −1 { }=
𝑠 (𝑠 − 𝑎) 2 + 𝑏2
𝑏 𝑒 𝑎𝑡 (𝑎 − 𝑏𝑖 ) (𝑎 + 𝑖𝑏) (𝑎 − 𝑏𝑖 ) (𝑎 + 𝑖𝑏)
2 2
+ 2 2
[[ + ] cos 𝑏𝑡 + [ − ] 𝑖 sin𝑏𝑡] =
𝑎 +𝑏 𝑎 +𝑏 2𝑖 ( −2𝑖 ) 2𝑖 (−2𝑖 )
𝑏 𝑒 𝑎𝑡 (𝑎 − 𝑏𝑖 ) − (𝑎 + 𝑖𝑏) (𝑎 − 𝑏𝑖 ) + (𝑎 + 𝑖𝑏)
2 2 + 2 2 [[ ] 𝑐𝑜𝑠 𝑏𝑡 + [ ] 𝑖 𝑠𝑖𝑛 𝑏𝑡]
𝑎 +𝑏 𝑎 +𝑏 2𝑖 2𝑖
Simplifying gives:
1 𝑏 𝑏 𝑒 𝑎𝑡 −2𝑏𝑖 2𝑎
ℒ −1 { } = + [[ ] 𝑐𝑜𝑠 𝑏𝑡 + [ ] 𝑖 𝑠𝑖𝑛 𝑏𝑡]
𝑠 (𝑠 − 𝑎) 2 + 𝑏2 𝑎2 + 𝑏2 𝑎2 + 𝑏2 2𝑖 2𝑖
𝑒 𝑎𝑡 𝑏
= 2 2
(𝑎 𝑠𝑖𝑛 𝑏𝑡 − 𝑏 𝑐𝑜𝑠 𝑏𝑡) + 2
(𝑎 + 𝑏 ) 𝑎 + 𝑏2
𝑒 𝑎𝑡 𝑏
∫ 𝑓 {𝑡}𝑑𝑡 = (𝑎 𝑠𝑖𝑛 𝑏𝑡 − 𝑏 𝑐𝑜𝑠 𝑏𝑡 ) + +𝑐
(𝑎2 + 𝑏2 ) 𝑎2 + 𝑏2
38
MATHEMATICA PARTICULARIS
𝑏
Note that the term 𝑎2 +𝑏2 is a constant that can be grouped into the integration constant, by
defining:
𝑏
𝑐′ = 𝑐 +
𝑎2 + 𝑏2
Thus,
𝑒 𝑎𝑡
∫ 𝑓{𝑡}𝑑𝑡 = (𝑎 𝑠𝑖𝑛 𝑏𝑡 − 𝑏 𝑐𝑜𝑠 𝑏𝑡) + 𝑐 ′
( 𝑎2 + 𝑏2 )
This antiderivative is consistent with the integral obtained from the partial fraction method, as
well as the Example 1 of Integration by Euler’s Identity.
Remark:
𝑘
If you notice in Example 2, the term in a form 𝑠 would result in a constant 𝑘 after inverse
𝑘
Laplace Transform. As such, as a shortcut for antiderivative, any term can be ignored in
𝑠
performing inverse Laplace Transform for antiderivative since such constant would end up
“gobbled” by the generic constant of integration.
Note that this method transforms an integration problem into an algebraic problem. This
method allows one to obtain integrals of a function using Laplace Transform table and Heaviside
Expansion formulae. Note also this formula is in the same form as the integral properties of
Laplace Transform:
𝑡
1
ℒ {∫ 𝑓{𝑡}𝑑𝑡} = ℒ{𝑓 {𝑡}}
𝑠
0
39
MATHEMATICA PARTICULARIS
Therefore, this method is indeed consistent with the integral properties of Laplace Transform:
1
∫ 𝑓 {𝑡}𝑑𝑡 = ℒ −1 { ℒ {𝑓(𝑡)}} + 𝐶
𝑠
For usual inverse Laplace Transform, integration on the left-hand-side is used to obtain the
inverse Laplace on the right-hand-side; for this method, inverse Laplace is obtained algebraically
on the right-hand-side to bypass symbolic integration operation (which could be difficult to
perform in certain cases) on the left-hand-side.
This method was developed out of boredom in class and when I suddenly got curious
about what happens if we treat integration as a type of differential equation solution.
40
MATHEMATICA PARTICULARIS
- Rene Descartes
Summary: The solution of the differential equation of the type:
𝑑𝑦 𝑓 ′ {𝑦}
(1 − 𝑦 ) + 𝑃 {𝑥 }𝑦 = 𝑄{𝑥 }𝑓{𝑦}
𝑑𝑥 𝑓 {𝑦}
Can be transformed into a linear ordinary differential equation by the substitution:
𝑦
𝑧=
𝑓{𝑦}
Resulting in the following general solution:
𝑦 1
= ∫ 𝑄{𝑥 }𝑒 ∫ 𝑃{𝑥 }𝑑𝑥
𝑓 {𝑦} 𝑒 {𝑥} 𝑑𝑥
∫ 𝑃
41
MATHEMATICA PARTICULARIS
𝑑𝑦 𝑑𝑦
𝑑𝑧 𝑓 {𝑦} 𝑑𝑥 − 𝑦𝑓′ {𝑦} 𝑑𝑥 𝑑𝑦 1 𝑓 ′ {𝑦}
= = ( −𝑦 )
𝑑𝑥 [𝑓 {𝑦}]2 𝑑𝑥 𝑓 {𝑦} [𝑓 {𝑦}]2
We now have the equation is terms of 𝑧 transformed to in terms of 𝑦:
𝑑𝑦 1 𝑓 ′ {𝑦} 𝑦
( −𝑦 2 ) + 𝑃 {𝑥 } = 𝑄 {𝑥 }
𝑑𝑥 𝑓{𝑦} [𝑓{𝑦}] 𝑓{𝑦}
Multiplying the equation by 𝑓{𝑦} gives:
𝑑𝑦 𝑓 ′ {𝑦}
(1 − 𝑦 ) + 𝑃 {𝑥 }𝑦 = 𝑄{𝑥 }𝑓{𝑦}
𝑑𝑥 𝑓 {𝑦}
which is the equation solvable by dividing the equation by 𝑓 {𝑦} followed by substituting 𝑧 =
𝑦
.
𝑓 {𝑦}
42
MATHEMATICA PARTICULARIS
𝑑𝑧
Using chain rule for 𝑑𝑥 :
𝑑𝑧 𝑑𝑧 𝑑𝑦 𝑑𝑦
= = −𝑦 −2
𝑑𝑥 𝑑𝑦 𝑑𝑥 𝑑𝑥
𝑑𝑦
Rearranging for 𝑑𝑥 :
𝑑𝑦 𝑑𝑧
= −𝑦 2
𝑑𝑥 𝑑𝑥
Substituting this into the equation gives:
𝑑𝑧 2
−𝑦 2 − 𝑦 = −𝑥 2 𝑦 2
𝑑𝑥 𝑥
Multiplying the equation by −1 gives:
𝑑𝑧 2
𝑦2 + 𝑦 = 𝑥 2𝑦2
𝑑𝑥 𝑥
The next step is to eliminate 𝑦 from the equation so as to integrate the equation, noting that:
1
𝑦=
𝑧
Eliminating 𝑦 again gives the form of equation entirely in terms of 𝑧 and 𝑥:
1 𝑑𝑧 2 1 2
1
+ = 𝑥
𝑧 2 𝑑𝑥 𝑥 𝑧 𝑧2
Multiplying the equation by 𝑧 2 gives:
𝑑𝑧 2
+ 𝑧 = 𝑥2
𝑑𝑥 𝑥
This is a linear ordinary differential equation in the form of:
𝑑𝑧
+ 𝑃 {𝑥 }𝑧 = 𝑄 {𝑥 }
𝑑𝑥
Whereas for this case:
2
𝑃{𝑥 } =
𝑥
𝑄 {𝑥 } = 𝑥 2
The solution of such linear ordinary differential equation is:
1 1 2
𝑧= ∫ 𝑄{𝑥 }𝑒 ∫ 𝑃{𝑥} 𝑑𝑥 𝑑𝑥 = 2
∫ 𝑥 2 𝑒 ∫𝑥 𝑑𝑥 𝑑𝑥
𝑒 ∫ 𝑃 {𝑥} 𝑑𝑥 𝑒 ∫𝑥 𝑑𝑥
Evaluating the integration factor:
2
𝑒 ∫ 𝑥 𝑑𝑥 = 𝑒 2 ln 𝑥 = 𝑥 2
43
MATHEMATICA PARTICULARIS
𝒅𝒚
(𝟏 − 𝒚𝒄𝒐𝒕𝒚) + 𝑷{𝒙}𝒚 = 𝑸{𝒙}𝒔𝒊𝒏𝒚
𝒅𝒙
Note that
𝑑
𝑐𝑜𝑠𝑦 𝑑𝑦 𝑠𝑖𝑛𝑦
𝑐𝑜𝑡 𝑦 = =
𝑠𝑖𝑛𝑦 𝑠𝑖𝑛𝑦
𝑓′ (𝑦)
This is in the form of , where by comparison:
𝑓 ( 𝑦)
𝑓 (𝑦) = sin𝑦
So the equation can be solved as:
𝑑𝑧
+ 𝑃 {𝑥 }𝑧 = 𝑄 {𝑥 }
𝑑𝑥
𝑦
with 𝑧 = .
sin𝑦
44
MATHEMATICA PARTICULARIS
1
𝑧= ∫ 𝑄{𝑥 }𝑒 ∫ 𝑃{𝑥 }𝑑𝑥 𝑑𝑥
𝑒 ∫ 𝑃{𝑥} 𝑑𝑥
Or in terms of 𝑦:
𝑦 1
= ∫ 𝑃{𝑥} 𝑑𝑥 ∫ 𝑄 {𝑥 }𝑒 ∫ 𝑃{𝑥 }𝑑𝑥 𝑑𝑥
sin𝑦 𝑒
Remark:
This method works by reversing the order of the statement and adjusting the form of
equation until it matches the classical transformation solution. Similar reverse reasoning
technique can be developed for other types differential equations.
𝑓′ {𝑦}
However, for this case, the factor 1 − 𝑦 makes the form of differential equation too
𝑓{𝑦}
specific that limits its practical application. In other words, it is hard to meet this kind of
differential equation to be solved. While this method is more of a niche topic, this method is
included since it is interesting and less useless as you thought as demonstrated by the following
anecdote.
Similar generalization/reverse reasoning technique was tested in my second year midterm
of CHE222: Applied Differential Equations (2013 Winter) to derive solution for a particular
“new” class of ordinary differential equation. For unknown reason, I had a really bad insomnia
that night such that I couldn’t sleep at all. Fortunately, I managed to figure out the solution and
got a stunning 100% despite being really “drunk” without any sleep.
45
MATHEMATICA PARTICULARIS
lim 𝑓2 {𝑥 } = ∞
𝑥→∞
The relation between the 2 constants of integration of 2 functions that both diverges at infinity is
related to each other by limit evaluation:
𝒇𝟏 {𝒙}
𝑪𝟐 = −𝑪𝟏 𝒍𝒊𝒎
𝒙→∞ 𝒇𝟐 {𝒙 }
If both function of the general solution to a general differential equation diverges at infinity:
𝑦 = 𝐶1 𝑓1 {𝑥 } + 𝐶2 𝑓2 {𝑥 }
Where one of the boundary condition is given as:
lim 𝑦 = 𝐶
𝑥→∞
But
lim 𝑓1 {𝑥 } = ∞
𝑥→∞
lim 𝑓2 {𝑥 } = ∞
𝑥→∞
Derivation:
Given the general solution of an ordinary differential equation:
𝑦 = 𝐶1 𝑓1 {𝑥 } + 𝐶2 𝑓2 {𝑥 }
Where both functions 𝑓1 {𝑥 } and 𝑓2 {𝑥 } diverges as 𝑥 approaches infinity:
lim 𝑓1 {𝑥 } = ∞
𝑥→∞
lim 𝑓2 {𝑥 } = ∞
𝑥→∞
46
MATHEMATICA PARTICULARIS
Rearranging:
𝐶 𝑙𝑖𝑚 𝑓2 {𝑥}
𝑥→∞
= 𝐶1 + 𝐶2
𝑙𝑖𝑚 𝑓1 (𝑥 ) 𝑙𝑖𝑚 𝑓1 {𝑥}
𝑥→∞ 𝑥→∞
𝒚|𝒙=𝟎 = 𝟏
Note that this fulfils the criteria of the summation of infinitely growing function to be finite at
infinity, the formulas can be applied:
𝑥 +7
𝐶2 = −𝐶1 𝑙𝑖𝑚
𝑥→∞ 3𝑥 + 5
47
MATHEMATICA PARTICULARIS
𝟏 𝟐 𝑴𝜼𝟑
𝒍𝒊𝒎 𝟏𝑭𝟏 {𝒑 − ; ;− }=∞
𝜼→∞ 𝟑 𝟑 𝟗
𝟒 𝑴𝜼𝟑
𝒍𝒊𝒎 𝜼 𝟏𝑭𝟏 {𝒑; ; − }=∞
𝜼→∞ 𝟑 𝟗
48
MATHEMATICA PARTICULARIS
49
MATHEMATICA PARTICULARIS
Note that
𝟒 𝑴𝜼𝟑 𝟏 𝟒
𝜼 𝟏𝑭𝟏 {𝒑; ; − } 𝟗 𝟑 𝜼 𝟏𝑭𝟏 {𝒑; ; −𝜼𝟑 }
𝟑 𝟗 𝟑
𝒍𝒊𝒎 = ( ) 𝒍𝒊𝒎
𝜼→∞ 𝟏 𝟐 𝑴𝜼 𝟑 𝑴 𝜼→∞ 𝑭 {𝒑 − 𝟏 ; 𝟐 ; −𝜼𝟑 }
𝟏𝑭𝟏 {𝒑 − 𝟑 ; 𝟑 ; − 𝟗 } 𝟏 𝟏 𝟑 𝟑
While the following limit is only a function of 𝒑:
𝟒
𝜼 𝟏𝑭𝟏 {𝒑; 𝟑 ; −𝜼𝟑 }
𝒍𝒊𝒎 ≡ 𝒈{𝒑}
𝜼→∞ 𝟏 𝟐 𝟑
𝟏𝑭𝟏 {𝒑 − 𝟑 ; 𝟑 ; −𝜼 }
This problem fits perfectly with the concept of 2 infinite terms summing to be finite, applying
the formula:
2 1 2 𝑀𝜂3
33 1𝐹1 {𝑝 − ;
3 3 ; − 9 }
𝐶2 = −𝐶1 1 𝜂→∞
lim
4 𝑀𝜂3
𝑀3 𝜂 1𝐹1 {𝑝; 3 ; − 9 }
4 𝑀𝜂3 1 4 1
𝜂 1𝐹1 {𝑝; ; − } 9 3 𝜂 1𝐹1 {𝑝; ; −𝜂3 } 9 3
3 9 3
𝑙𝑖𝑚 = ( ) 𝑙𝑖𝑚 = ( ) 𝑔 {𝑝}
𝜂→∞ 1 2 𝑀𝜂3 𝑀 𝜂→∞ 𝐹 {𝑝 − 1 ; 2 ; −𝜂3 } 𝑀
1𝐹1 {𝑝 − 3 ; 3 ; − 9 } 1 1 3 3
Thus,
1 1
𝑀3 9 3
𝐶1 = −𝐶2 2 ( ) 𝑔{𝑝} = −𝐶2 𝑔{𝑝}
𝑀
33
And the general solution is simplified:
1
2 𝑀𝜂3 𝑀3 4 𝑀𝜂3
𝑓{𝜂} = −𝐶2 𝑔(𝑝) 1𝐹1 {𝑝 − 𝑛; ; − } + 𝐶2 2 𝜂 1𝐹1 {𝑝; ; − }
3 9 3 9
33
50
MATHEMATICA PARTICULARIS
This 𝑔{𝑝} can be obtained by evaluating the limit at various values of 𝑝, as plotted below:
5
Quartic Model, g_2(p)
4
Analytic Fit
3
2
1
0
0 0.2 0.4 0.6 0.8 1
p
Figure 4 The actual 𝒈{𝒑} obtained by evaluating the limit at various values of 𝒑
Remark:
This method to deal with infinite boundary conditions is rare in ordinary differential
equations. However, such scenario is often encountered in solving ordinary differential equations
after reducing partial differential equations by self-similarity transformations. Self-similarity
solution is an elegant method in solving partial differential equation. Compared to infinite series
expansion, it gives a closed form solution so that it is easy to understand the infinite limits
without having to evaluate the solution numerically. In fact, I would say infinite series solution is
almost useless because they give an infinite series that is computationally expensive to evaluate,
after all those cumbersome derivation work; if one is to choose brute force method, numerical
method such as finite element method would serve such purpose better.
As hinted in Example 2, this method was developed to solve the partial differential
equations for concentration profile in a parallel plate electrolyzer. In fact, this problem dealing
with diverging infinite functions having finite boundary value at infinity bugged me for almost
51
MATHEMATICA PARTICULARIS
entire term when I was developing the solution for the problem proposed. I got stuck in that
problem for long because simple substitution always gave me a trivial solution where everything
is zero, which made no sense. I kept pondering: how can summation of 2 infinite terms become
finite? It just turned out, in some Eureka moment that I could adjust the integration constants so
precisely that they cancel each other out.
52
MATHEMATICA PARTICULARIS
Chapter 3
Numerical Methods
A journey of a thousand miles begins with a single step.
-Lao-Tzu
Often, analytic solution as in previous sections could not be obtained due to complexity
of the equations of interest. In this case, we find ourselves in uncharted territories of mathematics
where there is no readily-made closed form solutions. How do we deal with that? The answer is
that we need to develop some ad hoc solution to fit our purpose. Numerical analysis is a richer
topic because it is more diversified to suit a range of purposes and it is more intuitive to
understand. While the concepts in this chapter are often presented with example, the concepts are
fundamentally related to the abstract study of algorithm involving many cells. As such, actual
practice with numerical software like Excel is recommended because the formulas alone could
not explain the algorithm adequately without practice.
−1
𝑓 {𝑓𝑛−1 } − 𝑥
𝑓𝑛+1 = 𝑓𝑛−1 −
𝑓 ′ {𝑓𝑛−1 }
Where the initial guess 𝑓0−1 = 𝑥
53
MATHEMATICA PARTICULARIS
Derivation:
Consider the duo of the graphs 𝑓 {𝑥 } and 𝑓 −1 {𝑥 }. It is well-known that the 2 curves are reflection
of each other around the line of 𝑦 = 𝑥. This important properties will be used to derive the
equation:
𝑓(𝑥)
𝑦 =𝑥
𝐵: (𝑥 + 𝑑, 𝑓 {𝑥 + 𝑑 })
𝐶:
(𝑓 {𝑥 + 𝑑 },𝑓 {𝑥 + 𝑑 }) = (𝑥, 𝑥 )
y
𝑀:
1 1
(𝑥 + 𝑑, 𝑥 + 𝑑) 𝑓 −1 (𝑥)
2 2
𝐷: 𝐴: (𝑥, 𝑓 −1 {𝑥 })
(𝑥 + 𝑑, 𝑥 + 𝑑 ) = (𝑓 −1 {𝑥 },𝑓 −1 {𝑥 })
x
54
MATHEMATICA PARTICULARIS
Such equations can be solved numerically by various methods. For convenience, Newton-
Raphson method is chosen since it only requires a single point while 𝑑 = 0 ⇒ 𝑓 −1 = 𝑥 is
an obvious initial single point guess to start for iteration.
For convenience of using the method, rewriting the 𝑥 + 𝑑 term as 𝑓 −1 :
𝑓 −1 = 𝑥 + 𝑑
At initial guess of zero reflection distance, the
𝑑0 = 0 ⇒ 𝑓0−1 = 𝑥 + 𝑑0 = 𝑥
The function to be solved for root numerically is obtained by rearranging the equation:
𝑔{𝑓 −1 } ≡ 0 = 𝑓{𝑓 −1 } − 𝑥
Differentiating the function:
𝑔′ {𝑓 −1 } = 𝑓 ′ {𝑓 −1 }
By Newton-Raphson method, the guess can be revised to higher precision by the following
iteration:
−1
𝑔 {𝑓𝑛−1 } 𝑓{𝑓𝑛−1 } − 𝑥
𝑓𝑛+1 = 𝑓𝑛−1 −1
− ′ −1 = 𝑓𝑛 −
𝑔 {𝑓𝑛 } 𝑓 ′ {𝑓𝑛−1 }
For instance, starting with the initial guess 𝑓0−1 = 𝑥
𝑓{𝑓0−1 } − 𝑥
𝑓1−1 = 𝑓0−1 −
𝑓 ′ {𝑓0−1 }
Example:
Example 1: The first example is illustrative, to evaluate natural logarithm numerically using
exponential functions:
𝒇 −𝟏 {𝒙} = 𝒍𝒏 𝒙
At 𝒙 = 𝟎. 𝟓
The original function is
𝑓 {𝑥 } = 𝑒 𝑥
The equation to be solved numerically is:
𝑓{𝑥 + 𝑑 } = 𝑒 𝑥+𝑑 = 𝑥
Substituting the 𝑥 desired:
55
MATHEMATICA PARTICULARIS
𝑒 0.5+𝑑 = 0.5
This can be solved by Goal Seek or Solver in Excel to yield
𝑑 = −1.0178
𝑓 −1 {0.5} = 0.18224 = ln 0.5
Alternatively, the more compact Newton-Raphson scheme can be used. Rewriting in compact
form,
−1
𝑒𝑓 = 0.5
Differentiating the original function:
−1
𝑑(𝑒 𝑓 ) −1
−1
= 𝑒𝑓
𝑑 (𝑓 )
Applying the formulae:
−1
𝑒 𝑓𝑛 − 0.5
𝑓𝑛−1
+1 = 𝑓𝑛−1 − −1
𝑒 𝑓𝑛
With 𝑓0−1 = 𝑥 = 0.5
The following is the algorithm implemented in Excel:
0 0.5 1.648721
1 -0.19673 0.821409
2 -0.58802 0.555424
3 -0.68781 0.502676
4 -0.69313 0.500007
5 -0.69315 0.5
56
MATHEMATICA PARTICULARIS
Example 2: The second example demonstrates that what happens if there is multiple roots to
the equation.
Find the reflection distance 𝒅 for the following inverse function:
𝒇−𝟏 {𝒙} = √𝒙
At 𝒙 = 𝟏. 𝟓
Defining the original function:
𝑓 {𝑥 } = 𝑥 2
The function to be solved is:
𝑓{𝑥 + 𝑑 } = (𝑥 + 𝑑 )2 = 𝑥
Substituting gives:
(𝑥 + 𝑑 )2 = 𝑥
Substituting the values of 𝑥 desired gives:
(1.5 + 𝑑 )2 = 1.5
Solving numerically reveals that there are 2 solutions for 𝑑:
𝑑1 = −0.275
𝑑2 = −2.725
Thus the inverse functions are:
𝑓 −1 {1.5} = 1.225, −1.225
So it turns out that there are 2 solutions if simple reflection is used. This is due to the fact that a
many-to-one relation would result in one-to-many relation for the inverse. For instance, there are
2 resulting 𝑓 −1 {𝑥 } for this case.
Newton-Raphson Scheme, however, would also yield 2 roots, provided that different initial
guesses are used.
Alternatively, the more compact Newton-Raphson scheme can be used. Rewriting in compact
form,
( 𝑓 −1 )2 = 1.5
Differentiating the original function:
𝑑([𝑓 −1 ]2 )
= 2𝑓 −1
𝑑 (𝑓 −1 )
Applying the formulae:
−1
2𝑓 −1 − 0.5
𝑓𝑛+1 = 𝑓𝑛−1 −
(𝑓 −1 )2
57
MATHEMATICA PARTICULARIS
The initial guess for multiple root is more interesting. For convenient approach gives:
𝑓0−1 = 𝑥 = 1.5
This yields 𝑓 −1 = 1.225 as the solution:
f^-1(x) f(x)
n
0 1.5 2.25
1 1.25 1.5625
2 1.225 1.500625
If we plot the graphs numerically, we see that we have missed out another root 𝑓 −1 = −1.225.
𝑦=𝑥
1.5
1
𝑑1
0.5
𝑓{ 𝑥 } 𝑑2
y
0
-1.5 -1 -0.5 0 0.5 1 1.5 2
-0.5
-1 𝑓 −1 {𝑥}
-1.5
x
58
MATHEMATICA PARTICULARIS
This is solved by repeating the iteration algorithm, but with another initial guess. Seeing that 𝑓 −1
is negative, we choose a point close enough to the desired answer, let’s say 𝑓0−1 = −𝑥 = −1.5:
f^-1(x) f(x)
n
0 -1.5 2.25
1 -1.25 1.5625
2 -1.225 1.500625
As can be seen, the algorithm converged to another root after repeating with another initial
guess. In general, Newton-Raphson method converges to the closer root; the nearest root without
any turning point between the guess and the root.
Remark:
This method provides an excellent numerical way to obtain the inverse function of a
problem. In the past, the inverse function was usually evaluated by switching the columns of 𝑥
and 𝑦, or by extrapolation graphically/numerically. This method offers a faster yet simpler
numerical approach to evaluate inverse function.
However, if the original function is a many-to-one function, there would be multiple
roots to the equation, such that an inverse function does not exist by definition. The values would
still be obtained numerically as multiple roots but it is up to the user to define which one is more
relevant depending on purpose: Which value makes more sense? For instance, in dealing with
mole fractions, anything other than [0,1] would not make any sense and is therefore extraneous.
59
MATHEMATICA PARTICULARIS
You don't learn to walk by following rules. You learn by doing, and by falling over.
― Richard Branson
Summary:
Bisection method can be implemented in Excel easily without even using VBA programming.
Derivation:
The classical bisection method is used for various numerical analysis for root-solving. Suppose
the goal is to plot the root 𝑥 of a function 𝑓 {𝑥, 𝑎} with respect to a changing but controlled
parameter 𝑎. Starting with the given function to be solved for root:
𝑓{𝑥, 𝑎} = 0
With the following initial guess range:
[𝑥𝑙,0 , 𝑥𝑢,0 ]
For each iteration, the midpoint between the 2 bracketing limits is obtained:
𝑥𝑙,𝑛 + 𝑥𝑢,𝑛
𝑥𝑚,𝑛 =
2
The functions are compared and the midpoint with whichever the same sign of lower or upper
limit will be the lower or upper limit for the next iteration and repeat:
𝑥𝑚,𝑛 , 𝑓{𝑥𝑢,𝑛 , 𝑎}𝑓{𝑥𝑚,𝑛 , 𝑎} > 0
𝑥𝑢,𝑛+1 = {
𝑥𝑢,𝑛 , 𝑓{𝑥𝑢,𝑛 , 𝑎}𝑓{𝑥𝑚,𝑛 , 𝑎} < 0
𝑥𝑚,𝑛 , 𝑓{𝑥𝑙,𝑛 , 𝑎}𝑓{𝑥𝑚,𝑛 , 𝑎} > 0
𝑥𝑙,𝑛+1 = {
𝑥𝑙,𝑛 , 𝑓{𝑥𝑙,𝑛 , 𝑎}𝑓{𝑥𝑚,𝑛 , 𝑎} < 0
Such bisection algorithm is normally coded in Excel VBA. However, a more convenient form in
Excel table cells can be implemented:
Parameter Root 0 𝑛 = 𝑛𝑢𝑚𝑏𝑒𝑟𝑜𝑓𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛
𝑎 𝑓{𝑥, 𝑎} … 𝑥𝑢,𝑛 𝑓{𝑥𝑙,𝑛 , 𝑎} 𝑥𝑙,𝑛+1 𝑓{𝑥𝑢,𝑛 , 𝑎} 𝑥𝑚,𝑛 𝑓{𝑥𝑚,𝑛 , 𝑎}
≈ 𝑥𝑚,𝑛
Where
𝑥𝑚,𝑛−1 , 𝑓{𝑥𝑢,𝑛−1 }𝑓{𝑥𝑚,𝑛−1 } > 0
𝑥𝑢,𝑛 = {
𝑥𝑢,𝑛−1 , 𝑓{𝑥𝑢,𝑛−1 }𝑓{𝑥𝑚,𝑛−1 } < 0
60
MATHEMATICA PARTICULARIS
𝒇𝟐𝑬𝑩,𝒆𝒒𝑷
𝑲𝒑 =
(𝟏 + 𝒓 + 𝒇𝑬𝑩,𝒆𝒒)(𝟏 − 𝒇𝑬𝑩,𝒆𝒒)
𝟏𝟓𝟐𝟎𝟎
𝑲𝒑 = 𝟖. 𝟐×𝟏𝟎𝟓 𝒆− 𝑻 𝑴𝑷𝒂
𝑷 = 𝟎. 𝟏𝟒𝑴𝑷𝒂
𝒓 = 𝟏𝟓
Substituting the given terms into the given equation results in:
15200 2
0.14𝑓𝐸𝐵 ,𝑒𝑞
8.2×105 𝑒 − 𝑇 =
(1 + 15 + 𝑓𝐸𝐵,𝑒𝑞 )(1 − 𝑓𝐸𝐵,𝑒𝑞 )
2
𝑓𝐸𝐵
15200 ,𝑒𝑞 𝑃
𝐹 {𝑓𝐸𝐵 , 𝑇} = 8.2×105 𝑒 − 𝑇 −
(1 + 𝑟 + 𝑓𝐸𝐵,𝑒𝑞 )(1 − 𝑓𝐸𝐵,𝑒𝑞 )
61
MATHEMATICA PARTICULARIS
To plot 𝑓𝐸𝐵 against 𝑇, the above equations above must be solved for every assumed value of 𝑇.
Goal Seek, however, requires manually clicking to solve point by point, which clearly is not
feasible if one is to plot a graph of hundreds of points.
A bisection method is used to automatically solve the equation for every point. We note that as
the fractional conversion, 𝑓𝐸𝐵 must have value between 0 and 1 for it to have any physical
meaning. However, the values of 0 and 1 for 𝑓𝐸𝐵 results in error in Excel sheet, since they would
result in division by zero.
So values of 𝑓𝐸𝐵 ∈ (1×10−7 , 0.9999999) is used as the initial range for the bisection method.
𝑎0 = 1×10−7
𝑏0 = 0.9999999
p=0
𝑥𝑎 𝑦𝑎 𝑥𝑏 𝑦𝑏 𝑥𝑚 𝑦𝑚
62
MATHEMATICA PARTICULARIS
p=1
𝑥𝑎 𝑦𝑎 𝑥𝑏 𝑦𝑏 𝑥𝑚 𝑦𝑚
p=p-1
𝑥𝑎 𝑦𝑎 𝑥𝑏 𝑦𝑏 𝑥𝑚 𝑦𝑚
63
MATHEMATICA PARTICULARIS
p=p
𝑥𝑎 𝑦𝑎 𝑥𝑏 𝑦𝑏 𝑥𝑚 𝑦𝑚
Eventually 𝑥𝑚,𝑝 would converge to a value that is the numerical root to the equation 𝐹{𝑥𝑚,𝑝 } =
0. For simplicity, 𝑝 = 25 iterations are used for every point of the plot.
64
MATHEMATICA PARTICULARIS
The numerical solution gives a plot in excellent agreement with the plot in textbook [3]:
0.5
0.4
0.3
0.2
0.1
0
400 500 600 700 800 900 1000 1100 1200
T (K)
Example 2: The second example is the very classical liquid-vapor equilibrium diagram
algorithm for CHE323 (Engineering Thermodynamics) and CHE1142 (Applied Chemical
Thermodynamics):
Using the following data and guideline, plot the T-xy equilibrium diagram for a flash drum
𝑳 𝑽
calculation. Obtain the following flash output: 𝒙𝟏 , 𝒙𝟐 , 𝒚𝟏 , 𝒚𝟐 , , , 𝑻𝒃𝒖𝒃𝒃𝒍𝒆 (𝑲) , 𝑻𝒅𝒆𝒘 (𝑲).
𝑭 𝑭
65
MATHEMATICA PARTICULARIS
66
MATHEMATICA PARTICULARIS
Component 1 2
Name Water Ethanol
𝑨 𝟏𝟔. 𝟑𝟖𝟕𝟐 𝟏𝟔. 𝟖𝟗𝟓𝟖
𝑩 𝟑𝟖𝟖𝟓. 𝟕 𝟑𝟕𝟗𝟓. 𝟏𝟕
𝑪 𝟐𝟑𝟎. 𝟏𝟕 𝟐𝟑𝟎. 𝟗𝟏𝟖
Margules Parameters:
𝑨𝟏𝟐 = 𝟎. 𝟖𝟐𝟏𝟒
𝑨𝟐𝟏 = 𝟏. 𝟖𝟒𝟓
Flash Conditions:
𝑷𝒇𝒍𝒂𝒔𝒉 (𝒂𝒕𝒎) = 𝟏. 𝟒𝟖𝒂𝒕𝒎
𝑻𝒇𝒍𝒂𝒔𝒉 (𝑲) = 𝟑𝟕𝟎𝑲
𝒛𝟏 = 𝟎. 𝟕
𝒛𝟐 = 𝟎. 𝟑
67
MATHEMATICA PARTICULARIS
68
MATHEMATICA PARTICULARIS
It is to be left to the reader to demonstrate that the solution results in the below diagram, also
explained as a video [4]:
385 T, x_1
Temperature, T (K)
380 T, y_1
z_1=0.7,
370
T_flash=370K
365 y_1=0.5665
T_bubble=363.61K
360
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Mol Fraction of Component 1
69
MATHEMATICA PARTICULARIS
Remark:
This method arose from trying to plot the roots of solving hundreds of equations for
CHE333 teaching assistantship to develop the Excel equivalent of programming EZSolve
(phased out over time) to solve the chemical reaction engineering problems numerically.
Traditionally, students tend to solve manually, either by Excel Solver Add-in or Goal Seek.
While manual Solver or Goal seek make more sense than coding such automatic solving scheme
for a few equations, the manual approach obviously would not make any sense for such a graph
with hundreds of points to be solved individually.
On the other hand, the root-solving coding using Excel VBA would involve a learning
curve and would not be feasible to be used easily by the general public, including the students.
Such long learning curve would also distract the students from the actual science of the syllabus
(in this case chemical reaction engineering) involved; they were in the class to learn the chemical
reaction engineering and not programming.
Finally, this method saves the hassle to update the values manually by pressing the “Run”
VBA code, since the Excel cells will update the values automatically in real time fashion. This
could eliminate any human error from forgetting to update the values, not to mention the magical
sensation created in the following project video in CHE1142: Applied Chemical Engineering
Thermodynamics [4].
70
MATHEMATICA PARTICULARIS
1 2 3
Newton-Raphson Yes No No
False Position/Regula Yes No No
Falsi
Bisection Yes Yes No
Modified Bisection Yes Yes Yes
71
MATHEMATICA PARTICULARIS
The simplest remedy is to transform Type III to Type I, simply by multiplying the function with
the slope.
𝑔{𝑥 } = 𝑓 {𝑥 }𝑓 ′ {𝑥 }
Solving such transformed function 𝑔 {𝑥 } yields the root desired.
Example: The simplest example involving solving a quadratic equation numerically is used to
illustrate the concept.
Find the root numerically for the following function:
(𝒙 − 𝟏)𝟐 = 𝟎
Using the initial guess range of [𝟎, 𝟐. 𝟓]
The function to be solved is:
𝑓 {𝑥 } = (𝑥 − 1)2 = 0
Obtaining the derivative:
𝑓 ′ {𝑥} = 2(𝑥 − 1) = 2𝑥 − 2
The equation to be solved numerically is then:
𝑔{𝑥 } = 𝑓 {𝑥 }𝑓 ′ {𝑥 } = (𝑥 − 1)2 (2𝑥 − 2)
Obviously, it is known the true answer here is 𝑥 = 1. But the demonstrate the concept, assume
that this is not known apriori
The bisection method is used for its robustness, which is useful if one does not know about the
nature of the equation/function to be solved.
As given in the problem statement, the initial guesses of 𝑥𝑙,0 = 0 and 𝑥𝑢,0 = 2.5 will be used.
For each iteration, the midpoint between the 2 bracketing limits is obtained:
𝑥𝑙,𝑛 + 𝑥𝑢,𝑛
𝑥𝑚,𝑛 =
2
The functions are compared and the midpoint with whichever the same sign of lower or upper
limit will be the lower or upper limit for the next iteration and repeat:
𝑥𝑚,𝑛 , 𝑔{𝑥𝑢,𝑛 }𝑔{𝑥𝑚,𝑛 } > 0
𝑥𝑢,𝑛+1 = {
𝑥𝑢,𝑛 , 𝑔{𝑥𝑢,𝑛 }𝑔{𝑥𝑚,𝑛 } < 0
𝑥𝑚,𝑛 , 𝑔{𝑥𝑙,𝑛 }𝑔{𝑥𝑚,𝑛 } > 0
𝑥𝑙,𝑛+1 = {
𝑥𝑙,𝑛 , 𝑔{𝑥𝑙,𝑛 }𝑔{𝑥𝑚,𝑛 } < 0
72
MATHEMATICA PARTICULARIS
73
MATHEMATICA PARTICULARIS
Note that 𝑒 value (fraction or percent basis) of the above table represents the error or deviation
from the true answer:
𝑥𝑚,𝑛 − 𝑥𝑡𝑟𝑢𝑒
𝑒𝑛 =
𝑥𝑡𝑟𝑢𝑒
Where 𝑥𝑡𝑟𝑢𝑒 is 1 as mentioned previously.
As can be seen numerically and confirmed by the decreasing error % (e%), the 𝑥𝑚 value
converges to 1, which is the true answer.
The original function, first derivative and the transformed function is compared as follows:
74
MATHEMATICA PARTICULARIS
Remark:
This method is a semi-brute-force method in that it reduces the complication of having to
deal with a root that just right touched the x-axis, at the cost of more complex evaluation. While
derivative could not usually be obtained in analytic form as in the Example, the derivative can be
approximated numerically by slope of function at 2 points in vicinity:
𝑓 {𝑥 2 } − 𝑓 {𝑥 1 }
𝑓 ′ {𝑥 } ≈
𝑥2 − 𝑥1
In a more computation economic algorithm, the values from previous iteration can be
used to approximate such derivative:
𝑓 {𝑥𝑛 } − 𝑓 {𝑥𝑛−1 }
𝑓 ′ {𝑥 } ≈
𝑥𝑛 − 𝑥𝑛−1
For instance, the derivative at lower bracket limit of 𝑥 can be approximated using present
and previous steps:
𝑓{𝑥𝑢,𝑛 } − 𝑓{𝑥𝑢,𝑛−1 }
𝑓 ′ {𝑥𝑢 } ≈
𝑥𝑢,𝑛 − 𝑥𝑢,𝑛−1
Such that evaluating more points is merely needed at the first iteration 𝑛 = 0. This could
greatly save computation time for algorithm.
Note that this method would result in both the turning points and the roots. The turning points are
extraneous roots due to multiplication of zeros. Thus, in actual implementation, 𝑓 {𝑥 } is evaluated
for each root to determine if it is really a root or just a turning point. On the bright side, this also
allows turning point to be obtained as by-product of the algorithm.
75
MATHEMATICA PARTICULARIS
Basically, this method partitions a big set of linear equations of 𝑚 unknowns into a multiple of
independent 3 equations, after which can be solved using the equations solver of calculator to
obtain the solutions.
Derivation:
If a system of linear equations of 𝑛 unknowns and 𝑛 equations is to be solved:
𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 + ⋯ 𝑎1𝑛 𝑥𝑛 = 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + 𝑎23 𝑥3 + ⋯ 𝑎2𝑛 𝑥𝑛 = 𝑏2
The system can be represented in matrix form:
𝑎11 ⋯ 𝑎1𝑛 𝑏1
[ ⋮ ⋱ ⋮ |⋮]
𝑎𝑛1 ⋯ 𝑎𝑛𝑛 𝑏𝑛
This 𝑛 equations and 𝑛 unknowns system can be subdivided, by Gaussian elimination, into block
matrix subsystems that are independent of each other. For simplicity, it will be divided into
subsystems of 3 equations and 3 unknowns:
𝐴1 ⋯ … 𝐵1
𝐴=[ ⋮ ⋱ ⋮ | ⋮ ]
0 ⋯ 𝐴𝑚 𝐵𝑚
A set of n equations and n unknowns can be partitioned into 𝑚 sets of 3𝑥3 systems and 1
remainder set of 𝑟×𝑟 systems, where
𝑟 = 𝑛𝑚𝑜𝑑3
76
MATHEMATICA PARTICULARIS
For instance,
A 5x5 system can be divided into a 3x3 system and 2x2 system:
𝑎11 𝑎12 𝑎13 𝑎14 𝑎15 𝑏1 𝐴1,11 𝐴1,12 𝐶1,11 𝐶1,12 𝐶1,13 𝐵1,1
𝑎21 𝑎22 𝑎23 𝑎24 𝑎25 𝑏2 𝐴1,21 𝐴1,22 𝐶1,21 𝐶1,22 𝐶1,23 | 𝐵1,2
𝑎31 𝑎32 𝑎33 𝑎34 |
𝑎35 𝑏3 =
0 0 𝐴2,11 𝐴2,12 𝐴2,13 𝐵2,1
𝑎41 𝑎42 𝑎43 𝑎44 𝑎45 |𝑏4 𝐴2,21 𝐴2,22 𝐴2,23 | 𝐵2,2
0 0
[𝑎51 𝑎52 𝑎53 𝑎54 𝑎55 𝑏5 ]
0 0 𝐴2,31 𝐴2,32 𝐴2,33 𝐵2,3 ]
[
For this case, 𝑟 = 5𝑚𝑜𝑑3 = 2
Example:
Example 1: This is a problem often encountered in linear algebra class.
Solve the following system of equations:
𝟏 𝟐 𝟒 𝟑 𝟓 𝟓
𝟑 𝟓 𝟑 𝟏 𝟐 𝟔
𝟏 𝟒 𝟒 𝟐 𝟏 ||𝟕
𝟒 𝟏 𝟐 𝟓 𝟑 𝟖
[𝟓 𝟐 𝟏 𝟒 𝟏 𝟗]
This 5x5 matrix can be partitioned into coupled 3x3 and 2x2 systems. To do so, Gaussian
elimination operation is needed to eliminate some elements of the matrix (Double brackets will
be used to refer to formula number based on rows of previous matrix):
1 2 4 3 5 5 1 2 4 3 5 5
3 5 3 1 2 6 3 5 3 1 2 6
1 4 4 2 1 ||7 → ⟦3⟧ − ⟦1⟧ 0 2 0 −1 −4 || 2
4 1 2 5 3 8 ⟦4⟧ − 4⟦1⟧ 0 −7 −14 −7 −17 −12
[5 2 1 4 1 9] ⟦5⟧ − 5⟦1⟧ [0 −8 −19 −11 −24 −16]
1 2 4 3 5 5
3 5 3 1 2 6
→7 0 2 0 −1 −4 || 2
⟦3⟧ + ⟦4⟧ 0 0 −14 −10.5 −31 −5
2 [0 0 −19 −15 −40 −8]
4⟦3⟧ + ⟦5⟧
1 2 4 3 5 5
⟦2⟧ − 3⟦1⟧ 0 −1 −9 −8 −13 −9
→ 0 2 0 −1 −4 || 2
0 0 −14 −10.5 −31 −5
[0 0 −19 −15 −40 −8]
1 2 4 3 5 5
0 −1 −9 −8 −13 −9
→ ⟦3⟧ + 2⟦2⟧ 0 0 −18 −17 −30 ||−16
0 0 −14 −10.5 −31 −5
[0 0 −19 −15 −40 −8 ]
77
MATHEMATICA PARTICULARIS
At this point, note that the bottom 3 rows has no coefficient for 𝑥1 and 𝑥2, thus it is a 3x3 system
involving 𝑥3 , 𝑥4 ,𝑥5 only as a subsystem:
−18 −17 −30 −16
[−14 −10.5 −31 | −5 ]
−19 −15 −40 −8
This 3x3 subsystem can be readily solved by the built-in 3x3 equations solver in a conventional
scientific calculator. Doing so yields:
𝑥3 = 87
𝑥4 = −55
41
𝑥5 = − = −20.5
2
These 𝑥3 , 𝑥4 , 𝑥5 obtained can then be substituted into the top 2 rows of the original system after
rearrangement:
1 2 5 − 4𝑥3 − 3𝑥4 − 5𝑥5 1 2 5 − 4(87) − 3(−55) − 5( −20.5)
[ | ]=[ | ]
0 −1 −9 + 9𝑥 3 + 8𝑥 4 + 13𝑥 5 0 −1 −9 + 9(87) + 8(−55) + 13( −20.5)
This results in another 2x2 subsystem for 𝑥1 and 𝑥2:
1 2 −75.5
[ | ]
0 −1 67.5
Again, this 2x2 subsystem can be readily solved by the built-in 2x2 equations solver in a
conventional scientific calculator. Doing so yields:
𝑥1 = 59.5
𝑥2 = −67.5
Thus, the answer is, in terms of vector matrix of the variables:
𝑥1 59.5
𝑥2 −67.5
𝑥3 = 87
𝑥4 −55
[𝑥5 ] [−20.5]
As you have noticed, this method greatly eliminates the number of elements to be eliminated
manually in an exam setting.
78
MATHEMATICA PARTICULARIS
a) Write mass balance equations and determine fugacities of the chemical in air (𝒇𝟏 ), water
(𝒇𝟐 ), soil (𝒇𝟑 ) and sediment (𝒇𝟒 ).”
79
MATHEMATICA PARTICULARIS
80
MATHEMATICA PARTICULARIS
81
MATHEMATICA PARTICULARIS
82
MATHEMATICA PARTICULARIS
The optimization problem is then transformed into solving the following simultaneous equation
(not necessarily linear):
𝑓𝑥 (𝑥, 𝑦) 𝑔𝑦 (𝑥, 𝑦, 𝛼 ) − 𝑓𝑦 (𝑥, 𝑦)𝑔𝑥 (𝑥, 𝑦, 𝛼 ) = 0
𝑓𝑥 (𝑥, 𝑦) ℎ𝑦 (𝑥, 𝑦, 𝛽 ) − 𝑓𝑦 (𝑥, 𝑦)ℎ𝑥 (𝑥, 𝑦, 𝛽 ) = 0
83
MATHEMATICA PARTICULARIS
Example:
Example 1: Find (𝒙, 𝒚) such that
𝒇 (𝒙, 𝒚) = 𝟐𝒙𝒚 + 𝟐𝒙 − 𝒙𝟐 − 𝟐𝒚𝟐
is maximized.
Conventional Answer:
𝑓𝑥 (𝑥, 𝑦) = 2𝑦 + 2 − 2𝑥 = 0
𝑓𝑦 (𝑥, 𝑦) = 2𝑥 − 4𝑦 = 0
Solving the two equations yields (𝑥, 𝑦) = (2,1).
Performing second partial derivative test (Hessian determinant):
𝑓𝑥𝑥 = −2 < 0
𝑓𝑦𝑦 = −4
𝑓𝑥𝑦 = 2
2
𝐻(𝑥, 𝑦) = 𝑓𝑥𝑥 𝑓𝑦𝑦 − (𝑓𝑥𝑦 ) = (−2)( −4) − (22 ) = 4 > 0
Confirms that the function is local maximum at (2,1), since 𝐻(𝑥, 𝑦) > 0 and 𝑓𝑥𝑥 < 0.
Extremum Locus Construction:
Using the weaving function
𝑔 (𝑥, 𝑦, 𝛼 ) = 𝑥 + 𝑦 − 𝛼 = 0
𝑓𝑥 (𝑥, 𝑦) = 2𝑦 + 2 − 2𝑥
𝑓𝑦 (𝑥, 𝑦) = 2𝑥 − 4𝑦
𝑔𝑥 (𝑥, 𝑦, 𝛼 ) = 1
𝑔𝑦 (𝑥, 𝑦, 𝛼 ) = 1
𝑓𝑥 (𝑥, 𝑦)𝑔𝑦 (𝑥, 𝑦, 𝛼 ) − 𝑓𝑦 (𝑥, 𝑦) 𝑔𝑥 (𝑥, 𝑦, 𝛼 ) = (2𝑦 + 2 − 2𝑥 ) − (2𝑥 − 4𝑦) = 6𝑦 + 2 − 4𝑥 = 0
2𝑥−1
From this we get that 𝑦 = .
3
2𝑥−1
The physical meaning of the equation 𝑦 = is that, the extremum point must lie somewhere
3
2𝑥−1
along the line 𝑦 = on the xy-plane. By searching along the line for extremum point, the
3
84
MATHEMATICA PARTICULARIS
𝟐𝒙−𝟏
The equation 𝒚 = defines the domain for which every point inside is the extremum among
𝟑
every point located in 𝒙 + 𝒚 − 𝜶 = 𝟎 containing the point. The unconstrained extremum, which
𝟐𝒙−𝟏
should be the extremum among the extrema, should then lie on the line 𝒚 = .
𝟑
85
MATHEMATICA PARTICULARIS
Therefore the extremum point is (𝑥, 𝑦) = (2,1), consistent with the correct answer. Second
partial derivative test follows to show that it is the local maximum point.
Choice 2: Maximize
𝑓(𝑥, 𝑦) = 2𝑥𝑦 + 2𝑥 − 𝑥 2 − 2𝑦 2
2𝑥−1
With the constrain 𝑦 = .
3
Constrain: 3𝑦 − 2𝑥 + 1 = 0
Lagrange function
𝐹 = 2𝑥𝑦 + 2𝑥 − 𝑥 2 − 2𝑦 2 + 𝜆 (3𝑦 − 2𝑥 + 1)
𝐹𝑥 = 2𝑦 + 2 − 2𝑥 − 2𝜆 = 0
𝐹𝑦 = 2𝑥 − 4𝑦 + 3𝜆 = 0
𝐹𝜆 = 3𝑦 − 2𝑥 + 1 = 0
Solving the 3 simultaneous equations yields (𝑥, 𝑦) = (2,1), the correct answer.
Choice 3: Another extremum locus can be constructed, and the extremum is located on the
intersection of the two loci:
ℎ(𝑥, 𝑦, 𝛽 ) = 𝑥 2 + 𝑦 2 − 𝛽 2 = 0
ℎ𝑥 (𝑥, 𝑦, 𝛽 ) = 2𝑥
ℎ𝑦 (𝑥, 𝑦, 𝛽 ) = 2𝑦
𝑓𝑥 (𝑥, 𝑦)ℎ𝑦 (𝑥, 𝑦, 𝛽 ) − 𝑓𝑦 (𝑥, 𝑦) ℎ𝑥 (𝑥, 𝑦, 𝛽 ) = (2𝑦 + 2 − 2𝑥 )(2𝑦) − (2𝑥 − 4𝑦) (2𝑥) = 0
which leads to
4𝑦 2 + 4𝑦 − 4𝑥𝑦 − 4𝑥 2 + 8𝑥𝑦 = 0 ⇒ 𝑦 2 + 𝑦 + 𝑥𝑦 − 𝑥 2 = 0
2𝑥−1
With 𝑦 = :
3
Using second partial derivative test confirms that (2,1) is the correct answer rather than
(−1, −1).
86
MATHEMATICA PARTICULARIS
The points (−𝟏, −𝟏) and (𝟐, 𝟏) define the intersect between the curves 𝒚𝟐 + 𝒚 + 𝒙𝒚 − 𝒙𝟐 = 𝟎
𝟐𝒙−𝟏
and 𝒚 = , the unconstrained extremum should be either of the two points.
𝟑
Remarks:
This technique could be extended to solve optimization problems of higher dimensions
(more variables). If further developed, this technique could also provide an alternative (perhaps
faster) way to solve optimization along finite domain (for example a square bounded by 𝑥 = 1,
𝑥 = 3,𝑦 = 2,𝑦 = 4).
This technique is interesting in that it is groups a domain into subdomains and evaluate
individually. Suppose you want to find the richest person in a country, there are 2 approaches.
One, you search through the population of an entire country and look for the richest person
87
MATHEMATICA PARTICULARIS
(analogous to conventional method), but this could be too overwhelming to do. Two, you divide
the population into subsets of each cities, find richest person in each cities, and then compare
against the richest person in each cities (a much smaller set than entire country) for the richest
person in the country (analogous to extremum locus construction); this could either be not worth
the partitioning efforts or would be good idea, depending on the situation. As you can see, the
second method is partitions the 𝑥𝑦 space into a subset of parameterized curves, and then compare
the extremum at every curve for the global extremum. While whichever of method 1 or 2 is
easier depends on the case, this offers a way to break a problem down into smaller pieces rather
than having to “gobble” the entire problem all at once.
This method is in fact still in the discovery phase as an interesting observation. To be
more useful, the following questions need to be answered and any feedback is welcomed by
email ([email protected]):
1. Is it possible to find (by differentiation, et cetera) the numerical value of 𝛼, 𝛼′ such that
the uncontrained extremum point will be located in 𝑔 (𝑥, 𝑦, 𝛼′) = 0, without actually
solving the equation first? By doing so, the unconstrained optimization problem then
becomes constrained optimization problem with the constrain 𝑔 (𝑥, 𝑦, 𝛼′) = 0.
2. Often, the resulting equations to solve for will be in the form of non-linear equations
which could be difficult to solve both analytically and numerically. Is it possible to find
the properties of the weaving functions such that the resulting extremum locus become
linear (which can be solved in a set of simultaneous linear equations) in certain cases? In
other words, can we transform the optimization problem to merely solving simultaneous
linear equation?
3. Is there any method to determine (or choose) which weaving functions lead to the
solution fastest by balancing between derivation and computation efforts? More
importantly, how do we compare derivation and computation on some universal
“complexity” scale?
88
MATHEMATICA PARTICULARIS
Chapter 4
General Computation
Defeat is a state of mind; no one is ever defeated until defeat has been accepted as a reality.
― Bruce Lee
This section is a much lighter topic, demonstrating the useful problem-solving strategies.
In this chapter, it is less focused on the exact numerical evaluation and it is more of general
philosophies of problem solving. In general, a computation problem must be tackled
systematically with logical reasoning and deduction. Because the topic involves general
technique rather than specific formulas, derivation section would be less relevant and would be
omitted. Instead, focus is placed on examples to coach the reader about the use of the techniques
such that it can be extended to actual coursework.
89
MATHEMATICA PARTICULARIS
−𝒃 + √𝒃𝟐 − 𝟒𝒂𝒄
𝒚𝒑 =
𝟐𝒂
𝒂 = 𝟏 − 𝜶∗
𝟏 𝒙𝑹 ∗
𝒃 = −𝟏 + 𝜶∗ + + (𝜶 − 𝟏)
𝒓 𝒓
𝜶∗ 𝒙𝑹
𝒄=−
𝒓
𝑷𝑴,𝑨
𝜶=
𝑷𝑴,𝑩
𝒑𝒍
𝒓=
𝒑𝒉
𝑭𝑷 = 𝜽𝑭𝒇
𝒙𝒇 − 𝜽𝒚𝒑
𝒙𝑹 =
𝟏−𝜽
𝑷𝑴,𝑨
𝒚𝒑 𝑭𝒑 = 𝑨𝒎 (𝒙𝑹 𝒑𝑯 − 𝒚𝒑 𝒑𝑳 )
𝒍𝒎
To achieve the goal of obtaining the desired parameters from the given parameters, the
dependencies of the parameters are tracked by constructing an arrow diagram. To construct the
diagram, the given variables, desired variables, and the formulas are grouped together. And the
90
MATHEMATICA PARTICULARIS
interdependencies are then drawn from the desired variables, seeking from which equations that
contained the equations.
For example, one of the desired parameter is 𝑦𝑝 . From the formula, 𝑦𝑝 depends on 𝑎, 𝑏 and 𝑐.
Figure 17 Arrow Diagram with Exact Formulas for Membrane Separation Calculation
Tracking the arrow diagram. the solution is pretty clear. First, evaluating the variables from the
given variables, from the left to the right of the diagram:
𝑃𝑀,𝐴 50×10−10
𝛼∗ = = = 10
𝑃𝑀,𝐵 5×10−10
91
MATHEMATICA PARTICULARIS
𝑎 = 1 − 𝛼 ∗ = 1 − 10 = −9
𝑝𝐿 20
𝑟= = = 0.25
𝑝𝐻 80
𝐹𝑃 = 𝜃𝐹𝑓 = 0.71𝐹𝑓
𝑥𝑓 − 𝜃𝑦𝑝 0.5 − 0.71𝑦𝑝 50 71
𝑥𝑅 = = = − 𝑦
1−𝜃 1 − 0.71 29 29 𝑝
1 𝑥𝑅 1 𝑥𝑅
𝑏 = −1 + 𝛼 ∗ + + (𝛼 ∗ − 1) = −1 + 10 + + (10 − 1) = 13 + 36𝑥𝑅
𝑟 𝑟 0.25 0.25
𝛼 ∗ 𝑥𝑅 10𝑥𝑅
𝑐 =− =− = −40𝑥𝑅
𝑟 0.25
−𝑏 + √𝑏2 − 4𝑎𝑐 −(13 + 36𝑥𝑅 ) + √(13 + 36𝑥𝑅 )2 − 4( −9)(−40𝑥𝑅 )
𝑦𝑝 = =
2𝑎 2 (−9)
−13 − 36𝑥𝑅 + √(13 + 36𝑥𝑅 )2 − 4( −9)(−40𝑥𝑅 )
=
−18
−13 − 36𝑥𝑅 + √169 + 936𝑥𝑅 + 1296𝑥𝑅2 − 1440𝑥𝑅
=
−18
−13 − 36𝑥𝑅 + √169 + 1296𝑥𝑅2 − 504𝑥𝑅
=
−18
92
MATHEMATICA PARTICULARIS
50 71 50 71
−9𝑦𝑝2 + (13 + 36 ( − 𝑦𝑝 )) 𝑦𝑝 + −40 ( − 𝑦 )=0
29 29 29 29 𝑝
Rearranging:
1800 2556 2 2000 2840
−9𝑦𝑝2 + 13𝑦𝑝 + 𝑦𝑝 − 𝑦 − + 𝑦 =0
29 29 𝑝 29 29 𝑝
This is the quadratic equation to be solved for 𝑦𝑝 :
2817 2 2000
− 𝑦𝑝 + 173𝑦𝑝 − =0
29 29
Solving the quadratic equation gives 2 values of 𝑦𝑝 :
𝑦𝑝 = 1.1786, 0.60241
To find 𝑥𝑅 , invoking the previous linear relation between 𝑥𝑅 and 𝑦𝑝 :
50 71
𝑥𝑅 = − 𝑦
29 29 𝑝
This gives another 2 values of 𝑥𝑅 :
50 71
𝑥𝑅 = − 𝑦 = −1.1614, 0.24927
29 29 𝑝
Now, note that 𝑦𝑝 and 𝑥𝑅 are some composition fraction and thus must be between 0 and 1, so
the extraneous root is eliminated from consideration:
𝑦𝑝 = 0.60241
𝑥𝑅 = 0.24927
93
MATHEMATICA PARTICULARIS
−𝑏 + √𝑏2 − 4𝑎𝑐
𝑦𝑝 =
2𝑎
2 𝑎 = 1 − 𝛼∗ 𝐹2 {𝑎, 𝛼 ∗ } = 0
3 1 𝑥𝑅 ∗ 𝐹3 {𝑏, 𝛼 ∗ , 𝑟, 𝑥𝑅 } = 0
𝑏 = −1 + 𝛼 ∗ + + (𝛼 − 1)
𝑟 𝑟
∗
4 𝛼 𝑥𝑅 𝐹4 {𝑐, 𝛼 ∗ , 𝑥𝑅 , 𝑟} = 0
𝑐 =−
𝑟
5 𝑃𝑀 ,𝐴 𝐹5 {𝛼 ∗ , 𝑃𝑀,𝐴 , 𝑃𝑀,𝐵 } = 0
𝛼∗ =
𝑃𝑀,𝐵
6 𝑝𝐿 𝐹6 {𝑝𝐿 , 𝑝𝐻 } = 0
𝑟=
𝑝𝐻
7 𝐹𝑃 = 𝜃𝐹𝑓 𝐹7 {𝐹𝑝 , 𝜃, 𝐹𝑓} = 0
8 𝑥𝑓 − 𝜃𝑦𝑝 𝐹8 {𝑥𝑅 , 𝑥𝑓 , 𝜃, 𝑦𝑝 } = 0
𝑥𝑅 =
1−𝜃
9 𝑃𝑀,𝐴 𝐹9 {𝑦𝑝 , 𝐹𝑝 , 𝐴𝑚 , 𝑃𝑀,𝐴 , 𝑥𝑅 , 𝑙𝑚 , 𝑝𝐻 , 𝑝𝐿 } = 0
𝑦𝑝 𝐹𝑝 = 𝐴𝑚 (𝑥𝑅 𝑝𝐻 − 𝑦𝑝 𝑝𝐿 )
𝑙𝑚
94
MATHEMATICA PARTICULARIS
Example 2: The second example is more difficult, this is a fluidized bed reactor calculation
that I have developed by plant design project.
Find: The sizing of a fluidized bed reactor: 𝑫, 𝑽𝒇𝒍 , 𝑳𝒇𝒍
Given: Design specifications: 𝒌𝑨, 𝒅𝒑,, 𝝁𝒇 , 𝝆𝒑, 𝝆𝒇 , 𝑫𝒎, 𝒈, 𝜶, 𝜸𝒃, 𝝍, 𝒇𝑨
And the formula relations:
𝟎.𝟎𝟐𝟗 𝟎.𝟎𝟐𝟏
𝝁𝟐𝒇 𝝆
𝝐𝒎𝒇 = 𝟎. 𝟓𝟖𝟔𝝍 −𝟎.𝟕𝟐 (
𝟑
) ( 𝒇)
𝝆𝒇 𝒈(𝝆𝒑 − 𝝆𝒇 )𝒅𝒑 𝝆𝒑
𝟐
𝟏𝟓𝟎(𝟏 − 𝝐𝒎𝒇 )𝝁𝒇 𝟏𝟓𝟎(𝟏 − 𝝐𝒎𝒇 )𝝁𝒇 𝒈(𝝆𝒑 − 𝝆𝒇 )𝝐𝟑𝒎𝒇 𝒅𝒑
− + √( ) +𝟒
𝟏. 𝟕𝟓𝝆𝒇 𝒅𝒑 𝟏. 𝟕𝟓𝝆𝒇 𝒅𝒑 𝟏. 𝟕𝟓𝝆𝒇
𝒖𝒎𝒇 =
𝟐
𝒖𝒇𝒍 = 𝑨𝒖𝒎𝒇
𝑨 = 𝟒𝟎
𝟒𝒒
𝑫=√
𝝅𝒖𝒇𝒍
𝒅𝒃
𝒖𝒃𝒓 = 𝟎. 𝟖𝟓𝟑𝟐√𝒈𝒅𝒃 𝒆−𝟏.𝟒𝟗 𝑫
𝒖𝒃 = 𝒖𝒇𝒍 − 𝒖𝒎𝒇 + 𝒖𝒃𝒓
95
MATHEMATICA PARTICULARIS
𝒖𝒇𝒍
𝒇𝒃 =
𝒖𝒃
𝒇𝒘 = 𝜶𝒇𝒃
𝟑𝒖𝒎𝒇𝒇𝒃
𝒇𝒄 =
𝝐𝒎𝒇 𝒖𝒃𝒓 − 𝒖𝒎𝒇
(𝟏 − 𝝐𝒎𝒇 )(𝒇𝒄 + 𝒇𝒘 )
𝜸𝒄𝒘 =
𝒇𝒃
(𝟏 − 𝝐𝒎𝒇 )(𝟏 − 𝒇𝒃 )
𝜸𝒆 = − 𝜸𝒃 − 𝜸𝒄𝒘
𝒇𝒃
𝝐𝒎𝒇 𝑫𝒎𝒖𝒃𝒓
𝑲𝒄𝒆 = 𝟔.𝟕𝟕√
𝒅𝟑𝒃
𝒖𝒎𝒇 𝑫𝟎.𝟓
𝒎 𝒈
𝟎.𝟐𝟓
𝑲𝒃𝒄 = 𝟒. 𝟓 + 𝟓. 𝟖𝟓
𝒅𝒃 𝒅𝟏.𝟐𝟓
𝒃
𝟏
𝒌𝒐𝒗𝒆𝒓𝒂𝒍𝒍 = 𝜸𝒃𝒌𝑨 + 𝟏 𝟏
+ 𝟏
𝑲𝒃𝒄
𝜸𝒄𝒘𝒌𝑨 + 𝟏
𝜸𝒄𝒘𝒌𝑨 +
𝟏 𝟏
𝑲𝒄𝒆 + 𝜸𝒆 𝒌𝑨
𝒖𝒃 𝒍𝒏(𝟏 − 𝒇𝑨 )
𝑳𝒇𝒍 = −
𝒌𝒐𝒗𝒆𝒓𝒂𝒍𝒍
𝟏 𝟎. 𝟎𝟔𝟖𝟒𝑳𝒇𝒍 𝟏.𝟐𝟏
𝒅𝒃 (𝒎) = 𝟎. 𝟎𝟎𝟖𝟓𝟑[𝟏 + 𝟎. 𝟐𝟕𝟐(𝒖𝒇𝒍 − 𝒖𝒎𝒇)]𝟑 [𝟏 + ]
𝟐
𝝅
𝑽𝒇𝒍 = 𝑳 𝑫𝟐
𝟒 𝒇𝒍
Where any of the variables not mentioned are simply some intermediate variables.
This is a much more complex system than Example 1. However, performing the analysis results
in the following:
96
MATHEMATICA PARTICULARIS
Figure 20 Arrow Diagram with Exact Formulas for Fluidized Bed Reactor Calculation
97
MATHEMATICA PARTICULARIS
4 𝐴 = 40 𝐹4 {𝐴} = 0
5 4𝑞 𝐹5 {𝐷, 𝑞, 𝑢𝑓𝑙 } = 0
𝐷=√
𝜋𝑢𝑓𝑙
𝑑𝑏
6 𝐹6 {𝑢𝑏𝑟 , 𝑔, 𝑑𝑏 , 𝐷 } = 0
𝑢𝑏𝑟 = 0.8532√𝑔𝑑𝑏 𝑒 −1.49 𝐷
98
MATHEMATICA PARTICULARIS
99
MATHEMATICA PARTICULARIS
Unlike Example 1, the form of the formulae is too complex to have analytic solution. This
requires numerical method to solve, as suggested by the textbook [3]. The following is the
compiled algorithm:
Figure 23 The further explained calculation procedure for fluidized bed reactor sizing
100
MATHEMATICA PARTICULARIS
Remark:
Suppose you have an evaluation problem where you need to undergo a series of
calculations using a bunch of equations to obtain your goal parameter. This technique offers a
systematic way to track variables, making a complex calculation otherwise overwhelming to be
handled. In some sense, it is more like mapping and marking in a labyrinth of mathematics, such
that one can go to the desired place systematically rather than getting lost. The approach of
working from the desired variable all the way back to the given variables is largely influenced by
the learning experience of Retrosynthetic Analysis in the class of Organic Chemistry, where the
starting point is the goal product and working all the way back to the starting given materials.
While the arrow diagrams seem daunting to be constructed, an experienced practitioner
like me and the other top students can draft out such relation diagram mentally in very short time
during exam. This is not because our IQ is high (although I admit I am), but simply we have
been practicing such thinking approach for years. The diagrams are in fact some “babysitting
tools” to visualize what happens when a computation problem is being solved.
This technique, together with the Formulae Extraction in the next topic, form the
backbone of the so-called “algorithm” among the peers. Many students, including all the top
students, utilize such thinking (consciously or unconsciously) in problem-solving and this
ultimately contributed to their success in exams.
101
MATHEMATICA PARTICULARIS
a)
𝟐𝟓
𝒓= = 𝟎. 𝟐𝟐𝟕
𝟏𝟏𝟎
𝒂 = 𝟏 − 𝟏𝟎 = −𝟗
𝟏 𝟎. 𝟑
𝒃 = −𝟏 + 𝟏𝟎 + + (𝟏𝟎 − 𝟏) = 𝟐𝟓. 𝟐𝟖
𝟎. 𝟐𝟐𝟕 𝟎. 𝟐𝟐𝟕
−𝟏𝟎×𝟎. 𝟑
𝒄= = −𝟏𝟑. 𝟐
𝟎. 𝟐𝟐𝟕
−𝟐𝟓. 𝟐𝟖 + √𝟐𝟓. 𝟐𝟖𝟐 − 𝟒× (−𝟗)×( −𝟏𝟑. 𝟐)
𝒚𝒑 = = 𝟎. 𝟔𝟗𝟑
𝟐× (−𝟗)
102
MATHEMATICA PARTICULARIS
b)
𝒚𝒑 = 𝟎. 𝟕
𝟎. 𝟒𝟏𝟑 − 𝜽×𝟎. 𝟕
𝟎. 𝟑 = ⇒ 𝜽 = 𝟎. 𝟐𝟖𝟐
𝟏−𝜽
𝑭𝒑 = 𝟎. 𝟐𝟖𝟐×𝟐×𝟏𝟎−𝟑 = 𝟓. 𝟔𝟒×𝟏𝟎−𝟒 𝒎𝟑 /𝒔
c)
𝟑×𝟏𝟎−𝟏𝟐
(𝟓. 𝟔𝟒×𝟏𝟎−𝟒 )(𝟎. 𝟕) = 𝑨𝒎 × × (𝟎. 𝟑×𝟏𝟏𝟎 − 𝟎. 𝟕×𝟐𝟓) ⇒ 𝑨𝒎 = 𝟏𝟔𝟖𝒎𝟐
𝟐×𝟏𝟎−𝟓
Now, Comparing 2 sides. We see that
103
MATHEMATICA PARTICULARIS
Variables Involved
a)
𝑝𝑙 = 25𝑘𝑃𝑎
𝑝ℎ = 110𝑘𝑃𝑎
𝑎∗ = 10
𝑥𝑅 = 0.30
𝑟 = 0.227
𝑎 = −9
𝑏 = 25.28
𝑐 = −13.2
b)
𝑦𝑝 = 0.7
𝑥𝑓 = 0.413
𝜃 = 0.282
𝐹𝑓 = 2×10−3 𝑚3 (𝑆𝑇𝑃)/𝑠
c)
𝑦𝑝 = 0.7
𝐹𝑝 = 5.64×10−4 𝑚3 /𝑠
𝑃𝑀,𝐴 = 3×10−12 𝑚3 (𝑆𝑇𝑃 ). 𝑚/(𝑠. 𝑚2 . 𝑘𝑃𝑎)
𝑙𝑚 = 2×10−5 𝑚
𝑥𝑅 = 0.30
𝑝ℎ = 110𝑘𝑃𝑎
𝑝𝑙 = 25𝑘𝑃𝑎
Extracted Formulae (by replacing the numbers back into generic variables)
a)
𝑝𝑙
𝑟=
𝑝ℎ
𝑎 = 1 − 𝛼∗
1 𝑥𝑅 ∗
𝑏 = −1 + 𝑎∗ + + (𝑎 − 1)
𝑟 𝑟
∗
𝑎 𝑥𝑅
𝑐 =−
𝑟
104
MATHEMATICA PARTICULARIS
−𝑏 + √𝑏2 − 4𝑏𝑐
𝑦𝑝 =
2𝑎
b)
𝐹𝑃 = 𝜃𝐹𝑓
𝑥𝑓 − 𝜃𝑦𝑝
𝑥𝑅 =
1−𝜃
c)
𝑃𝑀,𝐴
𝑦𝑝 𝐹𝑝 = 𝐴𝑚 (𝑥𝑅 𝑝𝐻 − 𝑦𝑝 𝑝𝐿 )
𝑙𝑚
Much of these formulae extracted are where the formulae for 4.1.1 Arrow come from. Often,
single sample solution is not sufficient to extract all the formulae involved and more sample is
needed for bigger dataset to result in more accurate representation.
Example 2: The second example is more difficult, this is an MIE516 problem set 3 in 2013 [6].
Given the following problem and solution, extract the underlying formulas involved.
“For a laminar premixed flame burning a stoichiometric gaseous ethanol (𝑪𝟐 𝑯𝟓 𝑶𝑯)-air
mixture with an inlet reactant temperature of 𝟑𝟎𝟎𝑲, a pressure of 𝟏𝒂𝒕𝒎 and adiabatic flame
temperature of 𝟐𝟏𝟖𝟓𝑲. Assume complete combustion and use the fluid properties of air.
a) Estimate the mean reaction rate using the global one-step reaction rate.
b) Estimate the laminar flame speed.
c) Estimate the flame thickness
d) Estimate the characteristic time of the flame
e) How does the flame speed compare to the values of propane and acetylene as discussed
in class?”
The given variables are
𝑻𝒊𝒏 = 𝟑𝟎𝟎𝑲
𝑷 = 𝟏𝒂𝒕𝒎
𝑻𝒂𝒅 = 𝟐𝟏𝟖𝟓𝑲
𝒌𝒂𝒊𝒓 {𝟏𝟐𝟓𝟎𝑲} = 𝟕𝟗. 𝟏𝟓×𝟏𝟎−𝟑 𝑾/𝒎. 𝑲
𝑪𝑷,𝒂𝒊𝒓 {𝟏𝟐𝟓𝟎𝑲} = 𝟏𝟏𝟖𝟐𝑱/𝒌𝒈. 𝑲
𝝆𝒂𝒊𝒓 {𝟑𝟎𝟎𝑲} = 𝟏. 𝟏𝟔𝟏𝟒𝒌𝒈/𝒎𝟑
105
MATHEMATICA PARTICULARIS
𝑴𝑭 = 𝟒𝟔𝒈𝒎𝒐𝒍−𝟏
𝑴𝑶𝟐 = 𝟑𝟐𝒈𝒎𝒐𝒍−𝟏
𝑴𝑵𝟐 = 𝟐𝟖𝒈𝒎𝒐𝒍−𝟏
𝑬 𝟏
− 𝒂
𝑹𝒖
𝒘̇𝒇 = −𝑨𝒆 𝑻 [𝑭]𝒎 [𝑶𝟐 ]𝒏
Where 𝒘̇𝒇 is in 𝒎𝒐𝒍⁄𝒄𝒄 . 𝒔, 𝑻 is in 𝑲 while [𝑭] and [𝑶𝟐 ] are in 𝒎𝒐𝒍/𝒄𝒄, with
𝑨 = 𝟏. 𝟓×𝟏𝟎𝟏𝟐
𝑬𝒂
= 𝟏𝟓𝟎𝟗𝟖
𝑹𝒖
𝒎 = 𝟎. 𝟏𝟓
𝒏 = 𝟏. 𝟔
The following is the sample solution [7]:
𝟑𝟎𝟎 + 𝟐𝟏𝟖𝟓
+ 𝟐𝟏𝟖𝟓
𝑻= 𝟐 = 𝟏𝟕𝟏𝟑. 𝟕𝟓𝑲
𝟐
𝟏 𝟎. 𝟎𝟔𝟓𝟒𝟒𝟓
𝑿𝒊,𝑭 = = 𝟎. 𝟎𝟔𝟓𝟒𝟒𝟓 ⇒ 𝑿𝑭 = = 𝟎. 𝟎𝟑𝟐𝟕𝟐𝟐𝟓
𝟏 + 𝟑(𝟏 + 𝟑. 𝟕𝟔) 𝟐
𝟑 𝟎. 𝟏𝟗𝟔𝟑𝟑𝟓
𝑿𝒊,𝑶𝟐 = = 𝟎. 𝟏𝟗𝟔𝟑𝟑𝟓 ⇒ 𝑿𝑶𝟐 = = 𝟎. 𝟎𝟗𝟖𝟏𝟔𝟕𝟓
𝟏 + 𝟑(𝟏 + 𝟑. 𝟕𝟔) 𝟐
𝟏𝟎𝟏𝟑𝟐𝟓 𝒌𝒎𝒐𝒍
[𝑭] = 𝟎. 𝟎𝟑𝟐𝟕𝟐𝟐𝟓× = 𝟐. 𝟑𝟐𝟔𝟕𝟔𝟗𝟓×𝟏𝟎−𝟗
𝟖𝟑𝟏𝟓×𝟏𝟕𝟏𝟑. 𝟕𝟓 𝒎𝟑
= 𝟐. 𝟑𝟐𝟔𝟕𝟔𝟗𝟓×𝟏𝟎−𝟕 𝒎𝒐𝒍/𝒄𝒄
𝟏𝟓𝟎𝟗𝟖
𝒘̇𝒇 = −𝟏. 𝟓×𝟏𝟎𝟏𝟐 𝒆−𝟏𝟕𝟏𝟑.𝟕𝟓 (𝟐. 𝟑𝟐𝟔𝟕𝟔𝟗𝟓×𝟏𝟎−𝟕 )𝟎.𝟏𝟓 (𝟔. 𝟗𝟖𝟎𝟑𝟎𝟖𝟔×𝟏𝟎−𝟕 )𝟏.𝟔
= −𝟑. 𝟐𝟎𝟎𝟒× 𝟏𝟎−𝟑 𝒎𝒐𝒍⁄𝒄𝒄 . 𝒔 = −𝟑. 𝟐𝟎𝟎𝟒 𝒌𝒎𝒐𝒍⁄𝒎𝟑 . 𝒔
′′′
𝒎̇ 𝒇 = −𝟑. 𝟐𝟎𝟎𝟒×𝟒𝟔 = 𝟏𝟒𝟕. 𝟐𝟏𝟖𝟒 𝒌𝒈⁄𝒎𝟑 . 𝒔
106
MATHEMATICA PARTICULARIS
𝟑𝟎𝟎 + 𝟐𝟏𝟖𝟓
𝑻= = 𝟏𝟐𝟒𝟐. 𝟓𝑲 ≈ 𝟏𝟐𝟓𝟎𝑲
𝟐
−𝟏𝟒𝟕. 𝟐𝟏𝟖𝟗
𝑺𝑳 = √[−𝟐×𝟓. 𝟕𝟔𝟓𝟔𝟗×𝟏𝟎−𝟓 ×(𝟖. 𝟗𝟓𝟑 + 𝟏)× ] = 𝟎. 𝟑𝟖𝟏𝟒𝟐𝒎/𝒔
𝟏. 𝟏𝟔𝟏𝟒
𝟐(𝟓. 𝟕𝟔𝟓𝟔𝟗×𝟏𝟎−𝟓 )
𝜹= = 𝟑. 𝟎𝟐𝟑𝟑×𝟏𝟎−𝟒 𝒎
𝟎. 𝟑𝟖𝟏𝟒𝟐
𝟑. 𝟎𝟐𝟑𝟑×𝟏𝟎−𝟒
𝝉= = 𝟕. 𝟗𝟐𝟔𝟒×𝟏𝟎−𝟗 𝒔
𝟎. 𝟑𝟖𝟏𝟒𝟐
To pull out the underlying logic behind solving the equation, what is needed is just to track
where the numbers come from. For instance, for the final equation, it is easy to see that:
𝛿
𝜏=
𝑆𝐿
To get the general solution, simply repeat such operation of replacing values with general
variables until all values have been replaced with general variables. From the solution, it can be
seen that the following equations can be inferred in a systematic way:
107
MATHEMATICA PARTICULARIS
101325 𝑘𝑚𝑜𝑙
[𝐹 ] = 0.0327225× = 2.3267695×10 −9 = 2.3267695×10−7 𝑚𝑜𝑙/𝑐𝑐
8315×1713.75 𝑚3
[𝑂2 ] = 3×2.3267695×10−7 = 6.9803086×10−7 𝑚𝑜𝑙/𝑐𝑐
15098
𝑤̇ 𝑓 = −1.5×1012 𝑒 −1713.75 (2.3267695×10 −7 )0.15 (6.9803086×10−7 ) 1.6
= −3.2004× 10−3 𝑚𝑜𝑙⁄𝑐𝑐 . 𝑠 = −3.2004 𝑘𝑚𝑜𝑙⁄𝑚3 . 𝑠
′′′
𝑚̇ 𝑓 = −3.2004×46 = 147.2184 𝑘𝑔 ⁄𝑚3 . 𝑠
300 + 2185
𝑇= = 1242.5𝐾 ≈ 1250𝐾
2
𝑘𝑎𝑖𝑟 {1250𝐾 } = 79.15×10−3 𝑊/𝑚. 𝐾
79.15×10−3
𝐶𝑃,𝑎𝑖𝑟 {1250𝐾 } = 1182𝐽/𝑘𝑔. 𝐾 } 𝛼 = = 5.76569×10−5 𝑚2 /𝑠
1182 (1.1614)
𝜌𝑎𝑖𝑟 {300𝐾 } = 1.1614𝑘𝑔/𝑚3
𝑚𝑜𝑛 3(32 + 3.76×28)
𝑣= = = 8.953
𝑚𝑓 46
−147.2189
𝑆𝐿 = √ [−2×5.76569×10 −5 ×(8.953 + 1)× ] = 0.38142𝑚/𝑠
1.1614
2(5.76569×10−5 )
𝛿= = 3.0233×10−4 𝑚
0.38142
3.0233×10−4
𝜏= = 7.9264×10 −9 𝑠
0.38142
Variables Involved:
𝐶2 𝐻5 𝑂𝐻 + 𝑎( 𝑂2 + 𝑏𝑁2 ) → 2𝐶𝑂2 + 3𝐻2 𝑂 + 3×3.76𝑁2
𝑀𝐹 = 46𝑔𝑚𝑜𝑙 −1
𝑀𝑂2 = 32𝑔𝑚𝑜𝑙 −1
𝑀𝑁2 = 28𝑔𝑚𝑜𝑙 −1
𝑎=3
𝑏 = 3.76
𝑇𝑖𝑛 = 300𝐾
𝑇𝑎𝑑 = 2185𝐾
𝑇 = 1713.75𝐾
𝑋𝑖,𝐹 = 0.065445 ⇒ 𝑋𝐹 = 0.0327225
𝑋𝑖,𝑂2 = 0.196335 ⇒ 𝑋𝑂2 = 0.0981675
108
MATHEMATICA PARTICULARIS
[𝐹 ] = 2.3267695×10−7 𝑚𝑜𝑙/𝑐𝑐
[𝑂2 ] = 6.9803086×10 −7 𝑚𝑜𝑙/𝑐𝑐
𝐴 = 1.5×1012
𝐸𝑎
= 15098
𝑅𝑢
𝑚 = 0.15
𝑛 = 0.6
𝑤̇ 𝑓 = −3.2004× 10−3 𝑚𝑜𝑙 ⁄𝑐𝑐 . 𝑠 = −3.2004𝑘𝑚𝑜𝑙/𝑚3
′′′
𝑚̇ 𝑓 = 147.2184𝑘𝑔/𝑚3
𝑇 = 1242.5𝐾 ≈ 1250𝐾
𝑘𝑎𝑖𝑟 {1250𝐾 } = 79.15×10−3 𝑊/𝑚. 𝐾
𝐶𝑃,𝑎𝑖𝑟 {1250𝐾 } = 1182𝐽/𝑘𝑔. 𝐾
𝜌𝑎𝑖𝑟 {300𝐾 } = 1.1614𝑘𝑔/𝑚3
𝛼 = 5.76569×10−5 𝑚2 /𝑠
𝑣 = 8.953
𝑆𝐿 = 0.38142𝑚/𝑠
𝛿 = 3.0233×10−4 𝑚
𝜏 = 7.9264×10−9 𝑠
Extracted Formulae (by replacing the numbers back into generic variables):
𝐶2 𝐻5 𝑂𝐻 + 𝑎 (𝑂2 + 𝑏𝑁2 ) → 2𝐶𝑂2 + 3𝐻2 𝑂 + 𝑎𝑏𝑁2
𝑇𝑖𝑛 + 𝑇𝑎𝑑
+ 𝑇𝑎𝑑
𝑇= 2
2
1 𝑋𝑖,𝐹
𝑋𝑖,𝐹 = ⇒ 𝑋𝐹 =
1 + 𝑎 (1 + 𝑏) 2
3 𝑋𝑖,𝑂2
𝑋𝑖,𝑂2 = ⇒ 𝑋𝑂2 =
1 + 𝑎 (𝑏) 2
𝑃𝑎𝑡𝑚
[𝐹 ] = 𝑋 𝐹
𝑅𝑇
[𝑂2 ] = 3[𝐹 ]
𝐸 1
− 𝑎
𝑅𝑢 𝑇
𝑤̇ 𝑓 = −𝐴𝑒 [𝐹 ]𝑚 [𝑂2 ]𝑛
′′′
𝑚̇ 𝑓 = 𝑤̇ 𝑓 𝑀𝐹
109
MATHEMATICA PARTICULARIS
𝑇𝑖𝑛 + 𝑇𝑎𝑑
𝑇=
2
𝑘𝑎𝑖𝑟 {𝑇}
𝛼=
𝐶𝑃,𝑎𝑖𝑟 {𝑇}𝜌𝑎𝑖𝑟 {𝑇𝑖𝑛 }
𝑚𝑜𝑥 𝑎 (𝑀𝑂2 + 𝑏𝑀𝑁2 )
𝑣= =
𝑚𝑓 𝑀𝐹
′′′
𝑚̇ 𝑓
𝑆𝐿 = √ −2𝛼(𝑣 + 1)
𝜌𝑎𝑖𝑟 {300𝐾 }
2𝛼
𝛿=
𝑆𝐿
𝛿
𝜏=
𝑆𝐿
These formulae obtained agree excellently with the syllabus, except the fact that you do not
have to attend the full 2 hours of class (not to mention the extra practice time to be familiar
with the computation) to obtain the needed formulae. For me, this would probably take
between 30 minutes to 1 hour depending on my brain status.
Remark:
As the second example shows, this technique sometimes is more of forensics and requires
some ingenuity. In fact, some professors will try to apply various measures to try punishing such
students who do not go to class (don’t bother asking how I knew about this) and various
countermeasures is needed.
This is the second part of the so-called “algorithm”. This technique has been really useful
throughout my life. This is one of the reason that I could skip classes for years while still being
the top student. In fact, the top students perform such operation, consciously or unconsciously, in
order to ace exams. This is also part of the reasons that some students like me managed to
survive second year with honours, as slow studying no longer works under tight timeframe.
110
MATHEMATICA PARTICULARIS
Chapter 5
Epilogue
I believe in intuition and inspiration. Imagination is more important than knowledge. For
knowledge is limited, whereas imagination embraces the entire world, stimulating progress,
giving birth to evolution. It is, strictly speaking, a real factor in scientific research.
-Albert Einstein
When I was younger, I used to despise the discussion about the general philosophy of
life, or the so-called chicken soup. I used to get fascinated by the sophisticated treatment of the
messy algebra, thinking it to be the smart way. For instance, I liked to memorize complex
equations to demonstrate my intellect. As I age, even though I become more and more adept at
doing all this sophisticated calculation, I started thinking about the importance of such general
philosophy, having noticed many lose their direction of life being too obsessed about the details,
ignoring about the big picture.
In a lecture, I surprisingly overheard some students discussing about dropping a class
because it is too conceptual (or vague as they say), while they want something calculation-based.
While the choice of taking or dropping an elective class is pretty much a personal choice, such
ignorance of big picture is indeed worth thinking about: Do you really understand the concepts
that you think you do?
No matter how sophisticated a computation is, it involves some fundamental properties
that are usually very intuitive: Does this make sense? For instance, the solution to a system of
equations (as in Gauss-Hoe method) would only make sense if the number of equations must be
at least the number of variables. Without meeting this criterion, no method, however
sophisticated, could solve the set of equations.
Note that the described technique worked by transforming one problem into another
problem that could be easier to solve, rather than getting the solution for granted. This is a very
important observed phenomenon, which I will call it conservation of complexity. Simply put,
there is no free lunch in the world. Often, many of the cases with solutions is simply out of luck
that the previous people have already taken efforts to develop the general functions: if no
trigonometric function is developed in the first place, we would have to plot out our
trigonometric curve numerically.
Finally, to answer the bolded question, you need to practice: Go ahead, do something,
and you will be surprised at what you could learn.
111
MATHEMATICA PARTICULARIS
References
[1] R. R. Farnood, "CHE471 Fall 2015 Final Exam," 29 April 2015. [Online]. Available:
http://courses.skule.ca/exams/bulk/20151/CHE471S_2015_MATHEMATICAL%20MODE
LING%20IN%20CHEMICAL%20ENGINEERING_E.PDF. [Accessed 23 December 2017].
[2] H. H. Hoe, R. R. Farnood and D. W. Kirk, "Analytic Mathematical Model for Concentration
Profile in a Parallel Plate Electrolyzer with Variable Current Density," The Journal of
Electrochemical Society, vol. 164, no. 11, pp. E3531-E3538, 2017.
[4] H. H. Hoe, "CHE1142 Weekly Project 3 HHH," University of Toronto, 17 June 2016.
[Online]. Available: https://play.library.utoronto.ca/dtHc5jyLIdg4. [Accessed 25 December
2017].
112