I'm trying to write a very simple program to generate shear and bending moment diagrams for beams. The thing is that I don't know what kind of loading that the beam may see so I want to be able to write it as generically as possible. I'm trying to find a web resource (not a book, unless it's an ebook or PDF) for the differential equations or for hints on how I can derive it from first principles. (I'm guessing that it has something to do with Newton's Second Law of Motion?) If anybody can help point me in the right direction, that would be greatly appreciated. Just googling "partial differential equations solid mechanics" brings up a lot of links ABOUT PDEs in solid mechanics but not the equations themselves (whereas I'm actually looking for the PDEs). Thanks.