RSolve and known indexed variables
- To: mathgroup at smc.vnet.net
- Subject: [mg72299] RSolve and known indexed variables
- From: "Chris Chiasson" <chris at chiasson.name>
- Date: Tue, 19 Dec 2006 06:35:20 -0500 (EST)
Here is an attempt to solve a recurrence relation for the moment[i] at particular parts of a beam under constant shear. The index is i. lever[i] stands for the length of a particular section of the beam. I would specify the "initial" condition for the moment at index 1, but I want to show a problem into which I've run. RSolve[{moment[i+1]\[Equal]moment[i]+shear*lever@i, moment[10]\[Equal]someMoment},{moment[i]},i] {{moment[i] -> someMoment - Sum[shear*lever[K$35], {K$35, K$36, 9}] + Sum[shear*lever[K$35], {K$35, K$36, -1 + i}]}} Notice that the output includes two sums, both with an index of K$35. However, the range of the sums start at K$36. K$36 has no value. From looking at the output, I would guess that K$36 should have the value 10 (the index at which I gave the initial condition for the moment). For now: I will try to work around this by specifying my own generated parameter and then detecting the appropriate Sum structures to find the variable to replace. I have also run into a problem where RSolve returns the input and an RSolve::deqx error message if the input has one of these "known indexed variables", even though the problem is actually separable (the second part of the separate computation is shown above): RSolve[{moment[10] == someMoment, shear[10] == someShear, moment[1 + i] == moment[i] + lever[i]*shear[i], shear[1 + i] == shear[i]}, {shear[i], moment[i]}, i] So, uh, do you have any suggestions for making Mathematica handle the combined problem? Do you have any methods for making Mathematica not produce the K$36 variable in the output? Note: This is one of the few times I have ever attempted to use RSolve, and probably the first time in more than a year. I could easily be using it incorrectly. Second note: From the help browser documentation, it appears RSolve was moved into the kernel from RSolve.m beginning with version 5, so anyone with a version 4.x could probably view a copy of the source code that is probably quite similar to what the internal code now uses. I lack such a copy. -- http://chris.chiasson.name/