Shortly after noon Wednesday, Tesla Chief Executive Elon Musk tweeted about entropy and heat death of the universe. But that’s a long way off. For now, troubled Tesla is alive and kicking.

The company reported after the stock market closed Wednesday that its cash in the bank grew from $2.9 billion to $3.6 billion during the 2018 fourth quarter.

Free cash flow was up a bit too: to $910 million, from $881 million in the previous quarter. But that boost was due to a drastic reduction in capital expenses, which can signal either a reduced need to buy, say, factory robots or a slowdown of investment in future growth.

In the last three quarters, capital spending has shrunk from $786 million to $510 million to $324 million.

Revenue rose from $6.8 billion in the third quarter to $7.2 billion, as Model 3 sales rose.

The fourth quarter was profitable, but the profit shrank. Net income was $210 million in the fourth quarter, down from $255 million in the third quarter.

Although Musk promised last year that Tesla would be profitable and cash flow would be positive in the future, he warned earlier in January that investors should brace for a “tiny” first-quarter profit, if the company is profitable at all.

Service costs skyrocketed 50 percent, to $668 million, as Tesla deals with quality problems related its Model 3.

Tesla’s shares closed up about 4 percent Wednesday, before the earnings report, at $308.77. They fell about 0.4 percent in after-hours trading. Musk will address analyst and investor questions in a conference call later Wednesday afternoon.

The report comes as Tesla struggles to remain solvent. The company faced “severe threat of death” in 2018, Musk said in November — “single-digit weeks” away from failure.

It’s unclear how close to death Tesla is now, but some of Tesla’s biggest fans on Wall Street are getting nervous.

Adam Jonas, a Morgan Stanley stock analyst, said in a note to investors before the earnings release Wednesday that “the confluence of economic, competitive, regulatory, political and technological forces may potentially challenge (Tesla’s) status as a standalone entity.”

That could mean a buyout, if a buyer can be found. Musk claimed he had found a buyer in August for $420 per share, but that claim proved false and Musk settled fraud charges with the Securities and Exchange Commission.

Tesla’s challenge of the moment is paying off a $920-million convertible bond repayment due on March 1. The convertible bond’s strike price is about $359.

Cash retention is top of mind at Tesla, which explains this month’s layoffs and a 9 percent cut of the workforce in June. It recently cut production hours for its high-end Model S sedan and Model X sport utility vehicle.

Tesla faces a “demand air pocket,” Jonas said. He expects S and X sales will be down this year. The company is cutting prices on all its vehicles as federal incentives are cut in half and competing high-end electric cars from Jaguar, Porsche, Mercedes, Audi and others try to tempt would-be Tesla buyers.

On Tuesday Tesla offered an $8,000 discount on S and X cars for customers who let Tesla limit the range of the car’s battery pack using custom software. The range for the software-limited Model S, for example, would be cut by 20 miles, to 310. That car cost $96,000 at the end of 2018. Tesla cut that price by $2,000 earlier this month. Tuesday’s deal puts the price down to $85,000 — a reduction of $11,000 for 20 miles less range.

Because the batteries themselves wouldn’t differ, production costs would stay the same as in the higher-range car. The gross profit margin falls by $11,000 per car. (A Tesla spokesman told The Times that improved efficiencies on the assembly line would would help address that problem.)

How much sales might increase because of lower prices, and what effect that would have on profits and cash, will be answered over coming months.