I need certain user defined functions over and over. I was wondering how can I define and where and how to save them such that each time I start a notebook, these functions are available and need not to be defined again.
Best place is to make a package. But if you do not feel like it, you can put the definitions in the init.m file
see http://reference.wolfram.com/mathematica/ref/file/init.m.html for more information on using
"Possible locations for init.m files include the following:"
Using a package
If you put the definitions in a package, say
or if the package is in one of the standard locations in the Mathematica
whenever you need to use the functions.
To make a simple package, here is a note I wrote here it has more information.
See also this question here at how to install and use a package http://stackoverflow.com/questions/4641512/how-to-install-new-packages-for-mathematica
also WRI page on packages http://reference.wolfram.com/mathematica/tutorial/SettingUpMathematicaPackages.html
For advanced packages, you can make a package that will also load automatically when Mathematica starts. These has to go to a special location though, called
This link below is very useful to tell one where to put everything in Mathematica and talks more about this autoloading