
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 the function $f(x) = \sin^2x + 2\sin x\cdot\sin\left(\frac{\pi}{2}-x\right) + 3\sin^2\left(\frac{3\pi}{2}-x\right)$,
(1) If $\tan x = \frac{1}{2}$, find the value of $f(x)$;
(2) Determine the smallest positive period of $f(x)$ and the intervals where it is monotonically decreasing.

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