
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
Given a quadratic function $y=ax^2+bx+c$ with a maximum value of 2, the vertex of its graph lies on the line $y=x+1$, and the graph passes through the point $(3, -2)$.  
(1) Find the expression of the quadratic function;  
(2) When $0 \leq x \leq 3$, find the maximum and minimum values of the quadratic function, and the corresponding values of $x$.

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