modifications on calculation of dnudxi