To find an orthonormal set of functions, we can do the following:
p[n_] := (1 - x^2) x^(n - 1)
s = Simplify /@ Orthogonalize[Table[p[n], {n, 1, 4}],
Integrate[#1 #2, {x, -1, 1}] &];
check = Table[Integrate[f g, {x, -1, 1}], {f, s}, {g, s}] //
MatrixForm
(* 1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1 *)
There is a lot of good information and examples of AngleBracket
in the context of inner products in previous questions on this forum, so you will want to do that search. Meanwhile, one simple way to use AngleBracket
is to enter it with the key press sequence "Esc < Esc f , g Esc > Esc" and evaluate it with a rule, as in this example:
ip = AngleBracket[f_, g_] :> Integrate[f g, {x, -1, 1}];
〈 p[1], p[3] 〉 /. ip
〈 p[3], p[3] 〉 /. ip
〈 s[[1]], s[[3]] 〉 /. ip
(* 16/105
16/315
0 *)
In the above we have defined an inner product rule ip
, entered our inner products in the angle bracket notation, and then applied ip
to evaluate the angle bracket. Note that ip
is actually a RuleDelayed
defined with :>
, not an immediate Rule
.