
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)=3^{x}-k\cdot 3^{-x}$ where $k\in \mathbb{R}$ is an odd function.<br/>$(1)$ Find the value of the real number $k$;<br/>$(2)$ Let the solution set of the inequality $f(ax^{2}+1)+f\left(-\left(a+1\right)x\right) \lt 0$ be $A$. If the set $A$ contains only two integer elements, find the range of real number $a$.

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