Plotting Graphs and Pylab Questions
1. Plot the following ordered pairs and show the graph: (1, 2), (2, 3), (3, 5), (4, -1), (5, 0).
2. Plot a vertical line extending from (1, 2) to (1, 8) and a horizontal line extending from (4, 4) to (-1, 4).
3. Plot the parabola with domain [-1, 1]. Take the step between points along the x-axis to be 0.1. Have the individual points be shaped as green triangles and the connecting line be dashed.
4. A projectile is launched from an inital height 0 with a speed 4.0 m/s at 45 degrees to the horizontal. Plot the trajectory of the projectile in its plane of motion (letting the x-axis be parallel to the horizontal, and the origin be the initial position of the projectile) from the point of launch to the point where it lands on the ground (assume the ground is level). Make sure to label the axes and add a title to the graph.
5. Let f(x) = exp(x**2/2). Find f'(x) and f''(x), i.e. the first and second derivatives of f. Plot f, f' and f'' in the domain [-10, 10] with step 0.01 along the x-axis. Display all three plots in the same window.
6. Using the arange function, produce a list of numbers between -10 and 10 at intervals of 0.01. Use this list to plot graphs of:
y = x
y = x**2
y = exp(x)
y = arctan(x)
Also plot graphs of the following functions in the domain (0, 10]:
y = log(x)
y = x**x
y = x**(x**x)
Make sure to label your axes and graphs.