Piracetam is well studied and is credited by its users with boosting their memory, sharpening their focus, heightening their immune system, even bettering their personalities. But it’s only one of many formulations in the racetam drug family. Newer ones include aniracetam, phenylpiracetam and oxiracetam. All are available online, where their efficacy and safety are debated and reviewed on message boards and in podcasts.
Clarke and Sokoloff (1998) remarked that although [a] common view equates concentrated mental effort with mental work…there appears to be no increased energy utilization by the brain during such processes (p. 664), and …the areas that participate in the processes of such reasoning represent too small a fraction of the brain for changes in their functional and metabolic activities to be reflected in the energy metabolism of the brain… (p. 675).
I have elsewhere remarked on the apparent lack of benefit to taking multivitamins and the possible harm; so one might well wonder about a specific vitamin like vitamin D. However, a multivitamin is not vitamin D, so it’s no surprise that they might do different things. If a multivitamin had no vitamin D in it, or if it had vitamin D in different doses, or if it had substances which interacted with vitamin D (such as calcium), or if it had substances which had negative effects which outweigh the positive (such as vitamin A?), we could well expect differing results. In this case, all of those are true to varying extents. Some multivitamins I’ve had contained no vitamin D. The last multivitamin I was taking both contains vitamins used in the negative trials and also some calcium; the listed vitamin D dosage was a trivial ~400IU, while I take >10x as much now (5000IU).
One of the other suggested benefits is for boosting serotonin levels; low levels of serotonin are implicated in a number of issues like depression. I’m not yet sure whether tryptophan has helped with motivation or happiness. Trial and error has taught me that it’s a bad idea to take tryptophan in the morning or afternoon, however, even smaller quantities like 0.25g. Like melatonin, the dose-response curve is a U: ~1g is great and induces multiple vivid dreams for me, but ~1.5g leads to an awful night and a headache the next day that was worse, if anything, than melatonin. (One morning I woke up with traces of at least 7 dreams, although I managed to write down only 2. No lucid dreams, though.)

Systematic reviews and meta-analyses of clinical human research using low doses of certain central nervous system stimulants found enhanced cognition in healthy people.[21][22][23] In particular, the classes of stimulants that demonstrate cognition-enhancing effects in humans act as direct agonists or indirect agonists of dopamine receptor D1, adrenoceptor A2, or both types of receptor in the prefrontal cortex.[21][22][24][25] Relatively high doses of stimulants cause cognitive deficits.[24][25]