
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 a certain electronic instrument with a fixed cost of $20,000. An additional investment of $100 is required for each instrument produced. It is known that the total revenue $R (\text{in units of yuan})$ as a function of monthly production $x$ (in units of units) satisfies the function:  
$R=\left\{\begin{array}{l}{400x-\frac{1}{2}x^{2},0≤x≤400}\\{8000,x>400}\end{array}\right.$  
$(1)$ Express the profit $P (\text{in units of yuan})$ as a function of the monthly production $x$;  
$(2)$ At what value of monthly production does the company achieve the maximum profit? What is the maximum profit in yuan? (Total revenue = Total cost + Profit)

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