I've run into an issue and I am unsure of how to proceed. In the text I'm working through, the following is left "as an exercise to the reader." Normally proofs listed as such tend to be fairly simple so it's discouraging that this is giving me so much trouble. The problem is as follows.
For $B_1,B_2,...,B_k$ standard brownian motions, let $A_k(t)=\int_0^t g_k(B_1(s),B_2(s),...,B_k(s))ds$. Then the task is to find a suitable $g_2$ and $g_3$ such that $B_1(t)^2B_2(t)^2 - A_2(t)$ and $B_1(t)^2B_2(t)^2B_3(t)^2 - A_3(t)$ are martingales. Really I'm just not sure where to start so any hints in the right direction would be nice.
I did this quickly, so hopefully I didn't mess up.
$$\mathrm{d}\left(B_1^2 B_2^2 \right) = 2 B_1 B_2^2 \mathrm{d}B_1 + 2 B_1^2 B_2 \mathrm{d}B_2 + B_2^2 \mathrm{d}t + B_1^2 \mathrm{d}t$$
Since if you integrate both sides the terms with $\mathrm{d}B$ factors will be martingales what you want is
$$ A_2(t) = \int_0^t \left(B_2^2(s) + B_1^2(s)\right)\mathrm{d}s$$
Proceed in the same way with the triple product.