0% found this document useful (0 votes)
40 views203 pages

Lecture Notes

Uploaded by

mhmdwalid95
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
40 views203 pages

Lecture Notes

Uploaded by

mhmdwalid95
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 203

Copy from Lecture Notes

OHI – MATH 3
BAS111
SS 2022 - 2023
Instructor and Textbooks
Instructor: Assoc. Prof. Dr. R. E. Abo elkhair
E- mail: elkhair33@yahoo.com, elkhair33@azhar.edu.eg
Textbooks:
 Calculus, Stewart, 6e.
 Calculus, Minton, 3e.
 Advanced Engineering Mathematics, 8th edition, by E. Kreyszig, J.
Wiley & Sons, 1999.
 Advanced Engineering Mathematics, by H.K. DASS, S. CHAND &
COMPANY PVT. LTD. (AN ISO 9001 : 2008 COMPANY)
 Lecture notes (presentations).

1
Assoc. Prof. Dr. R. E. Abo elkhair
Course main objectives

 Introduce the fundamental concepts of function of several


variables, minimization and maximization of a given function,
and its use in the engineering problems.
 Differential equations concepts and its usage to the solution of
engineering.
 The Methodologies of solving engineering problems, integration
and its techniques for the applications in engineering practice
in several variables.
 Apply numerical techniques to the solution of engineering
problems.
Course main Plan
MATHEMATICS 3
BAS111
Part 1
Calculus of Several Variables
Part 2
Infinite sequences and Series
Part 3
Differential Equations
Part 4
Multiple Integrals and Green theorem
Part 5
Numerical analysis
3
Multi-variable functions

Motivation
 (1) Find the product of three positive numbers if their sum is 100.
 (2) Describe the distance between a given point (x0, y0) and a
variable point (x, y) in xy- plane.
 (3) Write down the expression of the volume of a box with side
lengths x, y and z.
 (4) Express the distance between the origin and the plane
 3x + 2y + 6z = 12.

Conclusion:
Functions of several variables appear quite frequently in many
engineering applications
Functions of several variables
Definition 1: A function of two real variables x and y is the rule
which assigns a unique real number f(x, y) to each point in some set
D in the xy - plane.
Definition 2: A function of three real variables x, y and z is the rule which assigns
a unique real number f(x, y,z) to each point in the set D in the 3 dimensional space.

Remark: The set D in the above definitions is called the domain of


the function. It is the set of points where the function is defined.
Domain of functions of two variables

If z = f(x, y) is a function of two variables then the domain of f is the


region in the xy – plane for which this function is defined.

Example 1: Find and sketch the domain of the function


f ( x, y )  x  y

We know, from Math 103, that x + y should


be greater than or equal to zero

 x y0
We first draw the line x + y = 0 which will
divide the xy-plane into two parts,
one part on each side of the line.
On one part x + y > 0 and on the second
part x + y < 0.
We just take any point in any side to check
the sign of the expression x + y on this side
Example 2: Find and sketch the domain of the function
f ( x , y )  ln( 9  x 2  9 y 2 )

We know, from Math 1, that 9 - x2 - 9y2


should be greater than zero, i. e.

9  x 2  9 y 2  0  x 2  9 y 2  9 
x2
 y2  1
9
We first draw the ellipse x2/9 + y2 = 1
which will divide the xy-plane into two parts,
one part inside the ellipse and the other
part outside. On the inner part x2/9 + y2 = 1
may be positive or negative.
We just take any point in any part to check
the sign of the expression on this side
Example 3 For the following function, evaluate f(3, 2)
and find its domain.

Solution
(1) D = {(x, y) |x + y + 1 ≥ 0, x ≠ 1}

8
Example 4 Evaluate f(3, 2) and find the domain of the
function

Solution f(3, 2) = 3 ln(22 – 3) = 3 ln 1 = 0


Since ln(y2 – x) is defined
only when y2 – x > 0,
that is, x < y2,
hence, the domain of f is:
D = {(x, y)| x < y2}

9
Domain of functions of three variables

If w = f(x, y, z) is a function of three variables then the domain of


f is the region in xyz-space for which this function is defined.

Example Find and sketch the domain of the function


1
f ( x, y , z ) 
x 2  y 2  z 2  16

Solution Similar to what we have done in the previous cases we


must have that x2 + y2 + z2 > 16,then from the equation of the
sphere x2 + y2 + z2 = 16, we can see that the required domain is the
set of all points exterior to this sphere.
Exercises 1

12
Partial derivatives

Conclusion, calculating partial derivative with respect to x is just


differentiating the function with respect to x considering y as a constant.
Similarly, for the partial derivative with respect to y.
If z = f(x, y) we can also denote the partial derivatives by the
following symbols:
Example 2 If

calculate

Solution
Higher order partial derivatives
Example Find the second partial derivatives of
f(x, y) = x3 + x2y3 – 2y2

Solution fx(x, y) = 3x2 + 2xy3 fy(x, y) = 3x2y2 – 4y


Thank you
Partial derivatives

Conclusion, calculating partial derivative with respect to x is just


differentiating the function with respect to x considering y as a constant.
Similarly, for the partial derivative with respect to y.
If z = f(x, y) we can also denote the partial derivatives by the
following symbols:
Example 2 If

calculate

Solution
Higher order partial derivatives
Example Find the second partial derivatives of
f(x, y) = x3 + x2y3 – 2y2

Solution fx(x, y) = 3x2 + 2xy3 fy(x, y) = 3x2y2 – 4y


Notice that, if fxy and fyx are both continuous function then fxy = fyx.
Partial derivatives of order 3 or higher can also be defined.

For instance,

It can be shown that fxyy = fyxy = fyyx if these functions are continuous.

Example Calculate fxxyz if f(x, y, z) = sin(3x + yz)

Solution fx = 3 cos(3x + yz) fxx = –9 sin(3x + yz)


fxxy = –9z cos(3x + yz)
fxxyz = –9 cos(3x + yz) + 9yz sin(3x + yz)
Example Show that the function u(x, y) = ex sin y
is a harmonic function (solution of Laplace’s equation|).

Solution
ux = ex sin y uy = ex cos y
uxx = ex sin y uyy = –ex sin y
uxx + uyy = ex sin y – ex sin y = 0
Thus, u satisfies Laplace’s equation, and hence an
analytic function.
Example
xy
Find the four 2nd order partial derivatives of z e
= +x.
Solution
∂z ∂z xy
xy
= ye + 1 = xe
∂x ∂y
2
2
∂ z ∂ z 2 xy
2 xy
=y e 2
= x e
∂x 2 ∂y

∂2 z ∂2 z xy xy
xy
= xye + e xy = xye + e
∂y∂x ∂x∂y
Example
4
∂ u 2 x+ y2
Compute if u = z e .
∂z∂y∂x 2
Solution
∂u 2 x +y 2
=z e
∂x
∂ 2u 2 x +y 2
2
=z e
∂x
∂ 3u 2 x +y 2
2
= 2 yz e
∂y ∂x
∂ 4u x +y 2
2
= 4 yze
∂z ∂y ∂x
Theorem:
If the function z = f ( x, y )
and its partial derivatives are defined and continuous at any
point and in some neighborhood of it, then at this point

2 2
∂f ∂f
=
∂y ∂x ∂x ∂y

This is true for a function of any number of variables and any


number of successive partial derivatives.
The Chain Rule:
Let z be a function of two independent variables u and v,

z = f (u ,v )
and let u and v be continuous functions of the independent
variables x, y :

