Let \begin{equation} u\left ( x,t\right ) =v\left ( x,t\right ) +u_{E}\left ( x\right ) \tag{1} \end{equation} Since \(Q\left ( x\right ) \) in this problem is zero, we can look for \(u_{E}\left ( x\right ) \) which is the steady state solution that satisfies the non-homogenous boundary conditions. (If \(Q\) was present, and if it also was time dependent, then we replace \(u_{E}\left ( x\right ) \) by \(r\left ( x,t\right ) \) which becomes a reference function that only needs to satisfy the non-homogenous boundary conditions and not the PDE itself at steady state. In (1) \(v\left ( x,t\right ) \) satisfies the PDE itself but with homogenous boundary conditions. The first step is to find \(u_{E}\left ( x\right ) \). We use the equilibrium solution in this case. At equilibrium \(\frac{\partial u_{E}\left ( x,t\right ) }{\partial t}=0\) and hence the solution is given \(\frac{d^{2}u_{E}}{\partial x^{2}}=0\) or \[ \fbox{$u_E\left ( x\right ) =c_1x+c_2$}\] At \(x=0,u_{E}\left ( x\right ) =A\), Hence \[ c_{2}=A \] And solution becomes \(u_{E}\left ( x\right ) =c_{1}x+A\). at \(x=L,\frac{\partial u_{E}\left ( x\right ) }{\partial x}=c_{1}=B\), Therefore\[ \fbox{$u_E\left ( x\right ) =Bx+A$}\] Now we plug-in (1) into the original PDE, this gives\[ \frac{\partial v\left ( x,t\right ) }{\partial t}=k\left ( \frac{\partial ^{2}v\left ( x,t\right ) }{\partial x}+\frac{\partial ^{2}u_{E}\left ( x\right ) }{\partial x}\right ) \] But \(\frac{\partial ^{2}u_{E}\left ( x\right ) }{\partial x}=0\), hence we need to solve \[ \frac{\partial v\left ( x,t\right ) }{\partial t}=k\frac{\partial ^{2}v\left ( x,t\right ) }{\partial x}\] for \(v\left ( x,t\right ) =u\left ( x,t\right ) -u_{E}\left ( x\right ) \) with homogenous boundary conditions \(v\left ( 0,t\right ) =0,\frac{\partial v\left ( L,t\right ) }{\partial t}=0\) and initial conditions \begin{align*} v\left ( x,0\right ) & =u\left ( x,0\right ) -u_{E}\left ( x\right ) \\ & =f\left ( x\right ) -\left ( Bx+A\right ) \end{align*}
This PDE we already solved before in earlier HW’s and we know that it has the following solution\begin{align} v\left ( x,t\right ) & =\sum _{n=1,3,5,\cdots }^{\infty }b_{n}\sin \left ( \sqrt{\lambda _{n}}x\right ) e^{-k\lambda _{n}t}\nonumber \\ \lambda _{n} & =\left ( \frac{n\pi }{2L}\right ) ^{2}\qquad n=1,3,5,\cdots \tag{2} \end{align}
With \(b_{n}\) found from orthogonality using initial conditions \(v\left ( x,0\right ) =f\left ( x\right ) -\left ( Bx+A\right ) \)\begin{align*} v\left ( x,0\right ) & =\sum _{n=1,3,5,\cdots }^{\infty }b_{n}\sin \left ( \sqrt{\lambda _{n}}x\right ) \\ \int _{0}^{L}\left ( f\left ( x\right ) -\left ( Bx+A\right ) \right ) \sin \left ( \sqrt{\lambda _{m}}x\right ) dx & =\int _{0}^{L}\sum _{n=1,3,5,\cdots }^{\infty }b_{n}\sin \left ( \sqrt{\lambda _{n}}x\right ) \sin \left ( \sqrt{\lambda _{m}}x\right ) dx\\ \int _{0}^{L}\left ( f\left ( x\right ) -\left ( Bx+A\right ) \right ) \sin \left ( \sqrt{\lambda _{m}}x\right ) dx & =b_{m}\frac{L}{2} \end{align*}
Hence\begin{equation} b_{n}=\frac{2}{L}\int _{0}^{L}\left ( f\left ( x\right ) -\left ( Bx+A\right ) \right ) \sin \left ( \sqrt{\lambda _{n}}x\right ) dx\qquad n=1,3,5,\cdots \tag{3} \end{equation} Therefore, from (1) the solution is\[ u\left ( x,t\right ) =\sum _{n=1,3,5,\cdots }^{\infty }b_{n}\sin \left ( \sqrt{\lambda _{n}}x\right ) e^{-k\lambda _{n}t}+\overset{u_{E}\left ( x\right ) }{\overbrace{Bx+A}}\] With \(b_{n}\) given by (3) and eigenvalues \(\lambda _{n}\) given by (2).
Let \begin{equation} u\left ( x,t\right ) =v\left ( x,t\right ) +r\left ( x\right ) \tag{1} \end{equation} Since \(Q\left ( x\right ) \) in this problem is zero, we can look for \(r\left ( x\right ) \), since unique equilibrium solution is not possible due to both boundary conditions being insulated. The idea is that, if we can find \(u_{E}\) then we use that, else we switch to reference function \(r\left ( x\right ) \) which only needs to satisfy the non-homogenous boundary condition \(\frac{\partial u_{E}\left ( L\right ) }{\partial x}=0\) but does not have to satisfy equilibrium solution. Let \begin{align*} r\left ( x\right ) & =c_{1}x+c_{2}x^{2}\\ \frac{\partial r}{\partial x} & =c_{1}+2c_{2}x \end{align*}
At \(x=0\), second equation above reduces to\[ 0=c_{1}\] Hence \(r\left ( x\right ) =c_{2}x^{2}\). Now \(\frac{\partial r}{\partial x}=2c_{2}x\). At \(x=L\), this gives \(2c_{2}L=B\) or \(c_{2}=\frac{B}{2L}\), therefore\[ r\left ( x\right ) =\frac{B}{2L}x^{2}\] The above satisfies the non-homogenous B.C. at the right, and also satisfies the homogenous B.C. at the left. Now we plug-in (1) into the original PDE, this gives\begin{align*} \frac{\partial v\left ( x,t\right ) }{\partial t} & =k\left ( \frac{\partial ^{2}v\left ( x,t\right ) }{\partial x}+\frac{\partial ^{2}u_{E}\left ( x\right ) }{\partial x}\right ) \\ \frac{\partial v\left ( x,t\right ) }{\partial t} & =k\left ( \frac{\partial ^{2}v\left ( x,t\right ) }{\partial x}+\frac{B}{L}\right ) \\ & =k\frac{\partial ^{2}v\left ( x,t\right ) }{\partial x}+k\frac{B}{L} \end{align*}
Hence\[ \frac{\partial v\left ( x,t\right ) }{\partial t}=k\frac{\partial ^{2}v\left ( x,t\right ) }{\partial x}+\frac{kB}{L}\] We now treat \(k\frac{B}{L}\) as forcing function. So the above can be written as\begin{equation} \frac{\partial v\left ( x,t\right ) }{\partial t}=k\frac{\partial ^{2}v\left ( x,t\right ) }{\partial x}+Q \tag{2} \end{equation} The above is now solved using eigenfunction expansion, since no steady state equilibrium solution exist. Let \begin{equation} v\left ( x,t\right ) =\sum _{n=0}^{\infty }a_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \tag{3} \end{equation} Where the index starts from zero, since there is a zero eigenvalue, due to B.C. being Neumann. \(\phi _{n}\left ( x\right ) \) are the eigenfunctions of the corresponding homogenous PDE \(\frac{\partial v\left ( x,t\right ) }{\partial t}=k\frac{\partial ^{2}v\left ( x,t\right ) }{\partial x}\) with homogenous BC \(\frac{\partial v\left ( 0,t\right ) }{\partial t}=0,\frac{\partial v\left ( L,t\right ) }{\partial t}=0\). This we solved before. The eigenfunctions are\[ \phi _{n}\left ( x\right ) =\cos \left ( \frac{n\pi }{L}x\right ) \] With eigenvalues\[ \lambda _{n}=\frac{n^{2}\pi ^{2}}{L^{2}}\qquad n=0,1,2,\cdots \] Notice that \(\lambda _{0}=0\). Substituting (3) into (2) gives\[ \sum _{n=0}^{\infty }a_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) =\left ( k\sum _{n=0}^{\infty }a_{n}\left ( t\right ) \frac{d^{2}\phi _{n}\left ( x\right ) }{dx^{2}}\right ) +Q \] Term by term differentiation is justified, since \(v\left ( x,t\right ) \) and \(\phi _{n}\left ( x\right ) \) both solve the same homogenous B.C. problem. Since \(\frac{d^{2}\phi _{n}\left ( x\right ) }{dx^{2}}=-\lambda _{n}\phi _{n}\left ( x\right ) \) the above equation reduces to\[ \sum _{n=0}^{\infty }a_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) =\left ( -k\sum _{n=0}^{\infty }a_{n}\left ( t\right ) \lambda _{n}\phi _{n}\left ( x\right ) \right ) +Q \] Now we expand \(Q\), which gives\[ \sum _{n=0}^{\infty }a_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) =-k\sum _{n=0}^{\infty }a_{n}\left ( t\right ) \lambda _{n}\phi _{n}\left ( x\right ) +\sum _{n=0}^{\infty }q_{n}\phi _{n}\left ( x\right ) \] By orthogonality\[ a_{n}^{\prime }\left ( t\right ) +ka_{n}\left ( t\right ) \lambda _{n}=q_{n}\] case \(n=0\)
\[ a_{0}^{\prime }\left ( t\right ) +ka_{0}\left ( t\right ) \lambda _{0}=q_{0}\] But \(\lambda _{0}=0\)\[ a_{0}^{\prime }\left ( t\right ) =q_{0}\] But since \(Q=\frac{kB}{L}\) is constant, then \(\frac{kB}{L}=\sum _{n=0}^{\infty }q_{n}\phi _{n}\left ( x\right ) \) implies that \(\frac{kB}{L}=q_{0}\phi _{0}\left ( x\right ) \). But \(\phi _{0}\left ( x\right ) =1\) for this problem. Hence \(q_{0}=\frac{kB}{L}\) and the ODE becomes\[ a_{0}^{\prime }\left ( t\right ) =\frac{kB}{L}\] Hence \[ a_{0}\left ( t\right ) =\frac{kB}{L}t+c_{1}\] case \(n>0\)
\[ a_{n}^{\prime }\left ( t\right ) +ka_{n}\left ( t\right ) \lambda _{n}=q_{n}\] Since all \(q_{n}=0\) for \(n>0\) the above becomes\[ a_{n}^{\prime }\left ( t\right ) +ka_{n}\left ( t\right ) \lambda _{n}=0 \] Integrating factor is \(\mu =e^{k\lambda _{n}t}\). Hence \(\frac{d}{dt}\left ( a_{n}\left ( t\right ) e^{k\lambda _{n}t}\right ) =0\) or \[ a_{n}\left ( t\right ) =c_{2}e^{-k\lambda _{n}t}\] Therefore the solution from (3) becomes \begin{equation} v\left ( x,t\right ) =\frac{kB}{L}t+c_{1}+c_{2}\sum _{n=1}^{\infty }e^{-k\lambda _{n}t}\cos \left ( \sqrt{\lambda _{n}}x\right ) \tag{4} \end{equation} Now we find the initial conditions on \(v\left ( x,t\right ) \). Since \(u\left ( x,0\right ) =v\left ( x,0\right ) +r\left ( x\right ) \) then\[ v\left ( x,0\right ) =f\left ( x\right ) -\frac{B}{2L}x^{2}\] Hence equation (4) at \(t=0\) becomes\[ f\left ( x\right ) -\frac{B}{2L}x^{2}=c_{1}+c_{2}\sum _{n=1}^{\infty }\cos \left ( \sqrt{\lambda _{n}}x\right ) \] We now find \(c_{1},c_{2}\) by orthogonality.
case \(n=0\)
\[ \int _{0}^{L}\left ( f\left ( x\right ) -\frac{B}{2L}x^{2}\right ) \cos \left ( \sqrt{\lambda _{0}}x\right ) dx=\int _{0}^{L}c_{1}\cos \left ( \sqrt{\lambda _{0}}x\right ) dx \] But \(\lambda _{0}=0\)\begin{align*} \int _{0}^{L}\left ( f\left ( x\right ) -\frac{B}{2L}x^{2}\right ) dx & =\int _{0}^{L}c_{1}dx\\ \int _{0}^{L}\left ( f\left ( x\right ) -\frac{B}{2L}x^{2}\right ) dx & =c_{1}L\\ c_{1} & =\frac{1}{L}\int _{0}^{L}\left ( f\left ( x\right ) -\frac{B}{2L}x^{2}\right ) dx \end{align*}
case \(n>0\)
\begin{align*} \int _{0}^{L}\left ( f\left ( x\right ) -\frac{B}{2L}x^{2}\right ) \cos \left ( \sqrt{\lambda _{m}}x\right ) dx & =\int _{0}^{L}c_{2}\sum _{n=1}^{\infty }\cos \left ( \sqrt{\lambda _{n}}x\right ) \cos \left ( \sqrt{\lambda _{m}}x\right ) dx\\ & =c_{2}\frac{L}{2}\\ c_{2} & =\frac{2}{L}\int _{0}^{L}\left ( f\left ( x\right ) -\frac{B}{2L}x^{2}\right ) \cos \left ( \sqrt{\lambda _{n}}x\right ) dx \end{align*}
Therefore the solution for \(v\left ( x,t\right ) \) is now complete from (4). Hence\begin{align*} u\left ( x,t\right ) & =v\left ( x,t\right ) +r\left ( x\right ) \\ & =\frac{kB}{L}t+c_{1}+\left ( c_{2}\sum _{n=1}^{\infty }e^{-k\lambda _{n}t}\cos \left ( \sqrt{\lambda _{n}}x\right ) \right ) +\frac{B}{2L}x^{2} \end{align*}
Where \(c_{1},c_{2}\) are given by above result. This completes the solution.
Let \begin{equation} u\left ( x,t\right ) =v\left ( x,t\right ) +r\left ( x,t\right ) \tag{1} \end{equation} Since the problem has time dependent source function \(Q\left ( x,t\right ) \) then \(r\left ( x,t\right ) \) is now a reference function that only needs to satisfy the non-homogenous boundary conditions which in this problem are at both ends and \(v\left ( x,t\right ) \) has homogenous boundary conditions. The first step is to find \(r\left ( x,t\right ) \). Let\[ r\left ( x,t\right ) =c_{1}\left ( t\right ) x+c_{2}\left ( t\right ) x^{2}\] Then\[ \frac{\partial r\left ( x,t\right ) }{\partial x}=c_{1}\left ( t\right ) +2c_{2}\left ( t\right ) x \] At \(x=0\)\[ A\left ( t\right ) =c_{1}\left ( t\right ) \] And at \(x=L\)\begin{align*} B\left ( t\right ) & =c_{1}\left ( t\right ) +2c_{2}\left ( t\right ) L\\ c_{2}\left ( t\right ) & =\frac{B\left ( t\right ) -c_{1}\left ( t\right ) }{2L} \end{align*}
Solving for \(c_{1},c_{2}\) gives\begin{equation} r\left ( x,t\right ) =A\left ( t\right ) x+\left ( \frac{B\left ( t\right ) -A\left ( t\right ) }{2L}\right ) x^{2} \tag{2} \end{equation} Replacing (1) into the original PDE \(u_{t}=ku_{xx}+Q\left ( x,t\right ) \) gives\begin{align*} \frac{\partial }{\partial t}\left ( v\left ( x,t\right ) -r\left ( x,t\right ) \right ) & =k\frac{\partial ^{2}}{\partial x}\left ( v\left ( x,t\right ) -r\left ( x,t\right ) \right ) +Q\left ( x,t\right ) \\ \frac{\partial v}{\partial t}-\frac{\partial r}{\partial t} & =k\frac{\partial ^{2}v}{\partial x^{2}}-k\frac{\partial ^{2}r}{\partial x^{2}}+Q\left ( x,t\right ) \end{align*}
But \(\frac{\partial ^{2}r}{\partial x^{2}}=\frac{B\left ( t\right ) -A\left ( t\right ) }{L}\), hence the above reduces to\begin{equation} \frac{\partial v}{\partial t}=k\frac{\partial ^{2}v}{\partial x^{2}}+Q\left ( x,t\right ) -k\frac{B\left ( t\right ) -A\left ( t\right ) }{L}+\frac{\partial r}{\partial t} \tag{3} \end{equation}
Let \[ \tilde{Q}\left ( x,t\right ) =Q\left ( x,t\right ) +\frac{\partial r}{\partial t}-k\frac{B\left ( t\right ) -A\left ( t\right ) }{L}\] then (3) becomes\[ \frac{\partial v}{\partial t}=k\frac{\partial ^{2}v}{\partial x^{2}}+\tilde{Q}\left ( x,t\right ) \] The above PDE now has homogenous boundary conditions \begin{align*} v_{t}\left ( 0,t\right ) & =0\\ v_{t}\left ( L,t\right ) & =0 \end{align*}
And initial condition is \begin{align*} v\left ( x,0\right ) & =u\left ( x,0\right ) -r\left ( x,0\right ) \\ & =f\left ( x\right ) -\left ( A\left ( 0\right ) x+\left ( \frac{B\left ( 0\right ) -A\left ( 0\right ) }{2L}\right ) x^{2}\right ) \end{align*}
The problem does not ask us to solve it. So will stop here.
Let \begin{equation} u\left ( x,t\right ) =v\left ( x,t\right ) +r\left ( x,t\right ) \tag{1} \end{equation} Since the problem has time dependent source function \(Q\left ( x,t\right ) \) then \(r\left ( x,t\right ) \) is now a reference function that only needs to satisfy the non-homogenous boundary conditions which in this problem are at both ends and \(v\left ( x,t\right ) \) has homogenous boundary conditions. The boundary condition \(r\left ( x,t\right ) \) need to satisfy is\begin{align} \frac{\partial r}{\partial x}\left ( L,t\right ) +hr\left ( L,t\right ) -hB\left ( t\right ) & =0\nonumber \\ r\left ( 0,t\right ) & =0 \tag{2} \end{align}
Let\[ r\left ( x,t\right ) =c_{1}\left ( t\right ) x+c_{2}\left ( t\right ) \] Since \(r\left ( 0,t\right ) =0\) then \(c_{2}=0\). Now we use the right side non-homogenous B.C. to solve for \(c_{1}\). Plugging the above into the right side B.C. gives\begin{align*} c_{1}+hc_{1}L-hB\left ( t\right ) & =0\\ c_{1} & =\frac{hB\left ( t\right ) }{1+hL} \end{align*}
Hence
\begin{equation} \fbox{$r\left ( x,t\right ) =\frac{hB\left ( t\right ) }{1+hL}x$} \tag{3} \end{equation} The rest is very similar to what we did in part (a). Replacing (1) into the original PDE \(\frac{\partial u\left ( x,t\right ) }{\partial t}=k\frac{\partial ^{2}u\left ( x,t\right ) }{\partial x}+Q\left ( x,t\right ) \) gives\begin{align*} \frac{\partial }{\partial t}\left ( v\left ( x,t\right ) -r\left ( x,t\right ) \right ) & =k\frac{\partial ^{2}}{\partial x}\left ( v\left ( x,t\right ) -r\left ( x,t\right ) \right ) +Q\left ( x,t\right ) \\ \frac{\partial v}{\partial t}-\frac{\partial r}{\partial t} & =k\frac{\partial ^{2}v}{\partial x^{2}}-k\frac{\partial ^{2}r}{\partial x^{2}}+Q\left ( x,t\right ) \end{align*}
But \(\frac{\partial ^{2}r}{\partial x^{2}}=0\) hence the above reduces to\begin{equation} \frac{\partial v}{\partial t}=k\frac{\partial ^{2}v}{\partial x^{2}}+Q\left ( x,t\right ) +\frac{\partial r}{\partial t} \tag{4} \end{equation} Let \[ \tilde{Q}\left ( x,t\right ) =Q\left ( x,t\right ) +\frac{\partial r}{\partial t}\] Then (4) becomes\[ \fbox{$\frac{\partial v}{\partial t}=k\frac{\partial ^2v}{\partial x^2}+\tilde{Q}\left ( x,t\right ) $}\] The above PDE now has homogeneous boundary conditions \begin{align*} v\left ( 0,t\right ) & =0\\ \frac{\partial v\left ( L,t\right ) }{\partial t} & =0 \end{align*}
And initial condition is \begin{align*} v\left ( x,0\right ) & =u\left ( x,0\right ) -r\left ( x,0\right ) \\ & =f\left ( x\right ) -\frac{hB\left ( 0\right ) }{1+hL}x \end{align*}
The problem does not ask us to solve it. So will stop here.
\begin{align*} \frac{\partial u\left ( r,\theta ,t\right ) }{\partial t} & =k\left ( \frac{\partial ^{2}u}{\partial r^{2}}+\frac{1}{r}\frac{\partial u}{\partial r}+\frac{1}{r^{2}}\frac{\partial ^{2}u}{\partial \theta ^{2}}\right ) \\ \left \vert u\left ( 0,\theta ,t\right ) \right \vert & <\infty \\ u\left ( a,\theta ,t\right ) & =g\left ( \theta \right ) \\ u\left ( r,-\pi ,t\right ) & =u\left ( r,\pi ,t\right ) \\ \frac{\partial u}{\partial \theta }\left ( r,-\pi ,t\right ) & =\frac{\partial u}{\partial \theta }\left ( r,\pi ,t\right ) \end{align*}
With initial conditions \(u\left ( r,\theta ,0\right ) =f\left ( r,\theta \right ) \). Since the boundary conditions are not homogenous, and since there are no time dependent sources, then in this case we look for \(u_{E}\left ( r,\theta \right ) \) which is solution at steady state which needs to satisfy the nonhomogeneous B.C., where \(u\left ( r,\theta ,t\right ) =v\left ( r,\theta ,t\right ) +u_{E}\left ( r,\theta \right ) \) and \(v\left ( r,\theta ,t\right ) \) solves the PDE but with homogenous B.C. Therefore, we need to find equilibrium solution for Laplace PDE on disk, that only needs to satisfy the nonhomogeneous B.C.\begin{align*} \nabla ^{2}u_{E} & =0\\ \frac{\partial ^{2}u_{E}}{\partial r^{2}}+\frac{1}{r}\frac{\partial u_{E}}{\partial r}+\frac{1}{r^{2}}\frac{\partial ^{2}u_{E}}{\partial \theta ^{2}} & =0 \end{align*}
With boundary condition\begin{align*} \left \vert u_{E}\left ( 0,\theta \right ) \right \vert & <\theta \\ u_{E}\left ( a,\theta \right ) & =g\left ( \theta \right ) \\ u_{E}\left ( r,-\pi \right ) & =u_{E}\left ( r,\pi \right ) \\ \frac{\partial u_{E}}{\partial \theta }\left ( r,-\pi \right ) & =\frac{\partial u_{E}}{\partial \theta }\left ( r,\pi \right ) \end{align*}
But this PDE we have already solved before. But to practice, will solve it again. Let \[ \fbox{$u_E\left ( r,\theta \right ) =R\left ( r\right ) \Theta \left ( \theta \right ) $}\] Where \(R\left ( r\right ) \) is the solution in radial dimension and \(\Theta \left ( \theta \right ) \) is solution in angular dimension. Substituting \(u_{E}\left ( r,\theta \right ) \) in the PDE gives\[ R^{\prime \prime }\Theta +\frac{1}{r}R^{\prime }\Theta +\frac{1}{r^{2}}\Theta ^{\prime \prime }R=0 \] Dividing by \(R\left ( r\right ) \Phi \left ( \theta \right ) \)\begin{align*} \frac{R^{\prime \prime }}{R}+\frac{1}{r}\frac{R^{\prime }}{R}+\frac{1}{r^{2}}\frac{\Theta ^{\prime \prime }}{\Theta } & =0\\ r^{2}\frac{R^{\prime \prime }}{R}+r\frac{R^{\prime }}{R} & =-\frac{\Theta ^{\prime \prime }}{\Theta } \end{align*}
Hence each side is equal to constant, say \(\lambda \) and we obtain\begin{align*} r^{2}\frac{R^{\prime \prime }}{R}+r\frac{R^{\prime }}{R} & =\lambda \\ -\frac{\Theta ^{\prime \prime }}{\Theta } & =\lambda \end{align*}
Or\begin{align} r^{2}R^{\prime \prime }+rR^{\prime }-\lambda R & =0\tag{1}\\ \Theta ^{\prime \prime }+\lambda \Theta & =0\tag{2} \end{align}
We start with \(\Phi \) ODE. The boundary conditions on (3) are \begin{align*} \Theta \left ( -\pi \right ) & =\Theta \left ( \pi \right ) \\ \frac{\partial \Theta }{\partial \theta }\left ( -\pi \right ) & =\frac{\partial \Theta }{\partial \theta }\left ( \pi \right ) \end{align*}
case \(\lambda =0\) The solution is \(\Phi =c_{1}\theta +c_{2}\). Hence we obtain, from first initial conditions\begin{align*} -\pi c_{1}+c_{2} & =\pi c_{1}+c_{2}\\ c_{1} & =0 \end{align*}
Second boundary conditions just says that \(c_{2}=c_{2}\), so any constant will do. Hence \(\lambda =0\) is an eigenvalue with constant being eigenfunction.
case \(\lambda >0\) The solution is \[ \Theta \left ( \theta \right ) =c_{1}\cos \sqrt{\lambda }\theta +c_{2}\sin \sqrt{\lambda }\theta \] The first boundary conditions gives\begin{align} c_{1}\cos \left ( -\sqrt{\lambda }\pi \right ) +c_{2}\sin \left ( -\sqrt{\lambda }\pi \right ) & =c_{1}\cos \left ( \sqrt{\lambda }\pi \right ) +c_{2}\sin \left ( \sqrt{\lambda }\pi \right ) \nonumber \\ c_{1}\cos \left ( \sqrt{\lambda }\pi \right ) -c_{2}\sin \left ( \sqrt{\lambda }\pi \right ) & =c_{1}\cos \left ( \sqrt{\lambda }\pi \right ) +c_{2}\sin \left ( \sqrt{\lambda }\pi \right ) \nonumber \\ 2c_{2}\sin \left ( \sqrt{\lambda }\pi \right ) & =0 \tag{3} \end{align}
From second boundary conditions we obtain\[ \Theta ^{\prime }\left ( \theta \right ) =-\sqrt{\lambda }c_{1}\sin \sqrt{\lambda }\theta +c_{2}\sqrt{\lambda }\cos \sqrt{\lambda }\theta \] Therefore\begin{align} -\sqrt{\lambda }c_{1}\sin \left ( -\sqrt{\lambda }\pi \right ) +c_{2}\sqrt{\lambda }\cos \left ( -\sqrt{\lambda }\pi \right ) & =-\sqrt{\lambda }c_{1}\sin \left ( \sqrt{\lambda }\pi \right ) +c_{2}\sqrt{\lambda }\cos \left ( \sqrt{\lambda }\pi \right ) \nonumber \\ \sqrt{\lambda }c_{1}\sin \left ( \sqrt{\lambda }\pi \right ) +c_{2}\sqrt{\lambda }\cos \left ( \sqrt{\lambda }\pi \right ) & =-\sqrt{\lambda }c_{1}\sin \left ( \sqrt{\lambda }\pi \right ) +c_{2}\sqrt{\lambda }\cos \left ( \sqrt{\lambda }\pi \right ) \nonumber \\ \sqrt{\lambda }c_{1}\sin \left ( \sqrt{\lambda }\pi \right ) & =-\sqrt{\lambda }c_{1}\sin \left ( \sqrt{\lambda }\pi \right ) \nonumber \\ 2c_{1}\sin \left ( \sqrt{\lambda }\pi \right ) & =0 \tag{4} \end{align}
Both (3) and (4) are satisfied if\begin{align*} \sqrt{\lambda }\pi & =n\pi \qquad n=1,2,3,\cdots \\ \lambda & =n^{2}\qquad n=1,2,3,\cdots \end{align*}
Therefore\begin{equation} \Theta _{n}\left ( \theta \right ) =\overset{\lambda =0}{\overbrace{\tilde{A}_{0}}}+\sum _{n=1}^{\infty }\tilde{A}_{n}\cos \left ( n\theta \right ) +\tilde{B}_{n}\sin \left ( n\theta \right ) \tag{5} \end{equation} I put tilde on top of these constants, so not confuse them with constants used for \(v\left ( r,\theta ,t\right ) \) found later below. Now we go back to the \(R\) ODE (2) given by \(r^{2}R^{\prime \prime }+rR^{\prime }-\lambda _{n}R=0\) and solve it. This is Euler PDE whose solution is found by substituting \(R\left ( r\right ) =r^{\alpha }\). The solution comes out to be (Lecture 9)\begin{equation} R_{n}\left ( r\right ) =c_{0}+\sum _{n=1}^{\infty }c_{n}r^{n} \tag{6} \end{equation} Combining (5,6) we now find \(u_{E}\) as\begin{align} u_{E_{n}}\left ( r,\theta \right ) & =R_{n}\left ( r\right ) \Theta _{n}\left ( \theta \right ) \nonumber \\ u_{E}\left ( r,\theta \right ) & =\tilde{A}_{0}+\sum _{n=1}^{\infty }\tilde{A}_{n}\cos \left ( n\theta \right ) r^{n}+\tilde{B}_{n}\sin \left ( n\theta \right ) r^{n}\nonumber \\ & =\sum _{n=0}^{\infty }\tilde{A}_{n}\cos \left ( n\theta \right ) r^{n}+\sum _{n=1}^{\infty }\tilde{B}_{n}\sin \left ( n\theta \right ) r^{n} \tag{7} \end{align}
Where \(c_{0}\) was combined with \(A_{0}\). Now the above equilibrium solution needs to satisfy the non-homogenous B.C. \(u_{E}\left ( a,\theta \right ) =g\left ( \theta \right ) \). Using orthogonality on (7) to find \(A_{n},B_{n}\) gives\begin{align*} g\left ( \theta \right ) & =\sum _{n=0}^{\infty }\tilde{A}_{n}\cos \left ( n\theta \right ) a^{n}+\sum _{n=1}^{\infty }\tilde{B}_{n}\sin \left ( n\theta \right ) a^{n}\\ \int _{0}^{2\pi }g\left ( \theta \right ) \cos \left ( n^{\prime }\theta \right ) d\theta & =\int _{0}^{2\pi }\sum _{n=0}^{\infty }\tilde{A}_{n}\cos \left ( n\theta \right ) \cos \left ( n^{\prime }\theta \right ) a^{n}d\theta +\int _{0}^{2\pi }\sum _{n=1}^{\infty }\tilde{B}_{n}\sin \left ( n\theta \right ) \cos \left ( n^{\prime }\theta \right ) a^{n}d\theta \\ & =\sum _{n=0}^{\infty }\int _{0}^{2\pi }\tilde{A}_{n}\cos \left ( n\theta \right ) \cos \left ( n^{\prime }\theta \right ) a^{n}d\theta +\sum _{n=0}^{\infty }\overset{0}{\overbrace{\int _{0}^{2\pi }\tilde{B}_{n}\sin \left ( n\theta \right ) \cos \left ( n^{\prime }\theta \right ) a^{n}d\theta }}\\ & =\tilde{A}_{n^{\prime }}\int _{0}^{2\pi }\cos ^{2}\left ( n^{\prime }\theta \right ) a^{n}d\theta \end{align*}
For \(n=0\)\begin{align*} \int _{0}^{2\pi }g\left ( \theta \right ) d\theta & =\tilde{A}_{0}\int _{0}^{2\pi }d\theta \\ \tilde{A}_{0} & =\frac{1}{2\pi }\int _{0}^{2\pi }g\left ( \theta \right ) d\theta \end{align*}
For \(n>0\)\begin{align*} \int _{0}^{2\pi }g\left ( \theta \right ) \cos \left ( n\theta \right ) d\theta & =\tilde{A}_{n}\int _{0}^{2\pi }\cos ^{2}\left ( n\theta \right ) a^{n}d\theta \\ \tilde{A}_{n} & =\frac{1}{\pi }\int _{0}^{2\pi }g\left ( \theta \right ) \cos \left ( n\theta \right ) d\theta \end{align*}
Similarly, we apply orthogonality to find \(\tilde{B}_{n}\,\) which gives (for \(n>0\) only)\[ \tilde{B}_{n}=\frac{1}{\pi }\int _{0}^{2\pi }g\left ( \theta \right ) \sin \left ( n\theta \right ) d\theta \] Therefore, we have found \(u_{E}\left ( r,\theta \right ) \) completely now. It is given by\begin{align*} u_{E}\left ( r,\theta \right ) & =\tilde{A}_{0}+\sum _{n=1}^{\infty }\tilde{A}_{n}\cos \left ( n\theta \right ) r^{n}+\tilde{B}_{n}\sin \left ( n\theta \right ) r^{n}\\ \tilde{A}_{0} & =\frac{1}{2\pi }\int _{0}^{2\pi }g\left ( \theta \right ) d\theta \\ \tilde{A}_{n} & =\frac{1}{\pi }\int _{0}^{2\pi }g\left ( \theta \right ) \cos \left ( n\theta \right ) d\theta \\ \tilde{B}_{n} & =\frac{1}{\pi }\int _{0}^{2\pi }g\left ( \theta \right ) \sin \left ( n\theta \right ) d\theta \end{align*}
The above satisfies the non-homogenous B.C. \(u_{E}\left ( a,\theta \right ) =g\left ( \theta \right ) \). Now, since \(u\left ( r,\theta ,t\right ) =v\left ( r,\theta ,t\right ) +u_{E}\left ( r,\theta \right ) \), then we need to solve now for \(v\left ( r,\theta ,t\right ) \) specified by\begin{align} \frac{\partial v\left ( r,\theta ,t\right ) }{\partial t} & =k\left ( \frac{\partial ^{2}v}{\partial r^{2}}+\frac{1}{r}\frac{\partial v}{\partial r}+\frac{1}{r^{2}}\frac{\partial ^{2}v}{\partial \theta ^{2}}\right ) \tag{8}\\ \left \vert v\left ( 0,\theta ,t\right ) \right \vert & <\theta \nonumber \\ v\left ( a,\theta ,t\right ) & =0\nonumber \\ v\left ( r,-\pi ,t\right ) & =v\left ( r,\pi ,t\right ) \nonumber \\ \frac{\partial v}{\partial \theta }\left ( r,-\pi ,t\right ) & =\frac{\partial v}{\partial \theta }\left ( r,\pi ,t\right ) \nonumber \end{align}
Let \(v\left ( r,\theta ,t\right ) =R\left ( r\right ) \Theta \left ( \theta \right ) T\left ( t\right ) \). Substituting into (8) gives\[ T^{\prime }R\Theta =k\left ( R^{\prime \prime }T\Theta +\frac{1}{r}R^{\prime }T\Theta +\frac{1}{r^{2}}\Theta ^{\prime \prime }RT\right ) \] Dividing by \(R\left ( r\right ) \Theta \left ( \theta \right ) T\left ( t\right ) \neq 0\) gives\[ \frac{1}{k}\frac{T^{\prime }}{T}=\frac{R^{\prime \prime }}{R}+\frac{1}{r}\frac{R^{\prime }}{R}+\frac{1}{r^{2}}\frac{\Theta ^{\prime \prime }}{\Theta }\] Let first separation constant be \(-\lambda \), hence the above becomes\begin{align*} \frac{1}{k}\frac{T^{\prime }}{T} & =-\lambda \\ \frac{R^{\prime \prime }}{R}+\frac{1}{r}\frac{R^{\prime }}{R}+\frac{1}{r^{2}}\frac{\Theta ^{\prime \prime }}{\Theta } & =-\lambda \end{align*}
Or\begin{align*} T^{\prime }+\lambda kT & =0\\ r^{2}\frac{R^{\prime \prime }}{R}+r\frac{R^{\prime }}{R}+r^{2}\lambda & =-\frac{\Theta ^{\prime \prime }}{\Theta } \end{align*}
We now separate the second equation above using \(\mu \) giving\begin{align*} r^{2}\frac{R^{\prime \prime }}{R}+r\frac{R^{\prime }}{R}+r^{2}\lambda & =\mu \\ -\frac{\Theta ^{\prime \prime }}{\Theta } & =\mu \end{align*}
Or\begin{align} R^{\prime \prime }+\frac{1}{r}R^{\prime }+R\left ( \lambda -\frac{\mu }{r^{2}}\right ) & =0\tag{9}\\ \Theta ^{\prime \prime }+\mu \Theta & =0 \tag{10} \end{align}
Equation (9) is Sturm-Liouville ODE with boundary conditions \(R\left ( a\right ) =0\) and bounded at \(r=0\) and (10) has periodic boundary conditions as was solved above. The solution to (10) is given in (5) above, no change for this part.\begin{align} \Theta _{n}\left ( \theta \right ) & =\overset{\lambda =0}{\overbrace{A_{0}}}+\sum _{n=1}^{\infty }A_{n}\cos \left ( n\theta \right ) +B_{n}\sin \left ( n\theta \right ) \nonumber \\ & =\sum _{n=0}^{\infty }A_{n}\cos \left ( n\theta \right ) +\sum _{n=1}^{\infty }B_{n}\sin \left ( n\theta \right ) \tag{11} \end{align}
Therefore (9) becomes \(R^{\prime \prime }+\frac{1}{r}R^{\prime }+R\left ( \lambda -\frac{n^{2}}{r^{2}}\right ) =0\) with \(n=0,1,2,\cdots \). We found the solution to this Sturm-Liouville before, it is given by\begin{equation} R_{nm}\left ( r\right ) =J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) \qquad n=0,1,2,\cdots ,m=1,2,3,\cdots \tag{12} \end{equation} Where \(\sqrt{\lambda _{nm}}=\frac{a}{z_{nm}}\) where \(a\) is the radius of the disk and \(z_{nm}\) is the \(m^{th}\) zero of the Bessel function of order \(n\). This is found numerically. We now just need to find the time solution from \(T^{\prime }+\lambda _{nm}kT=0\). This has solution \begin{equation} T_{nm}\left ( t\right ) =e^{-\sqrt{k\lambda _{nm}}t} \tag{13} \end{equation} Now we combine (11,12,13) to find solution for \(v\left ( r,\theta ,t\right ) \)\begin{align} v_{nm}\left ( r,\theta ,t\right ) & =\Theta _{n}\left ( \theta \right ) R_{nm}\left ( r\right ) T_{nm}\left ( t\right ) \nonumber \\ v\left ( r,\theta ,t\right ) & =\sum _{n=0}^{\infty }\sum _{m=1}^{\infty }A_{n}\cos \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) e^{-\sqrt{k\lambda _{nm}}t}+\sum _{n=1}^{\infty }\sum _{m=1}^{\infty }B_{n}\sin \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) e^{-\sqrt{k\lambda _{nm}}t} \tag{14} \end{align}
We now need to find \(A_{n},B_{n}\), which is found from initial conditions on \(v\left ( r,\theta ,0\right ) \) which is given by\begin{align*} v\left ( r,\theta ,0\right ) & =u\left ( r,\theta ,0\right ) -u_{E}\left ( r,\theta \right ) \\ & =f\left ( r,\theta \right ) -u_{E}\left ( r,\theta \right ) \end{align*}
Hence from (14), at \(t=0\)\begin{equation} f\left ( r,\theta \right ) -u_{E}\left ( r,\theta \right ) =\sum _{n=0}^{\infty }\sum _{m=1}^{\infty }A_{n}\cos \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) +\sum _{n=1}^{\infty }\sum _{m=1}^{\infty }B_{n}\sin \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) \tag{15} \end{equation} For each \(n\), inside the \(m\) sum, \(\cos \left ( n\theta \right ) \) and \(\sin \left ( n\theta \right ) \) will be constant. So we need to apply orthogonality twice in order to remove both sums. Multiplying (15) by \(\cos \left ( n^{\prime }\theta \right ) \) and integrating gives\begin{align*} \int _{-\pi }^{\pi }\left ( f\left ( r,\theta \right ) -u_{E}\left ( r,\theta \right ) \right ) \cos \left ( n^{\prime }\theta \right ) d\theta & =\int _{-\pi }^{\pi }\sum _{n=0}^{\infty }\left ( \sum _{m=1}^{\infty }A_{n}J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) \right ) \cos \left ( n\theta \right ) \cos \left ( n^{\prime }\theta \right ) d\theta \\ & +\int _{-\pi }^{\pi }\sum _{n=1}^{\infty }\left ( \sum _{m=1}^{\infty }B_{n}J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) \right ) \sin \left ( n\theta \right ) \cos \left ( n^{\prime }\theta \right ) \end{align*}
The second sum in the RHS above goes to zero due to \(\int _{-\pi }^{\pi }\sin \left ( n\theta \right ) \cos \left ( n^{\prime }\theta \right ) d\theta \) and we end up with\[ \int _{-\pi }^{\pi }\left ( f\left ( r,\theta \right ) -u_{E}\left ( r,\theta \right ) \right ) \cos \left ( n\theta \right ) d\theta =A_{n}\int _{-\pi }^{\pi }\cos ^{2}\left ( n\theta \right ) \sum _{m=1}^{\infty }J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) d\theta \] We now apply orthogonality again, but on Bessel functions and remember to add the weight \(r\). The above becomes\begin{align*} \int _{0}^{a}\int _{-\pi }^{\pi }\left ( f\left ( r,\theta \right ) -u_{E}\left ( r,\theta \right ) \right ) \cos \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm^{\prime }}}r\right ) rd\theta dr & =A_{n}\int _{0}^{a}\int _{-\pi }^{\pi }\cos ^{2}\left ( n\theta \right ) \sum _{m=1}^{\infty }J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) J_{n}\left ( \sqrt{\lambda _{nm^{\prime }}}r\right ) rd\theta dr\\ & =A_{n}\int _{0}^{a}\int _{-\pi }^{\pi }\cos ^{2}\left ( n\theta \right ) J_{n}^{2}\left ( \sqrt{\lambda _{nm^{\prime }}}r\right ) rd\theta dr \end{align*}
Hence\[ A_{n}=\frac{\int _{0}^{a}\int _{-\pi }^{\pi }\left ( f\left ( r,\theta \right ) -u_{E}\left ( r,\theta \right ) \right ) \cos \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) rd\theta dr}{\int _{0}^{a}\int _{-\pi }^{\pi }\cos ^{2}\left ( n\theta \right ) J_{n}^{2}\left ( \sqrt{\lambda _{nm}}r\right ) rd\theta dr}\qquad n=0,1,2,\cdots ,m=1,2,3,\cdots \] We will repeat the same thing to find \(B_{n}\). The only difference now is to use \(\sin n\theta \). repeating these steps gives\[ B_{n}=\frac{\int _{0}^{a}\int _{-\pi }^{\pi }\left ( f\left ( r,\theta \right ) -u_{E}\left ( r,\theta \right ) \right ) \sin \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) rd\theta dr}{\int _{0}^{a}\int _{-\pi }^{\pi }\sin ^{2}\left ( n\theta \right ) J_{n}^{2}\left ( \sqrt{\lambda _{nm}}r\right ) rd\theta dr}\qquad n=0,1,2,\cdots ,m=1,2,3,\cdots \] This complete the solution.
Summary of solution
\begin{align*} u\left ( r,\theta ,t\right ) & =v\left ( r,\theta ,t\right ) +u_{E}\left ( r,\theta \right ) \\ & =\sum _{n=0}^{\infty }\sum _{m=1}^{\infty }A_{n}\cos \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) e^{-\sqrt{k\lambda _{nm}}t}+\\ & \sum _{n=1}^{\infty }\sum _{m=1}^{\infty }B_{n}\sin \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) e^{-\sqrt{k\lambda _{nm}}t}+u_{E}\left ( r,\theta \right ) \end{align*}
Where\begin{align*} u_{E}\left ( r,\theta \right ) & =\tilde{A}_{0}+\sum _{n=1}^{\infty }\tilde{A}_{n}\cos \left ( n\theta \right ) r^{n}+\tilde{B}_{n}\sin \left ( n\theta \right ) r^{n}\\ \tilde{A}_{0} & =\frac{1}{2\pi }\int _{0}^{2\pi }g\left ( \theta \right ) d\theta \\ \tilde{A}_{n} & =\frac{1}{\pi }\int _{0}^{2\pi }g\left ( \theta \right ) \cos \left ( n\theta \right ) d\theta \\ \tilde{B}_{n} & =\frac{1}{\pi }\int _{0}^{2\pi }g\left ( \theta \right ) \sin \left ( n\theta \right ) d\theta \end{align*}
And\[ A_{n}=\frac{\int _{0}^{a}\int _{-\pi }^{\pi }\left ( f\left ( r,\theta \right ) -u_{E}\left ( r,\theta \right ) \right ) \cos \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) rd\theta dr}{\int _{0}^{a}\int _{-\pi }^{\pi }\cos ^{2}\left ( n\theta \right ) J_{n}^{2}\left ( \sqrt{\lambda _{nm}}r\right ) rd\theta dr}\qquad n=0,1,2,\cdots ,m=1,2,3,\cdots \] And\[ B_{n}=\frac{\int _{0}^{a}\int _{-\pi }^{\pi }\left ( f\left ( r,\theta \right ) -u_{E}\left ( r,\theta \right ) \right ) \sin \left ( n\theta \right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) rd\theta dr}{\int _{0}^{a}\int _{-\pi }^{\pi }\sin ^{2}\left ( n\theta \right ) J_{n}^{2}\left ( \sqrt{\lambda _{nm}}r\right ) rd\theta dr}\qquad n=0,1,2,\cdots ,m=1,2,3,\cdots \] Where \(\sqrt{\lambda _{nm}}=\frac{a}{z_{nm}}\) where \(a\) is the radius of the disk and \(z_{nm}\) is the \(m^{th}\) zero of the Bessel function of order \(n\).
Problem Solve the initial value problem
\begin{equation} c\rho \frac{\partial u}{\partial t}=\frac{\partial }{\partial x}\left ( K_{0}\frac{\partial u}{\partial x}\right ) +qu+f\left ( x,t\right ) \tag{1} \end{equation} Where \(c,\rho ,K_{0},q\) are functions of \(x\) only, subject to conditions \(u\left ( 0,t\right ) =0,u\left ( L,t\right ) =0,u\left ( x,0\right ) =g\left ( x\right ) \). Assume that eigenfunctions are know. Hint: let \(L=\frac{d}{dx}\left ( K_{0}\frac{d}{dx}\right ) +q\)
solution
Because this problem has homogeneous B.C. but has time dependent source (i.e. non-homogenous in the PDE itself), then we will use the method of eigenfunction expansion. In this method, we first need to find the eigenfunctions \(\phi _{n}\left ( x\right ) \) of the associated PDE without the source being present. Then use these \(\phi _{n}\left ( x\right ) \) to expand the source \(f\left ( x,t\right ) \) as generalized Fourier series. We now switch to the associated homogenous PDE in order to find the eigenfunctions. This the same as above, but without the source term.
\begin{align} \frac{\partial u}{\partial t} & =\frac{1}{c\rho }\frac{\partial }{\partial x}\left ( K_{0}\frac{\partial u}{\partial x}\right ) +\frac{q}{c\rho }u\tag{2}\\ u\left ( 0,t\right ) & =0\nonumber \\ u\left ( L,t\right ) & =0\nonumber \\ u\left ( x,0\right ) & =g\left ( x\right ) \nonumber \end{align}
We are told to assume the eigenfunctions \(\phi _{n}\left ( x\right ) \) are known. But it is better to do this explicitly, also needed to find the weight. Let \(u=X\left ( x\right ) T\left ( t\right ) \). Then (2) becomes\[ T^{\prime }X=\frac{1}{c\rho }K_{0}^{\prime }X^{\prime }T+\frac{1}{c\rho }K_{0}X^{\prime \prime }T+\frac{q}{c\rho }XT \] Dividing by \(XT\) gives\[ \frac{T^{\prime }}{T}=\frac{1}{c\rho }K_{0}^{\prime }\frac{X^{\prime }}{X}+\frac{1}{c\rho }K_{0}\frac{X^{\prime \prime }}{X}+\frac{q}{c\rho }\] As the right side depends on \(x\) only, and the left side depends on \(t\) only, we can now separate them. Using \(-\lambda \) as separation constant gives\[ T^{\prime }+\lambda T=0 \] And for the \(x\) part\begin{align} \frac{1}{c\rho }K_{0}^{\prime }\frac{X^{\prime }}{X}+\frac{1}{c\rho }K_{0}\frac{X^{\prime \prime }}{X}+\frac{q}{c\rho } & =-\lambda \nonumber \\ K_{0}^{\prime }X^{\prime }+K_{0}X^{\prime \prime }+qX & =-\lambda c\rho X\tag{2A}\\ \left ( K_{0}X^{\prime }\right ) ^{\prime }+qX & =-\lambda c\rho X\nonumber \end{align}
We now see this is Sturm-Liouville ODE, with\begin{align*} p & =K_{0}\\ q & \equiv q\\ \sigma & =c\rho \end{align*}
And \begin{align*} L\left [ X\right ] & =\frac{d}{dx}\left ( K_{0}\frac{dX}{dx}\right ) +qX\\ L & \equiv \frac{d}{dx}\left ( K_{0}\frac{dX}{dx}\right ) +q \end{align*}
Where \[ L\left [ X\right ] =-\lambda c\rho X \] The solution to S-L, with homogeneous B.C. is given as \[ X\left ( x\right ) =\sum _{n=1}^{\infty }a_{n}\phi _{n}\left ( x\right ) \] When we plug-in this back into (2), and incorporate the time solution from \(T^{\prime }+\lambda _{n}T=0\), we end up with solution for (2) as\begin{equation} u\left ( x,t\right ) =\sum _{n=1}^{\infty }a_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \tag{3} \end{equation} Where now the Fourier coefficients became time dependent. We now substitute this back into the original PDE (1) with the source present (the nonhomogeneous PDE) and obtain\begin{equation} c\rho \sum _{n=1}^{\infty }a_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) =\sum _{n=1}^{\infty }a_{n}\left ( t\right ) L\left [ \phi _{n}\left ( x\right ) \right ] +f\left ( x,t\right ) \tag{4} \end{equation} We now expand \(f\left ( x,t\right ) \) using same eigenfunctions found from the homogeneous PDE solution (we can do this, since eigenfunctions found from Sturm-Liouville can be used to expand any piecewise continuous function). Let \begin{equation} f\left ( x,t\right ) =\sum _{n=1}^{\infty }f_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \tag{5} \end{equation} Hence (4) becomes\begin{equation} c\rho \sum _{n=1}^{\infty }a_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) =\sum _{n=1}^{\infty }a_{n}\left ( t\right ) L\left [ \phi _{n}\left ( x\right ) \right ] +\sum _{n=1}^{\infty }f_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \tag{6} \end{equation} But from above, we know that\(\ L\left [ \phi _{n}\left ( x\right ) \right ] =-\lambda _{n}c\rho \phi _{n}\left ( x\right ) \), hence (6) becomes\begin{align*} c\rho \sum _{n=1}^{\infty }a_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) & =-c\rho \sum _{n=1}^{\infty }\lambda _{n}a_{n}\left ( t\right ) \phi _{n}\left ( x\right ) +\sum _{n=1}^{\infty }f_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \\ \sum _{n=1}^{\infty }c\rho a_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) +c\rho \lambda _{n}a_{n}\left ( t\right ) \phi _{n}\left ( x\right ) & =\sum _{n=1}^{\infty }f_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \\ \sum _{n=1}^{\infty }\left ( a_{n}^{\prime }\left ( t\right ) +\lambda _{n}a_{n}\left ( t\right ) \right ) c\rho \phi _{n}\left ( x\right ) & =\sum _{n=1}^{\infty }f_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \end{align*}
By orthogonality, (weight is \(c\rho \)) then from the above we obtain\[ a_{n}^{\prime }\left ( t\right ) +\lambda _{n}a_{n}\left ( t\right ) =f_{n}\left ( t\right ) \] The solution to the above is\[ a_{n}\left ( t\right ) =e^{-\lambda _{n}t}\int _{0}^{t}f_{n}\left ( s\right ) e^{\lambda _{n}s}ds+ce^{-\lambda _{n}t}\] To find constant of integration \(c\) in the above, we use initial conditions. At \(t=0\)\[ c=a_{n}\left ( 0\right ) \] Hence the solution becomes\begin{align*} a_{n}\left ( t\right ) & =e^{-\lambda _{n}t}\int _{0}^{t}f_{n}\left ( s\right ) e^{\lambda _{n}s}ds+a_{n}\left ( 0\right ) e^{-\lambda _{n}t}\\ & =e^{-\lambda _{n}t}\left ( a_{n}\left ( 0\right ) +\int _{0}^{t}f_{n}\left ( s\right ) e^{\lambda _{n}s}ds\right ) \end{align*}
To find \(a_{n}\left ( 0\right ) \), from (3), putting \(t=0\) gives\[ g\left ( x\right ) =\sum _{n=1}^{\infty }a_{n}\left ( 0\right ) \phi _{n}\left ( x\right ) \] Applying orthogonality\begin{align*} \int _{0}^{L}g\left ( x\right ) \phi _{n}\left ( x\right ) dx & =a_{n}\left ( 0\right ) \int _{0}^{L}\phi _{n}^{2}\left ( x\right ) c\rho dx\\ a_{n}\left ( 0\right ) & =\frac{\int _{0}^{L}g\left ( x\right ) \phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) c\rho dx} \end{align*}
And finally, to find \(f_{n}\left ( t\right ) \), which is the generalized Fourier coefficient of the expansion of the source in (5) above, we also use orthogonality\begin{align*} \int _{0}^{L}f\left ( x,t\right ) \phi _{n}\left ( x\right ) dx & =f_{n}\left ( t\right ) \int _{0}^{L}\phi _{n}^{2}\left ( x\right ) c\rho dx\\ f_{n}\left ( t\right ) & =\frac{\int _{0}^{L}f\left ( x,t\right ) \phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) c\rho dx} \end{align*}
Summary of solution
The solution to \(c\rho \frac{\partial u}{\partial t}=\frac{\partial }{\partial x}\left ( K_{0}\frac{\partial u}{\partial x}\right ) +qu+f\left ( x,t\right ) \) is given by \[ u\left ( x,t\right ) =\sum _{n=1}^{\infty }a_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \] Where \(a_{n}\left ( t\right ) \) is the solution to \[ a_{n}^{\prime }\left ( t\right ) +\lambda _{n}a_{n}\left ( t\right ) =f_{n}\left ( t\right ) \] Given by\[ a_{n}\left ( t\right ) =e^{-\lambda _{n}c\rho t}\left ( a_{n}\left ( 0\right ) +\int _{0}^{t}f_{n}\left ( s\right ) e^{\lambda _{n}c\rho s}ds\right ) \] Where\[ f_{n}\left ( t\right ) =\frac{\int _{0}^{L}f\left ( x,t\right ) \phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) c\rho dx}\] And\[ a_{n}\left ( 0\right ) =\frac{\int _{0}^{L}g\left ( x\right ) \phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) c\rho dx}\]
Since this problem has homogeneous B.C. but has time dependent source (i.e. non-homogenous in the PDE itself), then we will use the method of eigenfunction expansion. In this method, we first find the eigenfunctions \(\phi _{n}\left ( x\right ) \) of the associated homogenous PDE without the source being present. Then use these \(\phi _{n}\left ( x\right ) \) to expand the source \(f\left ( x,t\right ) \) as generalized Fourier series. We now switch to the associated homogenous PDE in order to find the eigenfunctions. \(u\equiv u\left ( r,t\right ) \). There is no \(\theta \). Hence\begin{align} \frac{\partial u\left ( r,t\right ) }{\partial t} & =k\left ( \frac{\partial ^{2}u}{\partial r^{2}}+\frac{1}{r}\frac{\partial u}{\partial r}\right ) \tag{1}\\ u\left ( a,t\right ) & =0\nonumber \\ \left \vert u\left ( 0,t\right ) \right \vert & <\infty \nonumber \\ u\left ( r,0\right ) & =0\nonumber \end{align}
We need to solve the above in order to find the eigenfunctions \(\phi _{n}\left ( r\right ) \). Let \(u=R\left ( r\right ) T\left ( t\right ) \). Substituting this back into (1) gives\[ T^{\prime }R=k\left ( R^{\prime \prime }T+\frac{1}{r}R^{\prime }T\right ) \] Dividing by \(RT\)\[ \frac{1}{k}\frac{T^{\prime }}{T}=\frac{R^{\prime \prime }}{R}+\frac{1}{r}\frac{R^{\prime }}{R}\] Let separation constant be \(-\lambda \). We obtain\[ T^{\prime }+k\lambda T=0 \] And\begin{align*} \frac{R^{\prime \prime }}{R}+\frac{1}{r}\frac{R^{\prime }}{R} & =-\lambda \\ R^{\prime \prime }+\frac{1}{r}R^{\prime } & =-\lambda R\\ rR^{\prime \prime }+R^{\prime }+\lambda rR & =0 \end{align*}
This is a singular Sturm-Liouville ODE. Standard form is\[ \left ( rR^{\prime }\right ) ^{\prime }=-\lambda rR \] Hence\begin{align*} p & =r\\ q & =0\\ \sigma & =r \end{align*}
We solved \(R^{\prime \prime }+\frac{1}{r}R^{\prime }+\lambda R=0\) before. The solution is\[ R_{n}\left ( r\right ) =J_{0}\left ( \sqrt{\lambda _{n}}r\right ) \] Where \(\sqrt{\lambda _{n}}\) is found by solving \(J_{0}\left ( \sqrt{\lambda _{n}}a\right ) =0\). Now that we know what the eigenfunctions are, then we write\begin{equation} u\left ( r,t\right ) =\sum _{n=1}^{\infty }a_{n}\left ( t\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) \tag{2} \end{equation} Where \(a_{n}\left ( t\right ) \) is function of time since it includes the time solution in it. Now we use the above in the original PDE with the source in it\begin{equation} \frac{\partial u\left ( r,t\right ) }{\partial t}=k\nabla ^{2}u+f\left ( r,t\right ) \tag{3} \end{equation} Where \(\nabla ^{2}u=-\lambda u\). Substituting (2) into (3), and using \(f\left ( r,t\right ) =\sum _{n=1}^{\infty }f_{n}\left ( t\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) \) gives\begin{align*} \sum _{n=1}^{\infty }a_{n}^{\prime }\left ( t\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) & =-k\sum _{n=1}^{\infty }\lambda _{n}a_{n}\left ( t\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) +\sum _{n=1}^{\infty }f_{n}\left ( t\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) \\ \sum _{n=1}^{\infty }\left ( a_{n}^{\prime }\left ( t\right ) +k\lambda _{n}a_{n}\left ( t\right ) \right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) & =\sum _{n=1}^{\infty }f_{n}\left ( t\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) \end{align*}
Applying orthogonality, the above simplifies to\[ a_{n}^{\prime }\left ( t\right ) +k\lambda _{n}a_{n}\left ( t\right ) =f_{n}\left ( t\right ) \] The solution is\[ a_{n}\left ( t\right ) =e^{-k\lambda _{n}t}\int _{0}^{t}f_{n}\left ( s\right ) e^{k\lambda _{n}s}ds+ce^{-k\lambda _{n}t}\] To find constant of integration \(c\) in the above, we use initial conditions. At \(t=0\)\[ c=a_{n}\left ( 0\right ) \] Hence the solution becomes\begin{align*} a_{n}\left ( t\right ) & =e^{-k\lambda _{n}t}\int _{0}^{t}f_{n}\left ( s\right ) e^{k\lambda _{n}s}ds+a_{n}\left ( 0\right ) e^{-k\lambda _{n}t}\\ & =e^{-k\lambda _{n}t}\left ( a_{n}\left ( 0\right ) +\int _{0}^{t}f_{n}\left ( s\right ) e^{k\lambda _{n}s}ds\right ) \end{align*}
To find \(a_{n}\left ( 0\right ) \), from (2), putting \(t=0\) gives\[ 0=\sum _{n=1}^{\infty }a_{n}\left ( 0\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) \] Hence \(a_{n}\left ( 0\right ) =0\). Therefore \(a_{n}\left ( t\right ) \) becomes.\[ a_{n}\left ( t\right ) =e^{-k\lambda _{n}t}\int _{0}^{t}f_{n}\left ( s\right ) e^{k\lambda _{n}s}ds \] And finally, to find \(f_{n}\left ( t\right ) \), which is the generalized Fourier coefficient of the expansion of the source in (3) above, we also use orthogonality\begin{align*} \int _{0}^{a}f\left ( r,t\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) rdr & =f_{n}\left ( t\right ) \int _{0}^{a}J_{0}^{2}\left ( \sqrt{\lambda _{n}}r\right ) rdr\\ f_{n}\left ( t\right ) & =\frac{\int _{0}^{a}f\left ( r,t\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) rdr}{\int _{0}^{a}J_{0}^{2}\left ( \sqrt{\lambda _{n}}r\right ) rdr} \end{align*}
Summary of solution
The solution to \(\frac{\partial u\left ( r,t\right ) }{\partial t}=k\left ( \frac{\partial ^{2}u}{\partial r^{2}}+\frac{1}{r}\frac{\partial u}{\partial r}\right ) +f\left ( r,t\right ) \) is given by \[ u\left ( r,t\right ) =\sum _{n=1}^{\infty }a_{n}\left ( t\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) \] Where \(a_{n}\left ( t\right ) \) is the solution to \[ a_{n}^{\prime }\left ( t\right ) +k\lambda _{n}a_{n}\left ( t\right ) =f_{n}\left ( t\right ) \] Given by\[ a_{n}\left ( t\right ) =e^{-k\lambda _{n}t}\int _{0}^{t}f_{n}\left ( s\right ) e^{k\lambda _{n}s}ds \] Where\[ f_{n}\left ( t\right ) =\frac{\int _{0}^{a}f\left ( r,t\right ) J_{0}\left ( \sqrt{\lambda _{n}}r\right ) rdr}{\int _{0}^{a}J_{0}^{2}\left ( \sqrt{\lambda _{n}}r\right ) rdr}\]
This problem has nonhomogeneous B.C. and non-homogenous in the PDE itself (source present). First step is to use reference function to remove the nonhomogeneous B.C. then use the method of eigenfunction expansion on the resulting problem.
Let \[ r\left ( x\right ) =c_{1}x+c_{2}\] At \(x=0,r\left ( x\right ) =1\), hence \(1=c_{2}\) and at \(x=\pi ,r\left ( x\right ) =0\), hence \(0=c_{1}\pi +1\) or \(c_{1}=-\frac{1}{\pi }\), hence\[ r\left ( x\right ) =1-\frac{x}{\pi }\] Therefore\[ u\left ( x,t\right ) =v\left ( x,t\right ) +r\left ( x\right ) \] Where \(v\left ( x,t\right ) \) solution for the given PDE but with homogeneous B.C., therefore \begin{align} \frac{\partial v\left ( x,t\right ) }{\partial t} & =\frac{\partial ^{2}v\left ( x,t\right ) }{\partial x^{2}}+e^{-2t}\sin 5x\tag{1}\\ v\left ( 0,t\right ) & =0\nonumber \\ v\left ( \pi ,t\right ) & =0\nonumber \\ v\left ( x,0\right ) & =u\left ( x,0\right ) -r\left ( x\right ) =0-\left ( 1-\frac{x}{\pi }\right ) =\frac{x}{\pi }-1\nonumber \end{align}
We now solve (1). This is homogeneous in the PDE itself. To solve, we first solve the nonhomogeneous PDE in order to find the eigenfunctions. Hence we need to solve\[ \frac{\partial v\left ( x,t\right ) }{\partial t}=\frac{\partial ^{2}v\left ( x,t\right ) }{\partial x^{2}}\] This has solution\begin{equation} v\left ( x,t\right ) =\sum _{n=1}^{\infty }a_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \tag{2} \end{equation} With\begin{align*} \phi _{n}\left ( x\right ) & =\sin \left ( \sqrt{\lambda _{n}}x\right ) \qquad n=1,2,3\cdots \\ \lambda _{n} & =n^{2}\qquad n=1,2,3\cdots \end{align*}
Plug-in (2) back into (1) gives\begin{align*} \sum _{n=1}^{\infty }a_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) & =\sum _{n=1}^{\infty }a_{n}\left ( t\right ) \phi _{n}\left ( x\right ) +e^{-2t}\sin 5x\\ & =\sum _{n=1}^{\infty }a_{n}\left ( t\right ) \frac{\partial ^{2}}{\partial x^{2}}\phi _{n}\left ( x\right ) +e^{-2t}\sin 5x \end{align*}
But \(\frac{\partial ^{2}}{\partial x^{2}}\phi _{n}\left ( x\right ) =-\lambda _{n}\phi _{n}=-n\phi _{n}\), hence the above becomes\begin{align*} \sum _{n=1}^{\infty }a_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) +n^{2}a_{n}\left ( t\right ) \phi _{n}\left ( x\right ) & =e^{-2t}\sin 5x\\ \sum _{n=1}^{\infty }\left ( a_{n}^{\prime }\left ( t\right ) +n^{2}a_{n}\left ( t\right ) \right ) \sin \left ( nx\right ) & =e^{-2t}\sin 5x \end{align*}
Therefore, since Fourier series expansion is unique, we can compare coefficients and obtain\[ a_{n}^{\prime }\left ( t\right ) +n^{2}a_{n}\left ( t\right ) =\left \{ \begin{array} [c]{ccc}e^{-2t} & & n=5\\ 0 & & n\neq 5 \end{array} \right . \] For the case \(n=5\)\begin{align*} a_{5}^{\prime }\left ( t\right ) +25a_{5}\left ( t\right ) & =e^{-2t}\\ \frac{d}{dt}\left ( a_{5}\left ( t\right ) e^{25t}\right ) & =e^{23t}\\ a_{5}\left ( t\right ) e^{25t} & =\int e^{23t}dt+c\\ & =\frac{e^{23t}}{23}+c \end{align*}
Hence\[ a_{5}\left ( t\right ) =\frac{e^{-2t}}{23}+ce^{-25t}\] At \(t=0,\) \(a_{5}\left ( 0\right ) =\frac{1}{23}+c\), hence\[ c=a_{5}\left ( 0\right ) -\frac{1}{23}\] And the solution becomes\[ a_{5}\left ( t\right ) =\frac{1}{23}e^{-2t}+\left ( a_{5}\left ( 0\right ) -\frac{1}{23}\right ) e^{-25t}\] For the case \(n\neq 5\)\begin{align*} a_{n}^{\prime }\left ( t\right ) +n^{2}a_{n}\left ( t\right ) & =0\\ \frac{d}{dt}\left ( a_{n}\left ( t\right ) e^{n^{2}t}\right ) & =0\\ a_{n}\left ( t\right ) e^{n^{2}t} & =c\\ a_{n}\left ( t\right ) & =ce^{-n^{2}t} \end{align*}
At \(t=0,\) \(a_{n}\left ( 0\right ) =c\), hence\[ a_{n}\left ( t\right ) =a_{n}\left ( 0\right ) e^{-nt}\] Therefore\[ a_{n}\left ( t\right ) =\left \{ \begin{array} [c]{ccc}\frac{1}{23}e^{-2t}+\left ( a_{5}\left ( 0\right ) -\frac{1}{23}\right ) e^{-25t} & & n=5\\ a_{n}\left ( 0\right ) e^{-n^{2}t} & & n\neq 5 \end{array} \right . \] To find \(a_{n}\left ( 0\right ) \) we use orthogonality. Since \(u\left ( x,t\right ) =v\left ( x,t\right ) +r\left ( x\right ) \), then\[ u\left ( x,t\right ) =\left ( \sum _{n=1}^{\infty }a_{n}\left ( t\right ) \sin \left ( nx\right ) \right ) +\left ( 1-\frac{x}{\pi }\right ) \] And at \(t=0\) the above becomes\[ 0=\left ( \sum _{n=1}^{\infty }a_{n}\left ( 0\right ) \sin \left ( nx\right ) \right ) +\left ( 1-\frac{x}{\pi }\right ) \] Or\[ \frac{x}{\pi }-1=\sum _{n=1}^{\infty }a_{n}\left ( 0\right ) \sin \left ( nx\right ) \] Applying orthogonality\[ \int _{0}^{\pi }\left ( \frac{x}{\pi }-1\right ) \sin \left ( n^{\prime }x\right ) dx=a_{n^{\prime }}\left ( 0\right ) \int _{0}^{\pi }\sin ^{2}\left ( n^{\prime }x\right ) dx \] Therefore\begin{align*} a_{n}\left ( 0\right ) & =\frac{\int _{0}^{\pi }\left ( \frac{x}{\pi }-1\right ) \sin \left ( nx\right ) dx}{\frac{\pi }{2}}\\ & =\frac{2}{\pi }\int _{0}^{\pi }\left ( \frac{x}{\pi }-1\right ) \sin \left ( nx\right ) dx\\ & =\frac{2}{\pi }\left [ -\int _{0}^{\pi }\sin \left ( nx\right ) dx+\frac{1}{\pi }\int _{0}^{\pi }x\sin \left ( nx\right ) dx\right ] \\ & =\frac{2}{\pi }\left [ -\left ( \frac{-\cos \left ( nx\right ) }{n}\right ) _{0}^{\pi }+\frac{1}{\pi }\left ( \frac{\sin \left ( nx\right ) }{n^{2}}-\frac{x\cos \left ( nx\right ) }{n}\right ) _{0}^{\pi }\right ] \\ & =\frac{2}{\pi }\left [ \left ( \frac{\cos \left ( n\pi \right ) }{n}-\frac{1}{n}\right ) +\frac{1}{\pi }\left ( \left ( \frac{\sin \left ( n\pi \right ) }{n^{2}}-\frac{\pi \cos \left ( n\pi \right ) }{n}\right ) -\left ( \frac{\sin \left ( 0\right ) }{n^{2}}-\frac{0\cos \left ( 0\right ) }{n}\right ) \right ) \right ] \\ & =\frac{2}{\pi }\left [ \left ( \frac{-1^{n}}{n}-\frac{1}{n}\right ) +\frac{1}{\pi }\left ( 0-\frac{\pi \left ( -1\right ) ^{n}}{n}\right ) \right ] \\ & =\frac{2}{\pi }\left [ \frac{\left ( -1\right ) ^{n}}{n}-\frac{1}{n}-\frac{\left ( -1\right ) ^{n}}{n}\right ] \\ & =\frac{-2}{n\pi } \end{align*}
Therefore \(a_{5}\left ( 0\right ) =\frac{-2}{5\pi }\). Hence\[ a_{n}\left ( t\right ) =\left \{ \begin{array} [c]{ccc}\frac{1}{23}e^{-2t}+\left ( \frac{-2}{5\pi }-\frac{1}{23}\right ) e^{-25t} & & n=5\\ \frac{-2}{n\pi }e^{-n^{2}t} & & n\neq 5 \end{array} \right . \] Where \begin{align*} u\left ( x,t\right ) & =v\left ( x,t\right ) +r\left ( x\right ) \\ & =\left ( \sum _{n=1}^{\infty }a_{n}\left ( t\right ) \sin \left ( nx\right ) \right ) +\left ( 1-\frac{x}{\pi }\right ) \end{align*}
Let\begin{equation} u\left ( x,t\right ) \sim \sum _{n=0}^{\infty }b_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \tag{1} \end{equation} Where in this problem \(\phi _{n}\left ( x\right ) \) are the eigenfunctions of the corresponding homogenous PDE, which due to having both sides insulated, we know they are given by \(\phi _{n}\left ( x\right ) =\cos \left ( \frac{n\pi }{L}x\right ) \) where now \(n=0,1,2,\cdots \) and \(\lambda _{n}=\left ( \frac{n\pi }{L}\right ) ^{2}\). That is why the sum above starts from zero and not one. We now substitute (1) back into the given PDE, but remember not to do term-by-term differentiation on the spatial terms.\[ \sum _{n=0}^{\infty }b_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) =k\frac{\partial ^{2}x}{\partial u^{2}}+Q\left ( x,t\right ) \] But \(Q\left ( x,t\right ) \sim \sum _{i=0}^{\infty }q_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \) so the above becomes\[ \sum _{n=0}^{\infty }b_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) =k\frac{\partial ^{2}u}{\partial x^{2}}+\sum _{n=0}^{\infty }q_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \] Multiplying both sides by \(\phi _{m}\left ( x\right ) \) and integrating\[ \int _{0}^{L}\sum _{n=0}^{\infty }b_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) \phi _{m}\left ( x\right ) dx=\int _{0}^{L}k\frac{\partial ^{2}u}{\partial x^{2}}\phi _{m}\left ( x\right ) dx+\int _{0}^{L}\sum _{n=0}^{\infty }q_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \phi _{m}\left ( x\right ) dx \] Applying orthogonality\[ b_{n}^{\prime }\left ( t\right ) \int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx=\int _{0}^{L}k\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx+q_{n}\left ( t\right ) \int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx \] Dividing both sides by \(\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx\) gives\begin{equation} b_{n}^{\prime }\left ( t\right ) =\frac{k\int _{0}^{L}\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx}+q_{n}\left ( t\right ) \tag{1A} \end{equation} We now use Green’s formula to simplify \(\int _{0}^{L}\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx\). We rewrite \(\frac{\partial ^{2}u}{\partial x^{2}}\equiv L\left [ u\right ] \) and let \(\phi _{n}\left ( x\right ) \equiv v\), then\[ \int _{0}^{L}\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx=\int _{0}^{L}vL\left [ u\right ] dx \] But we know from Green’s formula that\[ \int _{0}^{L}\left ( vL\left [ u\right ] -uL\left [ v\right ] \right ) dx=p\left ( v\frac{du}{dx}-u\frac{dv}{dx}\right ) _{0}^{L}\] In this problem \(p=1\), so we solve for \(\int _{0}^{L}vL\left [ u\right ] dx\) (which is really all what we want) from the above and obtain\begin{align*} \int _{0}^{L}vL\left [ u\right ] dx-\int _{0}^{L}uL\left [ v\right ] dx & =\left ( v\frac{du}{dx}-u\frac{dv}{dx}\right ) _{0}^{L}\\ \int _{0}^{L}vL\left [ u\right ] dx & =\left ( v\frac{du}{dx}-u\frac{dv}{dx}\right ) _{0}^{L}+\int _{0}^{L}uL\left [ v\right ] dx \end{align*}
Since we said \(\phi _{n}\left ( x\right ) \equiv v\,\), then we replace these back into the above to make it more explicit\[ \int _{0}^{L}\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx=\left ( \phi _{n}\left ( x\right ) \frac{du}{dx}-u\frac{d\phi _{n}\left ( x\right ) }{dx}\right ) _{0}^{L}+\int _{0}^{L}uL\left [ \phi _{n}\left ( x\right ) \right ] dx \] But \(L\left [ \phi _{n}\left ( x\right ) \right ] =-\lambda _{n}\phi _{n}\left ( x\right ) \) and above becomes\begin{equation} \int _{0}^{L}\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx=\left ( \phi _{n}\left ( x\right ) \frac{du}{dx}-u\frac{d\phi _{n}\left ( x\right ) }{dx}\right ) _{0}^{L}-\lambda _{n}\int _{0}^{L}u\phi _{n}\left ( x\right ) dx \tag{2} \end{equation} We are now ready to substitute boundary conditions. In this problem we know that \begin{align*} \frac{du}{dx}\left ( L,t\right ) & =B\left ( t\right ) \\ \frac{d\phi _{n}\left ( L,t\right ) }{dx} & =\frac{d}{dx}\cos \left ( \frac{n\pi }{L}x\right ) _{x=L}=-\frac{n\pi }{L}\sin \left ( \frac{n\pi }{L}x\right ) _{x=L}=0\\ \phi _{n}\left ( L,t\right ) & =\cos \left ( \frac{n\pi }{L}x\right ) _{x=L}=\cos \left ( n\pi \right ) =\left ( -1\right ) ^{n}\\ \frac{d\phi _{n}\left ( 0,t\right ) }{dx} & =\frac{d}{dx}\cos \left ( \frac{n\pi }{L}x\right ) _{x=0}=0\\ \phi _{n}\left ( 0,t\right ) & =\cos \left ( \frac{n\pi }{L}x\right ) _{x=0}=1\\ \frac{du}{dx}\left ( 0,t\right ) & =A\left ( t\right ) \end{align*}
Now we have all the information to evaluate (2)\begin{align*} \int _{0}^{L}\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx & =\left ( \phi _{n}\left ( L\right ) \frac{du}{dx}\left ( L\right ) -u\left ( L\right ) \frac{d\phi _{n}\left ( L\right ) }{dx}\right ) -\left ( \phi _{n}\left ( 0\right ) \frac{du}{dx}\left ( 0\right ) -u\left ( 0\right ) \frac{d\phi _{n}\left ( 0\right ) }{dx}\right ) \\ & -\lambda _{n}\int _{0}^{L}u\phi _{n}\left ( x\right ) dx \end{align*}
Which becomes\begin{align} \int _{0}^{L}\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx & =\left ( \left ( -1\right ) ^{n}B\left ( t\right ) -0\right ) -\left ( A\left ( t\right ) -0\right ) -\lambda _{n}\int _{0}^{L}u\phi _{n}\left ( x\right ) dx\nonumber \\ & =\left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) -\lambda _{n}\int _{0}^{L}u\phi _{n}\left ( x\right ) dx \tag{3} \end{align}
Now we need to sort out the \(\int _{0}^{L}u\phi _{n}\left ( x\right ) dx\) term above, since \(u\left ( x,t\right ) \) is unknown, so we can’t leave the above as is. But we know from \(u\left ( x,t\right ) \sim \sum _{n=0}^{\infty }b_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \) that \(b_{n}\left ( t\right ) =\frac{\int _{0}^{L}u\phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx}\) by orthogonality. Hence \(\int _{0}^{L}u\phi _{n}\left ( x\right ) dx=b_{n}\left ( t\right ) \int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx\). Using this in (3), we finally found the result for \(\int _{0}^{L}\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx\)\[ \int _{0}^{L}\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx=\left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) -\lambda _{n}b_{n}\left ( t\right ) \int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx \] But \(\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx=\int _{0}^{L}\cos ^{2}\left ( \frac{n\pi }{L}x\right ) dx=\frac{L}{2}\) hence\begin{equation} \int _{0}^{L}\frac{\partial ^{2}u}{\partial x^{2}}\phi _{n}\left ( x\right ) dx=\left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) -\lambda _{n}b_{n}\left ( t\right ) \frac{L}{2} \tag{4} \end{equation} Substituting the above in (1A) gives\begin{align*} b_{n}^{\prime }\left ( t\right ) & =\frac{k\left ( \left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) -\lambda _{n}b_{n}\left ( t\right ) \frac{L}{2}\right ) }{\frac{L}{2}}+q_{n}\left ( t\right ) \\ b_{n}^{\prime }\left ( t\right ) & =\frac{2}{L}k\left ( \left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) -\lambda _{n}b_{n}\left ( t\right ) \frac{L}{2}\right ) +q_{n}\left ( t\right ) \\ & =\frac{2}{L}k\left ( \left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) \right ) -k\lambda _{n}b_{n}\left ( t\right ) +q_{n}\left ( t\right ) \end{align*}
Or\[ b_{n}^{\prime }\left ( t\right ) +k\lambda _{n}b_{n}\left ( t\right ) =q_{n}\left ( t\right ) +\frac{2}{L}k\left ( \left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) \right ) \] Now that we found the differential equation for \(b_{n}\left ( t\right ) \) we solve it. The integrating factor is \(\mu =e^{k\lambda _{n}t}\), hence the solution is\[ \frac{d}{dt}\left ( \mu b_{n}\left ( t\right ) \right ) =\mu q_{n}\left ( t\right ) +\mu \frac{2}{L}k\left ( \left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) \right ) \] Integrating\[ \mu b_{n}\left ( t\right ) =\int \mu q_{n}\left ( t\right ) dt+\int \mu \frac{2}{L}k\left ( \left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) \right ) dt+c \] Or\[ b_{n}\left ( t\right ) =e^{-k\lambda _{n}t}\int e^{k\lambda _{n}t}q_{n}\left ( t\right ) dt+\int e^{k\lambda _{n}t}\frac{2}{L}k\left ( \left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) \right ) dt+ce^{-k\lambda _{n}t}\] The constant of integration \(c\) is \(b_{n}\left ( 0\right ) \), therefore\[ b_{n}\left ( t\right ) =e^{-k\lambda _{n}t}\int e^{k\lambda _{n}t}q_{n}\left ( t\right ) dt+\int e^{k\lambda _{n}t}\frac{2}{L}k\left ( \left ( -1\right ) ^{n}B\left ( t\right ) -A\left ( t\right ) \right ) dt+b_{n}\left ( 0\right ) e^{-k\lambda _{n}t}\] The above could also be written as\[ b_{n}\left ( t\right ) =e^{-k\lambda _{n}t}\int _{0}^{t}e^{k\lambda _{n}s}q_{n}\left ( s\right ) ds+\int _{0}^{t}e^{k\lambda _{n}s}\frac{2}{L}k\left ( \left ( -1\right ) ^{n}B\left ( s\right ) -A\left ( s\right ) \right ) ds+b_{n}\left ( 0\right ) e^{-k\lambda _{n}t}\] Now that we found \(b_{n}\left ( t\right ) \), the last step is to determine \(b_{n}\left ( 0\right ) .\) This is done from initial conditions\[ u\left ( x,0\right ) \sim \sum _{n=0}^{\infty }b_{n}\left ( 0\right ) \phi _{n}\left ( x\right ) \] By orthogonality\[ b_{n}\left ( 0\right ) =\frac{\int _{0}^{L}f\left ( x\right ) \phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx}=\frac{2}{L}\int _{0}^{L}f\left ( x\right ) \cos \left ( \frac{n\pi }{L}x\right ) dx \] This complete the solution. Summary of result
The solution is\[ u\left ( x,t\right ) \sim \sum _{n=0}^{\infty }b_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \] Where\[ b_{n}\left ( t\right ) =e^{-k\lambda _{n}t}\int _{0}^{t}e^{k\lambda _{n}s}q_{n}\left ( s\right ) ds+\int _{0}^{t}e^{k\lambda _{n}s}\frac{2}{L}k\left ( \left ( -1\right ) ^{n}B\left ( s\right ) -A\left ( s\right ) \right ) ds+b_{n}\left ( 0\right ) e^{-k\lambda _{n}t}\] Where \[ b_{n}\left ( 0\right ) =\frac{2}{L}\int _{0}^{L}f\left ( x\right ) \cos \left ( \frac{n\pi }{L}x\right ) dx \] And\[ q_{n}\left ( t\right ) =\frac{2}{L}\int _{0}^{L}Q\left ( x,t\right ) \cos \left ( \frac{n\pi }{L}x\right ) dx \] And\[ \lambda _{n}=\left ( \frac{n\pi }{L}\right ) ^{2}\qquad n=0,1,2,3,\cdots \]
From problem 8.3.3, we found the eigenfunctions \(\phi _{n}\left ( x\right ) \) from the Sturm-Liouville to have weight \[ \sigma =c\rho \] Let \[ u\left ( x,t\right ) \sim \sum _{n=1}^{\infty }b_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \] Substituting the above in the PDE gives\[ \sigma \sum _{i=1}^{\infty }b_{n}^{\prime }\left ( t\right ) \phi _{n}\left ( x\right ) =L\left [ u\right ] +f\left ( x,t\right ) \] Where \(L=\frac{\partial }{\partial x}\left ( K_{0}\frac{\partial }{\partial x}\right ) +q\). Following same procedure using Green’s formula on page 35, we obtain\begin{equation} \sigma \frac{db_{n}\left ( t\right ) }{dt}+k\lambda _{n}b_{n}\left ( t\right ) =f_{n}\left ( t\right ) +\frac{k\sqrt{\lambda _{n}}\left ( \alpha \left ( t\right ) -\left ( -1\right ) ^{n}\beta \left ( t\right ) \right ) }{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx} \tag{1} \end{equation} Where\begin{align*} f\left ( x,t\right ) & =\sum _{n=1}^{\infty }f_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \\ f_{n}\left ( t\right ) & =\frac{\int _{0}^{L}f\left ( x,t\right ) \phi _{n}\left ( x\right ) \sigma dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx} \end{align*}
The solution to (1) is found using integrating factor.\[ \frac{db_{n}\left ( t\right ) }{dt}+\left ( \frac{\lambda _{n}}{\sigma }\right ) b_{n}\left ( t\right ) =\frac{1}{\sigma }f_{n}\left ( t\right ) +\frac{\frac{k}{\sigma }\sqrt{\lambda _{n}}\left ( \alpha \left ( t\right ) -\left ( -1\right ) ^{n}\beta \left ( t\right ) \right ) }{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx}\] Hence \(\mu =e^{\frac{\lambda _{n}}{c\rho }t}\) and the solution becomes\[ b_{n}\left ( t\right ) =e^{-\frac{\lambda _{n}}{\sigma }t}\left ( \frac{1}{\sigma }\int e^{\frac{\lambda _{n}}{\sigma }t}f_{n}\left ( t\right ) dt+\frac{\frac{k}{\sigma }\sqrt{\lambda _{n}}}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx}\int e^{\frac{\lambda _{n}}{\sigma }t}\left ( \alpha \left ( t\right ) -\left ( -1\right ) ^{n}\beta \left ( t\right ) \right ) dt\right ) +ce^{-\frac{\lambda _{n}}{\sigma }t}\] Where \(c\) is found from\[ b_{n}\left ( 0\right ) =c \] And \(b_{n}\left ( 0\right ) \) is found from initial conditions\begin{align*} g\left ( x\right ) & =\sum _{n=1}^{\infty }b_{n}\left ( 0\right ) \phi _{n}\left ( x\right ) \\ b_{n}\left ( 0\right ) & =\frac{\int _{0}^{L}g\left ( x\right ) \phi _{n}\left ( x\right ) \sigma dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx} \end{align*}
This complete the solution. Summary
Solution is\[ u\left ( x,t\right ) \sim \sum _{n=1}^{\infty }b_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \] Where\begin{align*} b_{n}\left ( t\right ) & =e^{-\frac{\lambda _{n}}{\sigma }t}\left ( \frac{1}{\sigma }\int e^{\frac{\lambda _{n}}{c\rho }t}f_{n}\left ( t\right ) dt+\frac{\frac{k}{\sigma }\sqrt{\lambda _{n}}}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx}\int e^{\frac{\lambda _{n}}{\sigma }t}\left ( \alpha \left ( t\right ) -\left ( -1\right ) ^{n}\beta \left ( t\right ) \right ) dt\right ) +b_{n}\left ( 0\right ) e^{-\frac{\lambda _{n}}{\sigma }t}\\ b_{n}\left ( 0\right ) & =\frac{\int _{0}^{L}g\left ( x\right ) \phi _{n}\left ( x\right ) \sigma dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx}\\ \sigma & =c\rho \end{align*}
The first step is to obtain a reference function \(r\left ( x,t\right ) \) where \(u\left ( x,t\right ) =v\left ( x,t\right ) +r\left ( x,t\right ) \). The reference function only needs to satisfy the nonhomogeneous B.C.
We see that\[ r\left ( x,t\right ) =\alpha \left ( t\right ) +\frac{\beta \left ( t\right ) -\alpha \left ( t\right ) }{L}x \] does the job. Now we solve the following PDE\begin{align*} c\rho \frac{\partial v}{\partial t} & =\frac{\partial }{\partial x}\left ( K_{0}\frac{\partial v}{\partial x}\right ) +q\left ( x\right ) v+f\left ( x,t\right ) \\ v\left ( 0,t\right ) & =0\\ v\left ( \pi ,t\right ) & =0\\ v\left ( x,0\right ) & =g\left ( x\right ) -\left ( \alpha \left ( 0\right ) +\frac{\beta \left ( 0\right ) -\alpha \left ( 0\right ) }{L}x\right ) \end{align*}
Using Green’s formula, starting with\[ v\left ( x,t\right ) =\sum _{i=1}^{\infty }b_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \] Where we used \(=\) instead of \(\sim \) above now, since both \(v\left ( x,t\right ) \) and \(\phi _{n}\left ( x\right ) \) satisfy the homogenous B.C., and where \(b_{n}\left ( t\right ) \) satisfies the ODE\begin{equation} \sigma \frac{db_{n}\left ( t\right ) }{dt}+\lambda _{n}b_{n}\left ( t\right ) =f_{n}\left ( t\right ) \tag{1} \end{equation} Where \(\sigma =c\rho \) and\begin{align*} f\left ( x,t\right ) & =\sum _{n=1}^{\infty }f_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \\ f_{n}\left ( t\right ) & =\frac{\int _{0}^{L}f\left ( x,t\right ) \phi _{n}\left ( x\right ) \sigma dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx} \end{align*}
The solution to (1) is found using integrating factor \(\mu =e^{\frac{\lambda _{n}}{\sigma }t}\), hence\[ b_{n}\left ( t\right ) =e^{-\frac{\lambda _{n}}{\sigma }t}\frac{1}{\sigma }\int e^{\frac{\lambda _{n}}{\sigma }t}f_{n}\left ( t\right ) dt+b_{n}\left ( 0\right ) e^{-\frac{\lambda _{n}}{\sigma }t}\] And \(b_{n}\left ( 0\right ) \) is found from initial conditions \(v\left ( x,0\right ) \)\begin{align*} g\left ( x\right ) -\left ( \alpha \left ( 0\right ) +\frac{\beta \left ( 0\right ) -\alpha \left ( 0\right ) }{L}x\right ) & =\sum _{i=1}^{\infty }b_{n}\left ( 0\right ) \phi _{n}\left ( x\right ) \\ b_{n}\left ( 0\right ) & =\frac{\int _{0}^{L}g\left ( x\right ) -\left ( \alpha \left ( 0\right ) +\frac{\beta \left ( 0\right ) -\alpha \left ( 0\right ) }{L}x\right ) \phi _{n}\left ( x\right ) \sigma dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx} \end{align*}
This complete the solution. Summary
Solution is given by\begin{align*} u\left ( x,t\right ) & =\left ( \sum _{i=1}^{\infty }b_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \right ) +r\left ( x,t\right ) \\ & =\left ( \sum _{i=1}^{\infty }b_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \right ) +\alpha \left ( t\right ) +\frac{\beta \left ( t\right ) -\alpha \left ( t\right ) }{L}x \end{align*}
Where\[ b_{n}\left ( t\right ) =e^{-\frac{\lambda _{n}}{\sigma }t}\frac{1}{\sigma }\int e^{\frac{\lambda _{n}}{\sigma }t}f_{n}\left ( t\right ) dt+b_{n}\left ( 0\right ) e^{-\frac{\lambda _{n}}{\sigma }t}\] And\[ b_{n}\left ( 0\right ) =\frac{\int _{0}^{L}g\left ( x\right ) -\left ( \alpha \left ( 0\right ) +\frac{\beta \left ( 0\right ) -\alpha \left ( 0\right ) }{L}x\right ) \phi _{n}\left ( x\right ) \sigma dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx}\] And\[ f_{n}\left ( t\right ) =\frac{\int _{0}^{L}f\left ( x,t\right ) \phi _{n}\left ( x\right ) \sigma dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) \sigma dx}\] Where \(\sigma =c\rho \)
Let \[ u\left ( x,t\right ) =\sum _{n=1}^{\infty }A_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \] Where we used \(=\) instead of \(\sim \) above, since the PDE given has homogeneous B.C. We know that \(\phi _{n}\left ( x\right ) =\sin \left ( \sqrt{\lambda _{n}}x\right ) \) for \(n=1,2,3,\cdots \) where \(\lambda _{n}=\left ( \frac{n\pi }{L}\right ) ^{2}\). Substituting the above in the given PDE gives\[ \sum _{n=1}^{\infty }A_{n}^{\prime \prime }\left ( t\right ) \phi _{n}\left ( x\right ) =c^{2}\sum _{n=1}^{\infty }A_{n}\left ( t\right ) \frac{d^{2}\phi _{n}\left ( x\right ) }{dx^{2}}+Q\left ( x,t\right ) \] But \(Q\left ( x,t\right ) =\sum _{n=1}^{\infty }q_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \), hence the above becomes\[ \sum _{n=1}^{\infty }A_{n}^{\prime \prime }\left ( t\right ) \phi _{n}\left ( x\right ) =c^{2}\sum _{n=1}^{\infty }A_{n}\left ( t\right ) \frac{d^{2}\phi _{n}\left ( x\right ) }{dx^{2}}+\sum _{n=1}^{\infty }g_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \] But \(\frac{d^{2}\phi _{n}\left ( x\right ) }{dx^{2}}=-\lambda _{n}\phi _{n}\left ( x\right ) \), hence\[ \sum _{n=1}^{\infty }A_{n}^{\prime \prime }\left ( t\right ) \phi _{n}\left ( x\right ) =-c^{2}\sum _{n=1}^{\infty }\lambda _{n}A_{n}\left ( t\right ) \phi _{n}\left ( x\right ) +\sum _{n=1}^{\infty }g_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \] Multiplying both sides by \(\phi _{m}\left ( x\right ) \) and integrating gives\begin{align*} \int _{0}^{L}\sum _{n=1}^{\infty }A_{n}^{\prime \prime }\left ( t\right ) \phi _{m}\left ( x\right ) \phi _{n}\left ( x\right ) dx & =-c^{2}\int _{0}^{L}\sum _{n=1}^{\infty }\lambda _{n}A_{n}\left ( t\right ) \phi _{m}\left ( x\right ) \phi _{n}\left ( x\right ) dx+\int _{0}^{L}\sum _{n=1}^{\infty }g_{n}\left ( t\right ) \phi _{m}\left ( x\right ) \phi _{n}\left ( x\right ) dx\\ A_{n}^{\prime \prime }\left ( t\right ) \int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx & =-c^{2}\lambda _{n}A_{n}\left ( t\right ) \int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx+g_{n}\left ( t\right ) \int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx \end{align*}
Hence\[ A_{n}^{\prime \prime }\left ( t\right ) +c^{2}\lambda _{n}A_{n}\left ( t\right ) =g_{n}\left ( t\right ) \] Now we solve the above ODE. Let solution be \[ A_{n}\left ( t\right ) =A_{n}^{h}\left ( t\right ) +A_{n}^{p}\left ( t\right ) \] Which is the sum of the homogenous and particular solutions. The homogenous solution is \[ A_{n}^{h}\left ( t\right ) =c_{1_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) +c_{2_{n}}\sin \left ( c\sqrt{\lambda _{n}}t\right ) \] And the particular solution depends on \(q_{n}\left ( t\right ) \). Once we find \(q_{n}\left ( t\right ) \), we plug-in everything back into \(u\left ( x,t\right ) =\sum _{n=1}^{\infty }A_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \) and then use initial conditions to find \(c_{1_{n}},c_{2_{n}}\), the two constant of integrations. We will do this in the second part.
Now we are given that \(Q\left ( x,t\right ) =g\left ( x\right ) \cos \left ( \omega t\right ) \). Hence\[ g_{n}\left ( t\right ) =\frac{\int _{0}^{L}Q\left ( x,t\right ) \phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx}=\frac{\cos \left ( \omega t\right ) \int _{0}^{L}g\left ( x\right ) \phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx}=\cos \left ( \omega t\right ) \gamma _{n}\] Where\[ \gamma _{n}=\frac{\int _{0}^{L}g\left ( x\right ) \phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx}\] is constant that depends on \(n\). Now we use the above in result found in part (a)\begin{equation} A_{n}^{\prime \prime }\left ( t\right ) +c^{2}\lambda _{n}A_{n}\left ( t\right ) =\gamma _{n}\cos \left ( \omega t\right ) \tag{1} \end{equation} We know the homogenous solution from part (a). \[ A_{n}^{h}\left ( t\right ) =c_{1_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) +c_{2_{n}}\sin \left ( c\sqrt{\lambda _{n}}t\right ) \] We now need to find the particular solution. Will solve using method of undetermined coefficients.
Case 1 \(\omega \neq c\sqrt{\lambda _{n}}\) (no resonance)
We can now guess \[ A_{n}^{p}\left ( t\right ) =z_{1}\cos \left ( \omega t\right ) +z_{2}\sin \left ( \omega t\right ) \] Plugging this back into (1) gives\begin{align*} \left ( z_{1}\cos \left ( \omega t\right ) +z_{2}\sin \left ( \omega t\right ) \right ) ^{\prime \prime }+c^{2}\lambda _{n}\left ( z_{1}\cos \left ( \omega t\right ) +z_{2}\sin \left ( \omega t\right ) \right ) & =\gamma _{n}\cos \left ( \omega t\right ) \\ \left ( -\omega z_{1}\sin \left ( \omega t\right ) +\omega z_{2}\cos \left ( \omega t\right ) \right ) ^{\prime }+c^{2}\lambda _{n}\left ( z_{1}\cos \left ( \omega t\right ) +z_{2}\sin \left ( \omega t\right ) \right ) & =\gamma _{n}\cos \left ( \omega t\right ) \\ -\omega ^{2}z_{1}\cos \left ( \omega t\right ) -\omega ^{2}z_{2}\sin \left ( \omega t\right ) +c^{2}\lambda _{n}\left ( z_{1}\cos \left ( \omega t\right ) +z_{2}\sin \left ( \omega t\right ) \right ) & =\gamma _{n}\cos \left ( \omega t\right ) \end{align*}
Collecting terms\[ \cos \left ( \omega t\right ) \left ( -\omega ^{2}z_{1}+c^{2}\lambda _{n}z_{1}\right ) +\sin \left ( \omega t\right ) \left ( -\omega ^{2}z_{2}+c^{2}\lambda _{n}z_{2}\right ) =\gamma _{n}\cos \left ( \omega t\right ) \] Therefore we obtain two equations in two unknowns\begin{align*} -\omega ^{2}z_{1}+c^{2}\lambda _{n}z_{1} & =\gamma _{n}\\ -\omega ^{2}z_{2}+c^{2}\lambda _{n}z_{2} & =0 \end{align*}
From the second equation, \(z_{2}=0\) and from the first equation\begin{align*} z_{1}\left ( c^{2}\lambda _{n}-\omega ^{2}\right ) & =\gamma _{n}\\ z_{1} & =\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}} \end{align*}
Hence \begin{align*} A_{n}^{p}\left ( t\right ) & =z_{1}\cos \left ( \omega t\right ) +z_{2}\sin \left ( \omega t\right ) \\ & =\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\cos \left ( \omega t\right ) \end{align*}
Therefore\begin{align*} A_{n}\left ( t\right ) & =A_{n}^{h}\left ( t\right ) +A_{n}^{p}\left ( t\right ) \\ & =c_{1_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) +c_{2_{n}}\sin \left ( c\sqrt{\lambda _{n}}t\right ) +\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\cos \left ( \omega t\right ) \end{align*}
Now we need to find \(c_{1_{n}},c_{2_{n}}\). Since\begin{align*} u\left ( x,t\right ) & =\sum _{n=1}^{\infty }A_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \\ & =\sum _{n=1}^{\infty }\left ( c_{1_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) +c_{2_{n}}\sin \left ( c\sqrt{\lambda _{n}}t\right ) +\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\cos \left ( \omega t\right ) \right ) \sin \left ( \frac{n\pi }{L}x\right ) \end{align*}
At \(t=0\) the above becomes\begin{align*} f\left ( x\right ) & =\sum _{n=1}^{\infty }\left ( c_{1_{n}}+\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\right ) \sin \left ( \frac{n\pi }{L}x\right ) \\ & =\sum _{n=1}^{\infty }c_{1_{n}}\sin \left ( \frac{n\pi }{L}x\right ) +\sum _{n=1}^{\infty }\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\sin \left ( \frac{n\pi }{L}x\right ) \end{align*}
Applying orthogonality\begin{align*} \int _{0}^{L}f\left ( x\right ) \sin \left ( \frac{m\pi }{L}x\right ) dx & =\int _{0}^{L}\sum _{n=1}^{\infty }c_{1_{n}}\sin \left ( \frac{n\pi }{L}x\right ) \sin \left ( \frac{m\pi }{L}x\right ) dx+\int _{0}^{L}\sum _{n=1}^{\infty }\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\sin \left ( \frac{n\pi }{L}x\right ) \sin \left ( \frac{m\pi }{L}x\right ) dx\\ \int _{0}^{L}f\left ( x\right ) \sin \left ( \frac{m\pi }{L}x\right ) dx & =c_{1_{n}}\int _{0}^{L}\sin ^{2}\left ( \frac{n\pi }{L}x\right ) dx+\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\int _{0}^{L}\sin ^{2}\left ( \frac{n\pi }{L}x\right ) dx \end{align*}
Rearranging\begin{align*} \int _{0}^{L}f\left ( x\right ) \sin \left ( \frac{m\pi }{L}x\right ) dx-\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\int _{0}^{L}\sin ^{2}\left ( \frac{n\pi }{L}x\right ) dx & =c_{1_{n}}\int _{0}^{L}\sin ^{2}\left ( \frac{n\pi }{L}x\right ) dx\\ c_{1_{n}} & =\frac{\int _{0}^{L}f\left ( x\right ) \sin \left ( \frac{m\pi }{L}x\right ) dx}{\int _{0}^{L}\sin ^{2}\left ( \frac{n\pi }{L}x\right ) dx}-\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\\ & =\frac{2}{L}\int _{0}^{L}f\left ( x\right ) \sin \left ( \frac{m\pi }{L}x\right ) dx-\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}} \end{align*}
We now need to find \(c_{2_{n}}\). For this we need to differentiate the solution once.\[ \frac{\partial u\left ( x,t\right ) }{\partial t}=\sum _{n=1}^{\infty }\left ( -c\sqrt{\lambda _{n}}c_{1_{n}}\sin \left ( c\sqrt{\lambda _{n}}t\right ) +c\sqrt{\lambda _{n}}c_{2_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) -\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\omega \sin \left ( \omega t\right ) \right ) \sin \left ( \frac{n\pi }{L}x\right ) \] Applying initial conditions \(\frac{\partial u\left ( x,0\right ) }{\partial t}=0\) gives\[ 0=\sum _{n=1}^{\infty }c\sqrt{\lambda _{n}}c_{2_{n}}\sin \left ( \frac{n\pi }{L}x\right ) \] Hence \[ c_{2_{n}}=0 \] Therefore the final solution is\[ A_{n}\left ( t\right ) =c_{1_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) +\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\cos \left ( \omega t\right ) \] And\[ u\left ( x,t\right ) =\sum _{n=1}^{\infty }A_{n}\left ( t\right ) \sin \left ( \frac{n\pi }{L}x\right ) \] Where \[ c_{1_{n}}=\frac{2}{L}\int _{0}^{L}f\left ( x\right ) \sin \left ( \frac{m\pi }{L}x\right ) dx-\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\] Case 2 \(\omega =c\sqrt{\lambda _{n}}\) Resonance case. Now we can’t guess \(A_{n}^{p}\left ( t\right ) =z_{1}\cos \left ( \omega t\right ) +z_{2}\sin \left ( \omega t\right ) \) so we have to use \[ A_{n}^{p}\left ( t\right ) =z_{1}t\cos \left ( \omega t\right ) +z_{2}t\sin \left ( \omega t\right ) \] Substituting this in \(A_{n}^{\prime \prime }\left ( t\right ) +c^{2}\lambda _{n}A_{n}\left ( t\right ) =\gamma _{n}\cos \left ( \omega t\right ) \) gives\begin{equation} \left ( z_{1}t\cos \left ( \omega t\right ) +z_{2}t\sin \left ( \omega t\right ) \right ) ^{\prime \prime }+c^{2}\lambda _{n}\left ( z_{1}t\cos \left ( \omega t\right ) +z_{2}t\sin \left ( \omega t\right ) \right ) =\gamma _{n}\cos \left ( \omega t\right ) \tag{2} \end{equation} But \begin{align*} \left ( z_{1}t\cos \left ( \omega t\right ) +z_{2}t\sin \left ( \omega t\right ) \right ) ^{\prime \prime } & =\left ( z_{1}\cos \left ( \omega t\right ) -z_{1}\omega t\sin \left ( \omega t\right ) +z_{2}\sin \left ( \omega t\right ) +z_{2}\omega t\cos \left ( \omega t\right ) \right ) ^{\prime }\\ & =-z_{1}\omega \sin \left ( \omega t\right ) -\left ( z_{1}\omega \sin \left ( \omega t\right ) +z_{1}\omega ^{2}t\cos \left ( \omega t\right ) \right ) \\ & +z_{2}\omega \cos \left ( \omega t\right ) +\left ( z_{2}\omega \cos \left ( \omega t\right ) -z_{2}\omega ^{2}t\sin \left ( \omega t\right ) \right ) \\ & =-2z_{1}\omega \sin \left ( \omega t\right ) -z_{1}\omega ^{2}t\cos \left ( \omega t\right ) +2z_{2}\omega \cos \left ( \omega t\right ) -z_{2}\omega ^{2}t\sin \left ( \omega t\right ) \end{align*}
Hence (2) becomes\[ -2z_{1}\omega \sin \left ( \omega t\right ) -z_{1}\omega ^{2}t\cos \left ( \omega t\right ) +2z_{2}\omega \cos \left ( \omega t\right ) -z_{2}\omega ^{2}t\sin \left ( \omega t\right ) +c^{2}\lambda _{n}\left ( z_{1}t\cos \left ( \omega t\right ) +z_{2}t\sin \left ( \omega t\right ) \right ) =\gamma _{n}\cos \left ( \omega t\right ) \] Comparing coefficients we see that \(2z_{2}\omega =\gamma _{n}\) or \[ z_{2}=\frac{\gamma _{n}}{2\omega }\] And \(z_{1}=0\). Therefore \[ A_{n}^{p}\left ( t\right ) =\frac{\gamma _{n}}{2\omega }t\sin \left ( \omega t\right ) \] Therefore\begin{align*} A_{n}\left ( t\right ) & =A_{n}^{h}\left ( t\right ) +A_{n}^{p}\left ( t\right ) \\ & =c_{1_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) +c_{2_{n}}\sin \left ( c\sqrt{\lambda _{n}}t\right ) +\frac{\gamma _{n}}{2c\sqrt{\lambda _{n}}}t\sin \left ( \omega t\right ) \end{align*}
We now can find \(c_{1_{n}},c_{2_{n}}\) from initial conditions.\begin{align} u\left ( x,t\right ) & =\sum _{n=1}^{\infty }A_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \nonumber \\ & =\sum _{n=1}^{\infty }\left ( c_{1_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) +c_{2_{n}}\sin \left ( c\sqrt{\lambda _{n}}t\right ) +\frac{\gamma _{n}}{2c\sqrt{\lambda _{n}}}t\sin \left ( \omega t\right ) \right ) \sin \left ( \frac{n\pi }{L}x\right ) \tag{4} \end{align}
At \(t=0\)\begin{align*} f\left ( x\right ) & =\sum _{n=1}^{\infty }c_{1_{n}}\sin \left ( \frac{n\pi }{L}x\right ) \\ c_{1n} & =\frac{2}{L}\int _{0}^{L}f\left ( x\right ) \sin \left ( \frac{n\pi }{L}x\right ) dx \end{align*}
Taking time derivative of (4) and setting it to zero will give \(c_{2n}\). Since initial speed is zero then \(c_{2_{n}}=0\). Hence\[ A_{n}\left ( t\right ) =c_{1_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) +\frac{\gamma _{n}}{2c\sqrt{\lambda _{n}}}t\sin \left ( \omega t\right ) \] This completes the solution.
Summary of solution
The solution is given by\[ u\left ( x,t\right ) =\sum _{n=1}^{\infty }A_{n}\left ( t\right ) \phi _{n}\left ( x\right ) \] Case \(\omega \neq c\sqrt{\lambda _{n}}\)\[ A_{n}\left ( t\right ) =c_{1_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) +\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\cos \left ( \omega t\right ) \] And\[ c_{1_{n}}=\frac{2}{L}\int _{0}^{L}f\left ( x\right ) \sin \left ( \frac{m\pi }{L}x\right ) dx-\frac{\gamma _{n}}{c^{2}\lambda _{n}-\omega ^{2}}\] And\[ \gamma _{n}=\frac{\int _{0}^{L}g\left ( x\right ) \phi _{n}\left ( x\right ) dx}{\int _{0}^{L}\phi _{n}^{2}\left ( x\right ) dx}\] And \(\lambda _{n}=\left ( \frac{n\pi }{L}\right ) ^{2},n=1,2,3,\)
Case \(\omega =c\sqrt{\lambda _{n}}\) (resonance)\[ A_{n}\left ( t\right ) =c_{1_{n}}\cos \left ( c\sqrt{\lambda _{n}}t\right ) +\frac{\gamma _{n}}{2c\sqrt{\lambda _{n}}}t\sin \left ( \omega t\right ) \] And\[ c_{1_{n}}=\frac{2}{L}\int _{0}^{L}f\left ( x\right ) \sin \left ( \frac{n\pi }{L}x\right ) dx \]
The solution to the corresponding homogeneous PDE
\[ \frac{\partial ^{2}u}{\partial t^{2}}=c^{2}\nabla ^{2}\] Is \[ u\left ( r,\theta ,t\right ) =\sum _{n=0}^{\infty }\sum _{m=1}^{\infty }a_{n}\left ( t\right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) \cos \left ( n\theta \right ) +\sum _{n=1}^{\infty }\sum _{m=1}^{\infty }a_{n}\left ( t\right ) J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) \sin \left ( n\theta \right ) \] Where \(\lambda _{nm}\) are found by solving roots of \(J_{n}\left ( \sqrt{\lambda _{nm}}a\right ) =0\). To make things simpler, we will write \[ u\left ( r,\theta ,t\right ) =\sum _{i}a_{i}\left ( t\right ) \Phi _{i}\left ( r,\theta \right ) \] Where the above means the double sum of all eigenvalues \(\lambda _{i}\). So \(\Phi _{i}\left ( r,\theta \right ) \) represents \(J_{n}\left ( \sqrt{\lambda _{nm}}r\right ) \left \{ \cos \left ( n\theta \right ) ,\sin \left ( \theta \right ) \right \} \) combined. So double sum is implied everywhere. Given this, we now expand the source term\[ Q\left ( r,\theta ,t\right ) =\sum _{i}q_{i}\left ( t\right ) \Phi _{i}\left ( r,\theta \right ) \] And the original PDE becomes\begin{equation} \sum _{i}a_{i}^{\prime \prime }\left ( t\right ) \Phi \left ( \lambda _{i}\right ) =c^{2}\sum _{i}a_{i}\left ( t\right ) \nabla ^{2}\left ( \Phi _{i}\left ( r,\theta \right ) \right ) +\sum _{i}q_{i}\left ( t\right ) \Phi _{i}\left ( r,\theta \right ) \tag{1} \end{equation} But \[ \nabla ^{2}\left ( \Phi _{i}\left ( r,\theta \right ) \right ) =-\lambda _{i}\Phi _{i}\left ( r,\theta \right ) \] Hence (1) becomes\begin{align*} \sum _{i}a_{i}^{\prime \prime }\left ( t\right ) \Phi _{i}\left ( r,\theta \right ) +c^{2}\lambda _{i}a_{i}\left ( t\right ) \Phi _{i}\left ( r,\theta \right ) & =\sum _{i}q_{i}\left ( t\right ) \Phi _{i}\left ( r,\theta \right ) \\ \sum _{i}\left ( a_{i}^{\prime \prime }\left ( t\right ) +c^{2}\lambda _{i}a_{i}\left ( t\right ) \right ) \Phi _{i}\left ( r,\theta \right ) & =\sum _{i}q_{i}\left ( t\right ) \Phi _{i}\left ( r,\theta \right ) \end{align*}
Applying orthogonality gives\[ a_{i}^{\prime \prime }\left ( t\right ) +c^{2}\lambda _{i}a_{i}\left ( t\right ) =q_{i}\left ( t\right ) \] Where \[ q_{i}\left ( t\right ) =\frac{\int _{0}^{a}\int _{-\pi }^{\pi }Q\left ( r,\theta ,t\right ) \Phi _{i}\left ( r,\theta \right ) rdrd\theta }{\int _{0}^{a}\int _{-\pi }^{\pi }\Phi _{i}^{2}\left ( r,\theta \right ) rdrd\theta }\] The solution to the homogenous ODE is\[ a_{i}^{h}\left ( t\right ) =A_{i}\cos \left ( c\sqrt{\lambda _{i}}t\right ) +B_{i}\sin \left ( c\sqrt{\lambda _{i}}t\right ) \] And the particular solution is found if we know what \(Q\left ( r,\theta ,t\right ) \) and hence \(q_{i}\left ( t\right ) \). For now, lets call the particular solution as \(a_{i}^{p}\left ( t\right ) \). Hence the solution for \(a_{i}\left ( t\right ) \) is\[ a_{i}\left ( t\right ) =A_{i}\cos \left ( c\sqrt{\lambda _{i}}t\right ) +B_{i}\sin \left ( c\sqrt{\lambda _{i}}t\right ) +a_{i}^{p}\left ( t\right ) \] Plugging the above into the \(u\left ( r,\theta ,t\right ) =\sum _{i}a_{i}\left ( t\right ) \Phi _{i}\left ( r,\theta \right ) \), gives\begin{equation} u\left ( r,\theta ,t\right ) =\sum _{i}\left ( A_{i}\cos \left ( c\sqrt{\lambda _{i}}t\right ) +B_{i}\sin \left ( c\sqrt{\lambda _{i}}t\right ) +a_{i}^{p}\left ( t\right ) \right ) \Phi _{i}\left ( r,\theta \right ) \tag{2} \end{equation} We now find \(A_{i},B_{i}\) from initial conditions. At \(t=0\)\[ f\left ( r,\theta \right ) =\sum _{i}\left ( A_{i}+a_{i}^{p}\left ( 0\right ) \right ) \Phi _{i}\left ( r,\theta \right ) \] Applying orthogonality\begin{align*} \int _{0}^{a}\int _{-\pi }^{\pi }f\left ( r,\theta \right ) \Phi _{j}\left ( r,\theta \right ) rdrd\theta & =\int _{0}^{a}\int _{-\pi }^{\pi }\sum _{i}\left ( A_{i}+a_{i}^{p}\left ( 0\right ) \right ) \Phi _{i}\left ( r,\theta \right ) \Phi _{j}\left ( r,\theta \right ) rdrd\theta \\ \int _{0}^{a}\int _{-\pi }^{\pi }f\left ( r,\theta \right ) \Phi _{j}\left ( r,\theta \right ) rdrd\theta & =\left ( A_{j}+a_{j}^{p}\left ( 0\right ) \right ) \int _{0}^{a}\int _{-\pi }^{\pi }\Phi _{j}^{2}\left ( r,\theta \right ) rdrd\theta \\ \left ( A_{i}+a_{i}^{p}\left ( 0\right ) \right ) & =\frac{\int _{0}^{a}\int _{-\pi }^{\pi }f\left ( r,\theta \right ) \Phi _{i}\left ( r,\theta \right ) rdrd\theta }{\int _{0}^{a}\int _{-\pi }^{\pi }\Phi _{i}^{2}\left ( r,\theta \right ) rdrd\theta } \end{align*}
Taking time derivative of (2)\[ \frac{\partial u\left ( r,\theta ,t\right ) }{\partial t}=\sum _{i}\left ( -A_{i}c\sqrt{\lambda _{i}}\sin \left ( c\sqrt{\lambda _{i}}t\right ) +c\sqrt{\lambda _{i}}B_{i}\cos \left ( c\sqrt{\lambda _{i}}t\right ) +\frac{da_{i}^{p}\left ( t\right ) }{dt}\right ) \Phi _{i}\left ( r,\theta \right ) \] At \(t=0\)\[ 0=\sum _{i}\left ( c\sqrt{\lambda _{i}}B_{i}+\frac{da_{i}^{p}\left ( 0\right ) }{dt}\right ) \Phi _{i}\left ( r,\theta \right ) \] Hence \(B_{i}=0\). Therefore the final solution is\[ u\left ( r,\theta ,t\right ) =\sum _{i}\left ( A_{i}\cos \left ( c\sqrt{\lambda _{i}}t\right ) +a_{i}^{p}\left ( t\right ) \right ) \Phi _{i}\left ( r,\theta \right ) \] Where\[ \left ( A_{i}+a_{i}^{p}\left ( 0\right ) \right ) =\frac{\int _{0}^{a}\int _{-\pi }^{\pi }f\left ( r,\theta \right ) \Phi _{i}\left ( r,\theta \right ) rdrd\theta }{\int _{0}^{a}\int _{-\pi }^{\pi }\Phi _{i}^{2}\left ( r,\theta \right ) rdrd\theta }\] This complete the solution.