0% found this document useful (0 votes)
3 views40 pages

Examples All

The document covers topics in linear algebra, including orthogonal matrices, Gauss elimination, and vector spaces. It provides examples demonstrating linear independence and dependence of vectors and functions, as well as the concept of span and basis in R2. The document emphasizes the importance of matrix rank and transformations in understanding these concepts.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views40 pages

Examples All

The document covers topics in linear algebra, including orthogonal matrices, Gauss elimination, and vector spaces. It provides examples demonstrating linear independence and dependence of vectors and functions, as well as the concept of span and basis in R2. The document emphasizes the importance of matrix rank and transformations in understanding these concepts.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1 Linear Algebra

1.1 Matrices and Linear Systems


 2

√1 √1
! √
3 1
!
3
(− 23 ) 1
3
2 2 2  √2 1 2 2
Example 7. Show that √1
, and   are or-
(− √12 ) − 12 3 3
2
3
1
3
2 2
3 3
(− 23 )
thogonal matrices.
Solution. Clearly,
! !T ! !  
√1 √1 √1 √1 √1 √1 √1 √1 1 0
2 2 2 2 2 2 2 2
√1
= = ,
2
(− √12 ) √1
2
(− √12 ) √1
2
(− √12 ) √1
2
(− √12 ) 0 1

√ ! √ !T √ ! √  !  
3 1 3 1 3 1 3 1
2  √2 2  √2 2  √2 2

√2
1 0
= = ,
− 21 3
− 12 3
− 21 3 1 3 0 1
2 2 2 2 2

and
 2
 T   
3
(− 32 ) 1
3
2
3
(− 23 ) 1
3
2
3
(− 23 ) 1
3
2
3
1
3
2
3
 1 2 2  1 2 2  =  1 2 2   (− 2 ) 2 1 
3 3 3 3 3 3 3 3 3 3 3 3
2 1
3 3
(− 23 ) 2
3
1
3
(− 23 ) 2
3
1
3
(− 23 ) 1
3
2
3
(− 23 )
 
1 0 0
=  0 1 0 .
0 0 1

Thus, three matrices are orthogonal.

1.1.1 Gauss Elimination


Example 9. Transform the following matrices into row-reduced forms.
   
(−1) 4 1 1 (−2) 1 3
 0 0 0 0  and  0 1 1 .
0 0 0 1 2 0 1
Solution. We simply have
   
(−1) 4 1 1 (−1) 4 1 1
R2 ↔R3  
 0 0 0 0  ∼  0 0 0 1 ,
0 0 0 1 0 0 0 0

and
     
(−2) 1 3 (−2) 1 3 (−2) 1 3
R1 +R3 →R3 R3 −R2 →R3  
 0 1 1  ∼  0 1 1  ∼  0 1 1 .
2 0 1 0 1 4 0 0 3

1
1.2 Vector Spaces
Example 11. 1. Show that (1, 1), (−3, 2) are linearly independent.

2. Show that (1, 1), (−3, 2), (2, 4) are linearly dependent.

3. Show that 1, x, x2 , (x − 4)2 are linearly dependent.

4. Show that e−x , ex , cosh(x) are linearly dependent.


Solution. 1. Let us consider

α(1, 1) + β(−3, 2) = (0, 0),

