WASHINGTON — The International Monetary Fund, showing heightened concern over a slowing world economy, said on Tuesday that cash-rich countries like Germany needed to step up large public investments to help keep the flagging global recovery on track.

The comments — from the fund’s managing director and its lead economist — reflect growing concerns within the I.M.F. that Germany, which recently passed China as the country with the largest trade surplus in the world, is not doing enough to spur growth in Europe.

At a news conference at the start of its semiannual meeting, an event that attracts financiers, policy makers and central bankers from around the globe, the fund’s top economists highlighted a shift in the global economy in which many major nations are failing to keep up with what is still a relatively modest recovery in the United States.

In an interview on Friday, Christine Lagarde, the managing director of the fund, said global growth risked being stuck in a rut for a long time. “If nothing gets done in a bold way, there is a risk of a new mediocre” level of growth for the global economy, she said.