
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 $y=f(x)$, $y=h(x)$, and $g(x)=kx+b$ where $k, b \in \mathbb{R}$, such that $f(x) \geq g(x) \geq h(x)$ for all $x$ in interval $D$.

$(1)$ If $f(x)=x^{2}+x$, $h(x)=-x^{2}+x$, and $D=\mathbb{R}$, find the expression for $g(x)$.

$(2)$ If $f(x)=x^{2}+x+2$, $h(x)=x-\frac{1}{x}$, $b=1$, and $D=(0,+\infty)$, find the range of values for $k$.

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