 The late, great, Neil Peart wrote, in Tom Sawyer, He knows changes arent permanent, but change is. His words are an apt description of our modern world, an ever-changing landscape of pending tech. Right now, the shiny new change is 5G.Even the coronavirus couldnt fully derail the coming build-out of the new 5G networks. It only delayed it. China and Korea are leading the world right now in bringing 5G networks online, with the US expanding its own new systems and Europe lagging behind. In the US, most urban areas have at least partial 5G connectivity online, and the major service providers are working to connect those centers.For investors, the key here will be finding companies that are primed to gain as 5G expands. Its tempting to invest directly in the service providers; ATT;, Verizon, and T-MobileSprint, the three largest wireless providers, are all heavily invested in 5G networks. But they face certain headwinds that make them less than ideal as 5G investments for the present. They are absorbing the costs of the new networks, but without bringing in the new service fees to cover those costs. From a consumer perspective, the new service is more expensive, but hasnt surpassed existing 4G in convenience yet.This leaves investors seeking the right place to put their money, to benefit from 5G rollouts. Two segments come to mind, both deeply involved in different ways. The first is semiconductor chips; the second, surprisingly, are real estate investment trusts. These companies, inhabiting such different niches, find themselves well-positioned to profit for different reasons as 5G networks expand. Those different reasons are interesting to explore, as we open the TipRanks database to see what makes semiconductors and REITs compelling investments for 5G. Lets take a closer look. Broadcom, Inc. AVGOFirst up is a long-running major market player, a large-cap stock and a perennial champion for dividend investors. Broadcom is also one of the worlds largest semiconductor chip makers, ranked the sixth biggest by annual revenue in 2019, and reporting 5.25 billion in earnings in the first quarter of 2020.Broadcom has been making waves in 5G throughout 1H20. In February, the company announced completion of a 5G switching portfolio, designed for high-capacity switches and offering the feature set needed to meet new 5G tech standards. In March, Broadcom was noted by Forbes as one of the leaders in 5G wireless infrastructure; the company is deeply invested in providing chips that power the new devices. And earlier this month, handset maker Nokia, which has been having trouble in recent months sourcing 5G chips in sufficient quantity to meet demand, signed Broadcom on a supplier of 5G chips for Nokias ReefShark line.With all of this good news for the company, its no wonder that AVGO shares have climbed 85 since hitting bottom on March 18, dramatically outperforming the broader markets. Q2 saw revenue grow to 5.74 billion, up 9 sequentially. And, despite the ongoing pandemic, the company has maintained its generous dividend, declaring 3.25 per share on June 4. The current dividend annualizes to 13 and gives an impressive yield of 4.3.Writing on AVGO for Deutsche Bank is 5-star analyst Ross Seymore, rated 26 overall in the TipRanks analyst database. Seymore notes the Nokia arrangement, and points out that it plays to Broadcoms strengths in addressing the 5G needs of OEM customers: We view the Nokia announcement as evidence that the cos investments and engagement with infrastructure OEMs on solutions within the base station which AVGO referenced in December, are bearing fruit. Broadcoms strength in custom ASICs and in routing and switching have enabled the co to leverage its Ethernet technology in bringing the network to the Edge base stations.To this end, Seymore rates AVGO a Buy alongside a 360 price target, indicating a potential 16 upside for the stock this year. To watch Seymores track record, click hereAll in all, Broadcom has a Strong Buy from the analyst consensus, with 24 reviews breaking down to 21 Buys and only 3 Holds. Shares are priced at 311.30, and the average price target of 350.18 suggests an upside potential of 13. See AVGO stock analysis on TipRanksSBA Communications SBACThe next stock on our list operates as a REIT, focused on cellular infrastructure sites. Specifically, SBA Communications owns small cells, distributed antenna systems, and traditional cell sites throughout the Americas and South Africa. SBA both leases and develops the properties in its portfolio a business that perfectly positions the company to profit as telecom carriers and providers increase and densify their networks to accommodate 5G technology. This process naturally requires new cell towers, antenna placements, and small cells and that is SBAs core business.Standing as it does at the center of the 5G expansion, SBA is already showing gains. The companys stock is up 4.6 since February, having fully recovered from the market collapse in FebruaryMarch and survived several weeks of price volatility that followed. Its not just share price that has gained despite coronavirus-inspired recessionary pressures. SBA has reported modest sequential gains in quarterly earnings since the beginning of 2019, a trend that continued in Q1 2020. Credit Suisse analyst Sami Badri is confident in this companys business model and solid balance sheet. He writes, We believe the evidence points to an initial majority mid-band spectrum buildout. Mid-band spectrum will mainly be utilized on macro towers, given its solid propagation characteristics, therefore the initial 5G wave should favor macro tower focused SBAC... With SBAC capable of raising debt at such modest rates 3.875 May 19th while maintaining its broader tower asset ROIC of 10, we are comfortable and constructive with its current leverage profile.Badri rates SBAC an Outperform i.e. Buy, and his 361 price target indicates his belief in a 23 upside potential for the stock. To watch Badris track record, click hereOverall, the analyst consensus rating on SBAC, a Strong Buy is based on a 9-to-1 split between Buy and Hold reviews. The average price target, 328, implies an upside of 12 from the current trading price of 293.78. See SBAC stock analysis on TipRanksAmerican Tower AMTLast up is American Tower, the Boston-based REIT with a global portfolio containing more than 180,000 cellular broadcast tower and wireless communication sites. The core of the portfolio is in the US, but the company has been expanding internationally, both to supplement the core holdings and to take advantage of the global nature of wireless com systems. AMT currently holds more than 40,000 US cellular sites, along with 75,000 Asia and 37,000 in Latin America.As wireless providers expand their networks to introduce 5G connections, AMT is a logical beneficiary. Due to the shorter range of 5G systems, a denser tower network will be required; AMT, which owns and leases such sites, is ramping up acquisitions to take advantage. AMT derives most of its customer base on the order of 88 ATT;, Verizon, and SprintT-Mobile. These companies are not going anywhere, and lend a sense of permanence to AMTs holdings.In addition, due to the long-term nature of cellular leases, AMT features a high proportion of recurring revenue in its portfolio a feature that has insulated the company from the impact of COVID-19. AMT reported sequential gains in earnings for Q1, the coronavirus quarter, and share prices have shown a net gain during the last few months of market volatility.Analyst Sami Badri covers AMT shares as well, and he writes of the stock: We expect Massive MIMO antennas to place more weight on towers, while taking up the same amount of physical vertical space or more on the structure. This will result in more revenue from tower leasing activity for AMT, which we expect to appear primarily as amendment revenues.Badri is bullish on AMT, giving the stock a Buy rating with a 300 price target. His target implies an upside of 13 in the coming 12 months. Once again, were looking at a stock with a Strong Buy analyst consensus rating. AMTs rating is based on 14 reviews, including 12 Buys and just 2 Holds. Shares are selling for 265.60, and the 269.42 suggests a modest upside this year. See AMT stock-price forecast on TipRanksTo find good ideas for 5G stocks trading at attractive valuations, visit TipRanks Best Stocks to Buy, a newly launched tool that unites all of TipRanks equity insights. 