MHB Solving the 1D Heat Equation with Separations of Variables

Click For Summary
The discussion focuses on solving the 1D heat equation using separation of variables, specifically the equation ∂u/∂t = 4∂²u/∂x² with given boundary and initial conditions. The user expresses frustration after hours of effort without results, leading to a detailed exploration of the problem. A proposed solution involves separating variables into functions of x and t, resulting in ordinary differential equations for each. However, inconsistencies in the boundary conditions are noted, particularly regarding the initial condition, which complicates the solution process. The conversation concludes with a suggestion that the initial problem statement may contain a typo affecting the interpretation of the boundary conditions.
superbread88
Messages
2
Reaction score
0
Have been trying for hours but simply no results. Hope that someone can help me out.

\[\frac{\partial u}{\partial t}=4\frac{\partial^2 u}{\partial x^2}\]

for \(t>0\) and \(0\leq x\leq 2\) subject to the boundary conditions

\[u_x (0,t) = 0\mbox{ and }u(2,t) = 0\]

and the initial condition

\[u(x,0) = 2 \cos \left(\frac{7\pi x}{4}\right)\]

By the use of separations of variables, solve the above equation for the temperature \(u(x,t)\)
 
Last edited by a moderator:
Physics news on Phys.org
superbread88 said:
Have been trying for hours but simply no results. Hope that someone can help me out.

∂u/∂t=4(∂^2 u)/(∂x^2 )

for t>0 and 0≤x≤2 subject to the boundary conditions

ux (0,t) = 0 and u(2,t) = 0

and the initial condition

u(x,0) = 2 cos (7πx)/4

By the use of separations of variables, solve the above equation for the temperature u(x,t)



