Artificial intelligent assistant

Find price where sum of all investments = 0 * Investment 1 will make 1 dollar for every point move above 2290. * Investment 2 will LOSE 3 dollars for every point move above 2295. * Investment 3 will make 2 dollars for every point move above 2310. * Investment 4 will make 1 dollar for every point move above 2340. Question: At what price above 2340 will the sum of all gains/losses of these investments = 0 I know how to solve this problem by brute force ie. iterate starting at 2341 and for each number calculate profit/loss of every investment and stop when sum = 0. My question is, can this be abstracted into a formula so i can solve for it.

Above $x=2340$ each of the investment returns is specified by a simple linear equation:

The first returns a profit of $x-2290$

The second returns a loss of $3(x-2295)$

the third returns a profit of $2(x-2310)$

The fourth returns a profit of $x-2340$

It follows that the portfolio returns $$P(x)=(x-2290)-3(x-2295)+2(x-2310)+(x-2340)=x-2365$$

We are interested in the condition $P(x)=0$ which implies $x=\fbox {2365}$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 5f2fd60895d906a08e82200b90dfa7e3