u = φ ( x, y ), v = ψ ( x, y ).
then:
∂z ∂z ∂u ∂z ∂v
= +
∂x ∂u ∂x ∂v ∂x
∂z ∂z ∂u ∂z ∂v
= +
∂y ∂u ∂y ∂v ∂y
Example
Given z =2 3 y . Find ∂z
u + 2v , u =
xy , v = .
x ∂x
Solution
∂z ∂z ∂u ∂z ∂v  y
= + 2
=2uy + 6v  − 2 
∂x ∂u ∂x ∂v ∂x  x 
3
y
= 2 xy 2 − 6 4
x
y
2u y 2
6v − 2
x
Example
2
Given z = ln(u + v), u = e
x+ y2
, v = x 2 . Find ∂z .
∂x
Solution
∂z ∂z ∂u ∂z ∂v 2u x+ y2 1
= = 2
+ e + 2 2x
∂x ∂u ∂x ∂v ∂x u +v u +v
2 x+ y2
= 2 (ue + x)
u +v

2u e x + y 2 1 2x
u2 + v u2 + v
Example If z = x2y + 3xy4, where x = sin 2t and y
= cos t, find dz/dt when t = 0.

Solution The Chain Rule gives:


dz ∂z dx ∂z dy
= +
dt ∂x dt ∂y dt
= (2 xy + 3 y 4 )(2 cos 2t ) + ( x 2 + 12 xy 3 )(− sin t )
It’s not necessary to substitute the expressions for x and y in terms of t.
We simply observe that, when t = 0, we have x = sin 0 = 0 and y
= cos 0 = 1.
Thus, dz
dt t =0

= (0 + 3)(2 cos 0) + (0 + 0)(− sin 0) = 6


IMPLICIT DIFFERENTIATION
The Chain Rule can be used to give a more complete description of the process of
implicit differentiation that was introduced in math 1.
We suppose that an equation of the form F(x, y) = 0 defines y implicitly as a
differentiable function of x. That is, y = f(x), where F(x, f(x)) = 0 , for all x in the
domain of f.
If F is differentiable, we can apply Case 1 of the Chain Rule to differentiate both
sides of the equation F(x, y) = 0 with respect to x.
∂F dx ∂F dy
Since both x and y are functions of x, we obtain: + = 0
∂x dx ∂y dx
∂F
However, dx/dx = 1.So, if ∂F/∂y ≠ 0, dy F
− ∂x =
= − x
we solve for dy/dx and obtain: dx ∂F Fy
∂y

If an equation 𝐹𝐹 𝑥𝑥, 𝑦𝑦, 𝑧𝑧 = 0 determine, implicitly. A differentiable function 𝑓𝑓 of


two variables 𝑥𝑥 and 𝑦𝑦 such that 𝑧𝑧 = 𝑓𝑓(𝑥𝑥, 𝑦𝑦) then,

𝝏𝝏𝝏𝝏 𝑭𝑭𝒙𝒙 𝝏𝝏𝝏𝝏 𝑭𝑭𝒚𝒚


=− , =−
𝝏𝝏𝝏𝝏 𝑭𝑭𝒛𝒛 𝝏𝝏𝝏𝝏 𝑭𝑭𝒛𝒛
Ex.1 Find 𝑑𝑑𝑑𝑑/𝑑𝑑𝑑𝑑 if 𝑦𝑦 = 𝑓𝑓(𝑥𝑥) is determined implicitly by,
1 𝑦𝑦 4 + 3𝑦𝑦 − 4𝑥𝑥 3 − 5𝑥𝑥 − 1 = 0 2 𝑦𝑦 3 − 3𝑥𝑥𝑥𝑥 = 5𝑥𝑥 2 𝑦𝑦 2

Solution:
1 𝐹𝐹 𝑥𝑥, 𝑦𝑦 = 𝑦𝑦 4 + 3𝑦𝑦 − 4𝑥𝑥 3 − 5𝑥𝑥 − 1 = 0
𝑑𝑑𝑑𝑑 𝐹𝐹𝑥𝑥 −12 𝑥𝑥 2 − 5 12 𝑥𝑥 2 + 5
=− =− =
𝑑𝑑𝑑𝑑 𝐹𝐹𝑦𝑦 4 𝑦𝑦 3 + 3 4 𝑦𝑦 3 + 3
2 𝐹𝐹 𝑥𝑥, 𝑦𝑦 = 𝑦𝑦 3 − 3𝑥𝑥𝑥𝑥 − 5𝑥𝑥 2 𝑦𝑦 2 = 0
𝑑𝑑𝑑𝑑 = − 𝐹𝐹𝑥𝑥 = − −3𝑦𝑦 − 10𝑥𝑥 𝑦𝑦 2 = 3𝑦𝑦 + 10𝑥𝑥 𝑦𝑦 2
𝑑𝑑𝑑𝑑 𝐹𝐹𝑦𝑦 3 𝑦𝑦 2 − 3𝑥𝑥 − 10 𝑥𝑥 2 𝑦𝑦 3 𝑦𝑦2 − 3𝑥𝑥 − 10 𝑥𝑥 2 𝑦𝑦
𝜕𝜕𝜕𝜕 𝜕𝜕𝜕𝜕
Ex.2 Find and if 𝑧𝑧 = 𝑓𝑓(𝑥𝑥, 𝑦𝑦) is determined implicitly by,
𝜕𝜕𝜕𝜕 𝜕𝜕𝑦𝑦
𝑥𝑥 2 𝑧𝑧 2 + 𝑥𝑥𝑦𝑦 2 − 𝑧𝑧 3 + 4𝑦𝑦𝑦𝑦 − 5 = 0
Solution:
𝜕𝜕𝜕𝜕 𝐹𝐹𝑥𝑥 2𝑥𝑥𝑧𝑧 2 + 𝑦𝑦 2
=− =−
𝜕𝜕𝜕𝜕 𝐹𝐹𝑧𝑧 2 𝑥𝑥 2 𝑧𝑧 − 3𝑧𝑧 2 + 4𝑦𝑦
𝜕𝜕𝜕𝜕 𝐹𝐹𝑦𝑦 2𝑥𝑥𝑥𝑥 + 4𝑧𝑧
=− =−
𝜕𝜕𝜕𝜕 𝐹𝐹𝑧𝑧 2 𝑥𝑥 2 𝑧𝑧 − 3𝑧𝑧 2 + 4𝑦𝑦
Exercise 1

Applications on
Partial
Derivatives
LINEARIZATION & LINEAR
APPROXIMATION

The function
L(x,y)= f(x0, y0) + fx(x0, y0)(x – x0) + fy(x0, y0)(y – y0)

is called the linearization of f at the point (x0, y0).

The approximation
f(x, y) ≈ L(x,y)

is called the linear approximation or the tangent plane


approximation of f at (x0, y0).
Example Find the linearization of f(x, y) = xexy near the point (1, 0),
then use it to find the approximate value of f(1.1, – 0.1) .

Solution
fx=xyexy+exy, fx(x0,y0)= fx(1,0) = 1, fy=x2exy, fy(x0,y0)= fy(1,0) = 1
Hence, the linearization of f(x, y) near the point (1, 0)is given by
L(x,y)= f(x0, y0) + fx(x0, y0)(x – x0) + fy(x0, y0)(y – y0)
= f(1, 0) + fx(1, 0)(x – x0) + fy(1, 0)(y – y0)
= 1 + 1(x – 1)+1(y – 0) = x + y
Therefore,
the approximate value of f(1.1, – 0.1) = L(1.1, – 0.1) = 1.1 – 0.1 =1.
Notice that the exact value of f(1.1, – 0.1) = 1.1e (1.1)(– 0.1) =
0.98542.
Differential

If we take dx = ∆x = x – x0 and dy = ∆y = y – y0 then the


differential of z is defined by:
dz = fx(x0, y0) dx + fy(x0, y0) dy

So, in the notation of differentials, the linear


