
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 supermarket is planning to launch a promotional campaign during this New Year's holiday. The marketing department of the supermarket analyzed the relationship between last year's sales and advertising expenses and found that the profit $y$ (in units of ten thousand yuan) of the supermarket is approximately related to the advertising expenses $x$ (in units of ten thousand yuan) as follows: when $x\in [0,2]$, $y$ is a power function of $x$; when $x\in (2,5]$, $y$ is a quadratic function of $x$. Specific data is shown in the following table (partial): 

| $x$ (in ten thousand yuan) | $1$ | $2$ | $3$ | $4$ | $5$ |
|---------------------------|-----|-----|-----|-----|-----|
| $y$ (in ten thousand yuan) | $1$ | $\sqrt{2}$ | $5$ | $4$ | $1$ |

$(1)$ Find the functional relationship of $y$ with respect to $x$;  
$(2)$ Based on the functional relationship between last year's profit of the supermarket and advertising expenses, estimate how many ten thousand yuan should be invested in advertising expenses this year to maximize the profit of the supermarket.

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