## sympy – plot(): draw many graphs on one window.

Graph $y = \frac{1}{2 \sqrt{x}}$ in a window that has 0 <= x <= 2. Then, on the same screen, graph
$y = \frac{1}{h} \left(\sqrt{h + x} - \sqrt{x} \right)$
for h = -1, -0.5, -0.1, 0.1, 0.5, 1.

from sympy import *

init_printing()
x, h = symbols('x h')
y1 = 1/(2*sqrt(x))
y2_0 = (sqrt(x + h) - sqrt(x))/h
y2 = Lambda((x, h), y2_0)
h = (-1, -0.5, -0.1, 0.1, 0.5, 1)

ff = []
for n in h:
f = y2(x, n)
ff.append(f)
pprint(ff)
plot(y1, ff[0], ff[1], ff[2], ff[3], ff[4], ff[5], (x, -1, 2), ylim=(0, 10))


$\begin{bmatrix}\sqrt{x} - \sqrt{x - 1}, 2.0 \sqrt{x} - 2.0 \sqrt{x - 0.5},$
$10.0 \sqrt{x} - 10.0 \sqrt{x - 0.1}, - 10.0 \sqrt{x} + 10.0 \sqrt{x + 0.1},$
$- 2.0 \sqrt{x} + 2.0 \sqrt{x + 0.5}, - \sqrt{x} + \sqrt{x + 1}\end{bmatrix}$