approximation can be written as:
f(x, y) ≈ f(x0, y0) + dz
Then,
f(x, y) – f(x0, y0) = ∆z ≈ dz
Example
If z = f(x, y) = x2 + 3xy – y2, find the differential dz and
the increment ∆z of z, if x changes from 2 to 2.05 and y
changes from 3 to 2.96, compare ∆z and dz.
Solution fx=2x+3y, fy=3x – 2y
Take, x = 2.05, x0 = 2 , dx = ∆x = x – x0 = 2.05 – 2 = 0.05, and,
y = 2.96, yo = 3, dy = ∆y = y – y0 = 2.96 – 3 = – 0.04
Hence,
dz = fx (x0, y0)dx + fy(x0, y0) dy
=[2(2) + 3(3)]0.05 + [3(2) – 2(3)](–0.04) = 0.65
The increment of z is:
∆z = f(2.05, 2.96) – f(2, 3)
= [(2.05)2 + 3(2.05)(2.96) – (2.96)2] – [22 + 3(2)(3) – 32] = 0.6449
Notice that ∆z ≈ dz, but dz is easier to compute.

Taylor theorem for functions of two
independent variables

z = f (x , y )

f ( x, y ) ≈ P2 ( x, y ) = f ( a, b ) +  h f x ( a, b ) + k f y ( a, b ) 
1 2
+  h f xx ( a, b ) + 2 hk f xy ( a, b ) + k 2 f yy ( a, b )  + ...
2!

x = a + h and y = b + k
Example
Find the second order approximation to the function:
f (x , y ) = e 2x −y
near the point ( 0,0 ) .
Solution:
f (x , y ) =
e 2 x − y ⇒ f ( 0,0 ) =
1 f y (x , y ) =
−e 2 x − y ⇒ f y ( 0,0 ) =
−1

f x (x , y ) =
2e 2 x − y ⇒ f x ( 0,0 ) =
2 f yy ( x , y ) =
e 2 x − y ⇒ f yy ( 0,0 ) =
1

f xx ( x , y ) =
4e 2 x − y ⇒ f xx ( 0,0 ) =
4 f xy ( x , y ) =
−2e 2 x − y ⇒ f xy ( 0,0 ) =
−2

e 2 x − y =1 +  2 ( x − 0 ) − ( y − 0 )
1
4 ( x − 0 ) −4 ( x − 0 )( y − 0 ) + ( y − 0 ) 
2 2
+
2!  
GRADIENT VECTOR FIELD ON R2 and R3

Definition 1: If 𝒇𝒇 is a scaler function of two variables, then we


define its gradient 𝛁𝛁𝛁𝛁 (grad 𝒇𝒇) as:
𝛁𝛁𝛁𝛁 = 𝒇𝒇𝒙𝒙 𝒙𝒙, 𝒚𝒚 𝒊𝒊 + 𝒇𝒇𝒚𝒚 𝒙𝒙, 𝒚𝒚 j
Thus 𝛁𝛁𝛁𝛁 is really a vector field in ℝ𝟐𝟐 and is called a gradient
vector field

Definition 2: Likewise If 𝒇𝒇 is a scaler function of three


variables, then
𝛁𝛁𝛁𝛁 = 𝒇𝒇𝒙𝒙 𝒙𝒙, 𝒚𝒚, 𝒛𝒛 𝒊𝒊 + 𝒇𝒇𝒚𝒚 𝒙𝒙, 𝒚𝒚, 𝒛𝒛 j+𝒇𝒇𝒛𝒛 𝒙𝒙, 𝒚𝒚, 𝒛𝒛 k
Thus 𝛁𝛁𝛁𝛁 is really a gradient vector field in ℝ𝟑𝟑
Example Find the gradient vector fields of:
(1) f(x, y) = x2y – y3 (2) f(x, y, z) = x2y e – z
Solution (1) The gradient vector field of two variables is given by:
∂f ∂f
∇f ( x , y ) = i + j
∂x ∂y
= 2 xy i + ( x − 3 y ) j
2 2

(2)

−z 2 −z 2 −z
∇f ( x, y, z ) = 2 xye i + x e j − x ye k
Example: Find the tangent plane and the normal line to the
surface of the function z = 9 − x2 − y2 at the point P0 = (1, 2,4).

Solution:
We first consider the surface of the function
z = f(x, y) = 9 − x2 − y2 as a level surface of the function
g(x, y, z) = x2 + y2 + z − 9 = 0.
(1) Find ∇g(x, y, z) = 〈 gx , gy , gz 〉 = 〈2x , 2y , 1〉
(2) Substitute to get ∇g|(1, 2, 4) = 〈2 , 4 , 1〉.
Hence, the equation of the tangent plane is
2(x − 1) + 4(y − 2) + 1(z − 4) = 0
The parametric equations of the normal line are
x = 1 + 2t , y = 2 + 4t, z = 4 + t
MAXIMUM & MINIMUM VALUES
Look at the hills and valleys in the graph of f shown here.
There are two points (a, b) where f has a local maximum—that is,
where f(a, b) is larger than nearby values of f(x, y). The larger of
these two values is the absolute maximum.
Likewise, f has two local minima—where f(a, b) is smaller than
nearby values. The smaller of these two values is the
absolute minimum.
LOCAL EXTREMA OF A FUNCTION OF TWO VARIABLES
HOW TO FIND LOCAL EXTREMA OF f(x,y)
Saddle
point
THE SECOND DERIVATIVE TEST FOR LOCAL
EXTREMA OF A FUNCTION OF TWO VARIABLES

Let D = D(a, b) = fxx(a, b) fyy(a, b) – [fxy(a, b)]2

(1) If D > 0 and fxx(a, b) > 0, f(a, b) is a local minimum.

(2) If D > 0 and fxx(a, b) < 0, f(a, b) is a local maximum.

(3) If D < 0, f(a, b) is not a local maximum or minimum. The


point (a, b) is called a saddle point of f

(4) If D = 0, the test gives no information. Further analysis


must be done to determine the nature of f at this point.
2
= ( )
D f xx f yy − f xy

D >0 D <0 D =0

f xx < 0 f xx > 0 Saddle The test is


point inconclusive

Local Local
maximum minimum
Example 1
Test the following function for maximum and minimum:
z = x3 + y 3 − 3 xy
Solution:
2
f x 3x − 3 y
=
2
3x − 3 y =
0 y = x2

f y 3 y2 − 3x
= 3 y2 − 3x =
0 y2 − x =0

x4 − x =0

= , x 1
x 0=
f xx = 6 x
f yy = 6 y
f xy = −3

( )
2
=D f xx f yy − f xy
= 36xy − 9
Example 3 Find the shortest distance from
the point (1, 0, –2) to the plane x + 2y + z = 4.
Solution
The distance from any point (x, y, z) to the point (1, 0, –2) is:
2 2 2
d= ( x − 1) + y + ( z + 2)
However, if (x, y, z) lies on the plane x + 2y + z = 4, then
z = 4 – x – 2y. Thus, we have:
2 2 2
d= ( x − 1) + y + (6 − x − 2 y )
We can minimize d by minimizing the simpler expression
2
d = f ( x, y )
2 2 2
= ( x − 1) + y + (6 − x − 2 y )
By solving the equations
f x = 2( x − 1) − 2(6 − x − 2 y ) = 4 x + 4 y − 14 = 0

f y =2 y − 4(6 − x − 2 y ) =4 x + 10 y − 24 =0
we find that the only critical point is ( 11 , 5 ) .
6 3

Since fxx = 4, fxy = 4, and fyy = 10, we have:


D(x, y) = fxx fyy – (fxy)2 = 24 > 0 and fxx > 0
So, by the Second Derivatives Test, f has a local
minimum at ( 116 , 53 ) .
Example 4 A cardboard box without lid is to have a volume of
500 cm3. Find the dimensions of the box that minimize the
amount of cardboard used.

Solution
Let the dimensions of the box be x, y , and z.
Then the volume of the box is
V = xyz = 500. This implies that z = 500/xy (1)
The total surface area of that box is
S = xy + 2yz + 2xz
Substituting from (1) we get
S(x,y) = xy + 1000/x + 1000/y
By solving the two equations
1000 1000
S x = y − 2 = 0, S y = x − 2 = 0
x y
we find that there are two critical points (0, 0) and (10,
10).
The point (0, 0) has no practical significance ( there will
be no box). Hence, the only significant critical point is
(10, 10). Since at that point Sxx = 2, Sxy = 1, and Syy = 2,
we have: D(x, y) = Sxx Syy – (Sxy)2 = 3 > 0 and Sxx > 0
So, by the Second Derivatives Test, S has a local
minimum at (10, 10) and hence the required dimensions
are x =10, y = 10, and z = 5.

