Solving the 1D Heat Equation with Separations of Variables

  • Context: MHB 
  • Thread starter Thread starter superbread88
  • Start date Start date
  • Tags Tags
    1d Heat Heat equation
Click For Summary
SUMMARY

The discussion focuses on solving the one-dimensional heat equation given by \(\frac{\partial u}{\partial t}=4\frac{\partial^2 u}{\partial x^2}\) with specific boundary conditions \(u_x(0,t) = 0\) and \(u(2,t) = 0\), and an initial condition \(u(x,0) = 2 \cos \left(\frac{7\pi x}{4}\right)\). The separation of variables method is employed, leading to the general solution expressed as \(u(x,t) = \sum_{n=1}^{\infty} \frac{16n}{4\pi n^2 - 49\pi} \sin \left(\frac{\pi}{2} n x\right) e^{-n^2 \pi^2 t}\). A critical point of confusion arises regarding the coherence of the boundary conditions, particularly the interpretation of \(u_x(0,t) = 0\) versus \(u(0,t) = 0\).

PREREQUISITES
  • Understanding of partial differential equations (PDEs)
  • Familiarity with the method of separation of variables
  • Knowledge of Fourier series and their applications
  • Basic calculus, particularly differentiation and integration techniques
NEXT STEPS
  • Study the method of separation of variables in more detail
  • Learn about Fourier series and their convergence properties
  • Explore the implications of boundary conditions on PDE solutions
  • Investigate the heat equation in different contexts, such as in higher dimensions
USEFUL FOR

Mathematicians, physicists, and engineering students who are working with heat transfer problems, particularly those involving partial differential equations and boundary value problems.

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: 79
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
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K