Let $B$ be a $q$-dimensional Brownian motion, $f:\mathbb{R^q} \to \mathbb{R}$ be continuous. We suppose that $(f(B_u))_{u \in \mathbb{R}_+}$ is a martingale.
Prove or disprove: $f$ is linear, that is there exist $c_0,c_1,..,c_q \in \mathbb{R}$ such that for all $(x_1,...,x_q) \in \mathbb{R}^q,f(x_1,...,x_q)=c_0+\sum_{k=1}^qc_kx_k.$
I know how how to prove the case $q=1$ using stopping times: Show that $f(B_t)$ is a martingale iff $f(x)=a+bx$.
What about $q>1$?
In $q>1$ dimensions the result no longer holds. As a counter-example, take $f(x,y)=x^2-y^2$. Then if $B_t=(X_t,Y_t)$ where $X_t$ and $Y_t$ are independent Brownian motions on $\mathbb R$, for $s<t$, \begin{align*} \mathbb E[f(X_t,Y_t)\mid\mathcal F_s]&=\mathbb E[X_t^2-t\mid\mathcal F_s]-\mathbb E[Y_t^2-t\mid\mathcal F_s] \\ &=(X_s^2-s)-(Y_s^2-s) \\ &= f(X_s,Y_s), \end{align*} where we used the property that $X_t^2-t$ is martingale. So $f(B_t)$ is martingale but $f$ isn't linear.