# Toronto Math Forum

## APM346-2012 => APM346 Math => Term Test 2 => Topic started by: Victor Ivrii on November 15, 2012, 08:20:35 PM

Title: TT2--Problem 2
Post by: Victor Ivrii on November 15, 2012, 08:20:35 PM
Consider the diffusion equation
\begin{equation*}
\end{equation*}
with the boundary conditions
\begin{equation*}
u_x(0,t)=u_x(2\pi,t)=0
\end{equation*}
and the initial condition
\begin{equation*}
u(x,0)=|\sin (x)|.
\end{equation*}
• (a) Write the associated eigenvalue problem.
• (b) Find all  eigenvalues and corresponding eigenfunctions.
• (c) Show that the eigenfunctions associated to 2 different eigenvalues are orthogonal.
• (d) Write the solution in the form of  a series expansion.
• (e) Write a formula for  the coefficients of the series expansion.

Post after 22:30
Title: Re: TT2--Problem 2
Post by: Jinchao Lin on November 15, 2012, 10:30:12 PM
Solutions for part (a) and part(b)
Title: Re: TT2--Problem 2
Post by: Ian Kivlichan on November 15, 2012, 10:30:24 PM
Hopeful solution to part c attached! :)

EDIT: Was not originally attached?
Title: Re: TT2--Problem 2
Post by: Chen Ge Qu on November 15, 2012, 10:31:48 PM
Part 1 of 3
Title: Re: TT2--Problem 2
Post by: Chen Ge Qu on November 15, 2012, 10:33:20 PM
Part 2 of 3
Title: Re: TT2--Problem 2
Post by: Chen Ge Qu on November 15, 2012, 10:33:45 PM
Part 3 of 3
Title: Re: TT2--Problem 2
Post by: Victor Ivrii on November 16, 2012, 06:51:54 AM

According to formulae $A_n=\frac{1}{\pi}\int _0^{2\pi} |\sin(x)| \cos (\frac{1}{2}nx)\,dx$.

Chen: wrong coefficient $\frac{1}{2\pi}$ and wrong limits $-\pi$ to $\pi$ and two other errors in (d)--(e) I do not disclose.

I expect for forum: Correct solution for (d),(e) including calculation of coefficients and plugging them into series.
Title: Re: TT2--Problem 2
Post by: Aida Razi on November 18, 2012, 01:47:40 PM
Solution to (d) and (e) is attached!
Title: Re: TT2--Problem 2
Post by: Victor Ivrii on November 18, 2012, 03:12:36 PM
In forum I expect this integral to be taken.

Also coefficient $1$ in front of integral is wrong as $\int_0^{2\pi}\cos ^2(mx/2)\,dx$ is not $1$ but $\pi$ (see lectures)
Title: Re: TT2--Problem 2
Post by: Aida Razi on November 18, 2012, 03:41:24 PM
Integration is done!
Title: Re: TT2--Problem 2
Post by: Victor Ivrii on November 18, 2012, 04:42:24 PM
You are correct that $A_n=0$  for odd $n$. However your calculation for even $n=2m$ is wrong.

Hint: $A_{2m}=0$ for odd $m$. $A_{4k}=?$.

Also note that $\cos$-series start from $n=0$ but it carries coefficient $1/2$
Title: Re: TT2--Problem 2
Post by: Aida Razi on November 18, 2012, 07:37:19 PM
Title: Re: TT2--Problem 2
Post by: Aida Razi on November 18, 2012, 07:39:15 PM
So, An is not zero when n=4k.
Title: Re: TT2--Problem 2
Post by: Victor Ivrii on November 19, 2012, 02:37:26 AM
So, An is not zero when n=4k.

Yes, look $|\sin (x)|$ is $\pi$-periodic; $\cos(nx/2)$ is $\pi$-periodic iff $n=4k$. Now thinks go easier:
$$A_{4k}=\frac{2}{\pi}\int_0^\pi \sin (x) \cos (2kx)\,dx=$$
where we halved interval but doubled coefficient (due to $\pi$-periodicity), then follow your calculations
$$\frac{1}{\pi} \int_0^\pi \Bigl[ \sin ((2k+1)x)-\sin ((2k-1)x)\Bigr]\,dx = \frac{1}{\pi} \Bigl[ -\frac{1}{2k+1}\cos ((2k+1)x)+\frac{1}{2k-1}\cos ((2k-1)x)\Bigr]_0^\pi = -\frac{4}{\pi(k^2-1)}$$
as in your calculations but we do not need to analyze cases. In particular, $A_0=\frac{4}{\pi}$.

So
$$u(x,t)= \frac{2}{\pi} -\sum_{k=0}^\infty \frac{4}{\pi(k^2-1)}\cos (2kx)e^{-4k^2t}.$$