Let suppose that any solution can be written as $\displaystyle u(x,t)= \alpha(x)\ \beta(t)$, so that the PDE is written as... $\displaystyle \frac{\alpha^{\ ''}}{\alpha} = \frac{\beta^{\ '}}{4\ \beta}=c$ (1)

... where c is a constant that we suppose to be negative so that we set $\displaystyle c=- \frac{1}{\lambda^{2}}$, $u_{t}= \alpha\ \beta^{\ '}$ and $u_{xx}= \beta\ \alpha^{\ ''}$ and arrive to the pair of ODE...

$\displaystyle \alpha^{\ ''}= - \frac{\alpha}{\lambda^{2}}$ (2)

$\displaystyle \beta^{\ '}= - \frac{4\ \beta}{\lambda^{2}}$ (3)

The (3) has solution...

$\beta = A\ e^{- \frac{4\ t}{\lambda^{2}}}$ (4)

... and (2) has solution...

$\alpha = B\ \cos (\frac{x}{\lambda}) + C\ \sin (\frac{x}{\lambda})$ (5)

Now we to introduce the 'conditions on the contour' that are...

$\displaystyle u(0,t)=u(2,t)=0\ ,\ u(x,0)= 2\ \cos (\frac{7}{4}\ \pi\ x)$ (6)

It is easy to see that the (6) are not coherent because for x=0 is u=0 no matter which is t, so that we take into account only the conditions $\displaystyle u(0,t)=u(2,t)=0$. In this case the value of $\lambda$ is $\displaystyle \lambda= \frac{2}{n\ \pi}$ and the solution becomes...

$\displaystyle u(x,t)= \sum_{n=1}^{\infty} c_{n} \sin (\frac{\pi}{2}\ n\ x)\ e^{- n^{2}\ \pi^{2}\ t}$ (7)

http://www.sv-luka.org/ikone/ikone180a.jpg

Marry Christmas from Serbia

Kind regards

$\chi$ $\sigma$
 
Last edited:
chisigma said:
Let suppose that any solution can be written as $\displaystyle u(x,t)= \alpha(x)\ \beta(t)$, so that the PDE is written as... $\displaystyle \frac{\alpha^{\ ''}}{\alpha} = \frac{\beta^{\ '}}{4\ \beta}=c$ (1)

... where c is a constant that we suppose to be negative so that we set $\displaystyle c=- \frac{1}{\lambda^{2}}$, $u_{t}= \alpha\ \beta^{\ '}$ and $u_{xx}= \beta\ \alpha^{\ ''}$ and arrive to the pair of ODE...

$\displaystyle \alpha^{\ ''}= - \frac{\alpha}{\lambda^{2}}$ (2)

$\displaystyle \beta^{\ '}= - \frac{4\ \beta}{\lambda^{2}}$ (3)

The (3) has solution...

$\beta = A\ e^{- \frac{4\ t}{\lambda^{2}}}$ (4)

... and (2) has solution...

$\alpha = B\ \cos (\frac{x}{\lambda}) + C\ \sin (\frac{x}{\lambda})$ (5)

Now we to introduce the 'conditions on the contour' that are...

$\displaystyle u(0,t)=u(2,t)=0\ ,\ u(x,0)= 2\ \cos (\frac{7}{4}\ \pi\ x)$ (6)

It is easy to see that the (6) are not coherent because for x=0 is u=0 no matter which is t, so that we take into account only the conditions $\displaystyle u(0,t)=u(2,t)=0$. In this case the value of $\lambda$ is $\displaystyle \lambda= \frac{2}{n\ \pi}$ and the solution becomes...

$\displaystyle u(x,t)= \sum_{n=1}^{\infty} c_{n} \sin (\frac{\pi}{2}\ n\ x)\ e^{- n^{2}\ \pi^{2}\ t}$ (7)

The conditions on contour have been defined as 'non coherent' because the term $2\ \cos (\frac{7}{4}\ \pi\ x)$ for $x=0$ is $\ne 0$, but that isn't true if we set the last condition as...

$\displaystyle u(x,0)= g(x)= \begin{cases} 2\ \cos (\frac{7}{4}\ \pi\ x), & \text{if } 0< x <2\\
- 2\ \cos (\frac{7}{4}\ \pi\ x), & \text{if } -2 < x < 0\\ 0, & \text{if}\ x=-2,x=0, x=2\end{cases}$ (1)

Now g(x) can be written as a Fourier series on only sines with coefficients ...

$\displaystyle c_{n}= 2\ \int_{0}^{2} \cos (\frac{7}{4}\ \pi\ x)\ \sin (\frac{\pi}{2}\ n\ x)\ dx = \frac{16\ n}{4\ \pi\ n^{2} -49\ \pi}$ (2)

... so that the solution is...

$\displaystyle u(x,t) = \sum_{n=1}^{\infty} \frac{16\ n}{4\ \pi\ n^{2} -49\ \pi} \sin (\frac{\pi}{2}\ n\ x)\ e^{- n^{2}\ \pi^{2}\ t}$ (3)

http://www.sv-luka.org/ikone/ikone180a.jpg

Marry Christmas from Serbia

$\chi$ $\sigma$
 
chisigma said:
The conditions on contour have been defined as 'non coherent' because the term $2\ \cos (\frac{7}{4}\ \pi\ x)$ for $x=0$ is $\ne 0$, but that isn't true if we set the last condition as...

$\displaystyle u(x,0)= g(x)= \begin{cases} 2\ \cos (\frac{7}{4}\ \pi\ x), & \text{if } 0< x <2\\
- 2\ \cos (\frac{7}{4}\ \pi\ x), & \text{if } -2 < x < 0\\ 0, & \text{if}\ x=-2,x=0, x=2\end{cases}$ (1)

Now g(x) can be written as a Fourier series on only sines with coefficients ...

$\displaystyle c_{n}= 2\ \int_{0}^{2} \cos (\frac{7}{4}\ \pi\ x)\ \sin (\frac{\pi}{2}\ n\ x)\ dx = \frac{16\ n}{4\ \pi\ n^{2} -49\ \pi}$ (2)

... so that the solution is...

$\displaystyle u(x,t) = \sum_{n=1}^{\infty} \frac{16\ n}{4\ \pi\ n^{2} -49\ \pi} \sin (\frac{\pi}{2}\ n\ x)\ e^{- n^{2}\ \pi^{2}\ t}$ (3)

http://www.sv-luka.org/ikone/ikone180a.jpg

Marry Christmas from Serbia

$\chi$ $\sigma$

Thank you very much for your help Chisigma. I e-mail my professor with regards to this question and she only replied me her answer which is :

https://www.physicsforums.com/attachments/514._xfImport

I understood your working but my professor claim that the above is the correct answer and now I am really confused.

Sorry I tried my best to type this out using LaTeX but I simply don't know how to thus I insert a picture for illustration purpose.
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    4 KB · Views: 76
superbread88 said:
Thank you very much for your help Chisigma. I e-mail my professor with regards to this question and she only replied me her answer which is :

https://www.physicsforums.com/attachments/514

I understood your working but my professor claim that the above is the correct answer and now I am really confused.

Sorry I tried my best to type this out using LaTeX but I simply don't know how to thus I insert a picture for illustration purpose.
I think that you have a typo in the initial statement of the problem. You wrote

superbread88 said:
\[\frac{\partial u}{\partial t}=4\frac{\partial^2 u}{\partial x^2}\]

for \(t>0\) and \(0\leq x\leq 2\) subject to the boundary conditions

\[\color{red}{u_x (0,t) = 0}\mbox{ and }\color{red}{u(2,t) = 0}\]

and the initial condition

\[u(x,0) = 2 \cos \left(\frac{7\pi x}{4}\right)\]

with the boundary conditions given as $u_x (0,t) = 0$ and $u(2,t) = 0$. Chisigma interpreted this as $u (0,t) = 0$ and $u(2,t) = 0$ (with no partial derivative in either condition). It looks as though you should have written $u_x (0,t) = 0$ and $u_x(2,t) = 0$ (with a partial derivative in both conditions). Chisigma's solution can then quite easily be modified to give the professor's solution.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K