Calculating the coefficients with the Fourier series

Click For Summary
SUMMARY

The discussion focuses on solving the initial and boundary value problem defined by the heat equation \(u_t = u_{xx}\) with specific boundary conditions and initial conditions. The user employs separation of variables to derive the solution and attempts to calculate the Fourier coefficients \(A_n\) using both Fourier series and Sturm-Liouville theory. The results differ, leading to confusion about the correct method for calculating these coefficients. The consensus is that the inner product formula from Sturm-Liouville theory should be applied correctly to ensure consistent results.

PREREQUISITES
  • Understanding of the heat equation and boundary value problems
  • Familiarity with Fourier series and Fourier coefficients
  • Knowledge of Sturm-Liouville theory and inner product spaces
  • Basic calculus, particularly integration techniques
NEXT STEPS
  • Review the derivation of Fourier coefficients in the context of boundary value problems
  • Study the application of Sturm-Liouville theory in solving differential equations
  • Learn about mixed boundary conditions and their implications on Fourier series expansions
  • Explore the properties of orthogonal functions and their role in solving PDEs
USEFUL FOR

Mathematicians, physicists, and engineers dealing with partial differential equations, particularly those interested in heat transfer and boundary value problems.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

I have to solve the following initial and boundary value problem:
$$u_t=u_{xx}, 0<x<L, t>0 (1)$$
$$u(0,t)=u_x(L,t)=0, t>0$$
$$u(x,0)=x, 0<x<L$$

I did the following:
Using the method separation of variables, the solution is of the form: $u(x,t)=X(x)T(t)$

Replacing this at $(1)$, we get:

$$\left.\begin{matrix}
X''+\lambda X=0, 0<x<L\\
X(0)=0, X'(L)=0
\end{matrix}\right\} (2)$$

$$\left.\begin{matrix}
T'+\lambda T=0, t>0
\end{matrix}\right\} (3)$$

$$u(x,0)=X(x)T(0)=x$$Solving the problem $(2)$ we get that the eigenfunctions are $$X_n(x)=\sin{(\frac{(2n+1) \pi x}{2L})}$$

Solving the problem $(3)$ we get $$T_n(t)=A_ne^{-(\frac{(2n+1) \pi}{2L})^2t}$$

So the solution of the initial problem is of the form $$u(x,t)=\sum_{n=1}^{\infty}{A_n \sin{(\frac{(2n+1) \pi x}{2L})}e^{-(\frac{(2n+1) \pi}{2L})^2t}}$$

$$u(x,0)=x \Rightarrow x=\sum_{n=1}^{\infty}{A_n \sin{(\frac{(2n+1) \pi x}{2L})}}$$

To calculate the coefficients $A_n$ can I do the following:

We expand the function $f(x)=x$ in an odd way in $[-L,L]$.
So we can write $f$ as a Fourier series:
$$f(x)=\sum_{n=1}^{\infty}{b_n \sin{(\frac{2(2n+1) \pi x}{2 \cdot 2L})}}, \text{ where } b_n=\frac{2}{4L} \int_{-L}^L{f(x) \sin{(\frac{2(2n+1) \pi x}{4L})}}dx$$

Or is it wrong to calculate these coefficients in that way?? (Wondering)
 
Physics news on Phys.org
Or is it better to calculate them with the Sturm-Liouville theory?
 
When I calculate the coefficients using the Fourier series, I get the following:

$$f(x)=\sum_{n=1}^{\infty}{b_n \sin{(\frac{2 (2n+1) \pi x}{2 \cdot 2L})}},$$ $$\text{ where } b_n=\frac{2}{4L} \int_{-L}^L{f(x) \sin{(\frac{2 (2n+1) \pi x}{4L})}}dx=\frac{1}{L} \int_0^L{f(x) \sin{(\frac{ (2n+1) \pi x}{2L})}}dx$$

So $$A_n=\frac{1}{L} \int_0^L{x \sin{(\frac{(2n+1) \pi x}{2})}}dx =\frac{1}{L} \frac{4L^2}{(2n+1)^2 \pi^2}(-1)^n=\frac{4L}{(2n+1)^2 \pi^2}(-1)^n$$When I use the Sturm-Liouville theory, I get the following:

