Imitation is sometimes one of the best paths towards understanding. When you are practicing a piece, improvising something similar to what you are playing helps get to the heart of what you are trying to learn. It can make the difference between learning something in two months and learning something in two days.
What is easier to learn, to memorize: a text in your own language or a list of random letters of the same length? The obvious answer is the speech because it can be organized into coherent structures and concepts which are easier to learn. In the case of the list of random letters, you are required to learn and organize one thousand or so individual things, while the speech can be reduced to only a handful of concepts, most of which fit the pattern of everything we have learned before.
The key towards effective and long-lasting memorization is a clear understanding of what is going on.
One of the best ways to get an understanding of a piece is by imitating what the composer did, trying out variations that the composer himself might have tried out himself and also completing ideas that are not completely developed. An insight into a piece of music from a composer’s point of view is a very useful things, and one of the factors that made musicians such as Glenn Gould great.
When playing a cantabile passage, you can try changing the key, you can try re-harmonizing the melody with the same functions but substituting the actual chords (like putting a minor IV instead of a major IV or a V instead of a diminished chord). You can try using the same model as the piece -for example, arpeggiated accompaniment in the left hand with melody in octaves- and make up a new piece of your own. If you run into a melodic or harmonic sequence- for example, in a Bach Invention- you can try taking the sequence out of context and completing it, instead of breaking it off where the music does. You can try fitting a different motif into the sequence.
This is a very useful practice technique that can be applied to children as well. Most kids interested in the piano will usually jump at the chance of improvising or writing their own music. In many cases, after I finish working on a small piece with a child, we talk about the piece and make some rules up. Things like: “this piece only uses the notes middle C, D and E”, “this piece only uses half notes and quarter notes” and “this piece plays the same thing with both hands all the time”. Once we do that, I let him improvise or write a piece following those rules, name it (whatever he wants- “The singing turtle song”, “The snail song”, “The Kung Fu Panda, Wall-e fighting ninjas and shooting Kame-hame-has song”), and then learn it along with whatever he is learning at the same time.