We calculate from first principles the nonlinear piezoelectric response of ferroelectric PbTiO3 for the case of a polarization-enhancing electric field applied along the tetragonal axis. We focus mainly on the case of fixed in-plane lattice constants, corresponding to epitaxially constrained thin films. We find that the dependence of the c/a ratio on electric field is almost linear in the range up to 500 MV/m with little saturation. This result contrasts with expectations from Landau-Devonshire approaches based on experimental results obtained at lower fields but is in qualitative agreement with a recent experiment in which higher fields were attained using pulsed-field methods. We also study cases in which the in-plane epitaxy constraint is removed, or an artificial negative pressure is applied, or both. These calculations demonstrate that PbTiO3 can show a strikingly nonlinear piezoelectric response under modified elastic boundary conditions.