- #1

member 428835

I am using the following code in Mathematica

Code:

```
mat = {{1, Cos[2], Cos[4], Sin[2],
Sin[4}, {1, 1, 1, 0, 0}};
Li[x_] :=
Transpose[
NullSpace[
mat].{{1}, {Cos[x}, {Cos[
2 x]}, {Sin[x]}, {Sin[2 x]}}];
Li1[x_] := Li[x].{{1}, {0}, {0}};
f[x_] :=
Li1[x]/Sqrt[Integrate[Li1[s]^2, {s, -1, 1}]];
```

Code:

`Integrate[f[x]^2, {x, -1, 1}]`

Code:

`f[x]//N`