Order of Accuracy for Finite Difference Method Backward Euler

  • MHB
  • Thread starter evinda
  • Start date
  • Tags
    Accuracy
In summary, the conversation is about a boundary/initial value problem for the heat equation, and the speaker has written a code to approximate the solution. They are discussing how to calculate the order of accuracy of the finite difference method backward euler and whether different values for the number of subintervals need to be used. The speaker has also shared their results and is questioning if there is a mistake in their code.
  • #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)
 
Mathematics news on Phys.org
  • #2
I have tried the following:function [p1]=order_fin_dif_back_euler [u1, ex1]=finite_difference_backward - Pastebin.com

The first two arguments of the function [m]finite_difference_backward_euler[/m] stands for the interval $[a,b]$, the third is the number of subintervals of this interval, the fourth one is $T_f$ ($t \in [0,T_f]$) , the last argument is the number of subintervals of $[0,T_f]$.

For [m]number of subintervals of [a,b]=20[/m] and [m]number of subintervals of [0,T_f]=400[/m] I got that:
[m]p1 = 0.1008[/m]The order of accuracy should tend to $2$. Is there a mistake at my code? (Thinking)
 

Related to Order of Accuracy for Finite Difference Method Backward Euler

1. What is the Order of Accuracy for Finite Difference Method Backward Euler?

The order of accuracy for the finite difference method backward Euler is first-order. This means that the error in the numerical approximation is proportional to the square of the step size. In other words, as the step size decreases, the error decreases by a factor of the square of the step size.

2. How is the Order of Accuracy for Finite Difference Method Backward Euler determined?

The order of accuracy for the finite difference method backward Euler is determined by analyzing the truncation error of the numerical method. This involves comparing the numerical approximation to the exact solution and examining the terms that are omitted in the approximation. The order of accuracy is then determined by the highest power of the step size that appears in the error expression.

3. What are the advantages of using Finite Difference Method Backward Euler?

One advantage of using the finite difference method backward Euler is its simplicity. The method is relatively easy to implement and does not require complex mathematical concepts. Additionally, it is a stable method and can handle stiff systems of differential equations.

4. What are the limitations of Finite Difference Method Backward Euler?

One limitation of the finite difference method backward Euler is its first-order accuracy. This means that for a given step size, the error in the numerical approximation can still be relatively large. This method is also less accurate compared to higher-order methods, such as the Runge-Kutta method.

5. How can the accuracy of Finite Difference Method Backward Euler be improved?

To improve the accuracy of the finite difference method backward Euler, one can use smaller step sizes. This can significantly reduce the truncation error and improve the overall accuracy of the numerical approximation. Another approach is to use higher-order methods, such as the Runge-Kutta method, which have a higher order of accuracy and can provide more accurate results.

Similar threads

  • General Math
Replies
1
Views
1K
  • General Math
Replies
1
Views
2K
  • General Math
Replies
1
Views
1K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
7
Views
1K
  • General Math
Replies
1
Views
1K
  • General Math
Replies
3
Views
2K
Replies
16
Views
4K
Replies
0
Views
455
Back
Top