Exercise 2
Differential equations concepts and its usage
to the solution of engineering problems.
1. BASIC CONCEPTS & CLASSIFYING DE’S
2. SOLUTION OF FIRST ORDER ODE
3. METHODS OF SOLUTION OF FIRST
ORDER ODE
(1) Separable Differential Equations:
(2) Homogeneous DE’s
(3) Exact Differential Equations:
(4) Linear DE’s:
(5) DE’s Reducible to Linear (Bernoulli DE):
4. ENGINEERING APPLICATIONS OF FIRST
ORDER DIFFERENTIAL EQUATIONS
What is the Differential Equation?
Differential equation is an equation that involves ordinary or
partial derivatives. When the DE involves ordinary derivatives
it is called ordinary differential equation (ODE) for example:
dy
x  2 y sin x  y cos x
dx
d3y dy
7 3  2y  4 y ln x
dx dx
But, when the DE involves partial derivatives it is called partial
differential equation (PDE) for example:

u u
  x2  y 2
x y
The Solution of Differential Equation

The solution of the DE is to find a function y  f  x 


satisfy the given DE for example.

2 Solution
d y y  2sin x
2
 y0 
(explicit solutions)
dx

dy
y Solution y
x  y
dx
xe x  ln x  e x 50 (Implicit solutions)
Classifications of Differential Equations
(i) Types of DE’s:
We have two types of DEs ordinary differential equations
(ODE’s) and partial differential equations (PDE’s) according
to the number of independent variables.

d2y (ODE’s)
2
 y0
dx
(ODE’s)
( x sin y ) dx  ( x  y cos x ) dy  0

 3u u (PDE’s)
  x 2
 y 2

x 3 y
(ii) Order of DE’s:
The order of the DE equal to the highest derivative in the
given DE for example,

d2y (order = 2)
 y0
dx 2

 3u u 2 2
  x  y (order = 3)
x3 y
5
d y2
 2   y  0 (order = 2)
 dx 
(iii) Degree of DE’s:
The degree of the DE is the highest exponent of the highest derivativ
appearing in the DE for example,

5
d y
2
 2   y  0 (degree = 5)
 dx 

 3u u
  x 2
 y 2
(degree = 1)
x 3 y
2 5
d y d y
3 2
7

 3   2   y y (degree = 2)
 dx   dx 
(iv) Linearity of DE’s:
The nth order linear ODE takes the form:

dny d n 1 y dy
an  an 1  ...  a1  a0 y  f ( x)
dy n
dx n 1 dx

The linear DE has the following two properties:

1- y and all its derivatives are of the first degree.

2- all the coefficients a n , a n 1 , ..., a1 and a0


function of the independent variable x only or constants.

If the DE not linear it said to be nonlinear.


d2y Linear
2
y0
dx

2 5
d y d y
3 2

 3  2  y 7
y Nonlinear
 dx   dx 

yy  xy  x 2 y  y Nonlinear

y  xy  x 2 y  y Linear

y   xy   x 2 y   e y Nonlinear
Note

dny d n 1 y dy
In the DE: an  an 1  ...  a1  a0 y  f ( x)
dy n
dx n 1 dx

f  x  0 DE said to be homogeneous.

f  x  0 DE said to be non-homogeneous.
Methods of Solution of First Order ODE

(1) Separable Differential Equations:

dy g ( x )
dy
dx
 f ( x, y )  
dx h( y )
  h( y) dy   g ( x)dx  c

M ( x, y )dx  N ( x, y )dy  0  a  x  b  y  dx  c( x) d  y  dy  0
Example

Solve the IVP dy  e x  y 1, y  0   1


dx
Solution
dy
 e x e y 1
dy
 e x  y 1
dx dx

 e x
dx  e1 y
 dy  c e x  e1 y  c

x  0  y 1 1  1  c  c  2

e x  e1 y  2  0
Example

Solve the DE x 2
y  2x 2
 dy
dx
 xy  2 y  x  2
Solution
 x y  2x 
2 2 dy
dx
 xy  2 y  x  2

x 2 ( y  2)dy  y ( x  2)  ( x  2)dx
x 2 ( y  2)dy  ( x  2)( y  1)dx
y2 x2 1 1 2
y 1
dy  2 dx  1  ( y  1)dy   x  x 2 dx  c
x
2
y  ln( y  1)  ln x   c
x
DE’s Reducible to Separable

This type takes the form:

dy
 f (ax  by  c)
dx

Put u  ax  by  c

this transform the DE into separable one.


Example

Solve the DE dy  (2 x  y  7)2


dx
Solution
let u  2 x  y  7
differentiate w.r.t. x, we get: du
du dy  2  u 2   dx  c
2
dx dx 1 1  u 
du
tan   xc
 2  u2 2  2
dx
1 1  2 x  y  7 
du 2
tan   xc
2u 2  2 
dx
Example

Solve the DE dy  sin( x  y  1)


dx
Solution
let u  x  y  1
du
differentiate w.r.t. x, we get:
 1  sin u   dx  c
du dy
 1 1  sin u
dx
du
dx
 1  sin2 u du   dx  c
 1  sin u
 sinu du   dx  c
2
dx sec 2
u  (cos u )
du
 1  sinu tan u  (cos u ) 1  x  c
dx
(2) Homogeneous DE’s

dy y 
This type takes the form: f  
dx x 

The right hand side is a homogeneous function of degree zero.

y
u
x

This transform the DE into separable one.


Example

y y
dy dy y
Solve the DE: x  y x ex  e x
dx dx x
Solution
y
let  u  y  ux
x du
differentiate w.r.t. x, we get: x  eu
dx
dy du 1
 e du   x dx  c
u
u  x
dx dx
u
u x
du
 u  eu e  ln x  c
dx
Example
y
1
Solve the DE: dy x  y dy
 x

dx x  y dx 1  y
x
Solution
y du 1  u
let  u  y  ux x  u
x dx 1  u
differentiate w.r.t. x, we get:
du 1  u  u  u 2
x 
dy du dx 1 u
u  x
1 u 1
 1  u2 du   x dx  c
dx dx
du 1  u
u x 
tan u  ln 1  u 2   ln x  c
1
dx 1  u 1

2
(3) Exact Differential Equations:
This type takes the form: M ( x, y ) dx  N ( x, y )dy  0

Such that: M N

y x

The solution function will take the form: f ( x, y )  c


Example

  
Solve the DE 2 y 2 x  3 dx  2 yx 2  7 dy  0 
Solution
M N
2
M  2y x  3 2
N  2 yx  7  4 yx 
y x

𝒇 𝒙, 𝒚 𝟐𝒚𝟐 𝒙 𝟑 𝒅𝒙 𝟕 𝒅𝒚 𝒄

f ( x, y )  y x  3 x  7 y  c
2 2
Example

   
Solve the DE y 3  y 2 sin x  x dx  3xy 2  2 y cos x dy  0
Solution
M 2 N
 3 y  2 y sin x 
y x

𝒇 𝒙, 𝒚 𝟑𝒙𝒚𝟐 𝟐𝒚 𝒄𝒐𝒔 𝒙 𝒅𝒚 𝒙 𝒅𝒙 𝒄

1 2
f ( x , y )  xy  y cos x  x  c
3 2

2
DE’s Reducible to Exact:
This type takes the form: M ( x, y ) dx  N ( x, y )dy  0

Such that: M  N
y x

Sometimes there exist a suitable function called an integrating


factor such that,

 M ( x, y )dx   N ( x, y )dy  0

which is exact DE.


The problem now is: how to obtain  ( x, y )
Case (I):

