  Stochastic thermodynamics (ST) for delayed Langevin systems are discussed. By
using the general principles of ST, the first-law-like energy balance and
trajectory-dependent entropy s(t) can be well-defined in a similar way as that
in a system without delay. Since the presence of time delay brings an
additional entropy flux into the system, the conventional second law $<{\Delta
{s_{tot}}}> \ge 0$ no longer holds true, where $\Delta {s_{tot}}$ denotes the
total entropy change along a stochastic path and $<...>$ stands for average
over the path ensemble. With the help of a Fokker-Planck description, we
introduce a delay-averaged trajectory-dependent dissipation functional $\eta
[{\chi(t)}]$ which involves the work done by a delay-averaged force $\bar
F({x,t})$ along the path $\chi (t)$ and equals to the medium entropy change
$\Delta {s_m}[ {x(t)}]$ in the absence of delay. We show that the total
dissipation functional R = \Delta s + \eta, where $\Delta s$ denotes the system
entropy change along a path, obeys $< R > \ge 0$, which could be viewed as the
second law in the delayed system. In addition, the integral fluctuation theorem
$< <e^(-R)>=1 also holds true. We apply these concepts to a linear Langevin
system with time delay and periodic external force. Numerical results
demonstrate that the total entropy change $< {\Delta {s_{tot}}} >$ could indeed
be negative when the delay feedback is positive. By using an inversing-mapping
approach, we are able to obtain the delay-averaged force $\bar F({x,t})$ from
the stationary distribution and then calculate the functional $R$ as well as
its distribution. The second law $< R > \ge 0$ and the fluctuation theorem are
successfully validated.
