
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 high-tech product is being introduced to the market. It is known that the cost of this product is $1000$ yuan per unit. By using flexible pricing, the daily sales revenue of a certain store is related to the daily production quantity $x$ (units). When $1\leqslant x\leqslant 3$, the daily sales revenue is $\frac{9}{x+1}+2x+3$ (thousand yuan); when $3\leqslant x\leqslant 6$, the daily sales revenue is $\frac{9mx}{x+3}+3x$ (thousand yuan); when $x>6$, the daily sales revenue is $21$ (thousand yuan).  
$(1)$ Find the value of $m$, and find the analytical expression of the function of daily sales profit $P$ (thousand yuan) with respect to the daily production quantity $x$ (units). (Sales profit = Sales revenue - Cost)  
$(2)$ For what value of the daily production quantity $x$ is the daily sales profit maximized? Find this maximum value.

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