𝟏 𝝏𝑵 𝝏𝑴 𝑨 𝒙 𝒅𝒙
𝑨 𝒙 𝝁 𝒙 𝒆
𝑵 𝝏𝒙 𝝏𝒚

Case (II):

𝟏 𝝏𝑴 𝝏𝑵 𝝁 𝒚 𝒆 𝑩 𝒚 𝒅𝒚
𝑩 𝒚
𝑴 𝝏𝒚 𝝏𝒙
Example

Solve the DE   
y 2  xy  y dx  x 2  3xy  2x dy  0 
Solution
M  y  xy  y
2
N  x  3 xy  2 x
2

M N
 2y  x 1  2x  3y  2
y x

1  M N    x  y  1 1
      B( y )
M  y x  y  x  y  1 y
1
 dy
 ( y )  e  B ( y ) dy  e y
 eln y  y
   
y 2  xy  y dx  x 2  3 xy  2 x dy  0

  
y 3  xy 2  y 2 dx  yx 2  3 xy 2  2 xy dy  0
  

M N

𝒇 𝒙, 𝒚 𝒚𝟑 𝒙𝒚𝟐 𝒚𝟐 𝒅𝒙 𝟎 𝒅𝒚 𝒄

1 2 2
f ( x, y )  xy  x y  xy 2  c
3

2
Example

Solve the DE   
cos2 x sin x dy  y cos3 x  1 dx  0 
Solution
M  y cos x  1
3
N  cos x sin x 2

M N
 cos3 x  cos3 x  2cos x sin 2 x
y x

1 𝜕𝑁 𝜕𝑀 2 cos 𝑥 sin 𝑥 2 sin 𝑥


𝐴 𝑥
𝑁 𝜕𝑥 𝜕𝑦 cos 𝑥 sin 𝑥 cos 𝑥

2
sin x  1 
2 dx ln   1
 2 ln cos x
 ( x)  e cos x e  e  cos x 
  sec 2 x
cos 2 x
   
cos 2 x sin x dy  y cos3 x  1 dx  0

 
sin x dy  y 
cos x  sec 2

x dx  0

𝒇 𝒙, 𝒚 𝐬𝐢𝐧 𝒙 𝒅𝒚 𝐬𝐞𝐜 𝟐 𝒙 𝒅𝒙 𝒄

f ( x, y )  y sin x  tan x  c
(4) Linear DE’s:
The general first order linear DE takes the form:

dy
 p( x) y  q( x)
dx

Solution steps:

 p ( x ) dx
 ( x)  e

y ( x) 
1
 ( x)
   ( x) q( x) dx  c 
Example

dy
Solve the DE cos x  y sin x  1
dx
Solution
dy sin x 1
y 
dx cos x cos x
sin x 1
p ( x)  q( x) 
cos x cos x
sin x  1 
 dx ln   1
 ln cos x
 ( x)  e cos x e e  cos x    sec x
cos x
1  1 
y ( x)   sec x dx  c  y sec x  tan x  c
sec x  cos x 
(5) DE’s Reducible to Linear (Bernoulli DE):
The general form of Bernoulli DE is:
dy
 p( x) y  q( x) y n
dx

u  y1 n

du
 (1  n) p ( x) u  (1  n)q ( x)
dx
Example dy
Solve the DE x  4y  x 2 y
dx
Solution
1
dy 4
 y  x y2 n  1/ 2
dx  x q x 
p x
1 du
le t u  y 2  (1  n) p ( x) u  (1  n)q ( x)
dx

du 2 1  1 1  
 u x u(x)  x   2  x  dx  c 
2

dx x 2  x 2  
2
2 1
 dx ln   1 1 
( x)  e x  e2ln x
e  x  u ( x)  x  ln x  c 
2

x2 2 
Main
objectives

Study some simple, but important,


engineering applications of the first order
DE like the problem of orthogonal
trajectories, the mixing problem, the
cooling problem, the current in an RL
circuits.
1. Orthogonal trajectories
Introduction: A general equation of the F(x,y;c) = 0
represents a family of curves in the xy - plane depending on
the parameter c. An important question in mathematics is
how to find the general equation of the orthogonal family to
the given one. This problem arises in many applications
such as:
(1) The study of the relation between the equipotential lines
and the lines of force in an electrostatic field.
(2) The relation between the stream lines in aerodynamics
and the velocity equipotential lines.
(3) In hydrodynamics the flow of heat across a plane
surface is orthogonal to the isothermal curves.

Tarek Emam2012 ٣٤
How to find the equation of the Orthogonal trajectories?

(1) Differentiating the equation of the given family


with respect to x.

(2) Using the first step together with the equation


of the given family, eliminate the parameter c
to get the DE of the given family.

(3) Solve the resulting DE to obtain the equation


of family of the orthogonal trajectories.
Example Find the orthogonal trajectories of
the family of parabolas y = cx2.
Solution
y𝑦 = c 𝑐x2𝑥2then
theny’𝑦’= 2cx2𝑐𝑥
yy 22cx 22
Eliminating 𝑐c by dividing we get  cx 
yy cx 22 xx
cx
𝑦’ by (-1/y’)
Replacing y’ 1/𝑦’wewe
get
get
the
the
DEDE
of of
thethe
orthogonal
orthogonal
family
family
1 2
 1  
2 2 yy   x
 yy x  2 yy   x
yy  x separable DE we get
Solving the resulting
Solving the resulting separable DE we get
x2 y 2
xdx  2 ydy  0   xdx   2 ydy  k   k
2x2 1y 2
xdxx2 2 ydy
y2
 0   xdx   2 ydy  k    k
or,  2 1
 1, which is a family of ellipses.
2k2 k2
x y
or,   1, whichis a familyof ellipses.
2k k
2. Current in R-L series circuit

In an electric circuit containing only a resistor and an


inductor, Kirchhoff’s second law states that: the sum of
the voltage drop across the resistor (𝑅𝐼) and the voltage
drop across the inductor (𝐿𝑑𝐼/𝑑𝑡) is the same as the
impressed voltage (𝐸 𝑡 ) on the circuit. Thus we obtain a
linear DE of the form
dI
L  RI  E (t )
dt
This DE can be solved to determine the current in the
circuit at any time t.
Example
A 30-volt electromotive force is applied to an R-L series circuit in
which the inductance is 0.1 henry and the resistance is 50 ohms. Find
the current 𝐼 𝑡 . Determine the current as t   .
Can you solve this DE by
Solution separation of variables?

dI dI dI
L  RI  E ( t )  0 . 1  50 I  30   500 I  300 
dt dt dt
 ( t )  e  500 dt  e 500 t  I ( t )  e  500 t [  300 e 500 t dt  c ] 
3
I ( t )   ce  500 t
5
3 3 3 3  500 t
 I ( 0 )  0  0   c  c    I (t )   e
5 5 5 5
3 3 3
As t   , I  lim (  e  500 t )  . Try to solve this
t  5 5 5 problem if
E(t) = 3sin2t
3. Newton’s law of cooling

Newton’s law of cooling states that the temperature T(t)


changes in a cooling body is proportional to the difference
between the temperature in the body and the constant
temperature Tm of the surrounding medium. This leads to
the DE
dT
 k (T  Tm )
dt
This simple DE can be solved to determine the
temperature of the body at any time t.
Example
When a cake is removed from a baking oven, its temperature is
measured at 300°F. Three minute later its temperature is 200°F. How
long will it take to cool off at a room temperature of 70°F.
Notice that the
temp. reaches
Solution 70.5°F after
dT dT dT 32.3 minutes
 k (T  Tm )   k (T  70)   kdt 
dt dt T  70
dT
   kdt | c  ln T  70  kt  c1  T  70  c2e kt (c2  ec1 ) 
T  70
T (t )  70  c2e kt Why the absolute
vale sign is
 T (0)  300  300  70  c2  c2  230 removed?

1 13
T (3)  200  200  70  230e3k  e3k  13
23
 k  ln 23  0.19018 
