The spectrum allocated to an end-to-end connection between source and destination nodes varies dynamically with time (denoted as time-varying traffic). For serving time varying traffic in an Elastic optical network (EON), the spectrum allocated for the connection can be expanded or contracted to meet the traffic requirement. Moreover, multipath routing algorithms can more flexibly utilize spectrum resources than single-path routing algorithms in dynamic scenario, since it splits a traffic request into multiple small-size connections and individually transmitting them through several optical paths. In this paper, the spectrum expansion /contraction problem (SECP) for multipath routing on EONs is studied with time-varying traffic. The expansion and contraction algorithms are proposed to solve this problem and these algorithms are examined through simulations. Simulations show that the proposed algorithms can achieve good results.