Separation of Variables: Difference between revisions
From biophysics wiki
No edit summary |
No edit summary |
||
| (24 intermediate revisions by the same user not shown) | |||
| Line 15: | Line 15: | ||
\frac{v''(t)}{v(t)}=c^2 \frac{w''(x)}{w(x)} | \frac{v''(t)}{v(t)}=c^2 \frac{w''(x)}{w(x)} | ||
\end{align} | \end{align} | ||
Now comes the key idea that | Now comes the key idea that allows us to solve the equation. The left side of the equation is a function of $t$ only, and the right side of the equation depends only on $x$. The only way this is possible is when both are constant | ||
\begin{align} | \begin{align} | ||
\frac{v''(t)}{v(t)}=c^2 \frac{w''(x)}{w(x)}=\lambda | \frac{v''(t)}{v(t)}=c^2 \frac{w''(x)}{w(x)}=\lambda | ||
| Line 23: | Line 23: | ||
Case $\lambda =0$ | Case $\lambda =0$ | ||
\begin{align} | \begin{align} | ||
v''(t)=0 \Rightarrow v(t)=A+Bt \\ | v''(t)&=0 \Rightarrow v(t)=A+Bt \\ | ||
w''(t)=0 \Rightarrow w(x)=C+Dx | w''(t)&=0 \Rightarrow w(x)=C+Dx | ||
\end{align} | \end{align} | ||
Case $\lambda = \beta^2 > 0$ | Case $\lambda = \beta^2 > 0$ | ||
\begin{align} | \begin{align} | ||
v''(t)=\beta^2 v(t) \Rightarrow v(t)= | v''(t)&=\beta^2c^2 v(t) \Rightarrow v(t)=Ae^{\beta c t} + Be^{-\beta c t} \\ | ||
w''( | w''(x)&=\beta^2 \Rightarrow w(x)=v(t)=Ce^{\beta x} + De^{-\beta x} | ||
\end{align} | \end{align} | ||
Case $\lambda = \beta^2 < 0$ | Case $\lambda = -\beta^2 < 0$ | ||
\begin{align} | \begin{align} | ||
v''(t)=\beta^2 v(t) \Rightarrow v(t)=sin(\beta t) +cos(\beta t) \\ | v''(t)&=-\beta^2c^2 v(t) \Rightarrow v(t)=A sin(\beta c t) +B cos(\beta c t) \\ | ||
w''( | w''(x)&=-\beta^2 \Rightarrow w(x)=C sin (\beta x ) +D cos (\beta x) | ||
\end{align} | \end{align} | ||
For PDE problems with so called Dirichlet boundary conditions we have | |||
<div style="background:#FEF5CA;border:1px solid #797979;border-radius:10px;padding:5px 15px 5px 15px;"> | |||
\begin{align} | |||
u(0,t)=u(L,t)=0 | |||
\end{align} | |||
</div> | |||
For $\lambda$ smaller than one and Dirichlet boundery conditions the solution becomes | |||
\begin{align} | |||
w(0)=C \, sin (\beta 0 ) + D \, cos (\beta 0)=D=0\\ | |||
C \, sin (\beta L ) =0\\ \label{dirichlet} | |||
\end{align} | |||
We are not interested in the trivial case $C=0$ so the argument of the $sin()$ must be a multiple of $\pi$ to satisfy equation \ref{dirichlet} | |||
\begin{align} | |||
\beta L &= n \pi \hspace{1cm} \text{for }(n=1,2,3, \dots) \\ | |||
\lambda_n &=\beta_n^2= \left( \frac{ n \pi }{L} \right)^2 \\ | |||
\end{align} | |||
So there are an infinite number of solutions to this problem, one for each $n$. They are | |||
\begin{align} | |||
u_n(x,t)=w_n(x) \cdot v_n(t)=\left( A_n \, cos \frac{n \pi ct}{L} + B_n \, sin \frac{n \pi ct}{L} \right) \, sin \frac{n \pi x}{L} | |||
\end{align} | |||
Since the wave equation is linear, a sum of solutions is again a solution for any finite sum | |||
<div style="background:#FEF5CA;border:1px solid #797979;border-radius:10px;padding:5px 15px 5px 15px;"> | |||
\begin{align} | |||
u(x,t)=\sum_n \left( A_n \, cos \frac{n \pi ct}{L} + B_n \, sin \frac{n \pi ct}{L} \right) \, sin \frac{n \pi x}{L} \label{sol} | |||
\end{align} | |||
</div> | |||
With the notion of fourier series this result can satisfy arbitrary initial conditions | |||
<div style="background:#FEF5CA;border:1px solid #797979;border-radius:10px;padding:5px 15px 5px 15px;"> | |||
\begin{align} | |||
u(x,0)=\phi(x) \hspace{1cm} u_t(x,0)=\psi(x)\\ | |||
\end{align} | |||
</div> | |||
The derivative of $u(x,t)$ with respect to time is | |||
\begin{align} | |||
u_t(x,t)=\sum_n \left(\frac{n \pi c}{L} \, A_n \, -sin \frac{n \pi ct}{L} +\frac{n \pi c}{L} \, B_n \, cos \frac{n \pi ct}{L} \right) \, sin \frac{n \pi x}{L} + \left( A_n \, cos \frac{n \pi ct}{L} + B_n \, sin \frac{n \pi ct}{L} \right)\frac{n \pi c}{L} \, cos \frac{n \pi x}{L} | |||
\end{align} | |||
so we get at $t=0$ | |||
\begin{align} | |||
u_t(x,0)=\sum_n \frac{n \pi c}{L} \, B_n \, sin \frac{n \pi x}{L} | |||
\end{align} | |||
and we can devolp the initial conditions $\phi,\psi$ into a fourier series | |||
<div style="background:#FEF5CA;border:1px solid #797979;border-radius:10px;padding:5px 15px 5px 15px;"> | |||
\begin{align} | |||
\phi(x) &= \sum_n A_n \, sin\frac{n \pi x}{L}\\ | |||
\psi(x) &= \sum_n \frac{n \pi c}{L} \, B_n \, sin \frac{n \pi x}{L} | |||
\end{align} | |||
</div> | |||
The solution \ref{sol} is thus quiet genereal. | |||
Latest revision as of 12:07, 3 March 2013
Separation of Variables is the most common approach to solve linear PDEs. The idea is that the solution is a product of functions that depend on one variable only \begin{align} u(x,t)=v(t)\cdot w(x) \end{align} To introduce the method we solve the wave equation by separation of variables \begin{align} u_{tt}=c^2u_{xx} \end{align} If we plug in the product we get \begin{align} v(t)w(x)=c^2v(t)w(x) \end{align} separating variables we have \begin{align} \frac{v(t)}{v(t)}=c^2 \frac{w(x)}{w(x)} \end{align} Now comes the key idea that allows us to solve the equation. The left side of the equation is a function of $t$ only, and the right side of the equation depends only on $x$. The only way this is possible is when both are constant \begin{align} \frac{v(t)}{v(t)}=c^2 \frac{w(x)}{w(x)}=\lambda \end{align} Lambda can be zero, positive or negative
Case $\lambda =0$ \begin{align} v(t)&=0 \Rightarrow v(t)=A+Bt \\ w(t)&=0 \Rightarrow w(x)=C+Dx \end{align} Case $\lambda = \beta^2 > 0$ \begin{align} v(t)&=\beta^2c^2 v(t) \Rightarrow v(t)=Ae^{\beta c t} + Be^{-\beta c t} \\ w(x)&=\beta^2 \Rightarrow w(x)=v(t)=Ce^{\beta x} + De^{-\beta x} \end{align} Case $\lambda = -\beta^2 < 0$ \begin{align} v(t)&=-\beta^2c^2 v(t) \Rightarrow v(t)=A sin(\beta c t) +B cos(\beta c t) \\ w(x)&=-\beta^2 \Rightarrow w(x)=C sin (\beta x ) +D cos (\beta x) \end{align}
For PDE problems with so called Dirichlet boundary conditions we have
\begin{align} u(0,t)=u(L,t)=0 \end{align}
For $\lambda$ smaller than one and Dirichlet boundery conditions the solution becomes \begin{align} w(0)=C \, sin (\beta 0 ) + D \, cos (\beta 0)=D=0\\ C \, sin (\beta L ) =0\\ \label{dirichlet} \end{align} We are not interested in the trivial case $C=0$ so the argument of the $sin()$ must be a multiple of $\pi$ to satisfy equation \ref{dirichlet} \begin{align} \beta L &= n \pi \hspace{1cm} \text{for }(n=1,2,3, \dots) \\ \lambda_n &=\beta_n^2= \left( \frac{ n \pi }{L} \right)^2 \\ \end{align} So there are an infinite number of solutions to this problem, one for each $n$. They are \begin{align} u_n(x,t)=w_n(x) \cdot v_n(t)=\left( A_n \, cos \frac{n \pi ct}{L} + B_n \, sin \frac{n \pi ct}{L} \right) \, sin \frac{n \pi x}{L} \end{align} Since the wave equation is linear, a sum of solutions is again a solution for any finite sum
\begin{align} u(x,t)=\sum_n \left( A_n \, cos \frac{n \pi ct}{L} + B_n \, sin \frac{n \pi ct}{L} \right) \, sin \frac{n \pi x}{L} \label{sol} \end{align}
With the notion of fourier series this result can satisfy arbitrary initial conditions
\begin{align} u(x,0)=\phi(x) \hspace{1cm} u_t(x,0)=\psi(x)\\ \end{align}
The derivative of $u(x,t)$ with respect to time is \begin{align} u_t(x,t)=\sum_n \left(\frac{n \pi c}{L} \, A_n \, -sin \frac{n \pi ct}{L} +\frac{n \pi c}{L} \, B_n \, cos \frac{n \pi ct}{L} \right) \, sin \frac{n \pi x}{L} + \left( A_n \, cos \frac{n \pi ct}{L} + B_n \, sin \frac{n \pi ct}{L} \right)\frac{n \pi c}{L} \, cos \frac{n \pi x}{L} \end{align} so we get at $t=0$ \begin{align} u_t(x,0)=\sum_n \frac{n \pi c}{L} \, B_n \, sin \frac{n \pi x}{L} \end{align} and we can devolp the initial conditions $\phi,\psi$ into a fourier series
\begin{align} \phi(x) &= \sum_n A_n \, sin\frac{n \pi x}{L}\\ \psi(x) &= \sum_n \frac{n \pi c}{L} \, B_n \, sin \frac{n \pi x}{L} \end{align}
The solution \ref{sol} is thus quiet genereal.