Superposition Principle
Some multiplications between lists
a = {a1,a2,a3,a4};
b = {b1,b2,b3,b4};
a b
a*b
Notice the difference with the following "dot" product
a.b
Now we construct a list of m random numbers
coeff[m_] := Table[Random[Real, {0,5},4],{n,1,m}]
coeff[10]
We define the harmonics
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
Some important properties of the harmonics
Notice that this integral is equal to unity -> Normal
MATHEMATICA does not know that "n" and "r" are integers. So we refine the harmonics as follow:
Integrate[f[x, n]^2, {x, 0, L},Assumptions→{ n > 0}]
Notice that this integtal is equal to zero for different n and r -> Orthogonal
Created by Mathematica (September 7, 2006) | ![]() |