Implementing Numerical Integration

Click For Summary
SUMMARY

This discussion focuses on implementing numerical integration for solving partial differential equations (PDEs) using a specific recurrence relation. The method presented is defined as u_m^{n+1}=u_m^{n-1}+2u_{m+1}^n-u_m^n-3u_{m-1}^n+k(u_{m+2}^n-u_{m-2}^n), where m and n represent spatial and temporal indices, respectively. The challenge arises when determining boundary conditions for m=0 and m=1, leading to the need for simultaneous equations to solve for unknowns. The discussion emphasizes the importance of correctly applying boundary conditions such as u(0,t)=u(1,t) to facilitate programming solutions.

PREREQUISITES
  • Understanding of partial differential equations (PDEs)
  • Familiarity with numerical methods for PDEs
  • Knowledge of recurrence relations in numerical analysis
  • Basic programming skills for implementing numerical algorithms
NEXT STEPS
  • Research boundary condition techniques for numerical PDE solutions
  • Learn about simultaneous equations and their applications in numerical methods
  • Explore programming libraries for numerical integration, such as NumPy in Python
  • Study specific numerical methods like the finite difference method for PDEs
USEFUL FOR

Mathematicians, computational scientists, and software developers interested in numerical methods for solving partial differential equations.

Tangent87
Messages
146
Reaction score
0
Say we have some partial differential equation for u(x,t) and we devise a numerical method to solve it. For example if we say unm is the solution at x=hm and t=kn with m=0,...,M and n=0,...,N where h and k are the step-lengths, and then our method is something like:

[tex]u_m^{n+1}=u_m^{n-1}+2u_{m+1}^n-u_m^n-3u_{m-1}^n+k(u_{m+2}^n-u_{m-2}^n)[/tex]

and we're given u(x,0) and u(x,k) so we can work out u0m and u1m for all m. We then stick n=1 into the recurrence in a bid to work out u2m for all m. But what happens if we stick m=0 or 1 now into the recurrence do we just let u1m-2 and u1m+2 be equal to 0 or is the recurrence just not defined for m=0 or 1? In which case how do we find u20 say?
 
Physics news on Phys.org
Ok I've figured out that if we use boundary conditions such as u(0,t)=u(1,t) for all t then *I think* the recurrence relation will set us up with a set of simultaneous equations, however I have no idea how we can program to solve this?
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
3
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K