Image source: Getty Images.

When you look at investments with dividend yields of 5% or more, you're venturing into the territory of yield traps. These are companies that seem to have high yields today -- but chances are those yields aren't going to last, because the companies will need to slash payouts for one reason or another.

Three companies that do have yields north of 5%, and look like they have the legs to keep their payouts going and grow over time, are integrated oil and gas company Total SA (TTE 0.59%), fertilizer producer CF Industries Holdings (CF -0.29%), and healthcare real estate investment trust HCP, Inc. (DOC -0.29%). Here's a quick look at why these three are compelling high-yield investments.

Still taking a beating from the energy market

Even after two years of solid results that have steadily outpaced the rest of its integrated oil and gas peers, shares of Total are still pretty cheap, and offer a fairly compelling dividend yield just shy of 6%. For a company as well-positioned as Total, the stock seems to be undervalued by the market by quite a bit.

Based on the company's financials and the plans its management team has put out in recent quarters, Total seems to have the two things investors want from oil and gas companies today: reduced capital spending, and growth. Normally you can't have both, but Total's strategic plans over the past couple years have set it up well to do just that. In 2015, the company increased overall production by 10%, which is a monumental amount of growth for a company as large as Total. Furthermore, it plans to grow production by 4% annually between now and 2019, while at the same time reducing its capital spend rate by 30% compared to 2014.

Total currently holds the crown as the integrated oil and gas company with the highest returns on equity -- a crown it took from ExxonMobil in 2015. Based on the company's growth plans and the amount it will spend to get there, it's possible that it could hang onto that crown for a while.

Banking on food's future

Food and agriculture have been in the spotlight lately, as many companies in the industry consolidate to become powerhouses. While CF Industries has been left out of these rumored mergers, investors looking for yield in this industry may want to consider its stock.

CF Industries' bread and butter is nitrogen-based fertilizers. Like other commodities, nitrogen fertilizer is very susceptible to price swings, and a surge in new facilities in recent years has led to lower prices.

Longer-term, however, CF industries has a major advantage that few global producers will be able to replicate: cheap natural gas. As shale gas drilling continues to improve, so too does our ability to produce mass quantities of natural gas at relatively low prices. Since most of CF Industries' nitrogen production comes from natural gas, it gives the company a major cost advantage that leads to higher margins.

According to management, CF industries can maintain cash margins of 40% or more at $3.00 per million BTUs of natural gas and $200 per ton of urea. Keep in mind, though, that the average selling price for urea in the past quarter was $247 per ton -- so there is a pretty high profit margin for the company today.

CF industries isn't the only company looking to take advantage of cheap gas for nitrogen fertilizer production, and management does admit that this year and next could be a little tough, as these low-cost facilities come online before the older, higher-cost ones have been taken out of commission. Long-term, though, there will be immense demand for agricultural inputs like nitrogen fertilizers as populations grow, caloric intakes increase, and arable land shrinks. These all suggest that CF Industries has a market to support its 5% yield.

Profiting from changing demographics

Among of the realities of life in the U.S. are the growing demand for healthcare and the associated costs. The baby-boomer generation is aging and its healthcare needs are going to increase dramatically, also increasing the need for healthcare facilities. As a real estate investment trust (REIT) that specializes in healthcare-related properties, HCP is at the center of a major demographic trend that should give it more than enough opportunities to grow its business and its (current) 6.2% yield.

To support such a generous payout, HCP needs to walk the fine line of investing in high-return projects that don't lead to an overburdened balance sheet. That is a major reason why the company plans to spin off its lower-margin post-acute care and nursing facilities. The company intends to use the proceeds from the spinoff to reinvest in higher-return projects; those should help the REIT maintain its streak of 30 consecutive years of dividend increases.