
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
A certain company produces commemorative handbooks. Through research, it is found that the production cost $C(x)$ in million yuan for producing $x$ thousand handbooks is as follows: if the production quantity is less than $20$ thousand handbooks, $C(x)=x^{2}+20x$; if the production quantity is not less than $20$ thousand handbooks, $C(x)=54x+\frac{{2500}}{x}-500$. After going public, each handbook is sold for $50$ yuan. According to market research, all the produced handbooks can be sold.<br/>$(1)$ Let the total profit be $y$ million yuan. Find the analytical expression $y=f(x)$ (profit = revenue - cost);<br/>$(2)$ At what production quantity of handbooks is the total profit maximized? And find the maximum value.

Present the answer in LaTex format: \boxed{Your answer}
user