Problems 11
  1. Theory.
    1. In the basic article document class, how do you create the title?
    2. What is the environment for displayed and automatically numbered quations in LaTeX?
    3. How can you refer to the equation number?
    4. What is the environment for floating figures in LaTeX?
    5. How can you add a caption to your figure?
    6. How can you refer to the figure number?
    7. Do you need any extra package to include figures in PDF format?
  2. Practice.
    1. An example of examination exercise: the error function.
      1. Implement the error function erf(x) and the complimentary error function erfc(x) using the integration routines from GSL.
        • Hint: you can implement mutually recursive functions:

          double erf(double);
          double erfc(double);
          
          double erf(double x){
          	if(x < 0) return -erf(-x);
          	if(x > 3) return 1-erfc(x); /* more effective */
          	/* calculate erf(x) */
          	return result;
          }
          double erfc(double x){
          	if(x < 0) return 2-erfc(-x);
          	if(x < 3) return 1-erf(x); /* more effective */
          	/* calculate erfc(x) */
          	return result;
          }
          				
      2. Create a short report about the error function --- using the material from wikipedia --- and about your implementation. You should use the integration subroutines from GSL. Use LaTeX document class article or revtex4 (or your other favourite class).
      3. The plots of the error function and the complementary error function must be done using pyxplot/gnuplot and your implementation of the error function.
    2. Debug somebody else's project here.
      • The assignment was the following: "implement a function that prints half the [0,0] element of a given matrix".
      • You shouldn't rewrite the code, you should only correct the errors --- if any --- in the Makefile and the code.