The mathematical formulation of heat conduction is based on Fourier's law, which states that the heat flux (q) is proportional to the temperature gradient (-dT/dx):

q = -k * A * (dT/dx)

where ρ is the density, c_p is the specific heat capacity, T is the temperature, t is time, and Q is the heat source term.

ρ * c_p * (∂T/∂t) = k * (∂^2T/∂x^2) + Q

T(x) = (Q/k) * (x^2/2) - (Q/k) * L * x + T_s