Differential equations are ubiquitous in models of physical phenomena. Applications like steadystate analysis of heat flow and deflection in elastic bars often admit to a second order differential equation. In this paper, we discuss the use of a quantum annealer to solve such differential equations by recasting a finite element model in the form of an Ising hamiltonian. The discrete variables involved in the Ising model introduce complications when defining differential quantities, for instance, gradients involved in scientific computations of solid and fluid mechanics. To address this issue, a graph coloring based methodology is proposed which searches iteratively for solutions in a subspace of weak solutions defined over a graph, hereafter called as the 'box algorithm.' The box algorithm is demonstrated by solving a truss mechanics problem on the D-Wave quantum computer. J n 11 J n 12 J n 13 J n 21 J n 22 J n 23 J n 31 J n 32 J n 33