# Find the solution to a PDE with an initial condition

Find the solution to $u_x + y u_y = u$ with initial condition $u(0,y) = \cos(y)$.

Attempted solution - Suppose we parametrize a curve $(x,y)$ by a parameter $\xi$. So that

$$u=u(x(\xi),y(\xi))$$

$$\frac{\mathrm{d}u}{\mathrm{d}\xi}=\frac{\mathrm{d}x}{\mathrm{d}\xi}\frac{\partial u}{\partial x}+\frac{\mathrm{d}y}{\mathrm{d}\xi}\frac{\partial u}{\partial y}$$

Comparing to our original PDE

$$u = \frac{\partial u}{\partial x}+y\frac{\partial u}{\partial y}$$

We then set

$$\frac{\mathrm{d}u}{\mathrm{d}\xi}=u$$

$$\frac{\mathrm{d}x}{\mathrm{d}\xi}=1$$

$$\frac{\mathrm{d}y}{\mathrm{d}\xi}=y$$

We then have

$$\mathrm{d}\xi=\frac{\mathrm{d}u}{u}= \mathrm{d}x = \frac{\mathrm{d}y}{y}$$

Integrating we have $$\xi = \ln(u) = x = \ln(y) + C$$

Now for the general solution we have $$\frac{\mathrm{d}u}{\mathrm{d}\xi} = u \Rightarrow \mathrm{d}\xi = \frac{\mathrm{d}u}{u}\Rightarrow \xi = \ln(u) + C \Rightarrow u = Ce^{\xi}$$

The initial condition implies...

I am following the structure from another user that answered a similar question I had but I am now a bit lost applying the initial condition. I do know that $x = \xi$ but I am not sure how to get the rest of the solution from there.

• $\frac{dx}{d\xi}$ should be 1. – Chee Han May 22 '17 at 3:03
• @CheeHan Thank you just caught that – Wolfy May 22 '17 at 3:04
• You set up the correct characteristic equations. Now you need to paramaterise your "initial curve", i.e the curve traced out by the given initial condition. These will serve as the initial condition for the characteristic equations. Since $u(0,y) = \cos(y)$, you may parameterise your initial curve as $x(0) = 0, y(0)=s, u(0,s)=\cos(s)$. Now solve each of the three characteristic equation with respective initial condition. – Chee Han May 22 '17 at 3:10
• @CheeHan I see, but don't I need to find the general solution first and then apply the initial condition? I believe after my last line I wrote I need to integrate to get $\xi = \ln(u) = x = \ln(y) + C$? – Wolfy May 22 '17 at 3:12
• Your answer will then be in terms of $\xi$ and $s$ and the trick now is to try and express $\xi$ and $s$ in terms of $x$ and $y$. Not that this is not always possible. – Chee Han May 22 '17 at 3:12

$$u_x+yu_y=u$$ Set of characteristic ODEs: $\quad \frac{dx}{1}=\frac{dy}{y}=\frac{du}{u}$

First family of characteristics curves, from $\frac{dx}{1}=\frac{dy}{y} \quad\to\quad ye^{-x}=c_1$

Second family of characteristics curves, from $\frac{dy}{y}=\frac{du}{u} \quad\to\quad \frac{u}{y}=c_2$

General solution, with any differentiable fonction $F$ : $$\frac{u}{y}=F(ye^{-x}) \quad\to\quad u=y\:F(ye^{-x})$$ Condition : $\quad u(0,y)=\cos(y)=y\:F(ye^{0}) \quad$ determines the function $F$ :

$$F(t)=\frac{\cos(t)}{t} \quad \text{any } t\neq 0$$

Bringing this function $F$ into the above general solution gives $\quad u=y\:\frac{\cos(ye^{-x}) )}{ye^{-x}}$ $$u(x,y)=e^x\cos(y\:e^{-x})$$

• Can you explain why $F(t) = \frac{cos(t)}{t}$ comes from? I don't understand that part – Wolfy May 22 '17 at 17:52
• From $\quad \cos(y)=y\:F(ye^{0})=y\:F(y)\quad$; Hence $\quad F(y)=\frac{\cos(y)}{y}\quad$. This defines the fonction $F$. The variable of a function can be represented by any symbol. So you can replace $y$ by any symbol, for example by $t$ or any other if you prefer. – JJacquelin May 22 '17 at 18:06