Mathematics 165                                  Laboratory 1                                September 3, 1992
	  
Name: _____________________________   	Lab Partner: ___________________________
	  
Consulted with: _____________________________________________________________

© Lafayette College, 1994

Some Basics of Mathematics and Mathematica

Part 0:	Getting Started (and Stopped)

To start Mathematica,

from the C:\> prompt, type mathwin and press the <Enter> key to load Windows.  (Loading Windows takes about a minute.)
	  
from Windows, double-click the left mouse button when the arrow is on the Mathematica icon.  In about a minute the hourglass will disappear and Mathematica will be loaded.

To execute a Mathematica command,

hold down the shift key while you press the <Enter> key (<Shift>+<Enter>).

To print a plot,

place the arrow on the plot you wish to print and click the left mouse button once.  Now click the left mouse button once on the word File (near the upper left-hand corner of the screen) to reveal a pull-down menu.  Then click the left mouse button once on the choice Print Selection in the menu.  Your hard copy of the plot will come out of the printer in 45  seconds or so.

To exit Mathematica,

click the left mouse button once on the word File (near the upper left-hand corner of the screen) to reveal a pull-down menu.  Then click the left mouse button once on the word Exit in the menu.  Finally, click the left mouse button once on the word “No” when you are asked if you want to save your notebook.

Part 1:	A Small Demonstration

We will use Mathematica to find all of the solutions of the equation

and then check our solutions.
	  
	  (a)	Solve[x^2 - 5x + 4 == 0, x] tells Mathematica that we want to solve the equation  x2 – 5x + 4 = 0  for the unknown x.  (In Mathematica, the double-equals symbol, ==, is used to define an equation, while the single-equals, =, is used to make assignments.  Thus, x == 2, is an equation which is either true or false, while x = 2 assigns the value 2 to the symbol x.)
	  
	  (b)	Be sure to check the solutions that Mathematica has given us by substituting the given values of x in the polynomial.  (Since the arithmetic is so easy here, we may as well do that in our heads.)
	  
	  (c)	We can also check our solutions geometrically by graphing the equation  y = x2 – 5x + 4.  (What is of interest in the graph?)  The command
	  
	  Plot[x^2 - 5x + 4, {x, -1, 5}]
	  
gives the graph of the polynomial over the x-interval [–1, 5].
	  
	  	Work through the next three exercises with your lab partner.  Part 2 takes you through the solution of another equation using the same kinds of ideas we used above.  Type the expressions in bold exactly as they are given and follow each command with <Shift>+<Enter>.  In Parts 3 and 4, you should decide what features you want to use to solve the problem.  Don't be reluctant to ask for help.

Part 2:	A Second Example

Solve the equation  2x2 + x – 8 = 6 – 2x.
	  
	  (a)	Type Solve[2x^2 + x - 8 == 6 - 2x, x] to ask Mathematica to find the values of x which satisfy the equation.  Write your results here.




	  (b)	Check your solution(s) numerically.  (See Part 1(b).)  Do the given values of x actually satisfy the equation?
	  



	  (c)	To do the graphical check, you could rewrite the equation in the form

and plot as we did in Part 1.  Instead, use Plot[{2x^2 + x - 8, 6 - 2x}, {x, -4, 3}] to plot the polynomials on either side of the equation together on the same set of axes.  What feature of the graph is of interest?  Why is [–4, 3] a reasonable interval over which to plot the graph?  Give your answers in a couple of complete sentences.

Part 3:	A More Complicated Equation

Solve the equation

Explain your results.  (Mathematica's name for the square root function is Sqrt.  Thus, to enter the left-hand side of the equation, you should type Sqrt[x^2 + 4x + 7].  Be sure to notice the  uppercase S and the square brackets.)

Part 4:	An Inequality

For what values of x does the inequality below hold?

On a separate sheet of paper, write a brief report on your solution to this problem.  (See the handout “Some Suggestions on Preparing Lab Reports.”)