1. Consider the partial differential equation
yu − 2∇2u = 12, 0 < x < 4, 0 < y < 3
with boundary conditions
x = 0 and x = 4 : u = 60
y = 0 and y = 3 : ∂u
∂y
= 5.
(a) Taking h = 1, sketch the region and the grid points. Use symmetry to minimize the number of
unknowns ui
that have to be calculated and indicate the ui
in the sketch.
(b) Use the 5-point difference formula for the Laplace operator to derive a system of equations for
the ui
.
(a)
To sketch the region and the grid points, we can visualize the rectangular region with dimensions 4
units by 3 units.
```
y
^
|-------------------|
, | |
| |
|-------------------| (4,3)
| |
| |
|-------------------|--------->
x (0,0)
```
Now, we can divide the region into a grid using a spacing of h = 1.
```
y
^
|-------------------|
| (0,3) | (1,3) | (2,3) | (3,3) | (4,3)
|-------------------|
| (0,2) | (1,2) | (2,2) | (3,2) | (4,2)
|-------------------|
| (0,1) | (1,1) | (2,1) | (3,1) | (4,1)
|-------------------|
| (0,0) | (1,0) | (2,0) | (3,0) | (4,0)
|-------------------|--------->
x
```
By symmetry, we can observe that the values of u for the grid points on the left half of the region
(x<2) will be the same as the values on the right half (x>2) because the boundary condition is the
same. Similarly, the values of u for the grid points on the upper half of the region (y<1.5) will be the
same as the values on the lower half (y>1.5) because the boundary condition is the same.
Let's label the unknowns ui for the distinct grid points:
yu − 2∇2u = 12, 0 < x < 4, 0 < y < 3
with boundary conditions
x = 0 and x = 4 : u = 60
y = 0 and y = 3 : ∂u
∂y
= 5.
(a) Taking h = 1, sketch the region and the grid points. Use symmetry to minimize the number of
unknowns ui
that have to be calculated and indicate the ui
in the sketch.
(b) Use the 5-point difference formula for the Laplace operator to derive a system of equations for
the ui
.
(a)
To sketch the region and the grid points, we can visualize the rectangular region with dimensions 4
units by 3 units.
```
y
^
|-------------------|
, | |
| |
|-------------------| (4,3)
| |
| |
|-------------------|--------->
x (0,0)
```
Now, we can divide the region into a grid using a spacing of h = 1.
```
y
^
|-------------------|
| (0,3) | (1,3) | (2,3) | (3,3) | (4,3)
|-------------------|
| (0,2) | (1,2) | (2,2) | (3,2) | (4,2)
|-------------------|
| (0,1) | (1,1) | (2,1) | (3,1) | (4,1)
|-------------------|
| (0,0) | (1,0) | (2,0) | (3,0) | (4,0)
|-------------------|--------->
x
```
By symmetry, we can observe that the values of u for the grid points on the left half of the region
(x<2) will be the same as the values on the right half (x>2) because the boundary condition is the
same. Similarly, the values of u for the grid points on the upper half of the region (y<1.5) will be the
same as the values on the lower half (y>1.5) because the boundary condition is the same.
Let's label the unknowns ui for the distinct grid points: