Formal Solution for Heat Equation using Fourier Series

In summary, the heat equation u_t=u_xx, subject to the boundary conditions u(0,t)=0, u_x(∏,t)=0, and initial condition u(x,0)=f(x), has a formal solution given by u(x,t)=\sum_{n=1}^\infty sin(\frac{(2n-1)}{2}x) * c_n * e^{-(\frac{(2n-1)}{2})^2*t} where c_n is given by the Fourier sine series, c_n=\frac 2 \pi \int_0^\pi f(x)\sin(\frac{2n-1}{2}x)\ dx, which can be confirmed using
  • #1
RayonG
6
0

Homework Statement


Find a formal solution of the heat equation u_t=u_xx subject to the following:
u(0,t)=0
u_x(∏,t)=0
u(x,0)=f(x)

for 0≤x≤∏ and t≥0

Homework Equations


u(x,t)=X(x)T(t)

The Attempt at a Solution


I first began with a separation of variables.

T'(t)=λT(t)

T(t) = Ce^(λt).X''(x)=λX(x)
The boundary conditions show that X(0)=0 and X'(∏)=0.

There are three general cases for the solution X(x).

Case 1: When λ=0, I get X(x)=Ax+B, and using the boundary conditions get A=B=0.
So the solution is a trivial solution (not what I need).

Case 2: When λ=μ^2 >0, then X(x)=Acosh(μx)+Bsinh(μx) and X'(x)=Aμsinh(μx)+Bμcosh(μx).
Again, using the boundary conditions lead to C=D=0, leading to the trivial solution X(x)=0.

Case 3: When λ=-μ^2 <0, then X(x)=Acos(μx)+Bsin(μx). X'(x)=-Aμsin(μx)+Bμcos(μx).

This is where I'm stuck. After solving I get A=0 and B≠0, as cos(μ∏)=0. How do I continue?

The solution is along the lines of f(x)=u(x,0)= Summation of n=1 to infinity of (Bn*sin(nx)), but clearly that is wrong. Help?

EDIT: You don't have to show that the Fourier series obtained converges to the solution.
After looking at it some more, I think that X(x)=sin(μx). λ_n=-(μ_n)^2=-n^2/2 (where n is a positive integer). Would that be right?
 
Last edited:
Physics news on Phys.org
  • #2
So now I have X(x)=sin((n+0.5)x) where n is a positive integer.

Using u_n(x,t)=[tex]\sum_{n=1}^{\infty}b_n*T_n(t)*X_n(x)[/tex] and plug in t=0,

So

u(x,0)=f(x)=[tex]\sum_{n=1}^{\infty}b_n*sin((n+0.5)x)[/tex].

Now does b_n = the Fourier sine series?
 
  • #3
I am a bit lost. How do you get λ_n=-(μ_n)^2=-n^2/2? I get [itex]\lambda_n=-\frac{n^2\pi ^2}{\Pi^2}[/itex].
How do you get [itex]X(x)=sin((n+0.5)x)[/itex]? I get [itex]X(x)= B_n \sin \left ( \frac{n\pi x}{\Pi} \right )[/itex].
I don't know if your b_n's are equal to the sine Fourier series coefficients.
I'll wait for someone more experienced than me to answer.
 
  • #4
I realized that my edit was incorrect. I corrected with my next post.
I'm also new to this forum, and forgive me since I meant ∏ to be equal to [itex]\pi[/itex].

Since cos(μ[itex]\pi[/itex])=0. μ[itex]\pi[/itex]=n[itex]\pi[/itex]+[itex]\pi[/itex]/2 where n=positive integer.

Then I get,

X(x) = Bsin((n+0.5)x).

I don't know if I'm doing this right, this is just my way of going about it, and I need verification.
 
  • #5
RayonG said:

Homework Statement


Find a formal solution of the heat equation u_t=u_xx subject to the following:
u(0,t)=0
u_x(∏,t)=0
u(x,0)=f(x)

for 0≤x≤∏ and t≥0

Homework Equations


u(x,t)=X(x)T(t)

The Attempt at a Solution


I first began with a separation of variables.

T'(t)=λT(t)

T(t) = Ce^(λt).X''(x)=λX(x)
The boundary conditions show that X(0)=0 and X'(∏)=0.

There are three general cases for the solution X(x).

Case 1: When λ=0, I get X(x)=Ax+B, and using the boundary conditions get A=B=0.
So the solution is a trivial solution (not what I need).

Case 2: When λ=μ^2 >0, then X(x)=Acosh(μx)+Bsinh(μx) and X'(x)=Aμsinh(μx)+Bμcosh(μx).
Again, using the boundary conditions lead to C=D=0, leading to the trivial solution X(x)=0.

Case 3: When λ=-μ^2 <0, then X(x)=Acos(μx)+Bsin(μx). X'(x)=-Aμsin(μx)+Bμcos(μx).

This is where I'm stuck. After solving I get A=0 and B≠0, as cos(μ∏)=0. How do I continue?

The cosine is function is zero at odd multiples of ##\pi/2##. So you get$$
\mu_n = \frac {(2n-1)}{2}$$
and you have$$
X_n(x) = \sin(\frac {(2n-1)}{2}x)$$Next you will solve for ##T_n(t)##.

I'm guessing you have studied Sturm-Liouville expansions which is what you will need when it comes time to write down the Fourier Coefficients.
 
Last edited:
  • #6
Do you mean that X'(x)=cos((n-0.5)x) and so X(x)=sin((n-0.5)x)?

T_n(t) would be Ce^((λ_n)t).

And no, I have not learned Sturm-Liouville expansions, so I'm taking a guess that B_n is the Fourier sine series...
 
  • #7
RayonG said:
Do you mean that X'(x)=cos((n-0.5)x) and so X(x)=sin((n-0.5)x)?

T_n(t) would be Ce^((λ_n)t).

And no, I have not learned Sturm-Liouville expansions, so I'm taking a guess that B_n is the Fourier sine series...

Yes, that's what I meant. Thanks for noting that and I have edited it. So, yes, you would have $$
T_n(t) = c^{\lambda_n t}$$ giving$$
u(x,t) = \sum_{n=1}^\infty c_nX_n(x)T_n(t) = \sum_{n=1}^\infty
c_n\sin(\frac{2n-1}{2}x)e^{-(\frac {2n-1}{2})^2t}$$And, setting ##t=0##, your initial condition gives, as you have noted,$$
f(x) = u(x,0) = \sum_{n=1}^\infty c_n\sin(\frac{2n-1}{2}x)$$Now, the problem is as I think you understand, that this isn't the standard Fourier sine series. That would have been the case if your sine functions had been ##\sin(nx)##. As a consequence you can't assume that ##c_n## is given by the usual half range formula for the coefficient for the sine series. That would have given you$$
c_n=b_n=\frac 2 \pi \int_0^\pi f(x)\sin(\frac{2n-1}{2}x)\ dx$$That may in fact be a very good guess because it sometimes works out that way. But, as you realize, it is just a guess. You won't be able to check it until you have studied Sturm Liouville theory which give the formula for ##c_n## in expansions like this. At this point, if I were you, I would make that guess but raise the issue with your teacher.
 
  • #8
Thanks for the input!
As of right now, I'll just write down what I can (it's only a homework problem). I'll ask my professor on Monday (perhaps he is using this problem as a direct link to teaching us the Sturm Liouville theory).
 
  • #9
RayonG said:
Thanks for the input!
As of right now, I'll just write down what I can (it's only a homework problem). I'll ask my professor on Monday (perhaps he is using this problem as a direct link to teaching us the Sturm Liouville theory).

Maybe so. Perhaps you can report back here after you talk to your professor.
 
  • #10
I'm trying to solve this problem because I'm currently studying exactly the same stuff.
When doing separation of variables, for the third case when calculating [itex]X(x)[/itex]...
I get as you get, [itex]X(x)=A\cos (\mu x )+B \sin (\mu x )[/itex]. Since [itex]X(0)=0[/itex], this means [itex]A=0[/itex]. So I am left with [itex]X(x)=B\sin (\mu x)[/itex]. Using the boundary condition [itex]X(\pi )=0[/itex], I get that either [itex]B=0[/itex] (again trivial solution that we don't care of) or [itex]\sin (\mu x )=0[/itex]. For the latter to happen, [itex]\mu _n \pi[/itex] must equal [itex]n\pi[/itex] with [itex]n\in \mathbb{N}[/itex]. So I get that [itex]\mu _n \in \mathbb{N}[/itex]. Therefore I get [itex]X_n (x)=B_n \sin (nx)[/itex] with [itex]n \in \mathbb{N}[/itex]. This differs from your answer guys. Why were you looking when the cosine is worth 0? I didn't get that part.
 
  • #11
fluidistic said:
I'm trying to solve this problem because I'm currently studying exactly the same stuff.
When doing separation of variables, for the third case when calculating [itex]X(x)[/itex]...
I get as you get, [itex]X(x)=A\cos (\mu x )+B \sin (\mu x )[/itex]. Since [itex]X(0)=0[/itex], this means [itex]A=0[/itex]. So I am left with [itex]X(x)=B\sin (\mu x)[/itex]. Using the boundary condition [itex]X(\pi )=0[/itex], I get that either [itex]B=0[/itex] (again trivial solution that we don't care of) or [itex]\sin (\mu x )=0[/itex]. For the latter to happen, [itex]\mu _n \pi[/itex] must equal [itex]n\pi[/itex] with [itex]n\in \mathbb{N}[/itex]. So I get that [itex]\mu _n \in \mathbb{N}[/itex]. Therefore I get [itex]X_n (x)=B_n \sin (nx)[/itex] with [itex]n \in \mathbb{N}[/itex]. This differs from your answer guys. Why were you looking when the cosine is worth 0? I didn't get that part.

His boundary condition at ##\pi## was different: ##u_x(\pi, t) = 0## which gives ##X'(\pi) = 0##, not ##X(\pi)=0##.
 
  • #12
LCKurtz said:
His boundary condition at ##\pi## was different: ##u_x(\pi, t) = 0## which gives ##X'(\pi) = 0##, not ##X(\pi)=0##.

Whoops, thanks for pointing this out. Going to try out tomorrow.
 
  • #13
Ok guys I get your result.
I have that [itex]f(x)=\sum _{n=0}^{\infty } c_n \sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ][/itex].
Using Evans' book definition for the Fourier coefficients, [itex]c_n=\frac{1}{||\sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ] ||^2} \int _0 ^\pi f(x) \sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ]dx[/itex] where [itex]||\sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ] ||^2=\int _0 ^ \pi \sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ]^2dx=\frac{\pi}{2}-\frac{\sin (\pi ^2 (2n+1))}{2\pi n + \pi}=\pi /2[/itex].
Therefore [itex]c_n=\frac{2}{\pi} \int _0 ^\pi f(x)\sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ] dx[/itex] which is worth your educated guess LCKurtz.
There's no mention of S-T theory for this part.
I'd appreciate any comment of how S-T theory can be applied here.
 
  • #14
fluidistic said:
Ok guys I get your result.
I have that [itex]f(x)=\sum _{n=0}^{\infty } c_n \sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ][/itex].
Using Evans' book definition for the Fourier coefficients, [itex]c_n=\frac{1}{||\sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ] ||^2} \int _0 ^\pi f(x) \sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ]dx[/itex] where [itex]||\sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ] ||^2=\int _0 ^ \pi \sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ]^2dx=\frac{\pi}{2}-\frac{\sin (\pi ^2 (2n+1))}{2\pi n + \pi}=\pi /2[/itex].
Therefore [itex]c_n=\frac{2}{\pi} \int _0 ^\pi f(x)\sin \left [ \left ( n+\frac{1}{2} \right ) \pi x \right ] dx[/itex] which is worth your educated guess LCKurtz.
There's no mention of S-T theory for this part.
I'd appreciate any comment of how S-T theory can be applied here.

