Representation of a Linear Functional

Reference: The following project was suggested by two exercises in chapter 6 of
Sheldon Axler's "Linear Algebra Done Right, Second Edition,"  Springer, 2000.

Representation of a Linear Functional on P_2[x]

Define a Linear Functional on P_2[x]

Let's define a linear functional on the space of all real polynomials of degree two or less:
φ is the functional that evaluates such a polynomial at the point a == 2/3.

In[60]:=

Clear[φ, ψ, a, p, q, rep] 

a = 2/3 ; 

φ[p_] := p[a]

Apply that functional to two polynomials.

In[63]:=

p[x_] := 1 + x ; 

φ[p]

Out[64]=

5/3

In[65]:=

q[x_] := 1 + x + x^2 ; 

φ[q]

Out[66]=

19/9

Use Gram - Schmidt to Find an Orthonormal Basis for P_2[x]

Now, find an orthonormal basis for the space spanned by the polynomials {1, x, x^2}.

In[67]:=

Clear[α, β, x, a0, a1, a2, b0, b1, b2] 

α = standardBasis = {1, x, x^2} ; 

prod[f_, g_] := ∫_0^1f g x

In[70]:=

Plot[Evaluate[standardBasis], {x, 0, 1}, PlotLabel->"Standard Basis", ImageSize400, PlotStyle {DodgerBlue, MediumPurple, DarkViolet}] ;

[Graphics:HTMLFiles/6_linear_functionals_18.gif]

In[71]:=

normalize[f_] := f/prod[f, f]^(1/2) ;

In[72]:=

a0[x_] = 1 ; 

b0[x_] = normalize[a0[x]]

Out[73]=

1

In[74]:=

a1[x_] = x - prod[x, b0[x]] b0[x] ; 

b1[x_] = normalize[a1[x]]//Simplify

Out[75]=

3^(1/2) (-1 + 2 x)

In[76]:=

a2[x_] = x^2 - prod[x^2, b0[x]] b0[x] -   prod[x^2, b1[x]] b1[x] ; 

b2[x_] = normalize[a2[x]]//Simplify

Out[77]=

5^(1/2) (1 - 6 x + 6 x^2)

In[78]:=

β = orthonormalBasis = {b0[x], b1[x], b2[x]}

Out[78]=

{1, 3^(1/2) (-1 + 2 x), 5^(1/2) (1 - 6 x + 6 x^2)}

In[79]:=

Plot[Evaluate[orthonormalBasis], {x, 0, 1}, PlotLabel->"Orthonormal Basis&qu ... #62371;ImageSize400, PlotStyle {DodgerBlue, MediumPurple, DarkViolet}] ;

[Graphics:HTMLFiles/6_linear_functionals_32.gif]

Representation of the Linear Functional φ

Now, calculate the coefficients of the polynomial which will represent the linear functional φ.

In[80]:=

{c0 = φ[b0], c1 = φ[b1], c2 = φ[b2]}

Out[80]=

{1, 1/3^(1/2), -5^(1/2)/3}

Use those coefficients to construct the representing polynomial.

In[81]:=

repφ[x_] = c0 b0[x] + c1 b1[x] + c2 b2[x]//Simplify

Out[81]=

-5/3 + 12 x - 10 x^2

Use the representing polynomial to define a new functional ψ.

In[82]:=

ψ[p_] := prod[p[x], repφ[x]]

Now ψ == φ, since they both agree on the basis β.

In[83]:=

{ψ[b0] == φ[b0], ψ[b1] == φ[b1], ψ[b2] == φ[b2]}

Out[83]=

{True, True, True}

Check that φ and ψ agree on the two polynomials p and q.

In[84]:=

φ[p]  ψ[p]

Out[84]=

True

In[85]:=

φ[q]  ψ[q]

Out[85]=

True

Representation of a Second  Linear Functional on P_2[x]

Define a Second Linear Functional ξ on P_2[x]

Let's define another linear functional on the space of all polynomials of degree two or less.

In[86]:=

Clear[ξ, p, q] 

ξ[p_] := ∫_0^1p[x] Sin[π x] x

Apply that functional to two polynomials.

In[88]:=

p[x_] := 1 + x ; 

ξ[p]

Out[89]=

3/π

In[90]:=

q[x_] := 1 + x + x^2 ; 

ξ[q]

Out[91]=

(4 (-1 + π^2))/π^3

Representation of the Second Linear Functional ξ

Now, calculate the coefficients of the polynomial which will represent the second linear functional ξ.

In[92]:=

{d0 = ξ[b0], d1 = ξ[b1], d2 = ξ[b2]}

Out[92]=

{2/π, 0, (2 5^(1/2) (-12 + π^2))/π^3}

Use those coefficients to construct the representing polynomial.

In[93]:=

repξ[x_] = d0 b0[x] + d1 b1[x] + d2 b2[x]//Expand

Out[93]=

-120/π^3 + 12/π + (720 x)/π^3 - (60 x)/π - (720 x^2)/π^3 + (60 x^2)/π

Use the representing polynomial to define a new functional ρ.

In[94]:=

ρ[p_] := prod[p[x], repξ[x]]

Now ρ == ξ, since they both agree on the basis β.

In[95]:=

{ρ[b0] == ξ[b0], ρ[b1] == ξ[b1], ρ[b2] == (ξ[b2]//Expand)}

Out[95]=

{True, True, True}

Check that ρ and ξ agree on the two polynomials p and q.

In[96]:=

ρ[p] ξ[p]

Out[96]=

True

In[97]:=

ρ[q]  (ξ[q]//Expand)

Out[97]=

True


Created by Mathematica  (April 14, 2005) Valid XHTML 1.1!