$$A_n=\frac{(f(x),X_n(x))}{||X_n||^2}$$

$$(f(x),X_n(x))=\int_0^L{f(x) \sin{(\frac{ (2n+1) \pi x}{2L})}}dx=\int_0^L{x \sin{(\frac{ (2n+1) \pi x}{2L})}}dx=\frac{4L^2}{(2n+1)^2 \pi^2}(-1)^n$$

$$||X_n^2||=\int_0^L{\sin^2{(\frac{ (2n+1) \pi x}{2L})}}dx=\frac{L}{2}$$

So $$A_n=\frac{2}{L}\frac{4L^2}{(2n+1)^2 \pi^2}(-1)^n=\frac{8L}{(2n+1)^2 \pi^2}(-1)^n$$The results are not the same...
What have I done wrong? (Wondering)
 
mathmari said:
When I calculate the coefficients using the Fourier series, I get the following:

$$f(x)=\sum_{n=1}^{\infty}{b_n \sin{(\frac{2 (2n+1) \pi x}{2 \cdot 2L})}},$$ $$\text{ where } b_n=\frac{2}{4L} \int_{-L}^L{f(x) \sin{(\frac{2 (2n+1) \pi x}{4L})}}dx=\frac{1}{L} \int_0^L{f(x) \sin{(\frac{ (2n+1) \pi x}{2L})}}dx$$

So $$A_n=\frac{1}{L} \int_0^L{x \sin{(\frac{(2n+1) \pi x}{2})}}dx =\frac{1}{L} \frac{4L^2}{(2n+1)^2 \pi^2}(-1)^n=\frac{4L}{(2n+1)^2 \pi^2}(-1)^n$$When I use the Sturm-Liouville theory, I get the following:

$$A_n=\frac{(f(x),X_n(x))}{||X_n||^2}$$

$$(f(x),X_n(x))=\int_0^L{f(x) \sin{(\frac{ (2n+1) \pi x}{2L})}}dx=\int_0^L{x \sin{(\frac{ (2n+1) \pi x}{2L})}}dx=\frac{4L^2}{(2n+1)^2 \pi^2}(-1)^n$$

$$||X_n^2||=\int_0^L{\sin^2{(\frac{ (2n+1) \pi x}{2L})}}dx=\frac{L}{2}$$

So $$A_n=\frac{2}{L}\frac{4L^2}{(2n+1)^2 \pi^2}(-1)^n=\frac{8L}{(2n+1)^2 \pi^2}(-1)^n$$The results are not the same...
What have I done wrong? (Wondering)

Hey! (Blush)

Hmm, I don't think you have the right Fourier formula...

What you call Sturm-Liouville theory is actually an inner product formula, which does look correct.
 
I like Serena said:
Hey! (Blush)

Hmm, I don't think you have the right Fourier formula...

What you call Sturm-Liouville theory is actually an inner product formula, which does look correct.

Ahaa! Ok! So I have to use the inner product formula in these cases? (Wondering)
 
mathmari said:
Ahaa! Ok! So I have to use the inner product formula in these cases? (Wondering)

It boils down to the same thing.
The great discovery Fourier made was that $\{\cos(n\pi x), \sin(n\pi x) \}$ forms a basis for all square integrable functions. To find the coefficients we simply need to take the inner product.
If you apply the Fourier sine series correctly you should find the same result.
 
I like Serena said:
It boils down to the same thing.
The great discovery Fourier made was that $\{\cos(n\pi x), \sin(n\pi x) \}$ forms a basis for all square integrable functions. To find the coefficients we simply need to take the inner product.
If you apply the Fourier sine series correctly you should find the same result.

Ahaa! Ok!

What have I done wrong at the Fourier series?? (Wondering)

Since the boundary conditions are mixed we cannot expand the function neither in an odd way nor in an even way...

What can I do in this case?? (Wondering)
 

Similar threads

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