3
T (t )  70  230e  0.19018t
It is clear that the temperature reaches the room temperature when t  .
5. Terminal velocity problem

Let v(t) is the velocity of a falling object under the influence of gravity
through a medium such as water, oil, or air, which retards the downward
motion. Laboratory experiments suggests that the retarding force is
proportional to the square of the velocity of the object.
Hence, by Newton’s law of motion we have
dv
ma  mg  v 2  m  mg  v 2
dt
This is a separable DE which can be solved to determine the velocity of
the object at any time t. If we assume that the initial velocity v(0) = 0,
then the solution of the given initial value problem is given by
𝑚𝑔 𝛼𝑔
𝑣 𝑡 tanh 𝑡
𝛼 𝑚

Hence the terminal velocity is the velocity when 𝑡 → ∞ which is


𝑚𝑔
𝑣 𝑡
𝛼
Exercises

1. Solve the following differential equations

2. Solve the following differential equations


3. Solve the following differential equations

4. Solve the following differential equations


Lecture 10
Mathematics 3
BAS111

Fourier Series

1
Main
objectives

(1) Find the Fourier series for periodic functions.


(2) Determine the sum of Fourier series representing
discontinuous functions.
(3) Find the Fourier sine and Fourier cosine series.
(4) Use Fourier series to find the exact sum of certain
infinite series.

2
Definition
A function f(x) is said to be periodic with period p > 0, if f(x) is
defined for all real x, and f(x + p) = f(x) for all x, where p is the
smallest number satisfying this property.
Exapmles:
(1) The functions sin x and cos x are periodic with period 2, since
sin( x + 2) = sin x and cos( x + 2) = cos x
(2) sin nx and cos nx are also periodic with period 2/n.
(3) We shall consider f(x) = 1 as periodic with any period.
(4) a0 + a1cos x + b1sin x + a2cos 2x + b2sin 2x is periodic with
period 2.

3
Fourier Series for Continuous Periodic Functions with period 2L

Any continuous periodic function f(x) of period 2L can be


represented by the trigonometric series:
a0  n n
f ( x)    (an cos x  bn sin x)
2 n 1 L L
This is also true for any piecewise continuous (has finite points of
discontinuities) periodic function f(x) of period 2L, such that at any
point of jump discontinuity c,
f(c) = [f(c+) + f(c)]/2
where f(c+) and f(c) are the right- and left-hand limits of f at c.
The Fourier coefficients are given by:
1 L
a0   f ( x)dx
1 L n 1 L n
an   f ( x) cos xdx bn   f ( x) sin xdx
L L L L L L L L
4
Fourier Series for Continuous Periodic Functions with period 2π

If the period of the function f(x) is 2π then the above representation


becomes the following simplified form:
a0 
f ( x)    (an cos nx  bn sin nx)
2 n 1
Where
 1  1 
1 an   f ( x) cos nxdx bn 
a0   f ( x)dx  f ( x) sin nxdx
     

5
The computation and study of Fourier series is
known as harmonic analysis and is extremely
useful as a way to break up an arbitrary periodic
function into a set of simple terms that can be
plugged in, solved individually, and then
recombined to obtain the solution to the original
problem or an approximation to it to whatever
accuracy is desired or practical.

6
f(x) Periodic Function a0
2

=
x
 
a1 cos x b1 sin x
L L

+ +
2 2
a2 cos x b2 sin x
L L
+ + + …

7
8
2L  2  L  
1

sin nx

sin n  0, n  0,1,2,....
cos n  (1) , n  0,1,2,....
n

9
1/2

10
(a) (b)

2
sin x

2 2
sin x  sin 3 x
 3
(c)
(d)

2 2 2 2 2 2 2
sin x  sin 3 x  sin 5 x sin x  sin 3 x  sin 5 x  sin 7 x
 3 5  3 5 7

(e) (f)

1 2 2 2
2 2 2 2 2  sin x  sin 3 x    sin 23 x
sin x  sin 3x  sin 5 x  sin 7 x  sin 9 x 2  3 23
 3 5 7 9 11
Then prove that
 1 1 1 2
 1 2  2  
k 1 ( 2k  1)
2
3 5 8
12
Solution =1

2L  2  L  1

13
14
The previous Fourier series represents the function |x|
for 1  x  1, i.e.:
1  4
| x |   cos[(2k  1)x]
2 k 1 (2k  1) 
2 2

Substituting x = 0, we get: 0  1  4
 
2 k 1 (2k  1)2  2
Thus, we get the formula:

1 1 1 2

k 1 ( 2k  1)
2
 1 2  2  
3 5 8
15
Sometimes we use the
Example 3 variable t instead of x

Sketch the graph of the function


f (t )  t ,  1  t  1, f (t  2)  f (t ),  3  t  3.
Then compute its Fourier series.

Solution
The function is described by the following graph

16
Solution
The period 2 L  2  L  1

t 2 1
1 1 1 11
a0   f (t )dt   tdt     0
L 1 1  2  1 2

 t sin nt  1 sin nt


1
11 1
an   f (t ) cos ntdt   t cos ntdt     dt
L 1 1  n  1 1 n
sin n  [ sin(n )]  cos nt  cos n  cos( n )
1
  2 2  0 0
n  n   1 n
2 2

17
 t cos nt  1 cos nt
1
11 1
bn   f (t ) sin ntdt   t sin ntdt      dt
L 1 1  n  1 1 n
 cos n  [ cos( n )]  sin nt 
1
  2 2 
n  n   1
2 cos n sin n  sin(  n ) 2 cos n 2(1) n 2(1) n 1
    
n n2 2
n n n
a0 
Hence, f (t )    ( an cos nt  bn sin nt )
2 n 1
 2( 1) n 1
  sin nt
n 1 n
2 2 2
 sin t  sin 2t  sin 3t  
 2 3
18
Example 4
2  t , 0  t  2
Sketch the graph of the function v(t )  
 0 , 2t 4
v(t  4)  v(t ), 0  t  12. Then compute its Fourier series.
Given

Solution
The function is described by the following graph
v (t)

t
0 2 4 6 8 10 12
19
2L  4  L  2
2 2
1 2 14 1 2 4 
12 1 t
a0   v (t ) dt   v (t ) dt   ( 2  t ) dt   
0 dt   ( 2  t ) dt   2t   1
L 2 20 2 0 2  20 2 2 0

14 12 4 
an   v(t ) cos ntdt   (2  t ) cos ntdt   0dt ,  
20 20 2 L
1  (2  t ) sin nt  1 2 sin nt
2
     dt
2 n  0 2 0 n
1  cos nt  1  cos 2n 2(1  cos n ) 2[1  (1) n ]
2
 0   2 2    
2  n  0 2n 
2 2
n2 2
n 2 2
20
14 12 4
bn   v(t ) sin ntdt   (2  t ) sin ntdt   0dt
20 20 2

1   (2  t ) cos nt  1 2 cos nt


2
     dt
2 n  0 2 0 n
1 1  sin nt  1 sin 2n
2
1 2
   2 2     
n 2  n   0 n 2n  2 2
n n
Hence,
a0 
v (t )    ( an cos nt  bn sin nt )
2 n 1
1   2[1  ( 1) n ]  nt  2  nt 
   cos  sin 
2 n 1  n 
2 2
 2  n  2 
21
Fourier cosine and Fourier sine Series

Definitions
Let f(x) be a function defined for all real x:
(1) f is an even function if for all x, f(x) = f(x), i.e. the graph of f is
symmetric about the y-axis.
Examples: 1, x2, cosx, 5x6  2sin2x are all even functions.
(2) f is an odd function if for all x, f(x) = f(x), i.e. the graph of f is
symmetric about the origin.
Examples: x, x3, sinx, 5x7  2sin3x are all odd functions.
L L
It is clear that if f(x) is even then  f ( x)dx  2  f ( x)dx
L 0

L
And if f(x) is odd then  f ( x)dx  0
L

22
Fourier Series for even periodic functions