which yields (
α − 3β = 0 α=0
=⇒
α + 2β = 0 β = 0.
This shows that (1, 1) and (−3, 2) are linearly independent.

2. Let us consider
α(1, 1) + β(−3, 2) + γ(2, 4) = (0, 0),
which yields
( α = 16t
α − 3β + 2γ = 0
=⇒ β = 2t
α + 2β + 4γ = 0
γ = − 5t,
where t ∈ R. With t = 1, we obtain

16(1, 1) + 2(−3, 2) − 5(2, 4) = (0, 0),

which shows that (1, 1), (−3, 2) and (2, 4) are linearly dependent.

3. Let us consider
α + βx + γx2 + δ(x − 4)2 = 0 · 1 + 0 · x + 0 · x2
or equivalently

(α + 16δ) · 1 + (β − 8δ)x + (γ + δ)x2 = 0 · 1 + 0 · x + 0 · x2 ,

which yields
 α = 16t
α + 16δ = 0

β = − 8t
β − 8δ = 0 =⇒

 γ=t
γ+δ =0
δ = − t,
where t ∈ R. With t = 1, we obtain

16 · 1 − 8 · x + 1 · x2 − 1(x − 4)2 = 0 · 1 + 0 · x + 0 · x2 ,

which shows that 1, x, x2 and (x − 4)2 are linearly dependent.

2
4. Let us consider
αe−x + βex + γ cosh(x) = 0
or equivalently    
γ −x γ x
α+ e + β+ e =0
2 2
ex +e−x
since cosh(x) = 2
. This yields
(
γ
α=t
α+ 2
=0
γ =⇒ β = t
β+ 2
=0
γ = − 2t,

where t ∈ R. With t = 1, we obtain

1 · e−x + 1 · ex − 2 · cosh(x) = 0,

which shows that e−x , ex and cosh(x) are linearly dependent.


   
(−2) 2 1 3 (−2) 2 1 3
 0 0 1 1  and  0 0 1 1 

Example 13.   are row-equivalent. The num-
 2 (−2) 0 1   0 0 0 3 
2 (−2) 4 8 0 0 0 0
ber of non-zero rows of the last matrix is 3, i.e., its rank is 3. Thus, the first matrix has the
rank 3 too.
Solution. Applying elementary row operations, we obtain
     
(−2) 2 1 3 R3 + R1 → R3
(−2) 2 1 3 R3 − R2 → R3
(−2) 2 1 3
 0 0 1 1  R4 + R1 → R4  0 0 1 1  R4 − 5R2 → R4  0 0 1 1 

 2
 ∼   ∼  
(−2) 0 1   0 0 1 4   0 0 0 3 
2 (−2) 4 8 0 0 5 11 0 0 0 6
 
(−2) 2 1 3
 
R4 −2R3 →R4 
∼  0 0 1 1 
.
 0 0 0 3 
0 0 0 0

This shows that the rank of the matrix is 3.

Example 14.
 The set {(1, 2, 1), (−2, −3, 1), (3, 5, 0)} is linearly dependent since the matrix
1 2 1
 (−2) (−3) 1  has the rank 2, which is less than 3.
3 5 0
Solution. Applying elementary row operations, we obtain
     
1 2 1 R2 + 2R1 → R2
1 2 1 1 2 1
R +R →R
 (−2) (−3) 1  R3 − 3R ∼
1 → R3
 0 1 3  3 ∼2 3  0 1 3 .
3 5 0 0 (−1) (−3) 0 0 0

This shows that the rank of the matrix is 2.

Example 15. Show that Span{(1, 1), (−3, 2), (2, 4)} = R2 .
Solution. We will show that Span{(1, 1), (−3, 2), (2, 4)} ⊂ R2 and R2 ⊂ Span{(1, 1), (−3, 2), (2, 4)}.

3
• Let v ∈ Span{(1, 1), (−3, 2), (2, 4)}, then v = α(1, 1)+β(−3, 2)+γ(2, 4) for some α, β, γ ∈ R.
That is,
v = (α − 3β + 2γ , α + 2β + 4γ ) ∈ R2 ,
| {z } | {z }
∈R ∈R

which shows that v ∈ R2 , i.e., Span{(1, 1), (−3, 2), (2, 4)} ⊂ R2 .

• Let v ∈ R2 , then v = (x, y) for some x, y ∈ R. Now, consider the system

α(1, 1) + β(−3, 2) + γ(2, 4) = (x, y)


=⇒ (α − 3β + 2γ, α + 2β + 4γ) = (x, y)
1
( α = (2x + 3y − 16t)
5
α − 3β + 2γ = x
=⇒ =⇒ β = 1 (−x + y − 2t)
α + 2β + 4γ = y 5
γ=t

for any t ∈ R. Thus, v ∈ Span{(1, 1), (−3, 2), (2, 4)}, i.e., R2 ⊂ Span{(1, 1), (−3, 2), (2, 4)}.

This proves that Span{(1, 1), (−3, 2), (2, 4)} = R2 .

Example 16. Show that {(1, 1), (−3, 2)} is a basis for R2 . Hence, dim(R2 ) = 2.
Solution. We will show that {(1, 1), (−3, 2)} is linearly independent and Span{(1, 1), (−3, 2)} =
R2 .

• From Example 11, we know that {(1, 1), (−3, 2)} is linearly independent.

• Let v ∈ Span{(1, 1), (−3, 2)}, then v = α(1, 1) + β(−3, 2) for some α, β ∈ R. That is,

v = (α − 3β+, α + 2β+) ∈ R2 ,
| {z } | {z }
∈R ∈R

which shows that v ∈ R2 , i.e., Span{(1, 1), (−3, 2)} ⊂ R2 .

• Let v ∈ R2 , then v = (x, y) for some x, y ∈ R. Now, consider the system

α(1, 1) + β(−3, 2) = (x, y)


=⇒ (α − 3β, α + 2β) = (x, y)
( 1
α − 3β = x α= (2x + 3y)
=⇒ =⇒ 5
α + 2β = y 1
β= (−x + y).
5
Thus, v ∈ Span{(1, 1), (−3, 2)}, i.e., R2 ⊂ Span{(1, 1), (−3, 2)}.

This proves that {(1, 1), (−3, 2)} is a basis for R2 . Thus, dim(R2 ) = 2.

Example 17. Find the null space and nullity of


 
  x  
1 2 3 4   y = 0 .

2 4 7 8  z  0
w

4
Solution. Consider the augmented matrix form
   
1 2 3 4 0 1 2 3 4 0
∼ ,
2 4 7 8 0 0 0 1 0 0

which transforms to the system

( x = 2s + 4t
x + 2y + 3z + 4w = 0 y = −s
=⇒
z=0 z=0
w = −t

for any s, t ∈ R. Thus,


   
x 2s + 4t
 y   −s 
 z = for any s, t ∈ R.
   
0 
w −t

This shows that

Null(A) = {x : Ax = 0}
  

 x 

 
y 
=    : x = −2y − 4w and z = 0

 z  

 
w
  

 2s + 4t 

 
−s 
=  
 : s, t ∈ R


 0 
 
−t
     

 2 4 

  
(−1)   0 
= s   + t   : s, t ∈ R

 0   0  

 
0 (−1)
    

 2 4 

 
(−1)   0 
= Span  ,
 0   0 
 .

 
 
0 (−1)

Therefore, nullity(A) = 2.

Example 18. Find solutions of


 
  x  
1 2 3 4  y =
 6
.
2 4 7 8  z  11
w
Solution. Consider the augmented matrix form
   
1 2 3 4 6 1 2 3 4 6
∼ ,
2 4 7 8 11 0 0 1 0 (−1)

5
which transforms to the system

( x = 2s + 4t + 9
x + 2y + 3z + 4w = 6 y = −s
=⇒
z = −1 z = −1
w = −t

for any s, t ∈ R. This yields the solution


     
 
x 2 4 9
 y   (−1)   0   0 
 z  = s 0
+ t
 0  +  (−1)
     .
 
w 0 (−1) 0
| {z } | {z }
xh xp

1.3 Determinants
Example 25. Find the inverse matrix of
 
3 1
A := .
2 4
Solution. We first compute the determinant of the matrix A, which is

det(A) = 3 × 4 − 1 × 2 = 12 − 2 = 10.

As det(A) 6= 0, inverse of A exists. Next, we compute the adjoint matrix of A, which is


 T  
4 (−2) 4 (−1)
adj(A) = = .
(−1) 3 (−2) 3

Hence, the inverse matrix is given by


 2 1

−1 adj(A) 5
(− 10 )
A = = .
det(A) (− 15 ) 3
10

Example 26. Find the inverse matrix of


 
1 (−1) (−2)
A :=  3 (−1) 1 .
1 (−3) (−4)
Solution. We first compute the determinant of the matrix A, which is

det(A) = [1 × (−1) × (−4) + 3 × (−3) × (−2) + 1 × (−1) × 1]


− [(−2) × (−1) × 1 + 1 × (−3) × 1 + (−4) × (−1) × 3]
= [4 + 18 − 1] − [2 − 3 + 12] = 10.

6
As det(A) 6= 0, inverse of A exists. Next, we compute the adjoint matrix of A. To this end,
we compute the cofactors, which are
(−1) 1 3 1
C11 = (−1)1+1 = 7, C12 = (−1)1+2 = 13,
(−3) (−4) 1 (−4)
3 (−1) (−1) (−2)
C13 = (−1)1+3 = −8, C21 = (−1)2+1 = 2,
1 (−3) (−3) (−4)
1 (−2) 1 (−1)
C22 = (−1)2+2 = −2, C23 = (−1)2+3 = 2,
1 (−4) 1 (−3)
(−1) (−2) 1 (−2)
C31 = (−1)3+1 = −3, C32 = (−1)3+2 = −7.
(−1) 1 3 1
1 (−1)
C33 = (−1)3+3 = 2,
3 (−1)
Thus, the adjoint matrix of A is
 T  
7 13 (−8) 7 2 (−3)
adj(A) =  2 (−2) 2  =  13 (−2) (−7)  .
(−3) (−7) 2 (−8) 2 2
Hence, the inverse matrix is given by
 7 1 3

10 5
(− 10 )
adj(A)  13
(− 15 ) (− 10
7 
= 10
) .
det(A)
(− 45 ) 1
5
1
5

Example 27. Find the solution of


x − y − 2z = − 10
3x − y + z = 5
x − 3y − 4z = 20.
Solution. We will rewrite the equation in the matrix form Ax = b, and then find the solution
by the formula x = A−1 b provided that A is non-singular. We have
    
1 (−1) (−2) x (−10)
 3 (−1) 1  y  =  5 ,
1 (−3) (−4) z 20
which yields
   −1  
x 1 (−1) (−2) (−10)
 y  =  3 (−1) 1   5 
z 1 (−3) (−4) 20
 7 1 3
 
10 5
(− 10 ) (−10)
=  13 (− 15 ) (− 10
7
 
10
)  5 
(− 45 ) 1 1 20
 5 5
(−12)
=  (−28)  .
13
Therefore, the solution of the system is x = −12, y = −28 and z = 13.

7
1.4 Real Inner Product Spaces
Example 30. 1. In R3 , u := (2, 1, −1) and v := (1, −1, 1) are orthogonal.

a+b 2
2. In C[a, b], f (x) := x − a+b
2
and g(x) := x2
− (a + b)x + 2
are orthogonal.
Solution. 1. We compute that
hu, vi = h(2, 1, −1), (1, −1, 1)i = 2 × 1 + 1 × (−1) + (−1) × 1 = 2 − 1 − 1 = 0.
Thus, (2, 1, −1) and (1, −1, 1) are orthogonal.
2. We compute that
  2 
a+b 2 a+b
hf, gi = x − , x − (a + b)x +
2 2
Z b !  2 !
a+b a + b
= x− x2 − (a + b)x + dx
a 2 2
Z b 3  4 b
a+b 1 a+b
= x− dx = x−
a 2 4 2 a
 4  4
1 a+b 1 a+b
= b− − a−
4 2 4 2
 4  4
1 b−a 1 a−b
= − = 0.
4 2 4 2
 
a+b 2
Thus, x − a+b
2
and x 2
− (a + b)x + 2
are orthogonal.

1.5 Linear Transformations


Example 33. Let f : R2 → R3 be a linear transform satisfying
   
  5   3
1 1
f =  (−1)  and f =  (−5)  .
1 (−1)
11 1
Find the representation matrix of the linear transform f .
   
1 1
Solution. Let us first show that B := , is a basis of R2 . To this end, we
1 (−1)
have to show that B is linearly independent and Span(B) = R2 .
• We show here that B is linearly independent. Let α, β ∈ R such that
     
1 1 0
α +β =
1 (−1) 0
   
α+β 0
=⇒ =
α−β 0
    
1 1 α 0
=⇒ =
1 (−1) β 0
Clearly,      
1 1 α 0
det = −2 6= 0 =⇒ = ,
1 (−1) β 0
i.e., α = 0 and β = 0. This shows that B is a linearly independent set.

8
 
2 x
• We show next that Span(B) = R . Let ∈ R2 , then we have
y
    
x 1 1
=α +β
y 1 (−1)
  
1 1 α
= ,
1 (−1) β
which yields
   −1  
α 1 1 x
=
β 1 (−1) y
  
1 (−1) (−1) x
=
(−2) (−1) 1 y
 
1 x+y
= .
2 x−y
So, we have
x+y x−y
α := and β := .
2 2
This shows that Span(B) = R2 .
Thus, B is a basis of R2 . This implies that the transform f is of the form
      
x x+y 1 x−y 1
f =f +
y 2 1 2 (−1)
   
x+y 1 x−y 1
= f + f
2 1 2 (−1)
   
5 3
x+y  x−y 
= (−1)  + (−5) 
2 2
11 1
 
4x + y
=  −3x + 2y 
6x + 5y
 
4 1  
x
=  (−3) 2  .
y
6 5
 
4 1
Thus, the representation matrix for f is  (−3) 2 .
6 5

1.6 Eigenvalues, Eigenvectors and Eigenspaces


 
1 2 1
Example 36. Find the eigenvalues and eigenvectors of the matrix A :=  0 3 2 .
(−1) 1 1
Solution. Let us first write the characteristic matrix for A, i.e.,
 
1−λ 2 1
A − λI =  0 3−λ 2 ,
(−1) 1 1−λ

9
whose determinant is
1−λ 2 1
D(λ) = det(A − λI) = 0 3−λ 2
(−1) 1 1−λ
= − λ3 + 5λ2 − 6λ = −λ(λ − 2)(λ − 3).

Hence, the eigenvalues are λ1 := 0, λ2 := 2 and λ3 := 3. Let us compute the eigenvectors.

• For λ1 = 0, we solve (A − 0I)x = 0. We obtain


    
1 2 1 x 0
 0 3 2   y  =  0 
(−1) 1 1 z 0

Writing the augmented matrix form, we obtain


     
1 2 1 0 1 2 1 0 1 2 1 0
 0 3 2 0  ∼  0 3 2 0  ∼  0 3 2 0 ,
(−1) 1 1 0 0 3 2 0 0 0 0 0

which yields     
x = t
 x 1
y = −2t =⇒  y  = t  (−2)  , t ∈ R.


z = 3t z 3
 
1
Thus, the first eigenvector is v 1 :=  (−2) .
3

• Consider λ2 = 2, we solve (A − 2I)x = 0. We obtain


    
(−1) 2 1 x 0
 0 1 2   y  =  0 
(−1) 1 (−1) z 0

Writing the augmented matrix form, we obtain


     
(−1) 2 1 0 1 (−2) (−1) 0 1 (−2) (−1) 0
 0 1 2 0 ∼  0 1 2 0 ∼ 0 1 2 0 
(−1) 1 (−1) 0 (−1) 1 (−1) 0 0 (−1) (−2) 0
 
1 (−2) (−1) 0
∼  0 1 2 0 ,
0 0 0 0

which yields     
x = 3t
 x 3
y = 2t =⇒  y  = t  2  , t ∈ R.


z = −t z (−1)
 
3
Thus, the second eigenvector is v 2 :=  2 .
(−1)

10
• Consider λ3 = 3, we solve (A − 3I)x = 0. We obtain
    
(−2) 2 1 x 0
 0 0 2   y  =  0 
(−1) 1 (−2) z 0

Writing the augmented matrix form, we obtain


     
(−2) 2 1 0 (−1) 1 (−2) 0 1 (−1) 2 0
 0 0 2 0  ∼  0 0 2 0  ∼  0 0 2 0 
(−1) 1 (−2) 0 (−2) 2 1 0 (−2) 2 1 0
   
1 (−1) 2 0 1 (−1) 2 0
∼  0 0 2 0  ∼  0 0 1 0 
0 0 5 0 0 0 5 0
 
1 (−1) 2 0
∼  0 0 1 0 ,
0 0 0 0

which yields     
x = t
 x 1
y=t =⇒  y  = t 1 ,
 t ∈ R.


z=0 z 0
 
1
Finally, the third eigenvector is v 3 :=  1 .
0
In this example, we can find three eigenvalues and three eigenvectors.
 
1 0 0
Example 37. Find the eigenvalues and eigenvectors of the matrix A :=  2 1 0 .
1 (−2) 3
Solution. Let us first write the characteristic matrix for A, i.e.,
 
1−λ 0 0
A − λI =  2 1−λ 0 ,
1 (−2) 3 − λ

whose determinant is
1−λ 0 0
D(λ) = det(A − λI) = 2 1−λ 0
1 (−2) 3 − λ
= − λ3 + 5λ2 − 7λ + 3 = −(λ − 1)2 (λ − 3).

Hence, the eigenvalues are λ1,2 := 1 and λ3 := 3. Let us compute the eigenvectors.

• For λ1,2 := 1, we solve (A − 1I)x = 0. We obtain


    
0 0 0 x 0
 2 0 0   y  =  0 
1 (−2) 2 z 0

11
Writing the augmented matrix form, we obtain
     
0 0 0 0 1 (−2) 2 0 2 0 0 0
 2 0 0 0  ∼  2 0 0 0 ∼ 1 (−2) 2 0 
1 (−2) 2 0 0 0 0 0 0 0 0 0
   
1 0 0 0 1 0 0 0
∼  1 (−2) 2 0 ∼ 0 (−2) 2 0 
0 0 0 0 0 0 0 0

which yields     
x = 0
 x 0
y=t =⇒  y  = t 1 ,
 t ∈ R.


z=t z 1
 
0
Thus, the first eigenvector is v 1 :=  1 .
1

• For λ3 := 3, we solve (A − 3I)x = 0. We obtain


    
(−2) 0 0 x 0
 2 (−2) 0   y  =  0 
1 (−2) 0 z 0

Writing the augmented matrix form, we obtain


     
(−2) 0 0 0 1 0 0 0 1 0 0 0
 2 (−2) 0 0  ∼  2 (−2) 0 0  ∼  0 (−2) 0 0 
1 (−2) 0 0 1 (−2) 0 0 0 (−2) 0 0
 
1 0 0 0
∼  0 (−2) 0 0 
0 0 0 0

which yields     
x = 0
 x 0
y=0 =⇒  y  = t 0 ,
 t ∈ R.


z=t z 1
 
0
Finally, the second eigenvector is v 2 :=  0 .
1
In this example, we can find only two eigenvalues and two eigenvectors.
 
(−5) (−6) 3
Example 38. Find the eigenvalues and eigenvectors of the matrix A :=  3 4 (−3) .
0 0 (−2)
Solution. Let us first write the characteristic matrix for A, i.e.,
 
(−5) − λ (−6) 3
A − λI =  3 4−λ (−3)  ,
0 0 (−2) − λ

12
whose determinant is
−(5 + λ) (−6) 3
D(λ) = det(A − λI) = 3 4−λ (−3)
0 0 −(2 + λ)
= − λ3 − 3λ2 + 4 = (λ − 1)(λ + 2)2 .
Hence, the eigenvalues are λ1,2 := −2 and λ3 := 1. Let us compute the eigenvectors.
• For λ1,2 := −2, we solve (A − (−2)I)x = 0. We obtain
    
(−3) (−6) 3 x 0
 3 6 (−3)   y  =  0 
0 0 0 z 0
Writing the augmented matrix form, we obtain
     
(−3) (−6) 3 0 1 2 (−1) 0 1 2 (−1) 0
 3 6 (−3) 0  ∼  3 6 (−3) 0  ∼  0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0
which yields
      
x = 2s + t
 x 2 1
y = −s =⇒  y  = s  1  + t 0 , s, t ∈ R.


z=t z 0 (−1)
   
2 1
Thus, the two eigenvectors are v 1 :=  1  and v 2 :=  0 .
0 (−1)
• For λ3 := 3, we solve (A − 3I)x = 0. We obtain
    
(−6) (−6) 3 x 0
 3 3 (−6)   y  =  0 
0 0 (−3) z 0
Writing the augmented matrix form, we obtain
     
(−6) (−6) 3 0 3 3 (−6) 0 1 1 (−2) 0
 3 3 (−6) 0  ∼  (−6) (−6) 3 0  ∼  (−6) (−6) 3 0 
0 0 (−3) 0 0 0 (−3) 0 0 0 (−3) 0
   
1 1 (−2) 0 1 1 (−2) 0
∼  0 0 (−9) 0 ∼ 0 0 1 0 
0 0 (−3) 0 0 0 (−3) 0
 
1 1 (−2) 0
∼  0 0 1 0 
0 0 0 0
which yields     
x = t
 x 1
y = −t =⇒  y  = t  (−1)  , t ∈ R.


z=0 z 0
 
1
Finally, the second eigenvector is v 3 :=  (−1) .
0
In this example, we can find only two eigenvalues and three eigenvectors.

13
2 Ordinary Differential Equations
2.1 First-Order Linear Differential Equations
Example 41. Find the general solution of the equation

y ′ + 3y = et .
Solution. The complementary solution is
Rt
3dξ
yc (t) = ce− = ce−3t ,

where c is an arbitrary constant. On the other hand, the particular solution is


Z t Z t
3ξ ξ 1 1
yp (t) = e−3t
e e dξ = e−3t
e4ξ dξ = e−3t e4t = et .
4 4
Finally, the general solution is
1
y(t) = yc (t) + yp (t) = ce−3t + et ,
4
where c is an arbitrary constant.

2.2 Second-Order Linear Differential Equations


2.2.1 Initial Value Problems
Example 47. Find the solutions of the IVP
(
y ′′ + y ′ − 2y = 0 for t > 0
(1)
y(0) = 1 and y ′ (0) = −5.
Solution. First, we write the characteristic equation of the ODE in (1), i.e.,

r 2 + r − 2 = 0,

whose roots are


r1 = −2 and r2 = 1.
Thus, the general solution of the ODE in (1) is

y(t) = c1 e−2t + c2 et ,

where c1 and c2 are arbitrary constants. Applying the ICs in (1), we find

y(0) = c1 + c2 = 1 c1 = 2
′ =⇒
y (0) = − 2c1 + c2 = −5 c2 = − 1.

Therefore, the solution of the IVP (1) is

y(t) = 2e−2t − et .

Example 48. Find the solutions of the IVP


(
y ′′ − 4y ′ + 4y = 0 for t > 0
(2)
y(0) = 1 and y ′(0) = 5.

14
Solution. First, we write the characteristic equation of the ODE in (2), i.e.,

r 2 − 4r + 4 = (r − 2)2 = 0,

whose roots are repeated and


r1,2 = 2.
Thus, the general solution of the ODE in (2) is

y(t) = c1 e2t + c2 te2t ,

where c1 and c2 are arbitrary constants. Applying the ICs in (2), we find

y(0) = c1 =1 c1 = 2
′ =⇒
y (0) = 2c1 + c2 = 5 c2 = 3.

Therefore, the solution of the IVP (2) is

y(t) = 2e2t + 3te2t .

Example 49. Find the solutions of the IVP


(
y ′′ − 4y ′ + 13y = 0 for t > 0
(3)
y(0) = 2 and y ′ (0) = −5.

Solution. First, we write the characteristic equation of the ODE in (3), i.e.,

r 2 − 4r + 13 = (r − 2)2 + 32 = 0,

whose complex roots are


r1,2 = 2 ± i3.
Thus, the general solution of the ODE in (3) is

y(t) = c1 e2t cos(3t) + c2 e2t sin(3t),

where c1 and c2 are arbitrary constants. Applying the ICs in (3), we find

y(0) = c1 = 2 c1 = 2
′ =⇒
y (0) = 2c1 + 3c2 = −5 c2 = − 3.

Therefore, the solution of the IVP (3) is

y(t) = 2e2t cos(3t) − 3e2t sin(3t).

Example 50. Find the solutions of the IVP


(
y ′′ + y = 3 for t > 0
(4)
y(0) = 5 and y ′ (0) = −1.
Solution. First, we write the characteristic equation of the associated homogeneous part of
the ODE in (4), i.e.,
r 2 + 1 = 0,
whose complex roots are
r1,2 = ±i.

15
Thus, the complementary solution of the ODE in (4) is
yc (t) = c1 cos(t) + c2 sin(t),
where c1 and c2 are arbitrary constants. Note that the Wronskian of the solutions cos and sin
is
cos(t) sin(t) 2 2
W (t) = = cos(t) + sin(t) ≡ 1.
− sin(t) cos(t)
A particular solution of the ODE in (4) is
Z t Z t
yp (t) = − cos(t) 3 sin(ξ)dξ + sin(t) 3 cos(ξ)dξ

= 3 cos(t) cos(t) + 3 sin(t) sin(t) ≡ 3.


Thus, the general solution of the ODE in (4) is
y(t) = c1 cos(t) + c2 sin(t) + 3,
where c1 and c2 are arbitrary constants. Applying the ICs in (4), we find
y(0) = c1 + 3 = 5 c1 = 2
′ =⇒
y (0) = c2 = −1 c2 = − 1.
Therefore, the solution of the IVP (4) is
y(t) = 2 cos(t) − sin(t) + 3.
Example 51. Find the solutions of the IVP
(
y ′′ − y = 3 for t > 0
′ (5)
y(0) = −1 and y (0) = −3.
Solution. First, we write the characteristic equation of the associated homogeneous part of
the ODE in (5), i.e.,
r 2 − 1 = 0,
whose real roots are
r1,2 = ±1.
Thus, the complementary solution of the ODE in (5) is
yc (t) = c1 cosh(t) + c2 sinh(t),
where c1 and c2 are arbitrary constants. Note that the Wronskian of the solutions cosh and
sinh is
cosh(t) sinh(t) 2 2
W (t) = = cosh(t) − sinh(t) ≡ 1.
sinh(t) cosh(t)
A particular solution of the ODE in (5) is
Z t Z t
yp (t) = − cosh(t) 3 sinh(ξ)dξ + sinh(t) 3 cosh(ξ)dξ

= − 3 cosh(t) cosh(t) + 3 sinh(t) sinh(t) ≡ −3.


Thus, the general solution of the ODE in (5) is
y(t) = c1 cosh(t) + c2 sinh(t) − 3,
where c1 and c2 are arbitrary constants. Applying the ICs in (5), we find
y(0) = c1 − 3 = −1 c1 = 2
′ =⇒
y (0) = c2 = −3 c2 = − 3.
Therefore, the solution of the IVP (5) is
y(t) = 2 cosh(t) − 3 sinh(t) − 3.

16
2.2.2 Boundary Value Problems
Example 52. Find the solutions of the BVP
(
π
y ′′ + 4y = 0 for 0 < t < 4
π (6)
y(0) = −2 and y( 4 ) = 10.
Solution. First, we write the characteristic equation of the associated homogeneous part of
the ODE in (6), i.e.,
r 2 + 4 = 0,
whose real roots are
r1,2 = ±i2.
Thus, the general solution of the ODE in (6) is

yc (t) = c1 cos(2t) + c2 sin(2t),

where c1 and c2 are arbitrary constants. Applying the BCs in (6), we find

y(0) = c1 = −2
y( π4 ) = c2 = 10.

Therefore, the solution of the BVP (6) is

y(t) = −2 cos(2t) + 10 sin(2t).

Example 53. Find the solutions of the BVP


(
y ′′ + 4y = 0 for 0 < t < π
(7)
y(0) = −2 and y(π) = −2.
Solution. First, we write the characteristic equation of the associated homogeneous part of
the ODE in (7), i.e.,
r 2 + 4 = 0,
whose real roots are
r1,2 = ±i2.
Thus, the general solution of the ODE in (7) is

yc (t) = c1 cos(2t) + c2 sin(2t),

where c1 and c2 are arbitrary constants. Applying the BCs in (7), we find

y(0) = c1 = −2
y(π) = c1 = −2.

Therefore, the solution of the BVP (7) is

y(t) = −2 cos(2t) + c sin(2t),

where c ∈ R.
Example 54. Find the solutions of the BVP
(
y ′′ + 4y = 0 for 0 < t < π
(8)
y(0) = −2 and y(π) = 2.

17
Solution. First, we write the characteristic equation of the associated homogeneous part of
the ODE in (8), i.e.,
r 2 + 4 = 0,
whose real roots are
r1,2 = ±i2.
Thus, the general solution of the ODE in (8) is

yc (t) = c1 cos(2t) + c2 sin(2t),

where c1 and c2 are arbitrary constants. Applying the BCs in (8), we find

y(0) = c1 = −2
y(π) = c1 = 2,

which is a contradiction. Therefore, the BVP (8) has no solutions.


Example 55. Find the solutions of the BVP
(
y ′′ + 3y = 0 for 0 < t < π
(9)
y(0) = 7 and y ′(π) = 0.
Solution. First, we write the characteristic equation of the associated homogeneous part of
the ODE in (9), i.e.,
r 2 + 3 = 0,
whose real roots are √
r1,2 = ±i 3.
Thus, the general solution of the ODE in (9) is
√  √ 
yc (t) = c1 cos 3t + c2 sin 3t ,

where c1 and c2 are arbitrary constants. Applying the BCs in (9), we find

y(0) = c1 = 7 c1 = 7

√ √  √ √  =⇒ √ 
y (π) = − c1 3 sin 3π + c2 3 cos 3π = 0 c2 = 7 tan 3π .

Therefore, the solution of the BVP (9) is


√  √  √ 
y(t) = 7 cos 3t + 7 tan 3π sin 3t .

Example 56. Find the solutions of the BVP


(
y ′′ + 25y = 0 for 0 < t < π
′ ′ (10)
y (0) = 5 and y (π) = 5.
Solution. First, we write the characteristic equation of the associated homogeneous part of
the ODE in (10), i.e.,
r 2 + 25 = 0,
whose real roots are
r1,2 = ±i5.
Thus, the general solution of the ODE in (10) is

yc (t) = c1 cos(5t) + c2 sin(5t),

18
where c1 and c2 are arbitrary constants. Applying the BCs in (10), we find

y ′(0) = 5c2 = 5
y ′(π) = − 5c2 = 5,

which is a contradiction. Therefore, the BVP (10) has no solutions.


Example 57. Find the solutions of the BVP
(
π
y ′′ + 9y = cos(t) for 0 < t < 2
(11)
y ′(0) = 3 and y( π2 ) = −1.
Solution. First, we write the characteristic equation of the associated homogeneous part of
the ODE in (11), i.e.,
r 2 + 9 = 0,
whose complex roots are
r1,2 = ±i3.
Thus, the complementary solution of the ODE in (11) is

yc (t) = c1 cos(3t) + c2 sin(3t),

where c1 and c2 are arbitrary constants. Note that the Wronskian of the solutions cos and sin
is
cos(3t) sin(3t) 2 2
W (t) = = 3 cos(3t) + 3 sin(3t) ≡ 3.
−3 sin(3t) 3 cos(3t)
A particular solution of the ODE in (11) is
Z t Z t
cos(ξ) sin(3ξ) cos(ξ) cos(3ξ)
yp (t) = − cos(3t) dξ + sin(3t) dξ
3 3
Z t Z t
1 1
= − cos(3t) [sin(2ξ) + sin(4ξ)]dξ + sin(3t) [cos(2ξ) + cos(4ξ)]dξ
6 6
   
1 1 1 1 1 1
= − cos(3t) − cos(2t) − cos(4t) + sin(3t) sin(2t) + sin(4t)
6 2 4 6 2 4
   
1 1
= cos(2t) cos(3t) + sin(2t) sin(3t) + cos(3t) cos(4t) + sin(3t) sin(4t)
12 24
1 1 1
= cos(t) + cos(t) = cos(t).
12 24 8
Thus, the general solution of the ODE in (11) is
1
y(t) = c1 cos(3t) + c2 sin(3t) + cos(t),
8
where c1 and c2 are arbitrary constants. Applying the ICs in (11), we find

y ′(0) = 3c2 = 3
=⇒ c2 = 1.
y( π2 ) = − c2 = −1

Therefore, the solution of the IVP (11) is


1
y(t) = c cos(3t) + sin(3t) + cos(t),
8
where c ∈ R.

19
2.3 Sturm-Liouville Problems
Example 59. Find the eigenvalues and the eigenfunctions of the EVP
(
y ′′ (t) + λy(t) = 0
(12)
y(0) = 0 and y ′ (π) = 0.

Solution. To obtain the nontrivial solutions of the EVP, we consider the following there dis-
tinct cases.
Case 1. Let λ > 0. Then, λ := µ2 for some µ > 0. In this case, the general solution of (12) is

ϕc (t) := c1 cos(µt) + c2 sin(µt), (13)

where c1 and c2 are arbitrary constants. Using the boundary conditions with (13), we get
(
c1 cos(0) + c2 sin(0) = 0
−c1 µ sin(µπ) + c2 µ cos(µπ) = 0
(
c1 = 0
⇐⇒
−c1 µ sin(µπ) + c2 µ cos(µπ) = 0

 c1 = 0

⇐⇒ c2 = arbitrary

µn = n − 21 , n ∈ N,


1 2
which yields µn = n − 12 for n ∈ N. For n ∈ N, the eigenvalues are λn := n − 2
, while the
eigenfunctions are ϕn (t) := sin (n − 21 )t .
Case 2. Let λ = 0. In this case, the general solution (12) is

ϕc (t) := c1 + c2 t, (14)

where c1 and c2 are arbitrary constants. Applying the boundary conditions to (14), we get
(
c1 + c2 0 = 0 c1 := 0
=⇒
c2 = 0 c2 := 0,

showing that (12) admits only the trivial solution in this case.
Case 3. Let λ < 0. Then, λ := −µ2 for some µ > 0. The general solution of (12) is

ϕc (t) := c1 cosh(µt) + c2 sinh(µt), (15)

where c1 and c2 are arbitrary constants. Using the boundary conditions with (15), we get
(
c1 cosh(0) + c2 sinh(0) = 0
c1 µ sinh(µπ) + c2 µ cosh(µπ) = 0
(
c1 = 0
⇐⇒
c1 µ sinh(µπ) + c2 µ cosh(µπ) = 0
(
c1 = 0
⇐⇒
c2 = 0,

which yields c1 = 0 and c2 = 0. That is, (12) admits only the trivial solution in this case.

20

1 2
Finally, we see
 that (12) has the eigenvalues λn := n − 2
and the eigenfunctions ϕn (t) :=
sin (n − 21 )t for n = 1, 2, · · · .
Example 60. Find the eigenvalues and the eigenfunctions of the EVP
(
y ′′ (t) + λy(t) = 0
(16)
y ′(0) = 0 and y ′(π) = 0.
Solution. To obtain the nontrivial solutions of the EVP, we consider the following there dis-
tinct cases.
Case 1. Let λ > 0. Then, λ := µ2 for some µ > 0. In this case, the general solution of (16) is

ϕc (t) := c1 cos(µt) + c2 sin(µt), (17)

where c1 and c2 are arbitrary constants. Using the boundary conditions with (17), we get
(
−c1 µ sin(0) + c2 µ cos(0) = 0
−c1 µ sin(µπ) + c2 µ cos(µπ) = 0
(
c2 = 0
⇐⇒
−c1 µ sin(µπ) + c2 µ cos(µπ) = 0

 c1 = arbitrary

⇐⇒ c2 = 0

µ = n, n ∈ N,
n

which yields µn = n for n ∈ N. For n ∈ N, the eigenvalues are λn := n2 , while the eigenfunctions
are ϕn (t) := cos(nt).
Case 2. Let λ = 0. In this case, the general solution (16) is

ϕc (t) := c1 + c2 t, (18)

where A and B are arbitrary constants. Applying the boundary conditions to (18), we get
(
c2 = 0 c1 := arbitrary
=⇒
c2 = 0 c2 := 0,

showing that λ = 0 is an eigenvalue and ϕ(t) := 1 is an eigenfunction for (16).


Case 3. Let λ < 0. Then, λ := −µ2 for some µ > 0. The general solution of (16) is

ϕc (t) := c1 cosh(µt) + c2 sinh(µt), (19)

where c1 and c2 are arbitrary constants. Using the boundary conditions with (19), we get
(
c1 µ sinh(0) + c2 µ cosh(0) = 0
c1 µ sinh(µπ) + c2 µ cosh(µπ) = 0
(
c2 µ = 0
⇐⇒
c1 µ sinh(µπ) + c2 µ cosh(µπ) = 0
(
c1 = 0
⇐⇒
c2 = 0,

which yields c1 = 0 and c2 = 0. That is, (16) admits only the trivial solution in this case.

21
Finally, we see that (16) has the eigenvalues λn := n2 and the eigenfunctions ϕn (t) := cos(nt)
for n = 0, 1, · · · .
Example 61. Find the eigenvalues and the eigenfunctions of the EVP
(
y ′′ (t) + λy(t) = 0
(20)
y(−π) = y(π) and y ′(−π) = y ′(π).
Solution. To obtain the nontrivial solutions of the EVP, we consider the following there dis-
tinct cases.
Case 1. Let λ > 0. Then, λ := µ2 for some µ > 0. In this case, the general solution of (20) is
ϕc (t) := c1 cos(µt) + c2 sin(µt), (21)
where c1 and c2 are arbitrary constants. Using the boundary conditions with (21), we get
(
c1 cos(−µπ) + c2 sin(−µπ) = c1 cos(µπ) + c2 sin(µπ)
−c1 µ sin(−µπ) + c2 µ cos(−µπ) = − c1 µ sin(µπ) + c2 µ cos(µπ)
(
c1 cos(µπ) − c2 sin(µπ) = c1 cos(µπ) + c2 sin(µπ)
⇐⇒
c1 µ sin(µπ) + c2 µ cos(µπ) = − c1 µ sin(µπ) + c2 µ cos(µπ)
(
2c2 sin(µπ) = 0
⇐⇒
2c1 µ sin(µπ) = 0,

which yields µn = n for n ∈ N. Hence, we get two linearly independent solutions c1 := 1,


c2 := 0 and c1 := 0, c2 := 1. For n ∈ N, the eigenvalues are λn := n2 , while the eigenfunctions
are ϕ2n−1 (t) := sin(nt) and ϕ2n (t) := cos(nt).
Case 2. Let λ = 0. In this case, the general solution (20) is
ϕc (t) := c1 + c2 t, (22)
where c1 and c2 are arbitrary constants. Applying the boundary conditions to (22), we get
(
c1 + c2 (−π) = c1 + c2 π c1 := arbitrary
=⇒
c2 = c2 c2 := 0,

which leads us to the eigenvalue λ0 := 0 and the eigenfunction ϕ0 (t) :≡ 1.


Case 3. Let λ < 0. Then, λ := −µ2 for some µ > 0. The general solution of (20) is
ϕc (t) := c1 cosh(µt) + c2 sinh(µt), (23)
where c1 and c2 are arbitrary constants. Using the boundary conditions with (23), we get
(
c1 cosh(−µπ) + c2 sinh(−µπ) = c1 cosh(µπ) + c2 sinh(µπ)
c1 µ sinh(−µπ) + c2 µ cosh(−µπ) = c1 µ sinh(µπ) + c2 µ cosh(µπ)
(
c1 cosh(µπ) − c2 sinh(µπ) = c1 cosh(µπ) + c2 sinh(µπ)
⇐⇒
−c1 µ sinh(µπ) + c2 µ cosh(µπ) = c1 µ sinh(µπ) + c2 µ cosh(µπ)
(
c2 sinh(µπ) = 0
⇐⇒
c1 µ sinh(µπ) = 0,

which yields c1 = 0 and c2 = 0. That is, (20) admits only the trivial solution in this case.
Finally, we see that (20) has the eigenvalues 0, 1, 4, · · · , n2 , · · · and the eigenfunctions 1, sin(t),
cos(t), sin(2t), cos(2t), · · · , sin(nt), cos(nt), · · · .

22
2.3.1 Fourier Series
Example 63. Find the Fourier series of the following 2-periodic function
(
t, 0 < t < 1
f (t) :=
2, −1 < t < 0.
Solution. We simple compute
Z 1 Z 0 Z 1 0 1
1 ξ2
a0 := f (ξ)dξ = 2dξ + ξdξ = 2ξ +
1 −1 −1 0 −1 2 0
 2 
 1 02 5
= 2 0 − (−1) + − = ,
| {z }
1
|2 {z 2} 2
1
2

Z 1   Z 0 Z 1
1 π
am := f (ξ) cos mξ dξ = 2 cos(πmξ)dξ + ξ cos(πmξ)dξ
1 −1 1 −1 0
0 1 Z 1
2 1 1
= sin(πmξ) + ξ sin(πmξ) − sin(πmξ)dξ
mπ −1 mπ 0 mπ 0
1
2 1 1
= [sin(0) − sin(−πm)] + [sin(πm) −0] + cos(πmξ)
mπ | {z } | {z } mπ | {z } (mπ)2 0
0 0 0
m
1 (−1) − 1
= 2
[cos(πm) − cos(0)] =
(mπ) | {z } | {z } (mπ)2
(−1)m 1

and
Z 1   Z 0 Z 1
1 π
bm := f (ξ) sin mξ dξ = 2 sin(πmξ)dξ + ξ sin(πmξ)dξ
1 −1 1 −1 0
0 1 Z 1
2 1 1
= − cos(πmξ) − ξ cos(πmξ) + cos(πmξ)dξ
mπ −1 mπ 0 mπ 0
1
2 1 1
= − [cos(0) − cos(−πm)] − [cos(πm) −0] + sin(πmξ)
mπ | {z } | {z } mπ | {z } (mπ)2 0
1 (−1)m (−1)m

1 1 (−1)m − 2
= [(−1)m − 2] + [sin(πm) − sin(0) ] = .
mπ (mπ)2 | {z } | {z } mπ
0 0

Therefore, the Fourier series for f is given by


∞  
5 X (−1)m − 1 (−1)m − 2
f (t) ∼ + cos(πmt) + sin(πmt) ,
4 m=1 (mπ)2 mπ

which is the 2-periodic function given explicitly by


3

 2
, t=1

t, 0 < t < 1
g(t) :=


 1, t = 0

2, −1 < t < 0.

23
Example 64. Consider the following 2-periodic function

f (t) := t for |t| < 1

whose graphic is given below.


Solution. Note that f is an odd function since f (−t) = −f (t) for t ∈ R. Then, we compute
Z   Z 1
2 1 π
bm := f (ξ) sin mξ dξ = 2 ξ sin(πmξ)dξ
1 0 1 0
1 Z 1
2 2
= − ξ cos(πmξ) + cos(πmξ)dξ
mπ 0 mπ 0
1
2 2
= − [cos(πm) −0] + sin(πmξ)
mπ | {z } (mπ)2 0
(−1)m
2 1 2
= − (−1)m + 2
[sin(πm) − sin(0)] = − (−1)m .
mπ (mπ) | {z } | {z } mπ
0 0

Therefore, the Fourier series for f is given by



2 X (−1)m
f (t) ∼ − sin(πmt),
π m=1 m

which is the 2-periodic function given explicitly by


(
0, t = 1
g(t) :=
t, −1 < t < 1.

Example 65. Consider the 2L-periodic function defined as


(
t(L − t), 0≤t≤L
f (t) :=
t(L + t), −L ≤ t ≤ 0.
Solution. Clearly, f is a continuous odd function since f (−t) = −f (t) for t ∈ R. Then,
∞  
X π
f (t) = bm sin mt for − L ≤ t ≤ L,
m=1
L

where Z  
L
2 π
bm = f (ξ) sin mξ dξ for m = 1, 2, · · · .
L 0 L
To compute the coefficients, we apply integrating by parts, and get
Z  
2 L π
bm = ξ(L − ξ) sin mξ dξ
L 0 | {z } L
u | {z }
dv
"  L Z L   #
2 L π L π
= − ξ(L − ξ) cos mξ + (L − 2ξ) cos mξ dξ
L πm L 0 πm 0 L
Z L  
2 π
= (L − 2ξ) cos mξ dξ
πm 0 | {z } L
u | {z }
dv

24
"  L Z   #
2 2L π 2L L π
= − sin mξ + sin mξ dξ
πm πm L 0 πm 0 L
" Z   #
2 2L 2L 2L L π
= − sin(πm) + sin(0) + sin mξ dξ
πm πm | {z } πm | {z } πm 0 L
0 0
Z L     L
4L π 4L2 π
= sin mξ dξ = − cos mξ
(πm)2 0 L (πm)3 L 0
4L2  
= − cos(πm) − cos(0)
(πm)3 | {z } | {z }
(−1)m 1

4L2  m

= 1 − (−1) .
(πm)3

Simply, we have

8L2 8L2 8L2


b1 = , b2 = 0, b3 = , b4 = 0, b5 = ,··· ,
π3 (3π)3 (5π)3

which yields
8L2
b2k−1 = for k = 1, 2, · · · .
[(2k − 1)π]3
Therefore,
∞  
4L2 X 1 − (−1)m π
f (t) = 3 sin mt for − L ≤ t ≤ L
π m=1 m3 L
or equivalently
∞  
8L2 X 1 π
f (t) = 3 sin (2k − 1)t for − L ≤ t ≤ L.
π k=1 (2k − 1)3 L

3 Partial Differential Equations


3.1 Heat Equation
Example 67. Find the solution of the heat equation

1
ut = 64 uxx for 0 < x < L and t > 0

u(0, t) = 0 and u(L, t) = 0 for t > 0 (24)


u(x, 0) = x(L − x) for 0 ≤ x ≤ L.

Solution. Suppose that (24) has a solution of the form u(x, t) = ϕ(x)ψ(t) for 0 ≤ x ≤ L and
t ≥ 0. Substituting this into the partial differential equation in (24), we obtain
1 ′′
ϕ(x)ψ̇(t) = ϕ (x)ψ(t) for 0 < x < L and t > 0,
64
which yields
ϕ′′ (x) ψ̇(t)
= 64 for 0 < x < L and t > 0 (25)
ϕ(x) ψ(t)

25
provided that ϕ(x) 6≡ 0 and ψ(t) 6≡ 0 for 0 < x < L and t > 0. Since the left-hand side only
depends on x and the right-hand side only depends on t, (25) can be written separately as
ϕ′′ (x)
= −λ for 0 < x < L (26)
ϕ(x)
and
ψ̇(t)
64 = −λ for t > 0, (27)
ψ(t)
where λ ∈ R is the so-called separation constant.

Spatial Problem
Let us first start with (26). The first conditions in (24) gives us 0 = u(0, t) = ϕ(0)ψ(t) and
0 = u(L, t) = ϕ(L)ψ(t), which yields ϕ(0) = 0 and ϕ(L) = 0 since ψ(t) 6≡ 0 for some t > 0.
Combining these with (26) brings us to the so-called spatial problem
(
ϕ′′ (x) + λϕ(x) = 0 for 0 < x < L
(28)
ϕ(0) = 0 and ϕ(L) = 0.
Case 1. Let λ < 0. Say λ := −µ2 , where µ > 0. The general solution of the ordinary
differential equation in (28) is
ϕ(x) := A cosh(µx) + B sinh(µx),
where A and B are arbitrary constants. Using the boundary conditions in (28), we find
ϕ(0) = A = 0 A := 0
=⇒
ϕ(L) = A cosh(µL) + B sinh(µL) = 0 B := 0.
Thus, in this case, ϕ must be the trivial solution, i.e., ϕ(x) :≡ 0 for 0 ≤ x ≤ L.
Case 2. Let λ = 0. The general solution of the ordinary differential equation in (28) is
ϕ(x) := Ax + B,
where A and B are arbitrary constants. Using the boundary conditions in (28), we find
ϕ(0) = B = 0 A := 0
=⇒
ϕ(L) = AL + B = 0 B := 0,
which gives us again the trivial solution.
Case 3. Let λ > 0. Say λ := µ2 , where µ > 0. In this case, the general solution of (28) is
ϕ(x) := A cos(µx) + B sin(µx),
where A and B are arbitrary constants. It follows from the boundary conditions in (28) that
we have
ϕ(0) = A = 0 A := 0
=⇒
ϕ(L) = A cos(µL) + B sin(µL) = 0 B := arbitrary
π
provided that µn := L n for n = 1, 2, · · · , i.e.,
 2
π
λn := n for n = 1, 2, · · · . (29)
L
Thus, in this case, we have the nontrivial solutions
 
π
ϕn (x) := sin nx for 0 ≤ x ≤ L and n = 1, 2, · · · . (30)
L

26
Time Problem
Substituting (29) into (27), we obtain
 2
π
ψ̇(t) + n ψ(t) = 0 for t > 0
8L

whose fundamental solution is


π 2t
ψn (t) := e−( 8L n) for t ≥ 0 and n = 1, 2, · · · . (31)

Complete Solution
Using now (30) and (31), we see that the solutions of the PDE in (24) are of the form
 
π π 2
un (x, t) := ϕn (x)ψn (t) = sin nx e−( 8L n) t for 0 ≤ x ≤ L, t ≥ 0 and n = 1, 2, · · · . (32)
L

Since the PDE in (24) is linear, any linear combination of (32) is also a solution. Thus, a
solution of the PDE in (24) is
∞ ∞  
X X π π 2
u(x, t) := bn un (x, t) = bn sin nx e−( 8L n) t for 0 ≤ x ≤ L and t ≥ 0, (33)
n=1 n=1
L

where for n = 1, 2, · · · , bn will be determined in such a way the latter initial condition in (24)
will be fulfilled.

Fourier Series
Using (33) in the latter boundary condition in (24), we see that
∞  
X π
x(L − x) = u(x, 0) = bn sin nx for 0 ≤ x ≤ L,
n=1
L

which yields
4L2 n

bn = 1 − (−1)
(nπ)3
by Example 65. Substituting this into (33) gives us
∞  
4L2 X 1 − (−1)n π π
−( 8L n)2 t
u(x, t) := 3 sin nx e for 0 ≤ x ≤ L and t ≥ 0,
π n=1 n3 L

which is the desired solution of (24).

Example 68. Find the solution of the heat equation



1
ut = 64 uxx for 0 < x < L and t > 0

u(0, t) = 0 and u(L, t) = 0 for t > 0 (34)

u(x, 0) = sin( Lπ x) + 3 sin(5 Lπ x) − 8 sin(17 Lπ x)

for 0 ≤ x ≤ L.

27
Solution. For this problem, we apply the same steps in Example 67 until we arrive at
∞  
X π π 2
u(x, t) := bn sin nx e−( 8L n) t for 0 ≤ x ≤ L and t ≥ 0,
n=1
L

where for n = 1, 2, · · · , bn will be determined now. By the initial condition, we get


∞        
X π π π π
u(x, 0) = bn sin nx = sin x + 3 sin 5 x − 8 sin 17 x ,
n=1
L L L L

which by comparison of the coefficients implies b1 := 1, b2 , b3 , b4 := 0, b5 := 3, b6 , b7 , · · · , b16 :=


0, b17 := −8, b18 , b19 , · · · := 0. Then, the solution of (34) is
     
π π 2
) t π π 2
) t π π 2
u(x, t) := sin x e −( 8L
+ 3 sin 5 x e−(5 8L
− 8 sin 17 x e−(17 8L ) t .
L L L

Example 69. Find the solution of the heat equation



1
ut = 64 uxx for 0 < x < L and t > 0

ux (0, t) = 0 and ux (L, t) = 0 for t > 0 (35)


u(x, 0) = 1 − cos(3 Lπ x) for 0 ≤ x ≤ L.
Solution. We proceed as in Example 67 until we arrive at the spatial problem.

Spatial Problem
Let us first start with
ϕ′′ (x)
= −λ for 0 < x < L (36)
ϕ(x)
The first initial conditions in (35) gives us 0 = ux (0, t) = ϕ′ (0)ψ(t) and 0 = ux (L, t) =
ϕ′ (L)ψ(t), which yields ϕ′ (0) = 0 and ϕ′ (L) = 0 since ψ(t) 6≡ 0 for some t > 0. Combining
these with (36) brings us to the so-called spatial problem
(
ϕ′′ (x) + λϕ(x) = 0 for 0 < x < L
(37)
ϕ′ (0) = 0 and ϕ′ (L) = 0.

Case 1. Let λ < 0. In this case, we can show that we cannot obtain any nontrivial solutions.

Case 2. Let λ = 0. The general solution of the ordinary differential equation in (37) is

ϕ(x) := Ax + B,

where A and B are arbitrary constants. Using the boundary conditions in (37), we find

ϕ′ (0) = A = 0 A := 0
′ =⇒
ϕ (L) = A = 0 B := arbitrary,

which gives us the nontrivial solution

ϕ0 (x) :≡ 1 for 0 ≤ x ≤ L.

28
Case 3. Let λ > 0. Say, λ := µ2 , where µ > 0. In this case, the general solution of (37) is

ϕ(x) := A cos(µx) + B sin(µx),

where A and B are arbitrary constants. It follows from the boundary conditions in (37) that
we have
ϕ′ (0) = µB = 0 A := arbitrary
′ =⇒
ϕ (L) = − Aµ sin(µL) + Bµ cos(µL) = 0 B := 0
provided that µn := Lπ n for n = 1, 2, · · · , i.e.,
 2
π
λn := n for n = 1, 2, · · · .
L
Thus, in this case, we have the nontrivial solutions
 
π
ϕn (x) := cos nx for 0 ≤ x ≤ L and n = 1, 2, · · · .
L

Combining Case 2 and Case 3, we get


 2
π
λn := n for n = 0, 1, · · · (38)
L
and 

π
ϕn (x) := cos nx for 0 ≤ x ≤ L and n = 0, 1, · · · . (39)
L

Time Problem
Substituting (38) into
ψ̇(t)
64 = −λ for t > 0,
ψ(t)
we obtain  2
π
ψ̇(t) + n ψ(t) = 0 for t > 0 and n = 0, 1, · · ·
8L
whose fundamental solution is
π 2t
ψn (t) := e−( 8L n) for t ≥ 0 and n = 0, 1, · · · . (40)

Complete Solution
Using now (39) and (40), we see that the solutions of the PDE in (35) are of the form
 
π π 2
un (x, t) := ϕn (x)ψn (t) = cos nx e−( 8L n) t for 0 ≤ x ≤ L, t ≥ 0 and n = 0, 1, · · · .
L

Thus, a solution of the PDE in (35) is


∞ ∞  
X X π π 2
u(x, t) := an un (x, t) = an cos nx e−( 8L n) t for 0 ≤ x ≤ L and t ≥ 0, (41)
n=0 n=0
L

where for n = 0, 1, · · · , an will be determined in such a way the latter initial condition in (35)
will be fulfilled.

29
Fourier Series by Comparison of the Coefficients
Using (41) in the latter boundary condition in (35), we see that
  ∞  
π X π
1 − cos 3 x = u(x, 0) = an cos nx for 0 ≤ x ≤ L,
L n=0
L

which yields by comparison that a0 := 1, a1 , a2 := 0, a3 := −1, a4 , a5 , · · · := 0. Substituting


this into (41) gives us
 
π π 2
u(x, t) := 1 − cos 3 x e−(3 8L ) t for 0 ≤ x ≤ L and t ≥ 0,
L

which is the desired solution of (35).

3.2 Wave Equation


Example 70. Find the solution of the wave equation

utt = 4uxx for 0 < x < L and t > 0

u(0, t) = 0 and u(L, t) = 0 for t > 0 (42)


u(x, 0) = x(L − x) and ut (x, 0) = x for 0 ≤ x ≤ L.

Solution. Suppose that (42) has a solution of the form u(x, t) = ϕ(x)ψ(t) for 0 ≤ x ≤ L and
t ≥ 0. Substituting this into the partial differential equation in (42), we obtain

ϕ(x)ψ̈(t) = 4ϕ′′ (x)ψ(t) for 0 < x < L and t > 0,

which yields
ϕ′′ (x) ψ̈(t)
= for 0 < x < L and t > 0 (43)
ϕ(x) 4ψ(t)
provided that ϕ(x) 6≡ 0 and ψ(t) 6≡ 0 for 0 < x < L and t > 0. Since the left-hand side only
depends on x and the right-hand side only depends on t, (43) can be written separately as

ϕ′′ (x)
= −λ for 0 < x < L (44)
ϕ(x)

and
ψ̈(t)
= −λ for t > 0, (45)
4ψ(t)
where λ ∈ R is the so-called separation constant.

Spatial Problem
Let us first start with (44). The first initial conditions in (42) gives us 0 = u(0, t) = ϕ(0)ψ(t)
and 0 = u(L, t) = ϕ(L)ψ(t), which yields ϕ(0) = 0 and ϕ(L) = 0 since ψ(t) 6= 0 for some t > 0.
Combining these with (44) brings us to the so-called spatial problem
(
ϕ′′ (x) + λϕ(x) = 0 for 0 < x < L
(46)
ϕ(0) = 0 and ϕ(L) = 0.

30
Case 1. Let λ < 0. Say, λ := −µ2 , where µ > 0. The general solution of the ordinary
differential equation in (46) is

ϕ(x) := A cosh(µx) + B sinh(µx),

where A and B are arbitrary constants. Using the boundary conditions in (46), we find

ϕ(0) = A = 0 A := 0
=⇒
ϕ(L) = A cosh(µL) + B sinh(µL) = 0 B := 0.

Thus, in this case, ϕ must be the trivial solution, i.e., ϕ(x) :≡ 0 for 0 ≤ x ≤ L.

Case 2. Let λ = 0. The general solution of the ordinary differential equation in (46) is

ϕ(x) := A + Bx,

where A and B are arbitrary constants. Using the boundary conditions in (46), we find

ϕ(0) = A = 0 A := 0
=⇒
ϕ(L) = A + BL = 0 B := 0,

which gives us again the trivial solution.

Case 3. Let λ > 0. Say, λ := µ2 , where µ > 0. In this case, the general solution of (46) is

ϕ(x) := A cos(µx) + B sin(µx),

where A and B are arbitrary constants. It follows from the boundary conditions in (46) that
we have
ϕ(0) = A = 0 A := 0
=⇒
ϕ(L) = A cos(µL) + B sin(µL) = 0 B := arbitrary
provided that µn := n Lπ for n = 1, 2, · · · , i.e.,
 2
π
λn := n for n = 1, 2, · · · . (47)
L
Thus, in this case, we have the nontrivial solutions
 
π
ϕn (x) := sin n x for 0 ≤ x ≤ L and n = 1, 2, · · · . (48)
L

Time Problem
Substituting (47) into (45), we obtain
 2
π
ψ̈(t) + 2n ψ(t) = 0 for t > 0
L
whose fundamental solutions are
 
π
ψ1,n (t) := cos 2n t for t ≥ 0 and n = 1, 2, · · · (49)
L
and  
π
ψ2,n (t) := sin 2n t for t ≥ 0 and n = 1, 2, · · · . (50)
L

31
Complete Solution
Using now (48), (49) and (50), for 0 ≤ x ≤ L, t ≥ 0 and n = 1, 2, · · · , we see that the solutions
of the PDE in (42) are of the form
   
π π
u1,n (x, t) := sin n x cos 2n t (51)
L L

and    
π π
u2,n (x, t) := sin n x sin 2n t . (52)
L L
Since the PDE in (42) is linear, any linear combination of (51) and (52) is also a solution.
Thus, for 0 ≤ x ≤ L and t ≥ 0, a solution of the PDE in (42) is
∞      
X π π π
u(x, t) := sin n x an cos 2n t + bn sin 2n t , (53)
n=1
L L L

where for n = 1, 2, · · · , an and bn will be determined in such a way the latter initial conditions
in (42) will be fulfilled.

Fourier Series
Using (53) in the first one in the second line of boundary conditions in (42), we see that
∞  
X π
x(L − x) = u(x, 0) = an sin n x for 0 ≤ x ≤ L.
n=1
L

Computing the Fourier series coefficients of x(L − x), for n = 1, 2, · · · , we see that
Z  
2 L π
an := η(L − η) sin n η dη
L 0 L
0 (−1)n
z }| { z }| {
2L2 2 − πn sin(πn) −2 cos(πn)
=
π3 n3
2 n
4L 1 − (−1)
= . (54)
π 3 n3
Using (53) in the latter one in the second line of the conditions in (42), we see that
∞    
X π π
x = ut (x, 0) = 2n bn sin n x for 0 ≤ x ≤ L.
n=1
L L

Computing the Fourier series coefficients of x, for n = 1, 2, · · · , we see that


Z  
L 2 L π
bn := η sin n η dη
2πn L 0 L
0 (−1)n
z }| { z }| {
L2 sin(πn) −πn cos(πn)
=
π 3 n3
L2 (−1)n
= − . (55)
π 2 n2

32
Substituting (54) and (55) into (53) gives us
∞      
L2 X π 4 1 − (−1)n π (−1)n π
u(x, t) := 2 sin n x cos 2n t − sin 2n t ,
π n=1 L π n3 L n2 L

which is the desired solution of (42).

Example 71. Find the solution of the wave equation



utt = 4uxx for 0 < x < L and t > 0

u(0, t) = 0 and u(L, t) = 0 for t > 0 (56)

   
u(x, 0) = 4 sin 5 Lπ x − 2 sin 7 Lπ x and ut (x, 0) = 3 sin 14 Lπ x for 0 ≤ x ≤ L.

Solution. We proceed as in the solution of Example 70 until we reach at (53). That is, we get
∞      
X π π π
u(x, t) := sin n x an cos 2n t + bn sin 2n t for 0 ≤ x ≤ L and t ≥ 0, (57)
n=1
L L L

where for n = 1, 2, · · · , an and bn will be determined later on. By using the first initial condition,
we get
∞      
X π π π
u(x, 0) = an sin n x = 4 sin 5 x − 2 sin 7 x ,
n=1
L L L
which yields by comparison that a1 , a2 , a3 , a4 := 0, a5 := 4, a6 := 0, a7 := −2, a8 , a9 , · · · := 0.
By using the second initial condition, we get
∞      
X π π π
ut (x, 0) = 2n bn sin n x = 3 sin 14 x ,
n=1
L L L

3L
which yields again by comparison that b1 , b2 , · · · , b13 := 0, b14 := 28π , b15 , b16 , · · · := 0. Using
these in (57), we see that the solution of (56) is
       
π π π π
u(x, t) := 4 sin 5 x cos 10 t − 2 sin 7 x cos 14 t
L L L L
   
3L π π
+ sin 14 x sin 28 t
28π L L

for 0 ≤ x ≤ L and t ≥ 0.

Example 72. Find the solution of the wave equation



utt = 4uxx for 0 < x < L and t > 0

ux (0, t) = 0 and u(L, t) = 0 for t > 0 (58)

 π
 π
 π

u(x, 0) = 2 cos 9 2L x − 5 cos 19 2L x and ut (x, 0) = 3 cos 15 2L x for 0 ≤ x ≤ L.

Solution. We apply the same steps in Example 70 until we arrive at (44) and (45).

33
Spatial Problem
Let us first start with (44). The first initial conditions in (58) gives us 0 = ux (0, t) = ϕ′ (0)ψ(t)
and 0 = u(L, t) = ϕ(L)ψ(t), which yields ϕ′ (0) = 0 and ϕ(L) = 0 since ψ(t) 6= 0 for some t > 0.
Combining these with (44) brings us to the so-called spatial problem
(
ϕ′′ (x) + λϕ(x) = 0 for 0 < x < L
(59)
ϕ′ (0) = 0 and ϕ(L) = 0.

Case 1. Let λ < 0. Say, λ := −µ2 , where µ > 0. The general solution of the ordinary
differential equation in (59) is

ϕ(x) := A cosh(µx) + B sinh(µx),

where A and B are arbitrary constants. Using the boundary conditions in (59), we find

ϕ′ (0) = Bµ = 0 A := 0
=⇒
ϕ(L) = A cosh(µL) + B sinh(µL) = 0 B := 0.

Thus, in this case, ϕ must be the trivial solution, i.e., ϕ(x) :≡ 0 for 0 ≤ x ≤ L.

Case 2. Let λ = 0. The general solution of the ordinary differential equation in (59) is

ϕ(x) := A + Bx,

where A and B are arbitrary constants. Using the boundary conditions in (59), we find

ϕ′ (0) = B = 0 A := 0
=⇒
ϕ(L) = A + BL = 0 B := 0,

which gives us again the trivial solution.

Case 3. Let λ > 0. Say, λ := µ2 , where µ > 0. In this case, the general solution of (59) is

ϕ(x) := A cos(µx) + B sin(µx),

where A and B are arbitrary constants. It follows from the boundary conditions in (59) that
we have
ϕ′ (0) = Bµ = 0 A := arbitrary
=⇒
ϕ(L) = A cos(µL) + B sin(µL) = 0 B := 0
π
provided that µn := (2n − 1) 2L for n = 1, 2, · · · , i.e.,
 2
π
λn := (2n − 1) for n = 1, 2, · · · . (60)
2L

Thus, in this case, we have the nontrivial solutions


 
π
ϕn (x) := cos (2n − 1) x for 0 ≤ x ≤ L and n = 1, 2, · · · . (61)
2L

34
Time Problem
Substituting (60) into the time equation (45), we obtain
 2
π
ψ̈(t) + (2n − 1) ψ(t) = 0 for t > 0
L
whose fundamental solutions are
 
π
ψ1,n (t) := cos (2n − 1) t for t ≥ 0 and n = 1, 2, · · · (62)
L
and  
π
ψ2,n (t) := sin (2n − 1) t for t ≥ 0 and n = 1, 2, · · · . (63)
L

Complete Solution
Using now (61), (62) and (63), for 0 ≤ x ≤ L, t ≥ 0 and n = 1, 2, · · · , we see that the solutions
of the PDE in (58) are of the form
   
π π
u1,n (x, t) := cos (2n − 1) x cos (2n − 1) t (64)
2L L
and    
π π
u2,n (x, t) := cos (2n − 1) x sin (2n − 1)n t . (65)
2L L
Since the PDE in (58) is linear, any linear combination of (64) and (65) is also a solution.
Thus, for 0 ≤ x ≤ L and t ≥ 0, a solution of the PDE in (58) is
∞      
X π π π
u(x, t) := cos (2n − 1) x an cos (2n − 1) t + bn sin (2n − 1) t , (66)
n=1
2L L L
where for n = 1, 2, · · · , an and bn will be determined in such a way the latter initial conditions
in (58) will be fulfilled.

Fourier Series by Comparison of the Coefficients


Using (66) in the latter condition in (58), we see that
    ∞  
π π X π
2 cos 9 x − 5 cos 19 x = u(x, 0) = an cos (2n − 1) x for 0 ≤ x ≤ L,
2L 2L n=1
2L
which yields by comparison that a1 , a2 , a3 , a4 := 0, a5 := 2, a6 , a7 , a8 , a9 := 0, a10 := −5
a11 , a12 , · · · := 0, and
  ∞  
π X π π
3 cos 15 x = ut (x, 0) = (2n − 1) bn cos (2n − 1) x for 0 ≤ x ≤ L,
2L n=1
L 2L
L
which yields by comparison that b1 , b2 , · · · , b7 := 0, b8 := 5π , b9 , b10 , · · · := 0. Substituting these
coefficients into (66) gives us the solution
       
π π L π π
u(x, t) := 2 cos 9 x cos 9 t + cos 15 x sin 15 t
2L L 5π 2L L
   
π π
− 5 cos 19 x cos 19 t
2L L
for 0 ≤ x ≤ L and t ≥ 0.

35
3.3 Laplace Equation
Example 73. Find the solution of the Laplace equation
 2
∂ u ∂2u
 ∂x2 + ∂y2 = 0 for 0 < x, y < 2 

u(x, 0) = 0 and u(x, 2) = sin 3 π2 x for 0 ≤ x ≤ 2 (67)


u(0, y) = 0 and u(2, y) = 0 for 0 ≤ y ≤ 2.
Solution. Suppose that (67) has a solution of the form u(x, y) = ϕ(x)ψ(y) for 0 ≤ x, y ≤ 2.
Substituting this into the partial differential equation in (67), we obtain
ϕ′′ (x)ψ(y) + ϕ(x)ψ̈(y) = 0 for 0 < x, y < 2,
which yields
ϕ′′ (x) ψ̈(y)
=− for 0 < x, y < 2 (68)
ϕ(x) ψ(y)
provided that ϕ(x) 6= 0 and ψ(y) 6= 0 for all 0 < x, y < 2. Since the left-hand side only depends
on x and the right-hand side only depends on y, (68) can be written separately as
ϕ′′ (x)
= −λ for 0 < x < 2 (69)
ϕ(x)
and
ψ̈(y)
= λ for 0 < y < 2, (70)
ψ(y)
where λ ∈ R is the so-called separation constant.

The First Spatial Problem


Let us first start with (69). The second boundary conditions in (67) gives us 0 = u(0, y) =
ϕ(0)ψ(y) and 0 = u(2, y) = ϕ(2)ψ(y), which yields ϕ(0) = 0 and ϕ(2) = 0 since ψ(y) 6= 0 for
some 0 < y < 2. Combining these with (69) brings us to the first spatial problem
(
ϕ′′ (x) + λϕ(x) = 0 for 0 < x < 2
(71)
ϕ(0) = 0 and ϕ(2) = 0.
Case 1. Let λ < 0. Say, λ := −µ2 , where µ > 0. The general solution of the ordinary
differential equation in (71) is
ϕ(x) := A cosh(µx) + B sinh(µx),
where A and B are arbitrary constants. Using the boundary conditions in (71), we find
ϕ(0) = A = 0 A := 0
=⇒
ϕ(2) = A cosh(2µ) + B sinh(2µ) = 0 B := 0.
Thus, in this case, ϕ must be the trivial solution, i.e., ϕ(x) :≡ 0 for 0 ≤ x ≤ 2.
Case 2. Let λ = 0. The general solution of the ordinary differential equation in (71) is
ϕ(x) := A + Bx,
where A and B are arbitrary constants. Using the boundary conditions in (71), we find
ϕ(0) = A = 0 A := 0
=⇒
ϕ(2) = A + 2B = 0 B := 0,
which gives us again the trivial solution.

36
Case 3. Let λ > 0. Say, λ := µ2 , where µ > 0. In this case, the general solution of (71) is

ϕ(x) := A cos(µx) + B sin(µx),

where A and B are arbitrary constants. It follows from the boundary conditions in (71) that
we have
ϕ(0) = A = 0 A := 0
=⇒
ϕ(2) = A cos(2µ) + B sin(2µ) = 0 B := arbitrary
provided that µn := n π2 for n = 1, 2, · · · , i.e.,
 2
π
λn := n for n = 1, 2, · · · . (72)
2
Thus, in this case, we have the nontrivial solutions
 
π
ϕn (x) := sin n x for 0 ≤ x ≤ 2 and n = 1, 2, · · · (73)
2
by letting B := 1 for simplicity.

The Second Spatial Problem


Note that the first boundary condition in the first line 0 = u(x, 0) = ϕ(x)ψ(0) implies ψ(0) = 0.
Substituting (72) into (70), we obtain the second spatial problem
  2

 π
ψ̈(y) − n ψ(y) = 0 for 0 < y < 2
2 (74)

ψ(0) = 0,

whose general solution is of the form


   
π π
ψn (y) := Cn cosh n y + Dn sinh n y for 0 < y < 2 and n = 1, 2, · · · , (75)
2 2
where Cn and Dn are arbitrary constants. Applying the initial condition in (74) to (75), we
find that Cn := 0, which implies
 
π
ψn (y) := Dn sinh n y for 0 < y < 2 and n = 1, 2, · · · . (76)
2

Complete Solution
Using now (73) and (76), we see that the solutions of the PDE in (67) are of the form
   
π π
un (x, y) := ϕn (x)ψn (y) = Dn sin n x sinh n y for 0 ≤ x, y ≤ 2 and n = 1, 2, · · · . (77)
2 2
Since the PDE in (67) is linear, any linear combination of (77) is also a solution. Thus, a
solution of the PDE in (67) is
∞ ∞    
X X π π
u(x, y) := Dn un (x, y) = Dn sin n x sinh n y for 0 ≤ x, y ≤ 2, (78)
n=1 n=1
2 2

where for n = 1, 2, · · · , Dn will be determined in such a way that the remaining boundary
condition in (67) will be fulfilled.

37
Fourier Series

Considering the boundary condition u(x, 2) = sin 3 π2 x in (67) with (78), we see that
  ∞  
π X π
sin 3 x = u(x, 2) = Dn sinh(nπ) sin n x for 0 ≤ x ≤ 2.
2 n=1
2

We can proceed by computing the Fourier Sine series of sin 3 π2 x , however, we can simply figure
1
the coefficients out by equating the series term by term. Indeed, D1 , D2 := 0, D3 := sinh(3π) ,
D4 , D5 , · · · := 0. Using this in (78) gives us
   
1 π π
u(x, y) := sin 3 x sinh 3 y for 0 ≤ x, y ≤ 2,
sinh(3π) 2 2
which is the desired solution of (67).
Example 74. Find the solution of the Laplace equation
 2
∂ u ∂2u
 ∂x2 + ∂y2 = 0 for 0 < x, y < 2

u(x, 0) = 0 and u(x, 2) = 0 for 0 ≤ x ≤ 2 (79)

 
u(0, y) = − sin π2 y and u(2, y) = 0 for 0 ≤ y ≤ 2.
Solution. Suppose that (79) has a solution of the form u(x, y) = ϕ(x)ψ(y) for 0 ≤ x, y ≤ 2.
Substituting this into the partial differential equation in (79), we obtain
ϕ′′ (x)ψ(y) + ϕ(x)ψ̈(y) = 0 for 0 < x, y < 2,
which yields
ϕ′′ (x) ψ̈(y)
=− for 0 < x, y < 2 (80)
ϕ(x) ψ(y)
provided that ϕ(x) 6= 0 and ψ(y) 6= 0 for all 0 < x, y < 2. Since the left-hand side only depends
on x and the right-hand side only depends on y, (80) can be written separately as
ϕ′′ (x)
= −λ for 0 < x < 2 (81)
ϕ(x)
and
ψ̈(y)
= λ for 0 < y < 2, (82)
ψ(y)
where λ ∈ R is the so-called separation constant.

The First Spatial Problem


Let us first start with (82). The second boundary conditions in (79) gives us 0 = u(x, 0) =
ϕ(x)ψ(0) and 0 = u(x, 2) = ϕ(x)ψ(2), which yields ψ(0) = 0 and ψ(2) = 0 since ϕ(x) 6= 0 for
some 0 < x < 2. Combining these with (81) brings us to the first spatial problem
(
ψ̈(y) − λψ(y) = 0 for 0 < y < 2
(83)
ψ(0) = 0 and ψ(2) = 0.
We know from the previous example that
 2
π
λn := − n for n = 1, 2, · · · . (84)
2
Thus, in this case, we have the nontrivial solutions
 
π
ψn (y) := sin n y for 0 ≤ y ≤ 2 and n = 1, 2, · · · . (85)
2

38
The Second Spatial Problem
Note that the first boundary condition in the first line 0 = u(2, y) = ϕ(2)ψ(y) implies ψ(2) = 0.
Substituting (84) into (81), we obtain the second spatial problem
  2

 ′′ π
ϕ (x) − n ϕ(x) = 0 for 0 < x < 2
2 (86)

ϕ(2) = 0,

whose general solution is of the form


   
π π
ϕn (x) := An cosh n x + Bn sinh n x for 0 ≤ x ≤ 2 and n = 1, 2, · · · , (87)
2 2
where An and Bn are arbitrary constants. To have the boundary condition in (86) satisfied, we
can let An := Kn sinh(nπ) and Bn := −Kn cosh(nπ) in (87), which implies
   
π π
ϕn (x) := Kn sinh(nπ) cosh n x − Kn cosh(nπ) sinh n x for 0 ≤ x ≤ 2 and n = 1, 2, · · ·
2 2
or eqivalently
 
π
ϕn (x) := Kn sinh n (2 − x) for 0 ≤ x ≤ 2 and n = 1, 2, · · · , (88)
2
where Kn to be determined later on.

Complete Solution
Using now (85) and (88), we see that the solutions of the PDE in (79) are of the form
   
π π
un (x, y) := ϕn (x)ψn (y) = Kn sinh n (2 − x) sin n y for 0 ≤ x, y ≤ 2 and n = 1, 2, · · · .
2 2
(89)
Since the PDE in (79) is linear, any linear combination of (89) is also a solution. Thus, a
solution of the PDE in (79) is
∞ ∞    
X X π π
u(x, y) := un (x, y) = Kn sinh n (2 − x) sin n y for 0 ≤ x, y ≤ 2, (90)
n=1 n=1
2 2

where for n = 1, 2, · · · , Kn will be determined in such a way that the remaining boundary
condition in (79) will be fulfilled.

Fourier Series

Considering the boundary condition u(0, y) = − sin π2 y in (79) with (90), we see that
  ∞  
π X π
− sin y = u(0, y) = Kn sinh(nπ) sin n y for 0 ≤ x ≤ 2.
2 n=1
2
1
We see that K1 := − sinh(π) and K2 , K3 , · · · := 0. Using this in (90) gives us
   
1 π π
u(x, y) := − sinh (2 − x) sin y for 0 ≤ x, y ≤ 2,
sinh(π) 2 2
which is the desired solution of (79).

39
Example 75. Find the solution of the Laplace equation
 2
∂ u ∂2u
 ∂x2 + ∂y2 = 0 for 0 < x, y < 2


u(x, 0) = 3 sin 7 π2 x and u(x, 2) = sin 3 π2 x for 0 ≤ x ≤ 2 (91)

 
u(0, y) = − sin π2 y and u(2, y) = 0 for 0 ≤ y ≤ 2.
Solution. In this case, the solution of (91) is sum of the solutions of
 2
∂ u ∂2u
 ∂x2 + ∂y2 = 0 for 0 < x, y < 2 

u(x, 0) = 0 and u(x, 2) = sin 3 π2 x for 0 ≤ x ≤ 2 (92)


u(0, y) = 0 and u(2, y) = 0 for 0 ≤ y ≤ 2,
 2
∂ u ∂2u
 ∂x2 + ∂y2 = 0 for 0 < x, y < 2

u(x, 0) = 3 sin 7 π2 x and u(x, 2) = 0 for 0 ≤ x ≤ 2 (93)


u(0, y) = 0 and u(2, y) = 0 for 0 ≤ y ≤ 2
and  2
∂ u ∂2u
 ∂x2 + ∂y2 = 0 for 0 < x, y < 2

u(x, 0) = 0 and u(x, 2) = 0 for 0 ≤ x ≤ 2 (94)

 
u(0, y) = − sin π2 y and u(2, y) = 0 for 0 ≤ y ≤ 2.
Note that the solution of (92) is
   
1 π π
u1 (x, y) := sin 3 x sinh 3 y for 0 ≤ x, y ≤ 2
sinh(3π) 2 2
and the solution of (93) is
   
3 π π
u2 (x, y) := sin 7 x sinh 7 (2 − y) for 0 ≤ x, y ≤ 2.
sinh(7π) 2 2
It should be noted that while obtaining u2 , we consider first the boundary value problem
(
ϕ′′ (x) − λϕ(x) = 0 for 0 < x < 2
ϕ(0) = 0 and ϕ(2) = 0.
and then the boundary value problem
( 2
ψ̈(y) − n π2 ψ(y) = 0 for 0 < y < 2
ψ(2) = 0.
Further, the solution of (94) can be shown to be
   
1 π π
u3 (x, y) := − sinh (2 − x) sin y for 0 ≤ x, y ≤ 2.
sinh(π) 2 2
By virtue of the superposition principle, the solution of (91) is
   
1 π π
u(x, y) := sin 3 x sinh 3 y
sinh(3π) 2 2
   
3 π π
+ sin 7 x sinh 7 (2 − y)
sinh(7π) 2 2
   
1 π π
− sinh (2 − x) sin y
sinh(π) 2 2
for 0 ≤ x, y ≤ 2.

40

You might also like