Company XYZ purchased new machinery for $50,000 on January 1, 20X1. The machinery has an estimated useful life of 5 years and a salvage value of $5,000. Assuming straight-line depreciation, calculate the depreciation expense for the year 20X1 and the carrying amount of the machinery at the end of 20X1.