analytical calculations