
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
Xiao Ming invests in selling a type of eye-protecting desk lamp with a cost price of $20$ yuan per unit. During the sales process, he found that the relationship between the monthly sales volume $y$ (units) and the selling price $x$ (yuan) can be approximated as a linear function: $y=-10x+500$. In the sales process, the selling price is not lower than the cost price, and the profit per unit is not higher than $60\%$ of the cost price. <br/>$(1)$ If Xiao Ming's monthly profit is denoted as $w$ (yuan), find the functional relationship between the monthly profit $w$ (yuan) and the selling price $x$ (yuan), and determine the range of values for the independent variable $x$. <br/>$(2)$ At what price should the selling price be set to maximize the monthly profit? What is the maximum monthly profit?

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