Description: a simulation of vibrating square membrane.
Compute Environment: Ubuntu 18.04 (Deprecated)
From Japanese translation of E. Kreyszig, Advanced Engineering Mathematics, 8th ed. （E. クライツィグ著，阿部寛治訳，「フーリエ解析と偏微分方程式」，培風館，p.168-170.）
This is a computer simlatoin of a vibration of an unit sqare membrane.
A wave equation of 2 dimension ∂t2∂2u=c2(∂x2∂2u+∂y2∂2u)
subject to boundary conditions
u(x,y,t)=0 if (x,y) is on the boundary,u(x,y,0)=f(x,y),∂t∂u∣∣∣∣∣t=0=g(x,y),
the second and the third conditions are initial conditions.
Now we use a method of 'separation of variables'. Let F(x,y) and
G(t) be a spatial part and a time dependent part of the solutoin
u(x,y,t): u(x,y,t)=F(x,y)G(t). By a standard procedure, we
have an ODE G¨+λG=0 (time dependent part), and a PDE
Fxx+Fyy+ν2F=0 (spatial part). The dot notation
means that a differential with respect to t, and the subscript means
a partial derivative with respect to x or y.
The time dependent part is governed by the eigenvalue
For a λm,n, we have an eigenfunctoin
So the solution of the original equation which corresponds to λm,n is
The general solution of the equation is given as a superposition of um,n.
The coefficients Bm,n and Bm,n∗ is given by the integrals
defb(m,n,f):"""The coefficient of mode (m, n)."""return(4*numerical_integral(numerical_integral(f(x,y)*sin(m*pi.n()*x),0,1,params=)*sin(n*pi.n()*y),0,1))
defu(t,m,n,f):"""The mode (m, n) eigen function."""return(b(m,n,f)*cos(pi.n()*sqrt(m^2+n^2).n()*t)*sin(m*pi.n()*x)*sin(n*pi.n()*y))
It is interesting that the same eigenvalue λm,n is attained by some different pairs (m,n) of integers. For example, λ4,7=λ1,8 holds since 42+72=65=12+82. This happens when m2+n2 have two or more prime factors p and q which are congruent to 1 modulo 4. These pairs of integers provide different eigenfunctions um,n(t) associated to the same eigenvalue λm,n. The followings are examples of such eigenfunctions.