## Fourier Series

Sometimes complicated motions can actually be composed of motions of many different frequencies. The type of mathematical analysis that’s useful is called Fourier series. Fourier series is a way of representing a function – an infinite series of cosine and sines. You can view these as a linear superposition of waves of various frequencies.

`f(x) = a`_{0} / 2 + โ a_{n} cos(n ฯ x / L) + b_{n} sin(n ฯ x / L)

We use orthogonality relations below to determine a_{0}, a_{n} and b_{n} . Because of the Kronecker ฮด_{nm}, when n = m, ฮด_{nm} = 1, then the equation = L; otherwise ฮด_{nm} = 0, then equation = 0:

`โซ`_{-L}^{L} cos(n ฯ x / L) cos(m ฯ x / L) dx = L ฮด_{nm}
โซ_{-L}^{L} sin(n ฯ x / L) sin(m ฯ x / L) dx = L ฮด_{nm}
โซ_{-L}^{L} cos(n ฯ x / L) sin(m ฯ x / L) dx = 0

We could derive:

`a`_{n} = 1/L * โซ_{-L}^{L} cos(n ฯ x / L) dx
b_{n} = 1/L * โซ_{-L}^{L} sin(n ฯ x / L) dx

Sometimes the function f(x) has some symmetry, which allows us to eliminate either the sine term or the cosine term in its Fourier series. Those resulting series are called the Fourier sine or the Fourier cosine series.

Even: f(-x) = f(x) | cosine series: f(x) = a _{0} / 2 + โ a_{n} cos(n ฯ x / L)a _{n} = 2/L * โซ_{0}^{L} cos(n ฯ x / L) dxb _{n} = 0 |

Odd: f(-x) = -f(x) | sine series: f(x) = โ b _{n} sin(n ฯ x / L)a _{n} = 0b _{n} = 2/L * โซ_{0}^{L} sin(n ฯ x / L) dx |

## Diffusion Equation

Diffusion equation is a very fundamental equation, which covers things like how smoke pollution can diffuse in the atmosphere or the diffusion of dye in a pipe. The idea of diffusion is that diffusion occurs from high concentrations to lower concentrations. That’s the gradient. The gradient going from high to low. Fick’s law of diffusion is from hight to low, so there is a minus sign.

`J(x, t) = -D u`_{x}(x,t)

The change of mass in time is `dM/dt = J(x,t) - J(x + ฮx, t)`

, and the mass `M = u(x, t) ฮx`

. Put all together, we get the one-dimensional diffusion equation:

`u`_{t} = D u_{xx}

The diffusion equation could be solved in three steps:

- Separation of variables
- Boundary conditions: the concentration at the end of pipe is zero.
- Initial conditions: put all of the dye in the center of pipe.
- Ansats:
`u(x, t) = X(x) T(t)`

, partial derivative turns into ordinary derivative.

- Eigenvalues
- Solve X(x)

- Fourier series
- Solve T(t)
- Put together to get u(x, t)
- Derive Fourier sine series, given initial condition t = 0.

The diffusion time is defined as L^{2}/D, if t is larger than the diffusion time, the most important term in u(x, t) will correspond to n = 1. u(x ,t) is approximately just the first term here, that will be the solution for large enough times when we can neglect all the higher order terms in n.

## My Certificate

For more on The Diffusion Equation of a Dye, please refer to the wonderful course here https://www.coursera.org/learn/differential-equations-engineers

## Related Quick Recap

*I am Kesler Zhu, thank you for visiting my website. Check out more course reviews at https://KZHU.ai*

Don't forget to sign up newsletter, don't miss any chance to learn.

Or share what you've learned with friends!

Tweet