HMTH407 - Partial Differential Equations

Assignment 1 solutions

  1. For each of the following equations, state the order and whether it is nonlinear, linear inhomogeneous, or linear homogeneous.
    1. \( (\cos xy^2)u_x - y^2u_{xxy} = \tan(x^2+y^2)\)
      \(\boxed{\text{third order, linear inhomogeneous}} \)
    2. \( \frac{u_x}{\sqrt{1+u_x^2}}+\frac{u_y}{\sqrt{1+u_y^2}}=0\)
      \(\boxed{\text{first order, nonlinear}}\)
  2. Solve the equation \( (1+x^2)u_x + u_y = 0 \).
    The characteristics curves are obtained by solving the equation
    \[\displaystyle\frac{dy}{dx} = \frac{1}{1+x^2}\rightarrow y = \arctan(x)+c\]
    The characteristic coordinate is: \(\displaystyle\xi = y - \arctan(x). \) The solution \(u(x,y)\) is constant along the characteristics, that is \[ \boxed{u(x,y) = f(\xi) = f(y-\arctan(x))} \] where \(f\) is an arbitrary function.
  3. Solve the equation \[\sqrt{1-x^2}u_x + u_y = 0,\,\,\,u(0,y)=y.\] The characteristic curves are obtained by solving the equation
    \[ \displaystyle\frac{dy}{dx} = \frac{1}{\sqrt{1-x^2}}\rightarrow y = \arcsin(x)+c\]
    The characteristic coordinate is then: \( \displaystyle\xi = y-\arcsin(x). \) The solution \(u(x,y)\) is constant along the characteristic curves:
    \[ u(x,y) = f(\xi) = f(y-\arcsin(x)) \] where \(f\) is arbitrary. To determine \(f\), set \(x=0\) and use the initial condition: \[ u(0,y) = f(y) = y. \] Hence \[\boxed{ u(x,y) = y-\arcsin(x)}, \] where \(x\in [0,1].\)
  4. Solve \[u_x+u_y+u = e^{x+y},\,\,\,\,u(x,0)=0.\] The slopes of the characteristic curves are solutions of the ODE \[ \frac{dy}{dx} = 1\rightarrow y = x + c.\] Change coordinates to \(\xi, \eta\) where \(\displaystyle \xi = y - x\) and \(\displaystyle\eta = x\). Thus \[\xi_x = -1,\,\,\, \xi_y = 1,\,\,\,\eta_x = 1,\,\,\, \eta_y = 0.\] Define \[ u(x,y) = w(\xi(x,y),\eta(x,y)).\] By the chain rule, \[u_x = w_\xi \xi_x + w_\eta \eta_x = -w_\xi + w_\eta \] and \[u_y = w_\xi \xi_y + w_\eta \eta_y = w_\xi.\] Solving for \(x\) and \(y\) in terms of \(\xi\) and \(\eta\) we see that \[x = \eta,\,\,\,y = \xi + \eta.\] So the PDE can be written in the new coordinates \[ u_x+u_y+u = -w_\xi + w_\eta + w_\xi = w_\eta + w = e^{\xi+2\eta}.\] This is an ODE in \(\eta\) which can be solved by using a multiplying factor, \(e^\eta\), yielding \[ \frac{\partial}{\partial\eta}\left[e^\eta w \right] = e^\eta e^{\xi+2\eta} = e^{\xi+3\eta}.\] Integrating with respect to \(\eta\) we get \[e^\eta w = \int e^{\xi + 3\eta}\,d\eta = \frac{1}{3}e^{\xi+3\eta} + f(\xi).\] where the function \(f\) is arbitrary. Hence \[ w = \frac{1}{3}e^{\xi+2\eta} + f(\xi)e^{-\eta} .\] Substituting back in terms of \( x, y\) we obtain the solution \[ u(x,y) = \frac{1}{3}e^{y+x} + f(y-x)e^{-x}.\] We now use the initial condition \(u(x,0)\) to determine \(f\). Let \(y=0\). Then \[ u(x,0) = \frac{1}{3}e^x + f(-x)e^{-x} = 0.\] Thus \[ f(-x) = -\frac{1}{3}e^{2x}\rightarrow f(x) = -\frac{1}{3}e^{-2x}.\] Therefore, \[ u(x,y) = \frac{1}{3}e^{y+x} - \frac{1}{3}e^{-2(y-x)}e^{-x}\] which simplifies into \[\boxed{ u(x,y) = \frac{1}{3}\left(e^{y+x} - e^{x-2y}\right).}\]
  5. Consider the one-dimensional wave equation: \[u_{tt}-c^2u_{xx}=0,\,\,\,c>0 \]
    1. Show that the wave equation is hyperbolic
      The general form of a linear second order PDE is \[A(x,y) u_{xx} + 2B(x,y)u_{xy} + C(x,y)u_{yy} +D(x,y)u_x + E(x,y)u_y + F(x,y)u = G(x,y)\] Setting \(t\rightarrow x\) and \(x\rightarrow y\) we see that \(A = 1,\,\,2B = 0,\,\,C = c^2 \). So that the discriminant can be calculated as follows \[ B^2-AC = 0^2 - 1\cdot c^2 < 0.\] This shows that the wave equation is \( \textit{hyperbolic}.\)
    2. By the method of characteristics, deduce that the general solution for the wave equation is given by the formula \[ u(x,t) = F(x+ct) + G(x-ct) \] where \(F, G\) are arbitrary.
      The equation for the characteristics is obtained by solving the ODE \[\frac{dx}{dt} = \frac{B\pm \sqrt{B^2-AC}}{A} = \pm c.\] The solutions are \[x = ct + \alpha,\,\,\,x = -ct+\beta\] where \(\alpha, \beta\) are constants. Therefore the new characteristic coordinates are \[\xi = x + ct,\,\,\,\eta = x - ct.\] Changing coordinates from \(t,x\) to \(\xi,\eta\), let \[ u(t,x) = w(\xi(t,x), \eta(t,x)).\] By the chain rule, \[u_t = w_\xi \xi_t + w_\eta \eta_t, \] \[u_x = w_\xi \xi_x + w_\eta\eta_x, \] \[u_{tt} = w_{\xi\xi} \xi_t^2 + 2w_{\xi\eta}\xi_t\eta_t + w_{\eta\eta}\eta_t^2 + w_\xi \xi_{tt} + w_{\eta}\eta_{tt} \] \[u_{xx} = w_{\xi\xi} \xi_x^2 + 2w_{\xi\eta}\xi_x\eta_x + w_{\eta\eta}\eta_x^2 + w_\xi \xi_{xx} + w_{\eta}\eta_{xx} \] Taking derivatives of \(\xi, \eta\) w.r.t. \(t, x\) we get \[ \xi_t = c,\,\,\xi_x = 1,\,\,\eta_t = -c,\,\,\eta_x = 1. \] Hence \[u_{tt} = c^2 w_{\xi\xi} - 2c^2 w_{\xi\eta} + c^2 w_{\eta\eta} \] \[c^2 u_{xx} = c^2 w_{\xi\xi} + 2c^2 w_{\xi\eta} + c^2w_{\eta\eta}.\] Subtracting, we obtain \[ u_{tt} - c^2u_{xx} = -2c^2 w_{\xi\eta} = 0.\] Since \( c>0 \), we get \[ w_{\xi\eta} = 0. \] Integrating this w.r.t \( \xi \) gives \[ w_\eta = g(\eta). \] Integrating with respect to \(\eta\) we obtain \[ w = \int g(\eta)\, d\eta + F(\xi). \] Setting \( G(\eta) = \int g(\eta)\, d\eta \) we get \[ w(\xi,\eta) = F(\xi) + G(\eta). \] Reverting back to the original variables \(x, y\), we get the general solution \[ \boxed{u(x,y) = F(x+ct) + G(x-ct)}\]
    3. Consider the initial conditions \[ u(x,0) = f(x),\,\,\,u_t(x,0) = g(x).\] Show that the solution of the Cauchy problem for the wave equation is given by \[u(x,t) = \frac{1}{2}\left[f(x+xt)+f(x-ct)\right] +\frac{1}{2c}\int_{x-ct}^{x+ct} g(s)\,ds.\]
      Setting \( t = 0 \) into the general solution, we obtain \[ u(x,0) = f(x) = F(x) + G(x). \] Also, taking the time derivative of the general solution gives, by the chain rule \[ u_t(x,t) = cF'(x+ct) - cG'(x-ct), \] which yields \[ u_t(x,0) = g(x) = cF'(x) -c G'(x)\] when evaluated at \(t=0.\) or \[ \frac{1}{c} g(x) = F'(x) - G'(x)\] Assume \(f'(x) \) exists, then \[ f'(x) = F'(x) + G'(x)\] and adding the above, we get \[ f'(x) + \frac{1}{c}g(x) = 2F'(x) \] and substracting, we obtain \[ f'(x) - \frac{1}{c}g(x) = 2G'(x). \] Hence, by integration \[ F(s) = \frac{1}{2}f(s) +\frac{1}{2c}\int_0^s g(\tau)\,d\,\tau + A\] \[ G(s) = \frac{1}{2}f(s) -\frac{1}{2c}\int_0^s g(\tau)\,d\,\tau + B.\] Since \(f(s) = F(s)+G(s)\), we have \(A+B=0.\) Setting \(s=x+ct\) in the \(F(s)\) equation and \(s = x-ct\) in the \(G(s)\) equation, we get \[ u(x,t) = F(x+ct)+G(x-ct) = \frac{1}{2}\left[f(x+ct)+f(x-ct)\right] + \frac{1}{2c}\int_{x-ct}^{x+ct}g(\tau)\,d\tau.\]
    4. To show that d'Alembert's solution satisfies the wave equation: \[u_t = \frac{1}{2}\left[ cf'(x+ct)-cf'(x-ct)\right]+\frac{1}{2c}\left[ c\cdot g(x+ct) - c\cdot g(x-ct)\right] \] \[u_{tt} = \frac{1}{2}\left[ c^2f''(x+ct)+c^2f''(x-ct)\right]+\frac{1}{2c}\left[ c^2\cdot g'(x+ct) - c^2\cdot g'(x-ct)\right] \] \[c^2u_{xx} = c^2\frac{1}{2}\left[ f''(x+ct)+f''(x-ct)\right]+c^2\frac{1}{2c}\left[ g'(x+ct) - g'(x-ct)\right] \] So \(u_{tt}-c^2u_{xx}=0.\) It remains to verify the boundary conditions: \[ u(x,0) = \frac{1}{2}[f(x) + f(x)] + \frac{1}{2c}\int_x^x g(\tau)\,d\,\tau = f(x)\] \[u_t(x,t) = cf'(x+ct)-cf'(x-ct) +\frac{1}{2c}[cg(x+ct)-(-cg(x-ct))] = \frac{1}{2}[g(x+ct)+g(x-ct).\] So \[u_t(x,0) = g(x). \]
    5. Solve the wave equation \[ \begin{align*} & u_{tt}-25u_{xx} = 0\\ & u(x,0) = e^{-x^2},\\ & u_t(x,0) = 4+x. \end{align*} \] Use d'Alembert's solution with \(c=5,\, f(x)=e^{-x^2},\,g(x)=4+x.\) \[u(x,t) = \frac{1}{2}\left[ e^{-(x+5t)^2} + e^{-(x-5t)^2} \right] + \frac{1}{10}\int_{x-5t}^{x+5t}(4+\tau)\,d\,\tau \] \[u(x,t) = \frac{1}{2}\left[ e^{-(x+5t)^2} + e^{-(x-5t)^2} \right] + \frac{1}{10} \left[4(x+5t)-4(x-5t)+\frac{1}{2}\left((x+5t)^2-(x-5t)^2 \right) \right] \] \[ \boxed{u(x,t) = \frac{1}{2}\left[ e^{-(x+5t)^2} + e^{-(x-ct)^2} \right] + 4t + \frac{1}{2}xt} \]
    6. The linear second order PDE \[ u_{xx}-2u_{xy}+u_{yy}+u_x-u_y=0\] is \(\textit{parabolic} \) since \[a=1,\,\, 2b=-2,\,\,c=1.\] The discriminant is then \[ b^2-ac = (-1)^2-1\cdot 1 = 0.\] The characteristic equation is \[\frac{dy}{dx} = -1 \] and so \[y = -x + c.\] Set \[\xi = y+x,\,\,\eta = x.\] Changing coordinates, \[ u(x,y) = w(\xi(x,y),\eta(x,y))\] we get the standard form in the new coordinates \(\xi, \eta \): \[u_{xx} - 2u_{xy} + u_{yy} + u_x-u_y = w_{\eta\eta} +w_\eta = 0.\] This PDE can be solved by multipication using an integrating factor \(e^\eta\) \[\frac{\partial }{\partial\eta}\left(e^\eta w_\eta\right) = 0.\] The solution is obtained by integration \[ w_\eta = e^{-\eta} f(\xi) \] and \[w(\xi, \eta) = g(\xi) - e^{-\eta}f(\xi). \] Reverting to \(x, y\), we get \[ \boxed{u(x,y) = g(y+x) - e^{-x}f(y+x).} \]