Superposition Principle

Some multiplications between lists

a = {a1,a2,a3,a4};
b = {b1,b2,b3,b4};

a b
a*b

{a1 b1, a2 b2, a3 b3, a4 b4}

{a1 b1, a2 b2, a3 b3, a4 b4}

Notice the difference with the following "dot" product

a.b

a1 b1 + a2 b2 + a3 b3 + a4 b4

Now we construct a list of m random numbers

coeff[m_] := Table[Random[Real, {0,5},4],{n,1,m}]

coeff[10]

{2.563, 0.7561, 2.528, 1.827, 2.164, 0.1437, 0.5415, 2.214, 2.097, 1.968}

We define the harmonics

f[x_, n1_] := 2/L^(1/2) Sin[(n1 π x)/L]

A list of m harmonics

harmonics[m_] := Table[f[x,n],{n,1,m}]

harmonics[10]

Define the length

L=1;

We use the "dot" product to combine the ceofficientes and the harmonics to construct a function as a sum of harmonics.

elem[n_] := coeff[n].harmonics[n]

elem[10]

Now we plot some of these arbitrary functions

[Graphics:../HTMLFiles/MATH5_TUT1_594.gif]

Some important properties of the harmonics

∫_0^Lf[x, n]^2x

1 - Sin[2 n π]/(2 n π)

Notice that this integral is equal to unity -> Normal

∫_0^Lf[x, n] f[x, r] x

(2 r Cos[π r] Sin[n π] - 2 n Cos[n π] Sin[π r])/(n^2 π - π r^2)

MATHEMATICA does not know that "n" and "r" are integers.  So we refine the harmonics as follow:

f[x_, n1_Integer ? Positive] := 2/L^(1/2) Sin[(n1  π  x)/L]

Integrate[f[x, n]^2, {x, 0, L},Assumptions→{ n > 0}]

1 - Sin[2 n π]/(2 n π)

∫_0^Lf[x, n] f[x, r] x

(2 r Cos[π r] Sin[n π] - 2 n Cos[n π] Sin[π r])/(n^2 π - π r^2)

Notice that this integtal is equal to zero for different n and r -> Orthogonal


Created by Mathematica  (September 7, 2006) Valid XHTML 1.1!