Professional Documents
Culture Documents
Vector and ODEs
Vector and ODEs
1 Vector Calculus 3
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Vector Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Addition and Subtraction of Vectors . . . . . . . . . . . . . 4
1.2.2 Scalar Multiplication . . . . . . . . . . . . . . . . . . . . . . 4
1.2.3 Vector Multiplication . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Scalar and Vector Fields . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.1 Gradient of a Scalar Field . . . . . . . . . . . . . . . . . . . 6
1.3.2 Vector Field . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.3 Divergence of a Vector Field . . . . . . . . . . . . . . . . . . 7
1.3.4 Curl of a Vector Field . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Equations of Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Tangent Lines and Normal Plane to space curves . . . . . . . . . 9
1.6 Tangent Plane to a surface at a point . . . . . . . . . . . . . . . . . 10
1
2 CONTENTS
Vector Calculus
1.1 Introduction
= −2i + 7j − 8k.
= 6i + j − 6k.
= 4i + 8j − 14k
= 0.5i + j − 1.75k
Vector multiplication include scalar or dot product, vector cross product and
vector triple product.
r~1 .~
r2 = x1 x2 + y1 y2 + z1 z2 (1.1)
If a dot product of two vectors is zero, the two vectors are said to be perpen-
dicular or orthogonal to each other. Orthogonal projection of one vector onto
another (~a, ~b) is the length of the shadow of ~a along ~b when the light is vertically
above ~a and ~b is horizontally oriented. The orthogonal projection of ~a onto ~b is
= |~a| cos θ where θ is the angle between the two vectors. A dot product of vectors
~a and ~b is:
which results in a vector. The modulus of the cross product denotes the area
of the parallelogram made by the two vectors i.e. Area = |~r1 × ~r2 |.
vectors as sides.
x1 y1 z1
r~1 × r~2 × r~3 = x2 y2 z2
x3 y3 z3
r~1 × r~2 × r~3 = x1 (y2 z3 − y3 z2 ) − y1 (x2 z3 − x3 z2 ) + z1 (x2 y3 − x3 y2 )
A field is a space or portion of space where the value of some quantity is defined.
If the quantity in question is a scalar, the field is said to be a scalar field and
if the it is a vector then the field is a vector field. Examples of scalar fields are
the density of atmospheric air and temperature at each point in an insulated
wall. F = x + 2y + 3z is an example of a scalar function. If x + 2y + 3z = k where
k is constant, we say a level surface has been defined. There is a collection of
all points at which the scalar field has the same value k.
The gradient of a scalar field is a vector function that gives a vector which is
perpendicular to a given scalar field at a given point. Gradient is defined by
the differential operator, ∇:
∂ ∂ ∂
∇ = i +j +k (1.3)
∂x ∂y ∂z
such that ∇φ is
∂ ∂ ∂
∇φ = (i +j + k )φ.
∂x ∂y ∂z
∂φ ∂φ ∂φ
∇φ = i +j +k .
∂x ∂y ∂z
Vector Calculus 7
The divergence of a vector field is a scalar which tells the extent to which a
vector field explodes. It is interpreted as a dot product of the Grad operator
and a vector field. Given a vector field F~ = F1 i+F2 j +F3 k, then the divergence
of F~ is given by:
∂ ∂ ∂
∇.F~ = (i +j + k ).(F1 i + F2 j + F3 k)
∂x ∂y ∂z
2
∂(x y) ∂(yx) ∂0
= +j +k
∂x ∂y ∂z
∂F1 ∂F2 ∂F3
∇.F~ = + +
∂x ∂y ∂z
∂ ∂ ∂
∇.F~ = (i +j + k ).(x2 yi + yxj + ok)
∂x ∂y ∂z
∇.F~ = 2xy + x
8 Vector Calculus
If the divergence of a vector field is zero, the vector field is said to be solenoidal.
If the divergence of a vector field is positive, the vector field is a source and if
it is negative the vector field is a sink.
The curl of a vector field tells how a vector field rotates. It is given as the
cross product of the Grad operator and the vector field. For vector field F~ =
F1 i + F2 j + F3 k, its curl is:
i j k
~
∇ × F = ∂x
∂ ∂ ∂
(1.4)
∂y ∂z
F1 F2 F3
∂F3 ∂F2 ∂F3 ∂F1 ∂F2 ∂F1
∇ × F~ = i( − ) − j( − ) + k( − )
∂y ∂z ∂x ∂z ∂x ∂y
Then for a vector field F~ = −yi + xj the curl of a vector field F~ is:
i j k
∇ × F~ = ∂x
∂ ∂ ∂ = 2k
∂y ∂z
−y
x 0
If the curl of a vector field is zero, the vector field is said to be irrotational or
conservative.
The vector equation of a line that passes through a position vector ~a in the
direction of vector ~b is given by ~r, where ~r = xi + yj + zk:
~r = ~a + (~b − ~a)t
~r = ~a + ~ut (1.5)
Vector Calculus 9
Given a vector function, F~ (t) = (t − cos t)i + (3 + sin 2t)j + (1 + cos 3t)k. Equation
of a tangent line through a point to is given by:
0
~r(t) = ~u(to ) + λ~u (to ) (1.6)
Example 1.2. Find the equation of the tangent line to the curve F~ (t) = (t −
cos t)i + (3 + sin 2t)j + (1 + cos 3t)k at t = π2 . Find also the equation of the normal
plane through this point.
Solution
0
From the given vector function, F~ (t) = (1 + sin t)i + (2 cos 2t)j + (−3 sin 3t)k. At
0
t = π2 , F~ ( π2 ) = 2i − 2j + 3k and F~ ( π2 ) = π2 i + 3j + k.
10 Vector Calculus
0
~r(t) = ~u(to ) + λ~u (to )
π
~r(t) = ( i + 3j + k) + λ(2i − 2j + 3k)
2
π
2
2
~r(t) = 3 + λ −2
1 3
0
[~r(t) − ~r(to )].F~ (to ) = 0
0
(~r(t) − ~r(to )).F~ (to ) = 0
π
[~r(t) − ( i + 3j + k)].(2i − 2j + 3k) = 0
2
Example 1.3. Find the equation of a i) tangent plane and ii) normal line to the
surface F (x, y, z) = x2 yz + 3y 2 − 2xz 2 + 8z at (1, 2, −1).
Vector Calculus 11
(1.8)
The equation of the tangent plane to the surface at point (1, 2, −1) is:
The equation of the normal line to surface at point (1, 2, −1) is:
0
~r = ~a + λ (to )t
Example 1.4. Find the equations of a i) tangent line and ii) normal plane to a
curve ~r = (t − cos t)i + (3 + sin 2t)j + (1 + cos 3t)k at t = π2 .
12 Vector Calculus
π
Solution: A vector tangent to the curve at a point t = 2
is:
dr
~n = |t= π
dt 2
= (1 + sin t)i + 2 cos 2tj − 3 sin 3tk|t= π2
~n = 2i − 2j + 3k
π
x− 2 y−3 z−1
= =
2 −2 3
x − xo y − yo z − zo
= =
a b c
Exercises
1.
2.
Chapter 2
2.1 Introduction
dy d2 y dn y
A differential equation is an equation containing differential coefficients , 2 , ... n
dx dx dx
which are also represented as y 0 , y 00 , . . . y n or the differentials dy, d2 y, ...dn y, dx, d2 x, ..dn x
of one or more dependent variables with respect to one or more independent
variables. Differential equations are classified by:
2. Order - i.e. 1st , 2nd , ...nth order. The order represents highest derivative in
the equation.
d2 y dy
The equation 2
− 3 + 2y = 0 is a second order linear ordinary differential
dx dx
equation with constant coefficients. The standard form of a first order differen-
tial equation is:
There are different types of first order differential equations that are solved
using different ways. Four types of first order equations include separable
variables, linear, homogeneous and exact first order differential equations.
dy x2
Example 2.1. Solve the differential equation = .
dx 1 − y2
Ordinary Differential Equations 15
Solution The right hand side of the equation can be separated in f (x) and
g(y) hence can be solved by separation of variables, we get:
dy x2
=
dx 1 − y2
(1 − y 2 )dy = x2 dx
Z Z
2
(1 − y )dy = x2 dx
y3 x3
y− = +c
3 2
Exercise
dy
a) Find the general solution of dx
= xy. If the curve passes through (2, 1),
find the particular solution.
dy
b) Solve = ex (1 + y 2 ).
dx
d(I.F × y)
= I.F × f (x)
dx
0 1
Example 2.2. Solve y + y = 2, x 6= 0.
x
16 Ordinary Differential Equations
1
R
Solution The integrating factor is e x dx = eln x = x. Therefore multiplying
0 1
the differential equation y + y = 2 by the integrating factor, we get
x
0 1
x(y + y) = 2x
x
d(xy)
= 2x
dx
xy = x2 + c
c
y = x+ f or x 6= 0
x
c
Giving a general solution y = x + x
or alternatively xy − x2 = c
A differential equation of the form y 0 = f (x, y), if it can be written in the form
dy y−x y 2 − x2
y 0 = F ( xy ) when x 6= 0. Examples of such equations are = or .
dx x−y xy
Such equations are solved by substituting y = vx or v = xy which will result in
a separable variable differential equation.
y
Example 2.3. Solve (xe x + y)dx − xdy = 0.
x(ev + v − v)dx − x2 dv = 0
An ordinary differential equation of the form P (x, y)dx + Q(x, y)dy = 0 is exact
if there exists a function f (x, y) such that df (x, y) = P (x, y)dx + Q(x, y)dy i.e. the
right side is the total differential of some function f (x, y). If such a function
∂f ∂f
exists, then ∂x
= P (x, y) and ∂y
= Q(x, y). The solution of such an equation is
f (x, y) = c. The function f (x, y) exists if
∂Q ∂P
=
∂x ∂y
If this is the case, then we get the solution by integrating P with respect to x
and Q with respect to y. f (x, y) is then given by the sum of the common term(s)
i.e. terms in x only and those in y only.
∂P ∂Q
Solution = = 6x2 y. Therefore the equation is exact. So integrating
∂y ∂x
Q(x, y) or P (x, y) we get:
Z
3x2 y 2 dx = x3 y 2 + g(y)
Z
2x3 ydy = x3 y 2 + h(x)
2.3 Exercise
dy
1. =x+y
dx
0
2. y = sin(x − y)
2xy + 1 y−x
3. Solve dx + dy = 0
y y2
dy 3x2 y + 2xy
6. =− 3
dx x + x2 + 2y
dn y dn−1 y dy
an n
+ a n−1 n−1
+ ...a1 + ao y = F (x) (2.2)
dx dx dx
0
an y n + an−1 y n−1 + ...a1 y + ao y = F (x) (2.3)
Referring to equation (2.2), second order differential equation takes the highest
derivative, n to be 2. The general form of the second order differential equation
is:
d2 y dy
a0 2
+ a1 + a2 y = F (x) (2.4)
dx dx
Ordinary Differential Equations 19
a0 y 00 + a1 y 0 + a2 y = F (x) (2.5)
Second order ordinary differential equations with constant coefficients take the
form
00 0
a0 y + a1 y + a2 y = 0 (2.6)
Where a0 , a1 and a2 are real numbers. Methods of solving such type of differ-
ential equation involve coming up with a characteristic equation from the
original differential equation, then solve it to determine the required solution.
0
The characteristic equation takes the form of substituting y with 1 (m0 ), y
00
with m1 and y with m2 . A characteristics equation of equation (2.6) takes a
quadratic form as:
a0 m2 + a1 m + a2 = 0 (2.7)
i. Equal and real - If there are equal roots, say, m1 twice, the solution of
the differential equation takes the form y = (ax + b)em1 x .
ii. Distinct and real - If there are two distinct roots, say, m1 and m2 , the
solution of the differential equation takes the form y = aem1 x + bem2 x .
d2 y dy
2. − 6 + 9y = 0
dx2 dx
d2 y dy
3. + 2 + 2y = 0
dx2 dx
Solutions
00 0
1. The characteristic equation of the equation y −y −6y = 0 is m2 −m−6 = 0,
which results in (m−3)(m+2) = 0. The solutions of characteristic equation
are m = 3 and m = −2. The solution to the differential equation is:
y = ae−2x + be3x
00
2. The characteristic equation of y − 6y 0 + 9y = 0 is m2 − 6m + 9 = 0, which
results in (m − 3)(m − 3) = 0. The solutions characteristic equation are
m = 3 twice. The solution to the differential equation is: y = (ax + b)e3x
00
3. The characteristic equation of y + 2y 0 + 2y = 0 is m2 + 2m + 2 = 0 which
√
result in solutions m = −1 ± 2i. The solution of the differential equation
√ √
is: y = e−x (a cos 2x + b sin 2x)
Exercises
Solve the following homogeneous differential equations.
1. y 000 − 3y 00 + 4y = 0
2. y 0000 + 2y 00 + y = 0
dn y dn−1 y dy
an n
+ a n−1 n−1
+ ...a1 + ay = f (x) (2.8)
dx dx dx
Ordinary Differential Equations 21
where f (x) 6= 0. The general solution will be expressed as a sum of the com-
plementary solution and a particular solution of the non-homogeneous equa-
tion.
The solution of such an equation is got by first letting f (x) = 0 and getting
the solution to the resulting homogeneous equation. This solution is called the
complementary function. The particular solution is then found for f (x). The
form of the particular solution depends on the form of the right hand side. It
takes the following forms, if f (x) is:
ii. a trigonometric function, say f (x) = 3 cos 2x, then yp = a cos 2x + b sin 2x.
y = yp + yc
The presence of f (x) means that some function g(x) has to be found from f (x)
then added to the complementary function to form the complete solution. The
type of function g(x) depends on the function f (x).
00 0
Example 2.6. Find the general solution of the differential equation y − 4y +
3y = 2x2 − 3
Solution: The solution will be given by the sum of the complementary and
particular solution. The complementary solution is got from the characteristic
22 Ordinary Differential Equations
equation:
m2 − 4m + 3 = 0
(m − 3)(m − 1) = 0
m = 3 or 1
yp = ax2 + bx + c
0
yp = 2ax + b
00
yp = 2a
2 2 16 25
yp = x + x+
3 9 27
y = yc + yp
2 16 25
y = aex + be3x + x2 + x +
3 9 27
ii with exponential
Exercises
Solve the following problems using the given hints.
00 0
1. 2y + 2y + 33y = x2 + 2x − 1. Use the particular solution yp = ax2 + bx + c
to get the first and second derivatives and substitute in the original ODE
to get the values of the coefficients.
00 0
2. y − 4y + 3y = x2 . Take yp = ax2 + bx + c.
00 0
3. y − 5y − 6y = 2e3x . Take yp = ae3x .
00 0
4. y − 4y + 3y = 2e3x . Take yp = axe3x since a term of the form ae3x is part
of the complimentary function.
00 0
5. y + 2y − 3y = sin x. Take yp = a sin x + b cos x
00 0
6. y + 3y − 4y = sin 2x. Take yp = x(a sin 2x + b cos 2x) since sin 2x is part of
the complimentary function.
0000 00
7. y − 4y = x2 + ex
000 00 0
8. y − 2y + y = 2 − 24ex + 40e5x
0000 00
9. y + 2y + y = 3x + 4
0000 000 00
10. y + 2y + 2y = 3ex + 2xe−x + e−x sin x