  Since the theorems of Schur and van der Waerden, numerous partition
regularity results have been proved for linear equations, but progress has been
scarce for non-linear ones, the hardest case being equations in three
variables. We prove partition regularity for certain equations involving forms
in three variables, showing for example that the equations $16x^2+9y^2=n^2$ and
$x^2+y^2-xy=n^2$ are partition regular, where $n$ is allowed to vary freely in
$\mathbb{N}$. For each such problem we establish a density analogue that can be
formulated in ergodic terms as a recurrence property for actions by dilations
on a probability space. Our key tool for establishing such recurrence
properties is a decomposition result for multiplicative functions which is of
independent interest. Roughly speaking, it states that the arbitrary
multiplicative function of modulus 1 can be decomposed into two terms, one that
is approximately periodic and another that has small Gowers uniformity norm of
degree three.
