
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 functions $f(x)=x^{2}+x+a^{2}+a$, $g(x)=x^{2}-x+a^{2}-a$, $a\in R$. For all $x\in R$, let $M(x)$ represent the larger of $f(x)$ and $g(x)$, denoted as $M(x)=\max \{f(x),g(x)\}$.
$(1)$ If $a=1$, write down the analytical expression of $M(x)$ and find the minimum value of $M(x)$.
$(2)$ If the minimum value of the function $M(x)$ is $3$, find the value of the real number $a$.

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