0
$\begingroup$

I can't quite put a finger as to why using 'AngleBracket' is so uncomfortable. For one part, one can't really assigned some arbitrary variable to any definition of an expression associated with 'AngleBracket'. It's frustrating.

Unlike any arbitrary function defined by, say, f[x_]:=x, you can define another by g[x_]:=2x You can't do the same for an expression defined with AngleBracket. I.e., p=AngleBracket[f_,g_]:=Integrate[f g,{x,-1,1}] which makes it possible only to have one expression defined with AngleBracket possible for if you have y=AngleBracket[f_,g_]:=Integrate[f g,{x,-2,2}] you wouldn't be able to evaluate y=AngleBracket[f_,g_]:=Integrate[f g,{x,-2,2}] for different f an g variable.

A set of polynomial is $\left(1-x^{2}\right)x^{n-1}$.

A basis set of linearly independent polynomial $p_n\left(x\right)$ for $n=0,1,2,3,4$ that satisfies $p'_{n}\left(\pm1\right)=0$ is $\left\{p\left(x\right)\right\}_{n=0}^{4}$=Table[Integrate[(1 - x^2) x^(n - 1), x], {n, 0, 4}].

I seek to construct an orthonormal set with respect to the inner product defined by

AngleBracket[f_, g_] := Integrate[f g, {x, -1, 1}]

from the above linearly independent set of orthogonal polynomial in the vector space.

To do this, use Orthogonalize:

Orthogonalize[Table[Integrate[(1 - x^2) x^(n - 1), x], {n, 0, 4}], p] // Factor.

However, the result does not follow.

Any input to illuminate what is wrong would be appreciated.

$\endgroup$
  • $\begingroup$ For f[x_] := x and g[x_] := 2x, you could/should defined AngleBracket[f_, g_] := Integrate[f[x] g[x], {x, -1, 1}]. Then the call AngleBracket[f, g] would work for whatever functions f and g were and whatever symbol was used in their definitions, but it would not work for expressions in terms of a variable such as AngleBracket[x, 2x]. Now it is not really possible, nor should it be, for AngleBracket[] to represent two different inner products (such as one over the interval {-1, 1} and one over {-2, 2}). $\endgroup$ – Michael E2 Jun 3 '17 at 16:35
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ I notice Orthogonalize was not used. Is there a pertinent reason why? $\endgroup$ – Physkid Jun 3 '17 at 10:12
  • $\begingroup$ @Physkid Orthogonalize was used in the second line of code to determine the orthonormal set s of polynomials. $\endgroup$ – LouisB Jun 3 '17 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.