A 70-year-old male with obesity has experienced right knee joint pain for 2 years, exacerbated when descending stairs. Over the past week, he developed right knee joint swelling with significant mobility limitation. Pain improves with rest. Physical examination shows negative patellar ballottement test. Which investigation is most valuable for diagnosis?