
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=(1,\cos x)$, $b=\left(\frac{1}{3},\sin x\right)$, and $x\in(0,\pi)$.

(I) If $a$ is parallel to $b$, find the value of $\frac{\sin x+\cos x}{\sin x-\cos x}$;

(II) If $a$ is perpendicular to $b$, find the value of $\sin x-\cos x$.

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