If f(x) is an even periodic function with period 2L, then


all bn become 0. Thus we get:
a0   n 
f ( x)    an cos x
2 n 1  L 
2L
where an are found by: a0   f ( x ) dx
L0
2L n
an   f ( x) cos xdx
L0 L
23
Fourier Series for odd periodic functions

If f(x) is an odd periodic function with period 2L, then


all an become 0. Thus we get:
  n 
f ( x)   bn sin x
n 1  L 

where bn are found by:

2L n
bn   f ( x) sin xdx
L0 L

24
Example: Find the Fourier series for the saw tooth function
defined by f(x) = x for  < x  , and f(x + 2) = f(x) for all x. For
which values of x is f(x) equal to the sum of its Fourier series?

Solution: Since f(x) is odd, all an = 0, and one can get


2 2 n 1 2
bn   x sin nxdx   cos(n )  (1)
0 n n
Thus, we get the following Fourier series which equals f(x) for all
x except when x = , 3, 5,…


2  1 1 
 (1)
n 1
n 1

n
sin(nx)  2 sin x  sin 2 x  sin 3 x  
 2 3 
25
Half Range Fourier Series Expansion

Let f(x) be a piecewise continuous function defined only


on the interval 0 < x < L, then we can extend it to the
interval L < x < L, such that:

(1) f(x) is an even function in such a case we will have a


Fourier cosine series

(2) f(x) is an odd function in such a case we will have a


Fourier sine series as in the following examples:

26
Example: Find the Fourier cosine series for the function:
1 if 0  x 1
f ( x)  
0 if 1 x  2

Solution Here 2L = 4, Hence, L = 2,


2L 2 1
a0   f ( x ) dx   f ( x ) dx   1dx  1
L0 0 0
2L n 1 nx 2  n 
an   f ( x) cos xdx   cos dx  sin  
L0 L 0 2 n  2 
1  2  n   nx 
f ( x)    sin  cos 
2 n 1 n  2   2 
1 2   x  1  3x  1  5x  
  cos   cos   cos   
2  2 3  2  5  2  
27
Example: Find the Fourier sine series for the
function: 1 if 0  x 1
f ( x)  
0 if 1 x  2

Solution Here 2T = 4, Hence, L = 2,


2L n 1
 nx  2   n 
bn   f ( x) sin xdx   sin  dx  1  cos 2 
L0 L 0  2  n   

2   n   nx 
f ( x)   1  cos  sin 
n 1 n   2   2 
2   x  2  2x  1  3x  
 sin   sin   sin   
 2 2  2  3  2  

28
Thank you

29
NUMERICAL
TECHNIQUES
1. Solving Non-Linear equations
We wish to find a root to the equation f(x)=0
in the interval [a,b]

f (b)  0

a b

f (a)  0 The root at which f ( x)  0


1.1. Bisection Method
Example 1
By using the bisection method solve the following equation
to find a root between x 2  6 x  8  0
Solution
Let f ( x)  x 2  6 x  8
Then we have f (0)  8 , f (3)  1
Then we have at least one root in the interval [0 ,3]
So we are going to take the first approximation to the root to be the
03
midpoint of the interval which will be x1   1.5
2
Now since we have f (1.5)  1.25 then we can take the following
approximation to the root to be the midpoint of the interval [1.5 ,3]
1.5  3
which will be x2   2.25
2
The percentage of the approximate error for this iteration is
x2  x1 2.25  1.5
 100   100  33.33%
x2 2.25
Now we can repeat the same iteration process till we get an approximation
to the solution with an acceptable relative error
1.2. Newton-Raphson Method

𝒇 𝒙𝒊 − 𝟎
The slope 𝒎 = 𝒇′ 𝒙𝒊 = Then 𝒙𝒊+𝟏 = 𝒙𝒊 −
𝒇 𝒙𝒊
𝒙𝒊 − 𝒙𝒊+𝟏 𝒇′ 𝒙𝒊
Example 4

Solution We have R(t )  e  t  t , R(t )  e  t  1


then
2. Euler Method for Solving the First order
Ordinary Differential Equations
Exercise
1. By using the bisection method, find one root to the following equations
with an error less than 0.05% (0.01%)
𝑎) 𝑥 3 − 3𝑥 − 5 = 0 2, 3
𝑏) 𝑥 − 𝑐𝑜𝑠 𝑥 = 0 [0, 1]
𝑐) 3𝑥 − 𝑒 𝑥 = 0 0, 1
2. By using the Newton-Raphson method, find one root to the following
equations with an error less than 0.0005%
𝑎)3𝑥 − 𝑒 𝑥 + sin 𝑥 = 0 𝑏) 2𝑥 tan 𝑥 = 1
𝑑𝑦
3. Given + 𝑦 = 𝑥 2 , 𝑦 0 = 1 by using ℎ = 0.1 find 𝑦(0.5) and 𝑦(1) by
𝑑𝑥
using Euler method.
𝑑𝑰
4. Given + 𝟏𝟎 𝑰 = 𝟐𝟎, 𝑰 0 = 𝟎 by using ℎ = 0.5 find 𝐼(5) and 𝑦(1) by
𝑑𝒕
using Euler method.
5. The population 𝑃(𝑡) of a certain town is modelled by the following Initial
𝑑𝑷(𝒕)
Problem: = 𝒂𝑷 𝒕 − 𝒃(𝑷(𝒕))2 , where 𝑎 = 0.03, and 𝑏 = 1.5 ∗ 𝟏𝟎−𝟕 .
𝑑𝒕
If 𝑃 0 = 60 ∗ 10𝟑 , use a numerical technique (Euler method) to find the
population after 5 years.
triple Integrals
and green
theorem
Triple Integrals:

 f ( x, y, z )dv
V
Important properties of the Triple integral:

 a f  x, y , z  dv  a  f  x , y , z  dv ,
V V

 ( f ( x, y , z ) g ( x, y , z ))dv   f ( x, y , z )dv   g ( x, y , z )dv.


V V V

 f ( x, y , z )dv   f ( x, y , z )dv   f ( x, y , z )dv


V V1 V2
Evaluating the triple integral in rectangular coordinates

 f  x, y , z  dv
V

b 2  x   2  x , y 

 f  x, y , z  dv     f  x , y , z  dz dA
V b 1  x   1  x , y 
Example
Evaluate the iterated integral   x  y  dv
V
over the region V bounded by the planes:
x  0 , y  0 , z  0 , x  y  z  1.
Solution:
1 1 x 1 x  y

  x  y  dv      x  y  dz dy dx
V 0 0 0
1 1 x z 1 x  y
   x  y z dy dx
0 0 z 0
1 1 x
   x  y 1  x  y  dy dx
0 0
Remark:
If f ( x , y , z )  1 , then the volume of the solid V is

V   dv
V
If  ( x , y , z ) , is density, then the mass of the solid V

m    ( x , y , z )dv
V
The coordinates of the center of the solid V are given by:
1 1
xc   x  ( x , y , z )dv , yc   y  ( x , y , z )dv ,
m m
V V
1
z c   z  ( x , y , z )dv .
m
V
Example
Find the volume and the coordinates of the center of gravity of
the region bounded by the parabolic cylinder:
z 4x 2
and x  0 , y  0 , y  6 , z  0 .
Assuming the density to be constant k.

Solution:
x  2 y 6 z  4 x2 x  2 y 6
z  4 x2
V    dz dy dx    z z 0
dy dx
x 0 y 0 z 0 x 0 y 0

x  2 y 6 x2
   4  x 2 dy dx    4  x2  y 0
 y  y 6
dx
x 0 y 0 x 0
x2
 
2
 1 3
6  4  x2 dx  6  4 x  x   32
 3 0
x 0
The mass of solid is:

m     x , y , z  dx dy dz   k dx dy dz
V V
 k  dx dy dz  kV  32k
V

The coordinates of the centre of gravity:


