Note: This article was originally published June 17, 2015 and updated December 17, 2015.

The oil price plunge over the past year and a half seemed to come out of nowhere. Oil had been consistently over $100 per barrel for several years and showed no signs of heading lower. Furthermore, it was no secret that OPEC rather liked triple-digit oil and that most of its members needed that price to balance their budgets. As a result it was largely accepted that if oil prices began to weaken, OPEC would slash production to keep prices elevated.

Then this happened:

Brent Crude Oil Spot Price Chart

Brent Crude Oil Spot Price data by YCharts

The plunge last summer was triggered by than weaker than expected growth in oil demand in Asia, assisted by surging petroleum production in the U.S. It accelerated in late fall when OPEC decided $100 oil was a thing of the past and that it instead needed to protect its market share, a policy that it continues to stand by.

Investors learned a valuable lesson from all this, which is that the outlook for oil prices can change without notice. This means the oil industry can be a tough place for investors. However, it also has the potential to be very profitable. With those profits in mind, here are three tips that can help investors sleep well at night and make a buck on the oil patch.

1. Keep the long term in mind
The key to investing in oil is to focus on the long-term outlook, because in the short term the oil industry can be quite volatile. This is because the industry occasionally goes through a downturn when oil supplies outstrip weaker than expected demand. Nonetheless, the U.S. Energy Information Administration forecasts global energy demand to increase by 40% from 2013 to 2035. While that outlook encompasses demand for all sources of energy, the need for oil will be a large part of that equation. The International Energy Agency estimates energy companies around the world will need to invest $40 trillion to bring additional energy supplies online by 2035 just to meet projected demand. This suggests that the longer-term outlook for oil remains quite compelling for investors. 

2. Invest in companies that can survive a deep downturn
That said, investors must make sure to invest in oil companies that will be around long enough to benefit from this future demand. Sticking with best-of-breed oil companies such as ExxonMobil (NYSE: XOM) and ConocoPhillips (NYSE: COP), which have investment-grade balance sheets, generate loads of cash flow, and earn peer-leading returns, is an obvious place to start. These are companies that can withstand deep downturns because they are built to last. 

Where investors tend to get into trouble is in investing in oil companies that use a lot of debt to fund growth. These stocks are always among the hardest hit when oil prices drop, and in many cases the decline is justified because these businesses need higher oil prices to survive. Plus, because these oil producers aren't self-funding with cash flow they often need to raise cash at the worst possible time and are then forced to take whatever capital they can get, which tends to come at a high price. That's why it often pays to stick with top-tier oil stocks.

3. Don't bail when the going gets tough
Finally, oil investors should always keep in mind that oil price volatility is likely to produce volatility in oil stocks. Just take a look at the long-term chart for the price of oil.

Brent Crude Oil Spot Price Chart

Brent Crude Oil Spot Price data by YCharts

Knowing full well that the price of oil can move dramatically, investors must be patient during a downturn and not bail on oil stocks. By sticking with a top-tier oil stock, an investor can earn exceptional long-term returns. For example, investors who didn't bail on oil stocks such as ConocoPhillips and ExxonMobil in the 1980s, when times were as tough, if not tougher, than they are today, were well rewarded over a period of decades:

COP Total Return Price Chart

COP Total Return Price data by YCharts

Investor takeaway
The oil industry is a tough one for investors because oil prices can be highly volatile. However, investors can overcome this by avoiding short-term thinking, investing in companies that are equipped to stick around for the long term, and not bailing when times get tough. If an investor can do all three, they could make a lot of money investing in oil.