Analytical expression of negative differential thermal resistance in a macroscopic heterojunction