Professional Documents
Culture Documents
Quiz 2 Solution MTH442
Quiz 2 Solution MTH442
1. (2 points) Find the unique solution u = u(x, y) to the initial value problem
(1 + x2 )ux + uy = 0, u(0, y) = y 2 + 3y.
Solution: In order to find the general solution, we need to solve the ODE
dy 1
= .
dx 1 + x2
Its solution can be obtained by taking integration directly:
Z
1
y= dx = arctan x + c ⇒ Φ(x, y) = y − arctan x = c.
1 + x2
Therefore the general solution to the PDE is u(x, y) = f (y − arctan x). By applying
the initial condition, we have
u(0, y) = y 2 + 3y = f (y) ⇒ u(x, y) = (y − arctan x)2 + 3(y − arctan x).
2. (2 points) Find the unique solution u = u(x, y) to the initial value problem
(x2 + 1)ux + 2xyuy = 0, u(0, y) = sin(y 2 + 1).
Solution: In order to find the general solution, we need to solve the ODE
dy 2xy
= 2 .
dx x +1
This equation cannot be solved by taking integration directly. It is a separable equation
dy 2x
in the sense that we can change it to a form = 2 dx in which x and y are placed
y x +1
separately in the two sides. We then take integrals:
Z Z
dy 2x
= 2
dx ⇒ ln y = ln(x2 + 1) + c.
y x +1
Note that we add only one constant in the right side (indeed, adding two different
constants in two sides ends with adding only one constant in one side). It yields
y y
ln y − ln(x2 + 1) = c ⇒ ln 2 = c, ⇒ 2
= ec .
x +1 x +1
y
Therefore the general solution to the PDE is u(x, y) = f . By applying the
x2 + 1
initial condition, we have
" 2 #
y
u(0, y) = sin(y 2 + 1) = f (y) ⇒ u(x, y) = sin +1 .
x2 + 1
1
2