Model Theory With Applications To Algebra and Analysis