We reduced image artifacts and increased the attainable axial field-of-view by designing a highly linear x-gradient coil for Halbach array-based MR systems. A truncated sum of sinusoidal basis function is used for the current density. Higher order modes combined with specifying the target field inside a volume lead to a stable solution of the inverse source problem. The coil was installed on our 50 mT system and resulted in a 150% increase in linear DSV with respect to our previously designed gradient coil. Whole-brain three-dimensional images have been acquired using turbo spin echo sequences in less than 10 minutes.