# Solving 2nd order partial differential equation

I'm trying to solve given partial differential equation

$$\frac{\partial p}{\partial t}=a\frac{\partial (xp)}{\partial x}+b\frac{\partial^2 p}{\partial x^2}$$

where $a$ and $b$ are constants.

Here is my attempt:

We have that $$\frac{\partial p}{\partial t}=a\frac{\partial (xp)}{\partial x}+b\frac{\partial^2 p}{\partial x^2}$$ Rewriting the equation as $$\frac{\partial p}{\partial t}-a(p\cdot \frac{\partial x}{\partial x}+x\frac{\partial p}{\partial x})=b\frac{\partial^2 p}{\partial x^2}$$ Applying the product rule of derivates $$\frac{\partial p}{\partial t}-a(p\cdot \frac{\partial x}{\partial x}+x\frac{\partial p}{\partial x})=b\frac{\partial^2 p}{\partial x^2}$$ Hence $$\frac{\partial p}{\partial t}-a(p(1)+x\frac{\partial p}{\partial x})=b\frac{\partial^2 p}{\partial x^2}$$ $$\frac{\partial p}{\partial t}-ap-ax\frac{\partial p}{\partial x}=b\frac{\partial^2 p}{\partial x^2}$$ where $$\frac{\partial p}{\partial t}=0$$ $$\frac{-a}{b}(p+x\frac{\partial p}{\partial x})=\frac{\partial^2 p}{\partial x^2}$$ Which yields $$\frac{\partial^2 p}{\partial x^2}=\frac{-a}{b}(p+x\frac{\partial p}{\partial x})$$

• Are there any boundary/initial conditions? – rafa11111 Jun 29 '18 at 16:57
• @rafa11111 No, there aren't. – Hamilton Jun 29 '18 at 17:53
• Can anyone help? – Hamilton Jun 29 '18 at 19:08
• It's very unlikely that you have a PDE without boundary conditions. In which circumstances did you find this equation? Is it a math problem? – rafa11111 Jun 29 '18 at 19:37
• @rafa11111 Yes, it is. However, I don't actually know what will be changed once I have a PDE without boundary conditions. What about assuming that $a = 0$? – Hamilton Jun 29 '18 at 19:38

Seeking a solution by separation of variables, we have $p = X(x)T(t)$. Substituting in the equation, $$X\dot{T} = a\left( XT + xX'T \right) + b X''T,$$ being $X' = dX/dx$ and $\dot{T} = dT/dt$. Dividing by $XT$: $$\frac{\dot{T}}{T} = a\left( 1 + x\frac{X'}{X} \right) + b \frac{X''}{X}.$$ See that the LHS is a function only of $t$ and the RHS is a function only of $x$. It is only possible if $x=t$, which is nonsense, or if they are both equal to a constant value, say, $\lambda$. Then: $$\frac{\dot{T}}{T} = a\left( 1 + x\frac{X'}{X} \right) + b \frac{X''}{X} = \lambda,$$ or, $$\dot{T} - \lambda T = 0,$$ $$b X'' + a x X' + (a-\lambda)X = 0.$$ Now, we have two ODE's instead of one PDE. It's a great advance! Solving the equation for $T$: $$T = c_1 \exp \lambda T.$$ See that we will want that $\lambda<0$, because, in that case, our solution will not explode to $\infty$ for large $t$. The equation for $X$ can be transformed into the Hermite equation, and you can solve it through power series or use the fancy solution given by WolframAlpha. Anyway, it will have the form $$X = c_2 F_1(x;\lambda) + c_3 F_2(x;\lambda),$$ in which $F_1$ and $F_2$ are crazy functions (that you will probably never see again) and the solution will be $$p(x,t;\lambda) = e^{\lambda t} (A F_1(x;\lambda) + B F_2(x;\lambda)).$$
See that the solution depends somehow of $\lambda$, which is not an input of the problem! That's because we have an eigenvalue problem, that only can be completed with the boundary conditions and the initial conditions. With the boundary conditions we will discover the values of $\lambda$ for which our solution works. There will be, probably, infinite possible values for $\lambda$, and we will need to sum $p(x,t;\lambda)$ for every possible $\lambda$, leading to a Fourier-like series. Also, the initial condition will show us which values $A$ and $B$ must assume. Therefore, the solution will be complete, with the form $$p(x,t) = \sum_{k=0}^\infty e^{\lambda_k t} (A_k F_1(x;\lambda_k) + B_k F_2(x;\lambda_k)).$$
That's why the problem statement is incomplete without the boundary and initial conditions. We solved only half of the problem, and we only know that our expression $p(x,t;\lambda)$ satisfies the original PDE. However, unlike ODE's, we can conclude nothing of the final solution (without boundary conditions) with what we got. See, for example, this simpler equation: $$\frac{\partial p}{\partial t} = k \frac{\partial^2 p}{\partial x^2},$$ known as the heat equation. If we follow the same steps, we will get $$p(x,t;\lambda) = e^{\lambda t} (A \sin \lambda x + B \cos \lambda x).$$ You may think "perhaps the final solution, after applying the boundary and initial conditions, will be oscilatory!". However, if we apply the conditions $$p(x,0) = 0; \ \ \ p(0,t) = 0; \ \ \ p(L,t) = 1$$ we will get a monotonic equation, without any kind of peak or oscilation.