Trinh @ Bath

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
vpde_lecture25 [2020/03/31 08:49]
trinh
vpde_lecture25 [2020/03/31 08:55]
trinh
Line 89: Line 89:
 end end
 </Code> </Code>
 +
 +==== Implementation of the Fourier series ====
 +
 +Now we need to look to solve for the coefficients of our series by applying the boundary conditions. We have that 
 +$$
 +u(x, t) = \sum_{n=0}^\infty \sin\left(\frac{n\pi x}{L}\right) \left[ A_n \cos\left(\frac{n\pi ct}{L}\right) + B_n \sin\left(\frac{n\pi ct}{L}\right)\right]
 +$$
 +
 +Imposing the initial displacement, we have 
 +$$
 +u_0(x) = \sum_{n=0}^\infty A_n \sin\left(\frac{n\pi x}{L}\right), 
 +$$
 +
 +which we recognise as the sine series for the odd $2L$-periodic extension of the function $u_0(x)$ originally defined on $[0, L]$. So the coefficients are (see theorem 12.7)
 +$$
 +A_n = \frac{2}{L} \int_0^L u_0(x) \sin\left(\frac{n\pi x}{L}\right). 
 +$$
 +
 +Imposing the initial velocity, we have
 +$$
 +v_0(x) = \sum_{n=1}^\infty \left(\frac{n\pi c}{L}\right)B_n \sin\left(\frac{n\pi x}{L}\right)
 +$$
 +
 +Again we recognise this as the sine series, so we now need to equate
 +$$
 +\left(\frac{n\pi c}{L}\right)B_n = \frac{2}{L} \int_0^L v_0(x) \sin\left(\frac{n\pi x}{L}\right). 
 +$$