Which one needs longer runway of an airplane between take off and landing for a constant weight?
Generally, aircraft require longer distance for taking off than landing roll. 

The standard definition for take-off phase is from the start of acceleration (stopped aircraft) to the point where aircraft reaches 35 ft above ground. Similarly, the landing phase is from 35 ft to the final stop. What you mentioned is a sub-phase, which is called "ground roll".

When the aircraft is accelerating for the take-off, the engins' thrust must overcome the aerodynamic drag and the ground friction, and the resultant will contribute to the acceleration. But when the aircraft is landing the reversed thrust in addition to an increased aerodynamic drag (due to spoilers and increased flap deflection) and increases ground friction (due to application of brakes) are decelerating the aircraft. This is physical reason.

While there are some engineering methods (such as equations or charts, usually presented in aircraft design books i.e. Roskam or in aircraft performance books), the most accurate method is to writing the force balance acting on the aircraft and computing the acceleration at any time step, and solving the position differential equation for the distance. But this method requires details about aerodynamic and thrust characteristics. This method somewhere was called time marching.