A homogenized theory for functionally graded Euler–Bernoulli and Timoshenko beams