
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 19th Asian Games will be held in Hangzhou, Zhejiang from September 23 to October 8, 2023. The three mascots of the Asian Games, Qiongqiong, Chenchen, and Lianlian, are designed as fish-shaped robots, representing the three major World Heritage sites in Hangzhou: Liangzhu Ancient City Ruins, the Beijing-Hangzhou Grand Canal, and West Lake. They also have a beautiful name: Jiangnan Yi. According to market research analysis, the current production of "Jiangnan Yi" is in short supply. For a certain company, the revenue from selling x thousand pieces of "Jiangnan Yi" is denoted by W(x) in thousands of yuan. The revenue function is defined as follows: 

\[W(x)=\begin{cases} 2x^2+10x, & 0<x\leq 5 \\ 200-\frac{400}{x-1}, & 5<x\leq 12 \end{cases}\]

The total cost of production is $4x+4$ thousand yuan. Let the profit of producing and selling x thousand pieces of "Jiangnan Yi" be denoted by f(x) in thousands of yuan.  
$(1)$ Find the analytical expression of the function f(x).  
$(2)$ Find the maximum value of f(x) and the corresponding value of x.

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