
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 shopping mall purchased a batch of clothing at a cost of $30$ yuan per item and sold them for $50$ yuan per item. They were able to sell 300 items per week. If the selling price of each item increases by $1$ yuan, then the number of items sold per week decreases by 10 (the selling price of each item cannot exceed $70$ yuan). Let $x$ represent the increase in selling price per item, $y$ represent the number of items sold per week, and $w$ represent the weekly sales profit.  
$(1)$ Write the function relationship between $y$ and $x$, and determine the range of values for $x$;  
$(2)$ Write the function relationship between $w$ and $x$, and determine the value of $x$ that maximizes $w$, and what is the maximum value of $w?

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