Exercise: Graphing functions

This exercise checks that you have learnt the basic usage of numpy and matplotlib.

In [1]:
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline

Task 1: Graph a function of one variable

Plot the graph of $\sin(x)$ for $x$ in the interval $[0,10].$

Task 2: Graph a function of two variables

Plot the graph of $\cos(\sqrt{x^2 + y^2})$ for $(x, y) \in [-5,5] \times [-5,5]$.