Uploaded by arimnahs

Linear Algebra HW 1

advertisement
Given :
To solve the given differential equation
-u"(x) = cos (4tx) with fixed-fixed boundary
conditions u(0) = u(1) = 0
Explanation:
finite difference method (specifically, the K3 scheme), we'll discretize the equation and compute
the values of u at discrete points.
へ
• Let's discretize the equation using the K3 scheme, which involves the following formula:
U;+ 1 - 2u; + u;-1 = h? x cos (4nih)
Explanation:
Here, 'h' is the step size, and we'll have a set of discrete points x; = i × h for
i= 0,1,2,….,n+1.
We start with Wo = Un+1 = 0,as given. Now, for
1 = 1, 2, . .., n, we can compute u; using the
formula above:
U; =
4+1+4,-1-hxcos (4mih)
2
• Start with an initial guess for ui, such as
U1 = 0.
• Use the formula you provided to compute U2:
U2 =
=
u3+u1-h?xcos (4th)
2
• until you reach :
ㅧ+1=
Ui+2+ u; -h? cos (Artih)
2
Continue this process for i = 2, 3, ..., n - 1.
• Finally, you will have Un+1 as Un+1 = 0 due to the given boundary condition.
Download