Traveling wave solving the wave equation 
A function $u(x,t)$ is called a traveling wave if it has the form $u(x,t) = f(x - at)$, for some function $f$, called the waveform, and some number $a$, called the wave speed.
a.) Show that if a traveling wave solves the wave equation, and the waveform is not a line, then $a = \pm c$.
b.) Show that for the diffusion equation, there are traveling wave solutions with any speed. What is the general form of the waveform for a given speed $a$?

I am not sure how to proceed with this, any suggestions are greatly appreciated
Attempted solution a.) A wave equation is of the form $$u_{tt} - c^2 u_{xx} = 0$$
Suppose the solution is of the form $u(x,t) = f(x - at)$. Then we have
$$u_{tt} = (a)^2 f^{\prime\prime}(x - at), \ \ u_{xx} = f^{\prime \prime}(x - at)$$
Thus from the wave equation we have $$(a)^2 f^{\prime\prime}(x - at) - c^2f^{\prime \prime}(x - at) = 0$$ Hence we must have $a = \pm c$ in order for this PDE to be satisfied.
 A: @Wolfgang-1 , regards. I may give partial detail. 

For the 1st question :



*

*A wave equation is of the form : $$  u_{tt} - c^{2} u_{xx} = 0 $$
You could check that $u(x,t) = f(x-at)$ solves the equation if $a^{2} = c^{2}$ and $f$ is not a line. 


I am not familiar with your method. But the 1st question could be solved this way : 'presume' the solution is of the form $ u(x,t) = f(x-at) $, so that 
$$  a^{2}f''(\xi) - c^{2}f''(\xi) = 0, \:\: \text{with} \: \xi = x -at  $$
from here you can see that the solution $f(x-at)$ must have $a = \pm c$. Note that $f$ must not be a line, if it is then it's 2nd derivative would be 0. This  answers the 1st question. 
You could try to visualize $u(x,t)= \cos\left[k(x-ct)\right]+ \cos\left[k(x+ct)\right] $ (with small $k$, so that the wave directions is more visible)
$\\$
$\\$
$\\$

For the 2nd :



*

*A 1D diffusion equation is of the form : 
$$ u_{t} = K u_{xx}, \:\: K > 0  $$ If you put $u(x,t) = f(x - at)$, then from the PDE you could get


$$ f''(\xi) + \frac{a}{K}f'(\xi) = 0, \:\:\ \ \ \text{with   } \:\:  \xi = x- at  $$
So there are travelling-wave solutions for the PDE, which is achieved by solving this ODE. You can solve this ODE and get the waveform $f(\xi)$, which is a translation of exponential function
$$ u(x,t) = f(\xi) = e^{-\frac{a}{K}(x-at)}  $$
Hope this would help. Regards, Arief.
