Implementing Numerical Integration

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?
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top