
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
The $19^{th}$ Asian Games in Hangzhou is the most prestigious international comprehensive sports event in Asia. The event was held in Hangzhou, Zhejiang from September $23^{rd}$ to October $8^{th}$, 2023. A certain Asian Games peripheral product is very popular and in high demand, causing a factory to work day and night to produce this product. The fixed cost of producing this product is $40,000, and an additional cost of $p(x)$ thousand yuan is required for producing $x$ thousand units. When the production is less than $60,000$ units, $p(x)=\frac{1}{2}x^{2}+x$; when the production is not less than $60,000$ units, $p(x)=7x+\frac{81}{x}-\frac{63}{2}$. If the selling price of this product is $6$ yuan per unit, through market analysis, the factory can sell all the products.<br/>$(1)$ Find the function relationship of the profit $y (in thousand yuan)$ of selling this product with the production $x (in thousand units)$;<br/>$(2)$ At what production level will the factory maximize its profit?

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