
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 vectors $\overrightarrow{m}=(\cos x,1-a\sin x)$, $\overrightarrow{n}=(\cos x,2)$, where $a\in R$, $x\in R$, let $f\left( x \right)=\vec{m}\cdot \vec{n}$, and the maximum value of the function $f\left( x \right)$ is $g\left( a \right)$.

(I) Find the analytical expression of function $g\left( a \right)$.

(II) Given $0\leqslant \theta \, < 2\pi$, find the maximum value, minimum value, and corresponding $\theta$ of function $g\left( 2{\cos }\,\theta +1 \right)$.

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