Is it possible to learning something like the trajectory of an n-pendulum based on a set of initial conditions? I've been experimenting with neural nets recently (Keras and Theano libraries), and it's been fun getting models with different architectures to match more and more complicated functions. But how would one go about teaching a net to learn the trajectory of a single, double, triple, etc pendulum? How can a neural net take a set of initial conditions (pendulum lengths, masses, init. velocities, etc) and extrapolate an entire trajectory, one as complicated as stack-pendulums produce?
 A: It's viable for a neural net to predict nearest future from previous state, so you can integrate by small steps, but not the entire trajectory.
Eventually a neural network can learn to predict the next time step as good as the well-established numeric methods do, such as the Runge Cutta methods.
The difference is that a neural network 'invents' and 'embeds' the numerical integration method inside itself, and can also learn more from the real world than you can provide with the equations. For example, when you provide just the newtonian mechanics of a pendulum system, a neural network fed with the real world feedback could also learn fluid dynamics of the surrounding air volume as well as the friction profiles of the joints.
Having said that, if you want to predict the entire trajectories with a neural network in a single step, your network should be capable for computation of the entire integration range of equalent numerical integration method, all in a single step. To illustrate what it takes, try to unroll the loop of integration using a Runge Cutta method on paper for first 10 time steps, and you will get the figure of the amount of nodes and hidden layers that an equally powerful neural network would require. The amount of computations would be enormous, basically proportional to the N^2 (number of future steps squared) if you use few hidden layers. If you the number of hidden layers equal to amount of integration steps, then each of the network layers would just replicate almost the same pattern learned in previous layer, only for another time step.
A better result could be achieved with a recurrent neural network, or a regular neural network evaluating a single time step at a time, and taking it's own output from previous step as an input along with all the known past states in some time range.
A better result can be achieved when the system has shorter relaxation time. For example when a pendulum moves with some friction in joints, in a fluid with some viscosity or in a turbulent mode (higher Reynolds number). In this case, the results would not depend on the steps beyond the relaxation time, and lower past steps need to be provided as inputs.
Still better result can be achieved if you interleave computation steps with model validation steps. For example, for a pendulum with hard joints, you can adjust the positions using backward/forward kinematics to alleviate the impossible state of the system when the numeric method computes it's position step so the distance is longer or shorter then the joint length.