1 k
xc 
m   x dz dy dx 
32 k  x dz dy dx
V V
2 6 4 x2
1 4
    xdzdydx 
32 3
0 0 0
1 k
yc 
m   y dz dy dx  32k  y dz dy dx
V V
2 6 4 x2
1
    ydzdydx  3
32
0 0 0

1 k
zc 
m   z dz dy dx  32k  z dz dy dx
V V
2 6 4 x2
1 8
    zdzdydx 
32 5
0 0 0
INTRODUCTION
Green’s Theorem gives the relationship between a line
integral around a simple closed curve C and a double
integral over the plane region D bounded by C. We
assume that D consists of all points inside C as well as
all points on C.
Notations We shall mean by the positive orientation of a simple
closed curve C the counterclockwise traversal of C.
Thus, if C is given by the vector function r(t), a ≤ t ≤ b, then the
region D is always on the
left as the point r(t) traverses C.
Theorem Let C be a positively oriented, “piecewise-
smooth” simple closed curve in the plane and let D
be the region bounded by C. If P and Q have
continuous partial derivatives on an open region that
contains D, then
 Q P 
C P dx  Q dy  D  x  y  dA
Double integral
Line integral
Example 1 Use Green’s theorem to evaluate
where C is the triangular curve consisting of
 C
x 4 dx  xy dy
the line segments from (0, 0) to (1, 0), from (1, 0) to (0, 1), and from (0, 1) to (0,
0).

Since P(x, y) = x4 and Q(x, y) = xy, then

 Q P 
C x dx  xy dy  D  x  y  dA
4

1 1 x
  ( y  0) dy dx
0 0
1
  [ 12 y 2 ] yy 10 x dx
0
1
 1
2  0
(1  x) 2 dx
Can you verify by evaluating the
3 1
  (1  x)  
1
6
1
6 corresponding line integral?
0
Example 2 Evaluate ‫( 𝐶ׯ‬3𝑦 − 𝑒 sin 𝑥 )𝑑𝑥 + 7𝑥 + 𝑦 4 + 1 𝑑𝑦
where C is the circle x2 + y2 = 9.

Solution The region D bounded by C is the disk x2 + y2 ≤ 9.


So, let’s change to polar coordinates after applying Green’s
Theorem:
ර (3𝑦 − 𝑒 sin 𝑥 )𝑑𝑥 + 7𝑥 + 𝑦 4 + 1 𝑑𝑦
𝐶
𝜕 𝜕
=ඵ 4
7𝑥 + 𝑦 + 1 − (3𝑦 − 𝑒 sin 𝑥 ) 𝑑𝐴
𝜕𝑥 𝜕𝑦
𝐷
2𝜋 3
=න න (7 − 3)𝑟𝑑𝑟𝑑𝜃
0 0
2𝜋 3 This example shows the
= 4 න 𝑑𝜃 න 𝑟𝑑𝑟 = 36𝜋 significance of using
0 0 Green’s theorem when the
vector field is too
complicated.
Example 3 Evaluate ‫ 𝑦 𝐶ׯ‬2 𝑑𝑥 + 3𝑥𝑦𝑑𝑦
where C is the boundary of the semiannular region D in the upper half-
plane between the circles x2 + y2 = 1 and x2 + y2 = 4.

Solution In polar coordinates, we can write:


D = {(r, θ) | 1 ≤ r ≤ 2, 0 ≤ θ ≤π}
So, Green’s Theorem gives:
𝜕 𝜕 2
ර 𝑦 2 𝑑𝑥 + 3𝑥𝑦𝑑𝑦 = ඵ (3𝑥𝑦) − (𝑦 ) 𝑑𝐴
𝐶 𝜕𝑥 𝜕𝑦
𝐷
𝜋 2
= ඵ 𝑦𝑑𝐴 = න න (𝑟 sin 𝜃)𝑟𝑑𝑟𝑑𝜃
0 1
𝐷
𝜋 2 2
1 3 14
= න sin 𝜃 𝑑𝜃 න 𝑟 2 𝑑𝑟 = [− cos 𝜃]𝜋0 𝑟 =
0 1 3 1 3

This example shows the significance of


using Green’s theorem when the curve C
consists of many different pieces.
Multiple
Integrals
Double Integrals:
b d
 y d
x b

a c f (x , y )dydx  xa  yc f (x , y )dy  dx
 
Important properties of the double integral:

 a f  x, y  dA  a  f  x , y  dA
R

  f  x, y   g  x, y  dA   f  x, y  dA   g  x , y  dA
R R R

 f  x, y  dx dy   f  x, y  dx dy   f  x , y  dx dy
R R1 R2
Example
2 3

  ydxdy
Evaluate the iterated integral: 2
x
1 0

y 2
2 3
3 2 
Solution:
 ydxdy     x ydx  dy
2
x
1 0 y 1 0 
3
2
x  3 2
  y   dy  9  ydy
1  3 0 1

2
y  2
27
 9  
 2 1 2
Evaluating Double Integrals over General Regions

b  g 2 x   d  h2  y  
 f ( x , y ) dA  
   f  x , y  dy  dx
  f ( x , y ) dA     f  x , y  dx  dy

a  g 1x  D c  h1  y  
D 
Example

Evaluate  D
( x  2 y )dA

D : y  2 x 2 and y  1  x 2 .
Solution:
1 1 x 2

D
( x  2 y )dA   
x 1 y 2 x 2
( x  2 y )dydx

1 1 x 2

   xy  y 2  dx
1 2 x2
1
32
  (1  x  2x 2  x 3  3x 4 )dx 
1
15
Example
2 1

 e
y 2
Evaluate dy dx
0 x /2
Solution:
D : y  x / 2, y  1, x  2, x  0. y
y 1

2 1 1 2y
2
y y 2
  e dy dx   e dx dy
y  x /2
0 x /2 0 0
x
2 x2 y
1
x e y  x 2
   dy
  x 0
0
1 1
  2 y e  y 2  dy   e y 2   e1  1  1  1
   
   0 e
0
The Double Integral in Polar Coordinate:

x  r cos y  r sin 

x  y r
2 2 dA  rdrd
Example
Evaluate  D
(3x  4 y 2 )dA in the upper half-plane
bounded by the circles D : x 2  y 2  1 and x 2  y 2  4.
Solution:
 2

 (3x  4 y 2 )dA       )rdrd


2 2
(3r cos 4 r sin
R
0 r 1
 2
      )drd
2 3 2
(3r cos 4 r sin
0 r 1

  (r cos  r sin  ) d
3 4 2 2

1
0
 
15 15
  (7cos  15sin  )d   (7cos  (1  cos2 ))d 
2

0 0
2 2
Applications of Double Integrals:
(1) Calculating the area of a plane region:

A   dA
D
(2) Calculating the Volumes:

V   f ( x, y )dA .
D
Example
Calculate the area of a region bounded the curves:
y  2  x 2, y  x .
Solution:

1 2 x2 1
2 x2
A   dA    dy dx    y x
dx
D 2 x 2
1
 2 1
 
3
x x
 2  x  x dx   2 x   
2
 3 2 
2  2
1 1 8 4 27
2  4  
3 2 3 2 6
Example
Calculate the volume of a solid bounded by the surfaces:
x  0, y  0, x  y  z  1, z  0 .
Solution:
V   f ( x, y ) dA 
D
 1  x  y  dA
D
1 1 x
  1  x  y  dy dx
0 0
1 x
1
 y2  1
 
1  x
2
   1  x  y   dx   1  x 1  x   dx
 2  2
0  0 0
1
1
1  x  2  1  x  
3
1
 dx    
2  6  6
0  0
Example
Find the volume of the solid bounded by the paraboloid:
z  1 x 2  y 2, z  0 .
Solution:

V   f ( x, y ) dA   (1  x 2  y 2 )dA
D D
2 1 2 1
      
 
2 3
(1 r ) rdrd d ( r r )dr
0 0 0 0
1
r r  
2 4
 2    
 2 4 0 2

You might also like