Forced oscillations of a wire vibrating in Newtonian and shear-thinning fluids described by the Carreau model are studied numerically. Two-dimensional simulations were performed using a commercial finite element modeling software package. When subjected to a sinusoidal driving force, the wire exhibits resonant behavior that depends on the viscosity of the surrounding fluid. The simulations of the wire vibrating in a Newtonian fluid were extremely well described by the theory developed by Retsina et al. ["The theory of a vibrating-rod densimeter," Appl. Sci. Res. 43, 127-158 (1986); " The theory of a vibrating-rod viscometer," Appl. Sci. Res. 43, 325-346 (1987)]. Our simulations of a wire vibrating in a Carreau fluid also revealed resonant behavior, but the shear rate and viscosity in the fluid varied significantly in both space and time. The behavior of a wire vibrating in a Carreau fluid can be described by the Newtonian theory if the constant viscosity in that theory is set equal to the non-Newtonian fluid viscosity averaged spatially around the circumference of the wire and temporally over one period of oscillation.