# Partial Differential Equation -MOC

1. Dec 2, 2011

### El_Nino

1. The problem statement, all variables and given/known data
The PDE: ${\partial \rho \over \partial t} + \rho {\partial \rho \over \partial x} =-x\rho$
and $\rho(x,0) = f(x)$
Determine a parametric representation of the solution.

2. Relevant equations
${dx\over dt} = \rho$

${d\rho \over dt} = -x\rho$

3. The attempt at a solution
Using method of characteristics I get

$\rho = \rho(x_0,0)\exp(-xt) = f(x_0)\exp(-xt)$

$x=-f(x_0)\exp(-xt)/x + c$

And since at t=0 x=x_0
$x=-{f(x_0)\over x}(1-\exp(-xt))+x_0$

This is my solution, but if i plug in f.x f(x) = x and substitute ρ into the PDE, i get rubish.

If f(x)=x, then

$x_0 = {x\over (1-\exp(-xt))/x +1}$

$\rho = x_0 \exp(-xt)$

And this substituting this into
${\partial \rho \over \partial t} + \rho {\partial \rho \over \partial x} +x\rho$

Gives a non-zero term.

Any idea what I'm doing wrong?