Wikipedia:Reference desk/Archives/Mathematics/2015 May 3

= May 3 =

Still not sure how to apply general solution of 1D wave equation to initial-boundary value problems.
I previously made a post here that was based on an erroneous remembrance of the general solution to the 1D wave equation. But now even with the correct general solution I still manage to derive contradictions when given a mixed boundary value problem. This is sort of a homework question but I can't grasp how. The method I am asked to use is normally separation of variables yielding a basis for a (formal) (generalized) Fourier series in x, so I can survive without this, but I'm bothered by the fact that a "general" solution apparently cannot be used to obtain the particular solution here.

Consider the problem on the finite interval from 0 to π (in x). The wave equation to be solved here is $$\frac{\partial^2 u}{\partial t^2} = 4\frac{\partial^2 u}{\partial x^2}$$. The boundary conditions are $$u(0, t) = u(\pi, t) =0$$ for all positive t, and the initial conditions are $$u(x, 0) = x^2(\pi - x)$$ and $$\frac{\partial u(x, 0)}{\partial t} = 0$$ for x from 0 to π, where the latter partial derivative is evaluated at t=0 and any x on the interval.

The general solution of this 1D wave equation is $$Af(x - 2t) + Bg(x + 2t)$$ where A and B are arbitrary but fixed real constants (to be determined) and f and g are arbitrary twice continuously differentiable functions of one variable. The trouble I'm having is that substituting this into the initial and boundary conditions produces contradictions.

Applying the boundary conditions leads to $$Af(-2t) + bg(2t) = Af(\pi - 2t) + Bg(\pi + 2t) = 0$$ and the initial conditions lead to $$Af(x) + Bg(x) = x^2(\pi - x)$$ and $$2Af'(x) - 2Bg'(x) = 0$$. These obviously cannot all be true at once. For example, integrating the last result yields $$2(Af(x) - Bg(x)) = C$$ where C is a constant of integration. Combining the other initial condition result to solve for f and g leads to $$f(x) = \frac{2x^2(\pi - x) + C}{4A}$$ and $$g(x) = \frac{2x^2(\pi - x) - C}{4B}$$. These are of course consistent with the initial conditions, but not the boundary conditions. Under this proposed solution we must have $$u(x, t) = \frac{2(x - 2t)^2(\pi - (x-2t)) + 2(x+2t)^2(\pi - (x + 2t))}{4}$$. Then $$ u(0, t) = \frac{2(-2t)^2(\pi + 2t) + 2(2t)^2(\pi - 2t)}{4}$$. This fails to be identically zero for all positive t as dictated by the boundary condition.--Jasper Deng (talk) 09:04, 3 May 2015 (UTC)
 * First of all, it's not exactly an error but it's not necessary to introduce the variables A and B into the solution; Af isn't going to be any more arbitrary than f if f is an arbitrary function.
 * The spot where your reasoning goes wrong in that the initial conditions tell you what f and g are from 0 to a, but you're extending that formula to apply for all reals, and the same formula doesn't work. It might help to generalize a bit. Basically you're given a function h with h(0)=h(a)=0, the initial conditions u(x,0)=h(x), ut(x,0)=0, and boundary conditions u(0,t)=u(a,t)=0. The general solution is of the form u(x,t)=f(x-2t)+g(x+2t). By plugging in t=0 it follows, using reasoning similar to what you have given, that f(x)=g(x)=h(x)/2, but this only applies for x between 0 and a. Let k be a function defined on all reals so that k(x)=h(x) for x between 0 and a, write u(x,t)=k(x-2t)/2+k(x+2t)/2, and now use the boundary conditions to determine k for x not between 0 and a. From u(0,t)=0 we get k(-2t)+k(2t)=0, so k is an odd function. So take k(x)=-k(-x) if x is between -a and 0. From u(a,t)=0 we get k(a-2t)+k(a+2t)=0, k(2t-a)=k(2t+a) since k is odd, then k(x)=k(x+2a) by taking x=2t-a. So k is periodic with period 2a. We already have k defined between -a and a so extend periodically to get k for all reals. So the solution is u(x,t)=k(x-2t)/2+k(x+2t)/2 where k is the unique odd function with period 2a which is equal to h on the interval from 0 to a. --RDBury (talk) 10:36, 3 May 2015 (UTC)
 * This is very helpful. Now I also understand why a Fourier series is so useful for solving this kind of problem. It's interesting how this series is only a sine series when I have products of sines and cosines with separation of variables, but the beauty of course is that they are connected by the sum-to-product / product-to-sum formulae.--Jasper Deng (talk) 19:13, 5 May 2015 (UTC)