Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Spectral method
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===A concrete, linear example=== Here we presume an understanding of basic multivariate [[calculus]] and [[Fourier series]]. If <math>g(x,y)</math> is a known, complex-valued function of two real variables, and g is periodic in x and y (that is, <math>g(x,y)=g(x+2\pi,y)=g(x,y+2\pi)</math>) then we are interested in finding a function ''f''(''x'',''y'') so that :<math>\left(\frac{\partial^2}{\partial x^2}+\frac{\partial^2}{\partial y^2}\right)f(x,y)=g(x,y)\quad \text{for all } x,y</math> <!--math>f_{xx}(x,y)+f_{yy}(x,y)=g(x,y)\quad \text{for all} x,y</math--> where the expression on the left denotes the second partial derivatives of ''f'' in ''x'' and ''y'', respectively. This is the [[Poisson equation]], and can be physically interpreted as some sort of heat conduction problem, or a problem in potential theory, among other possibilities. If we write ''f'' and ''g'' in Fourier series: :<math>\begin{align} f&=:\sum a_{j,k}e^{i(jx+ky)}, \\[5mu] g&=:\sum b_{j,k}e^{i(jx+ky)}, \end{align}</math> and substitute into the differential equation, we obtain this equation: :<math>\sum -a_{j,k}(j^2+k^2)e^{i(jx+ky)}=\sum b_{j,k}e^{i(jx+ky)}.</math> We have exchanged partial differentiation with an infinite sum, which is legitimate if we assume for instance that ''f'' has a continuous second derivative. By the uniqueness theorem for Fourier expansions, we must then equate the Fourier coefficients term by term, giving {{NumBlk|:| <math>a_{j,k}=-\frac{b_{j,k}}{j^2+k^2}</math>|{{EquationRef|<nowiki>*</nowiki>}}}} which is an explicit formula for the Fourier coefficients ''a''<sub>''j'',''k''</sub>. With periodic boundary conditions, the [[Poisson equation]] possesses a solution only if ''b''<sub>0,0</sub> = 0. Therefore, we can freely choose ''a''<sub>0,0</sub> which will be equal to the mean of the resolution. This corresponds to choosing the integration constant. To turn this into an algorithm, only finitely many frequencies are solved for. This introduces an error which can be shown to be proportional to <math>h^n</math>, where <math>h := 1/n</math> and <math>n</math> is the highest frequency treated. ==== Algorithm ==== # Compute the Fourier transform (''b<sub>j,k</sub>'') of ''g''. # Compute the Fourier transform (''a<sub>j,k</sub>'') of ''f'' via the formula ({{EquationNote|*}}). # Compute ''f'' by taking an inverse Fourier transform of (''a<sub>j,k</sub>''). Since we're only interested in a finite window of frequencies (of size ''n'', say) this can be done using a [[fast Fourier transform]] algorithm. Therefore, globally the algorithm runs in {{nowrap|time ''O''(''n'' log ''n'').}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)