Week 2

Question1

An important skill in computer programming is reproducing a previous result or modifying our code slightly and checking it still works. Try and plot a graph of tan(2y) over the range 0 to 2π.

Question 2

As we gain more experience, we will begin to spot patterns in the code the that we use. The plot function that we used, had a command of the form: 
Plot[function[x], {x, xmin, xmax}].
	
A similar function that can be used in Mathematica is Plot3D[...]. Below I have plotted the function f(x,y) = sin(x)cos(y), where x and y have been plotted over the range 0 to 2π.

a) By looking at the form of a the plot function using a single variable, suggest some forms the command for Plot3D might take.

b) ‘Google’ the Plot3D command and compare your suggestions. Are they similar or not? Are the square ‘[...]’ and curly ‘{...}’ brackets used in a way that you would have expected?

c) Now reproduce the above image using Plot3D.