The frustrations in training any animal to do even the simplest action are plentiful. Even teaching a friendly and cooperative dog to extend its paw can be a matter full of failures, setbacks and frustration. Behavioral scientists, however, have developed various means to evoke seemingly impossible actions from any animal, even one as seemingly unteachable as a duck, in controlling that least controlled of its actions, toilet behavior.
List the duck's behaviors and the circumstances behind those behaviors. The list may be different for individual ducks; after all, the individual learning of each one will effect its behavior. Then restrict your duck's diet to keep it hungry without causing malnutrition. Hunger will keep it motivated to seek rewards of food and therefore be willing to change behaviors in order to receive them. But it should also be in the best health possible to maintain its performance.
Choose those behaviors from the list likely to bring the duck closer to the ultimately intended one, such as taking a step toward the toilet. Then either cause the conditions likely to induce that action and reward it or simply reward its spontaneous occurrence. Rewarding the behavior without providing a condition to induce it will require some intuition to time the reward correctly. Giving the reward even a second too late may teach the duck to associate an entirely different behavior to the reward or may leave it with no association at all. However, the duck may also generalize the behavior and this may lead to spontaneous correct behaviors.
Give the duck a larger reward for reaching the base of the toilet and change its reward schedule from individual rewards for each step to a large reward for going to this location. According to many behaviorists, you can change from one pattern of reward to the other without transition, but the duck may briefly stop performing the desired behavior before coming to understand the new system. From this point, begin giving the duck small rewards for behaviors likely to place the duck on top of the toilet and in the correct position to defecate or urinate.
Give the duck a large reward for positioning itself over the opening of the toilet seat and again change its reward schedule from a series of individual rewards for each individual step toward that position to a larger, single reward for being there. Now wait for the duck to defecate or urinate into the toilet and then reward each occurrence of that behavior and replace the rewards for placing itself on the opening of the toilet with one for using it.
Over time, make your rewards for the completed behavior less frequent and ultimately, more random. A consistent reward does build behavior faster than any other system, but random rewards will ingrain a behavior more deeply. This randomness will therefore spare you from having to reward the behavior during pressing tasks or in your absence. By the end of this process, you will have trained your duck.