Computational mathematics applied to astrophysics: Three cases of study