This paper discusses a simple procedure to reconstruct f ( R ) -gravity models from exact cosmological solutions of the Einstein field equations with a non-interacting classical scalar field-and-radiation background. From the type of inflationary scenario we are interested in, we show how the potential functions can be obtained. We then show how an f ( R ) gravitational Lagrangian density that mimics the same cosmological expansion as the scalar field-driven inflation of general relativity (GR) can be reconstructed. As a demonstration, we calculate the slow-roll parameters (the spectral index n s and the tensor-to-scalar ratio r) and compare these to the Planck data.