1 | initial version |
The problem comes from the first line. It should be:
P1= text(r'$\int_0^2 \sqrt{x} \, dx$', (0.5, 1.1), fontsize=20)
Please, note the r
(which means raw) before the string. It is needed to force Python to interpret \
as an ordinary character instead of an escape one.