
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 curve $C$: $\frac{x^2}{9} + y^2 = 1$, with the origin as the pole and the positive half of the $x$-axis as the polar axis, establish a polar coordinate system. The polar equation of line $l$ is $\rho \sin (\theta -\frac{\pi }{4})=\sqrt{2}$.

$(1)$ Write the parametric equation of curve $C$ and the Cartesian equation of line $l$;

$(2)$ Let $P$ be any point on curve $C$. Find the maximum distance from $P$ to line $l$.

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