On Aug 5, 2012, at 5:20 PM, Schwab,Wilhelm K wrote: > short of symbolic manipulation (e.g. maple), all we do is discretize and > approximate, right? > > Integration (aka quadrature) is "easy" but numerical diff is very unstable. > ODEs solve well w/ Runge-Kutta methods. > >
Definitely, for some simple problems. Just to scratch the surface...Besset only provides two quadrature methods: Romberg and Simpson both of which are very problematic for many integrals (accumulation of underflow being one of the more common but I'm sure google can probably give you a longer list than I can). If I remember correctly neither of his algorithms employ adaptive step sizes (although I think that they respond to "data sources" with varying step sizes properly) so be ready for arbitrarily large errors with rapidly varying integrands. Most of the better libraries provide adaptive integrators and several variants of them because the world of "quadrature" is not one-size-fits all. The book "Numerical Recipes" (Press et al) touches the only the tip of this iceberg but its a start for those that want to go beyond Besset's book. As for diff-eqs: I don't think Besset includes Runge-Kutta or any other diff-eq integrators. RK or Adam's Bashforth are simple enough to implement, though, but again said implementation will likely be problematic, especially for very stiff equations but even in simpler cases for systems of equations that have singularities (despite the name, singularities in systems of equations are very common). More sophisticated solvers deal with these things well or one looks for specialized solvers for the problems at hand. None of this touches on problems that will likely arise from the types of problems the original poster is trying to solve (they only specified E & M). Maxwell's equations (time and space dependent PDE's) will require making both time and space discrete, which in multiple dimensions can be prohibitive due to both memory and time constraints. Normally one has to apply some knowledge of the physics to simplify the problem...or just start with a very simple problem ;-) I'm assuming the original poster will start with some problems with high degrees of symmetry and move forward from there. That is a great approach to learning numerical approaches to solving physics problems and simple tools will get them a long way. David
