  We model a spiral galaxy by a thin axially symmetric disk that includes both
visible and dark matter. The surface mass density of the disk is calculated
directly from the rotational velocity curve without extra assumptions. We
simplify the standard application of the model. Since most velocity curves are
known out to some radius, r_{max}, we extrapolate them by attaching a Keplerian
tail. The numerical procedure and the extrapolation are tested with a known toy
mass density and shown to reconstruct it with a good precision if r_{max}
includes a sufficient part of the velocity curve. Mass density curves are
calculated for Milky Way and NGC 3198. We vary the extent of the flat part of
the velocity curves from 30 kpc to 200 kpc and show that does not affect
appreciably the calculated mass density inside r_{max}=30 kpc. The
reconstructed masses for Milky Way are 15 x 10^10 solar masses inside the
visible disk and 23 x 10^10 solar masses inside 30 kpc. For NGC 3198, the
reconstructed mass inside the visible disk is 6.5 x 10^10 solar masses and 11 x
10^10 solar masses inside 30 kpc. The total galactic masses are roughly
proportional to the extent of the flat part of the velocity curves which is
currently unknown. The high light-to-mass ratios obtained for the visible disks
of the galaxies - 11 solar units for Milky way and 9.3 for NGC 3198 - suggest
presence of dark matter. The method is also applied to NGC 3031 - a spiral
galaxy with a declining velocity curve in which case it is able to reconstruct
both the mass density curve and the total mass (14 x 10^10 solar masses).