I don't have Evans' book. But here's a brief explanation of the connection.

The Sturm-Liouville theory covers eigenvalue problems of the form$$
(r(x)y'(x))'+ (q(x)+\lambda w(x))y = 0$$with appropriate boundary conditions. The theory shows that the eigenvalues are real and you get an infinite collection of eigenfunctions ##\{\phi_n(x)\}##which can be used in general Fourier expansions. The usual Fourier Series expansions are a special case. I'm glossing over many details, which you can find on the internet, but the relevance to the above problem is that the eigenfunctions are orthogonal to each other with respect to the weight function w(x). So you get an expansion of the form$$
f(x) = \sum_{k=0}^\infty c_n\phi_k(x)$$If you define an inner product by$$(f,g)=\int_a^bf(x)\overline g(x)w(x)\, dx$$the orthogonality is respect to that inner product and is referred to as orthogonality with respect to the weight function ##w(x)##. In our problem, everything is real and ##(a,b)=(0,\pi)##, and ##w(x)=1##. If you take the inner produce of the series with ##\phi_n## you get$$
(f,\phi_n) = \sum_{k=0}^\infty c_k(\phi_k,\phi_n) = c_n(\phi_n, \phi_n)$$
$$c_n = \frac {(f,\phi_n)}{(\phi_n, \phi_n)}$$In our problem$$\phi_n(x)=\sin(\frac{2n-1} 2x)$$ When you work out that denominator, as you have done when you worked out the norm formula, it gives you the ##2/\pi##, which is what you get when you guess using the standard Fourier coefficient formulas. Luckily, the weight function was 1.
 
  • #15
According to my professor, LCKurtz was right.

The solution is f(x)=u(x,0)=[tex]\sum_{n=1}^{\infty}b_n*sin((n+0.5)x)[/tex]

where

B_n=(2/[itex]\pi[/itex])[itex]\int_{0}^{\pi}f(x)*sin((n+0.5)x)dx[/itex].

As far as deriving b_n, my professor told me it was a guess. I suppose he'll teach us later on or something.
 
  • #16
Thank you LCKurtz, that was very informative. (I notice I made a small error for the expressions, I have an extra factor "pi" inside the sine function which souldn't be there).
 

1. What is the heat equation?

The heat equation is a partial differential equation that describes the flow of heat in a given medium over time. It can be used to model a variety of physical phenomena, such as the diffusion of heat through a solid material or the spread of temperature in a fluid.

2. How is the heat equation solved using Fourier series?

The heat equation can be solved using Fourier series by representing the solution as a sum of sine and cosine functions with varying coefficients. These coefficients can be determined by plugging the solution into the heat equation and using the orthogonality properties of trigonometric functions.

3. What is the significance of using Fourier series in solving the heat equation?

Using Fourier series allows for a more general solution to the heat equation, as it can capture the behavior of a wide range of initial conditions and boundary conditions. It also provides a systematic and efficient way to solve the equation, making it a useful tool in many scientific and engineering applications.

4. Are there any limitations to using Fourier series to solve the heat equation?

While Fourier series can provide an accurate solution to the heat equation, it is limited to linear problems. Nonlinear problems may require different techniques, such as numerical methods, to find a solution.

5. Can Fourier series be used to solve other types of equations?

Yes, Fourier series can be used to solve a variety of other partial differential equations, such as the wave equation and the Laplace equation. It is a powerful tool in many areas of science and mathematics, including signal processing, image processing, and quantum mechanics.

Similar threads

  • Calculus and Beyond Homework Help
Replies
5
Views
267
  • Calculus and Beyond Homework Help
Replies
3
Views
284
Replies
0
Views
458
  • Calculus and Beyond Homework Help
Replies
6
Views
389
  • Calculus and Beyond Homework Help
Replies
4
Views
354
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
372
  • Calculus and Beyond Homework Help
Replies
1
Views
535
  • Calculus and Beyond Homework Help
Replies
1
Views
833
  • Calculus and Beyond Homework Help
Replies
2
Views
709
Back
Top