# How can I do operations in this basis (using matrices)? [closed]

Let's define

$$u=t+1/2$$

$$v=t-1/2$$

Now, I have vectors in the basis $$e_n=u^n-v^n$$, I want to apply functions to such expressions, but as a result get expressions in the same basis again.

For instance, $$w=\frac{u^2-v^2}2$$, $$w^2=\frac{1}{3} \left(u^3-v^3\right)-\frac{u-v}{12}$$, so $$(0,1/2,0,0...)^2=(1/12,0,1/3,0,0,...)$$. Can operations on such vectors be automatized?

• Please add the code you have tried and the difficulties you encountered. Dec 16 '21 at 12:27

u = t + 1/2;
v = t - 1/2;
e[n_] := u^n - v^n
eq[k_, l_] := Sum[a[i] e[i], {i, 0, k + l}];
res[2, 2] = SolveAlways[e[2]^2 == eq[2, 2], t] // First
Clear[u, v]
eq[2, 2] /. res[2, 2]
(*{{a[1] -> -(1/3), a[3] -> 4/3, a[4] -> 0, a[2] -> 0}}*)


$$(u^2 - v^2)^2=\frac{4}{3} \left(u^3-v^3\right)+\frac{v-u}{3}$$

u = t + 1/2;
v = t - 1/2;
e[n_] := u^n - v^n
eq[k_, l_] := Sum[a[i] e[i], {i, 0, k + l}];
res[3, 5] =
SolveAlways[e[3]^5 == Sum[a[i] e[i], {i, 0, 15}], t] // First
Clear[u, v]
eq[3, 5] /. res[3, 5]

(*{{a[14] -> 0, a[2] -> 0, a[4] -> 0, a[6] -> 0, a[8] -> 0, a[10] -> 0,
a[12] -> 0, a[15] -> 0, a[1] -> -(1184/77), a[3] -> 101,
a[5] -> -198, a[7] -> 1269/7, a[9] -> -90, a[11] -> 243/11,
a[13] -> 0}}*)


$$(u^3 - v^3)^5=\frac{1269}{7} \left(u^7-v^7\right)-198 \left(u^5-v^5\right)+101 \left(u^3-v^3\right)-\frac{1184}{77} (u-v)$$

• The basis is infinite. I doubt this can handle an infinite series... Dec 16 '21 at 16:23
• @Anixx Please, update your post with an explicit example of infinite basis that you would like to automatize. Dec 16 '21 at 16:26