- #1
evinda
Gold Member
MHB
- 3,836
- 0
Hello! (Wave)
We are given the boundary / intial value problem for the heat equation:
$\left\{\begin{matrix}
u_t(t,x)=u_{xx}(t,x), \ \ x \in [a,b], \ \ t \geq 0\\
u(0,x)=u_0(x), \ \ \forall x \in [a,b] \\
u(t,a)=u(t,b)=0, \ \ \forall t \geq 0
\end{matrix}\right.$
I have written a code to approximate the solution of the problem.
How do we calculate the order of accuracy of the finite difference method backward euler?
I have found the error $$E^n=\max_{1 \leq i \leq N_x+1}|u^n_i-u(t_n, x_i)|, n=1, \dots, N_t+1$$
Do we have to take different values for $N_x$ to find the order of accuracy? (Thinking)
We are given the boundary / intial value problem for the heat equation:
$\left\{\begin{matrix}
u_t(t,x)=u_{xx}(t,x), \ \ x \in [a,b], \ \ t \geq 0\\
u(0,x)=u_0(x), \ \ \forall x \in [a,b] \\
u(t,a)=u(t,b)=0, \ \ \forall t \geq 0
\end{matrix}\right.$
I have written a code to approximate the solution of the problem.
How do we calculate the order of accuracy of the finite difference method backward euler?
I have found the error $$E^n=\max_{1 \leq i \leq N_x+1}|u^n_i-u(t_n, x_i)|, n=1, \dots, N_t+1$$
Do we have to take different values for $N_x$ to find the order of accuracy? (Thinking)