In this worksheet we give some examples on how to use the method of characteristics for first-order linear PDEs of the form
a(x,t)*diff(u(x,t),t)+b(x,t)*diff(u(x,t),x)+c(x,t)*u(x,t) = h(x,t) . The main idea of the method of characteristics is to reduce a PDE on the ( x, t )-plane to an ODE along a parametric curve (called the characteristic curve) parametrized by some other parameter tau . The characteristic curve is then determined by the condition that diff(u(x(tau),y(tau)),tau) = diff(t(tau),tau)*diff(u(x,t),t)+diff(x(tau),tau)*diff(u(x,t),x) = a(x,t)*diff(u(x,t),t)+b(x,t)*diff(u(x,t),x) and so we need to solve another ODE to find the characteristic. In the examples below we always take a(x,t) = 1 , and so we can use t instead of tau . In this case the characteristics are given by the equation diff(x,t) = b(x,t) . On the characteristic we then get an equation diff(u(t),t)+c(t)*u(t) = h(t) , which is again an ODE. Solving both ODEs, choosing the constants of integration to match the initial data, and going from the characteristic to the whole plane then gives us the solution u(x,t) of the PDE.