difference equations
- To: mathgroup at smc.vnet.net
- Subject: [mg20567] difference equations
- From: psalzman at landau.ucdavis.edu
- Date: Sat, 30 Oct 1999 00:14:12 -0400
- Sender: owner-wri-mathgroup at wolfram.com
dear all, i wrote a difference equation at low order, and looked at the same thing at higher order. it's absurd. so it's Mathematica or nothing since i have no grad students to pawn off the work to (i am a grad student). here's the basic starting point: (* a = dt/(2 hbar) and b = -hbar^2/(2 m) *) (1 + I a * H) Psi[j + 1, i] == (1 - I a * H) Psi[j, i] i would like H -> b(1/r[i]^2) deriv_r(r[i]^2 deriv_r) + V[j + 1, i] on the left, but H -> b(1/r[i]^2) deriv_r(r[i]^2 deriv_r) + V[j, i] on the right. how can i do this? also, my 'stubs' for the derivative, deriv_r shouldn't commute with anything, and Mathematica likes to commute stuff. is there a way to tell it that i want deriv_r to remain on the left side of whatever it starts out to the left of? lastly, i'm using Psi[j, i], etc to mean Psi at time j, grid i. is there a better way of doing this? these are some basic questions, i know. but up until now all i've ever used Mathematica for is to solve integrals, plot graphs and spacetimes. thanks! pete