Mathematica Basics - Functions
Introduction
In this notebook we will look at how you as the user can createÌýyour ownÌýfunctions inÌýMathematica. Some of your work may remind you of the work you did back in theÌýÌýnotebook when you learned the differences betweenÌýimmediateÌý²¹²Ô»åÌýdelayed assignment, (i.e. the differences betweenÌý=Ìý²¹²Ô»åÌý:=). In fact, if you're still a little confused on these issues it might pay you toÌýÌýthere now, and review them.
Note: In order to see exactly how functions behave we're going to begin the notebook by making someÌýdeliberate mistakes. Don't panic if you generate anÌýerror message, or an answer that seems incorrect—read on to the next question. Unless you managed to create a brand new mistake of your own, you should find an explanation following each of these little difficulties.
Evaluating Commands
Remember, as we said in the introduction to the first notebook, in order to tellÌýMathematicaÌýthat you want it to actually evaluate what you have typed, hit the ENTER key over on the extreme right side of your keyboard on the numeric keypad. Again, don't confuse this with the RETURN key, which merely starts a new line of text.
You can now switch to an actualÌýMathematicaÌýpractice notebook by clicking on the icon on the left. It may take a while to start up! Don't forget to come back here when you're done! (You can also return here just to reread the instructions.) See you in a few minutes.
Welcome back! You may be wondering how well you did. Click on the icon on the left to see the answers you should have gotten. (Only the answers are given, so if you don't match our results you need to figure out what you did wrong.)
You're now done with this lab. Next you may go to theÌýTable of Contents for theÌýMathematicaÌýBasics Labs, or go to theÌýTable of Contents for all of the Differential Equations Labs, or simply quit.