Industrial Mathematics - Alexiades
                   Lab 1
           Warmup programming and plotting
For each assignment, you should create a directory (folder) and work in it,
so all files pertaining to the assignment will be in one place.
A good name for this assignment may be:  Lab1 .
Always read the entire assignment before you start doing it...

1. Write a code that evaluates f(x) = a−bx3  at N equidistant points 
   in [0,1], and outputs the pairs x , f(x) in a file named "values".
   Ask the user to enter a,b,N, or read them from a data file. 
   Try a = -1., 0., 1 ,  b = 0.1, 1., 5. , N=20.

  (Start aquiring good programming habits: In your code
   enter your name, date, title, a brief description of what it does, 
   document the main steps, etc )

2. Use gnuplot to display the graph in each case
	gnuplot> plot "values" with points
   Check it with, for example (say, a=1, b=0.1):
	gnuplot> plot [0:1] 1-.1*x**3 with lines 
   You can plot both your "values" and this curve on the same plot:
	gnuplot> plot "values" with points,  1-.1*x**3 with lines

   In fact, you can enter formulas in gnuplot, like:
	gnuplot> f(x)=a-b*x**3 ; a=1 ; b=0.1 ; plot [0:1] f(x) w lines
   then only need to modify a, b and replot, like:
	gnuplot> a=0 ; b=5 ; replot
   [Better yet, can put these in a script file, see examples at bottom,
    ... gnuplot is very convenient and versatile... ]

   Play with N, to see how many points you need to "trace out the curve" 
   (minimum number needed to 'identify' the curve).

Most everything you need to know is in the How-To and On-line Resources
links on the  M475  web page. Check them out!

3. Once you get a good fit on screen, save the plot into a .ps file
   (see gnuplot - How to print  for how to do it).  
   Name the file "lab1.ps". 
   View this file with ghostscript or ghostview:
	gs lab1.ps	(or:  ghostview lab1.ps )
   on your screen.

4. Now run your code with:  a=1, b=0.1, N=10. 
   Email me (alexiades@utk.edu  and Cc: to yourself),
   with Subject: "M475 lab1" the following:
   in a single  plain text mail message, NO attachments:
     - your code
       ============================================== (separator line)
     - the input and output from it	(ONLY for N=10 !).
       ============================================== (separator line)
     - What value of N worked well in Part 2 ?

5. Get into good habits: clean up any junk files and the executable
   (since it can easily be generated by compiling), keeping only
   the useful files (code, input, output, lab1.ps).
                    All done !
Impressive examples of gnuplot scripts: trochoids spiro2.gp , spiro3.gp   Try them!