Implementing Numerical Integration

Click For Summary
The discussion centers on implementing a numerical method to solve a partial differential equation using a recurrence relation. The method involves calculating values of u at specific grid points based on previous values, but challenges arise when applying the recurrence at the boundaries (m=0 or 1). The user considers using boundary conditions to create simultaneous equations for solving the problem. They express uncertainty about how to program this solution effectively. Overall, the conversation highlights the complexities of numerical integration and boundary condition implementation in computational methods.
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:

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)

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?
 
Question: A clock's minute hand has length 4 and its hour hand has length 3. What is the distance between the tips at the moment when it is increasing most rapidly?(Putnam Exam Question) Answer: Making assumption that both the hands moves at constant angular velocities, the answer is ## \sqrt{7} .## But don't you think this assumption is somewhat doubtful and wrong?

Similar threads

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