CPSC 215 — Assignment 1

Winter 2002 — January (21^st), 2001

<your name here>
<your student ID here>

Note: Double-click on the outer cell brackets to see the contents of the cells.

Instructions for this Assignment

Welcome to the first assignment for CPSC 215 — Introduction to Programming with Mathematica.

Please follow these steps to complete your assignment:

(1) First you should download the PDF file (portable document format) from the CPSC 215 Assignments website at: http://pages.cpsc.ucalgary.ca/~jacob/Courses/Winter2002/CPSC215/Assignments.html.

You will find this PDF file as the second icon in the Assignment 1 line on this webpage.
If you don't know about how to read PDF files, have a look at http://www.adobe.com and search for the Get Adobe Acrobat Reader icon.

Note: On the computers in the CPSC labs the web browsers are already setup for PDF download and reading. That means when you use a web browser, like Netscape Navigator, on these machines, the PDF files will be displayed on the screen automatically.

(2) The PDF file shows the printout of a Mathematica notebook. Your first task is to construct a Mathematica notebook that looks exactly like this printout. However, replace your name and the date for the <my name> and <data> entries.

(3) After you have designed your notebook with all the text and formulas as in the PDF file, copy all the cells of that notebook into this notebook after this cell here. Then continue with the instructions in the following section Calculating with Formulas.

Calculating with Formulas

Please note that although the following tasks involve entering formulas and mathematical calculations, finding the solutions does not require any mathematical knowledge at all. You simply have to know how to convert a formula into Mathematica syntax and evaluate the appropriate commands.

Solve the integral for formula (a)

Note: Place your Input Cell right after this cell.

Solve the integral for formula (b)

Note: Place your Input Cell right after this cell.

Solve the integral for formula (c)

Note: Place your Input Cell right after this cell.

Solve the integral for formula (d)

Note: Place your Input Cell right after this cell.

Compute the partial derivative of formula (e)

Note: Place your Input Cell right after this cell.

Compute the solution of the equation in formula (f). (Hint: use the Solve command.)

Note: Place your Input Cell right after this cell.

Programming Examples

Working with the Table command

Write a command that generates the following outputs

For each line, which represents the desired output, write the Mathematica command that generates the corresponding result right above each output.

Hint: Look at the Help Browser!

Place your Input Cell right after this cell.

This is the result you should get:

Place your Input Cell right after this cell.

This is the result you should get:

Place your Input Cell right after this cell.

This is the result you should get:

Place your Input Cell right after this cell.

This is the result you should get:

Place your Input Cell right after this cell.

This is the result you should get:

Place your Input Cell right after this cell.

This is the result you should get:

Place your Input Cell right after this cell.

This is the result you should get:

Place your Input Cell right after this cell.

This is the result you should get:

Working with the Plot command

Enter the commands that produce the following graphics.

Hint: Again, have a look at the Help Browser.

Place your Input Cell right after this cell.

This is the result you should get:

Place your Input Cell right after this cell.

This is the result you should get:

Place your Input Cell right after this cell.

This is the result you should get:

How to Submit Your Notebook

Step 1

Save this notebook under the filename Ass1-<your student id>.nb.

For example, if your student ID is 123456, you would save this notebook as Ass1-123456.nb

Step 2

Send your notebook by email to your Teaching Assistant (TA).

If you are not sure how to do this, please ask your TA about details. (What email software can you use? How do you send attachments? ...)