When a fluid cannot convey a tensile stress, the phenomenon cavitation occurs. In the areas where cavitation occurs, the fluid is a mixture of liquid and gas bubbles. Cavitation may occur, in the cases when two surfaces with a thin film of lubrication between the surfaces separate from each other. When lubrication systems as the ball in the race in a deep grove ball element bearing are modeled, it is important to consider the effect of elastic deformation of the contacting surfaces and cavitation inside the fluid. A way to solve a cavitation problem with a method for linear complementarity problem was presented recently. An example of complementarity is found in contact mechanics. If contact does not occur the contact force is zero and if contact occurs the distance between the surfaces is zero. The product of the contact force and the distance between the surfaces are in the both cases, zero. Complementarity is achieved when this product is zero. To consider the original problem, both cavitation and deformation must be considered and a mathematical model must be formulated for these phenomena. Is it possible to express the mathematical model as a complementarity problem? A general system of equations is formulated as a mixed complementarity problem. The proposed systems of equations are comprised by some of the following equations: an equation expressed as a linear complementarity problem that is based on Reynolds equation, the film thickness and the force balance equation. A few possible systems of equations and solution methods are presented. Methods that have been used in the test of the methods are successive substitution and Newton-Raphson with use of a globally convergent method. Different bearing geometries have been used to verify the models and methods. The pocket pad bearing geometry makes it possible to compare with an analytical solution for rigid surfaces. The parabolic slider bearing geometry makes it possible to compare minimum film thickness for the elastic area, the minimum film thickness used for comparison is analytically estimated for some simplified situations. The comparison for pocket pad bearing geometry gives correspondence in pressure distribution, the differences that arise depends on the sizes of cavitation areas. The comparison for parabolic slider bearing geometry gives agreement in minimum film thickness for the tested cases. This implies that elastic deformation and cavitation can be modeled and the method Newton-Raphson can be used, in the calculation of a solution. For the model used, it is assumed that the viscosity is constant. To be able to model the compressibility, a density-pressure relation with constant bulk modulus is used. The pressure is assumed to be constant at both the leading and trailing edge of the bearing when formulating the boundary conditions.