0

I'd like to solve a simple ODE using Fourier series on $[0,L]$.

$d^2\phi/dx^2=0$, with boundary conditions $\phi(0)=0, \phi(L)=P$.

Simple integration results in $\phi(x) = Px/L$.

The Fourier series on $[0,L]$ of this solution is $\phi(x) = \sum_{n\neq 0} \frac{i P}{2\pi n} e^{i k_n x}$, where $k_n = 2\pi n /L$. (I used $c_n = \frac{1}{L}\int_0^L \frac{Px}{L}e^{-i k_n x} dx$).

This gives a saw tooth like function, as expected. However, I would like to solve it for $c_n$ directly, and that is where I get stuck:

$\phi(x) = c_0 + \sum_{n\neq 0} c_n e^{i k_n x}$, filling in, into the ODE gives $-\sum_n c_n k_n^2 e^{i k_n x}=0$.

Since $e^{i k_n x}$ form a basis (or take $\left<...|e^{i k_m x} \right>=\frac{1}{L}\int_0^L ... e^{-i k_m x} dx$, and $\left<e^{i k_n x}|e^{i k_m x} \right>=\delta_{n,m}$) we know that each term should be zero separately: $c_n k_n^2=0$, in other words $c_n=0$.

To fit the boundary conditions, we use $c_0=0$ for the first one, but $c_0=P$ for the second, impossible.

Did I make a mistake somewhere? I know it can be solved because $c_n = \frac{i P}{2\pi n}$ gives the correct answer.

Mike Jordan
  • 122
  • 6
  • $\sum_{k \in \mathbb Z \setminus {0}} e^{i k x}/k$ is a piecewise-linear function, but you can't differentiate the series termwise, you get a divergent series. Or, if you're working with distributions, you can differentiate termwise, but the result is not a constant, it's a constant plus an impulse train. – Maxim Sep 16 '19 at 21:11

1 Answers1

0

"Did I make a mistake somewhere?"

Yes. you solve the ode through simple integration then take the fourier transform of that solution. These 2 functions are not the same. One is periodic and one is not. Which leads to the fourier series not fufilling the ode.

Oscar
  • 36
  • Thanks for the quick reply, I understand the functions $\phi(x) = Px/L$ and $\phi(x) = \sum_{n\neq 0} \frac{i P}{2\pi n} e^{i k_n x}$ are not the same. Which is fine cause I am only looking for a solution in $[0,L]$. My question is regarding finding $c_n$ directly, this apparently does not even yield $c_n= \frac{i P}{2\pi n}$. I don't understand why, could you explain how you'd do that? – Mike Jordan Sep 16 '19 at 15:30
  • 1
    Well, I see your point, but posing the ODE-problem by assuming a fourier series is a different problem due to periodicy. The problem is mainly that the fourier series (and it's second derivate) are discontinous at x=nL. This can easily be explained only looking at boundry conditions $\phi (0) = \sum_n c_n = 0$ and $\phi (L) = \sum_n c_n = P$ which is a contradiction since $P\neq 0$. It is thereby impossible to solve by a fourier series assumption, but the solution gained from simple integration can be reconstructed to a fourier series on [0,L]. Hope this answer your question! :). – Oscar Sep 16 '19 at 16:26
  • Hello sir. Could you please help me with this question: https://math.stackexchange.com/q/3380406/394202 – Soumee Oct 04 '19 at 17:56