# How can I calculate the exact solution to a differential equation?

Let us consider a differential equation of the form :

$$\frac{\partial^2 u}{\partial x^2} + a\frac{\partial u}{\partial x} = 0$$ The solution is of the form $$u = c_0 + c_1\exp(ax)$$. Wtih boundary conditions $$u(\infty) = 0.5$$ and $$u(0) = -bV$$. Here, b and V are constants. How do I now calculate the exact solution of this differential equation ?

This is incorrect. The auxiliary equation formed would be $$m^2+am=0$$ $$m(m+a)=0$$ $$m=0,\, -a$$ $$\therefore u=c_0+c_1 e^{-ax}$$ Assuming that $$a\gt 0$$ and $$a\in \mathbb{R}$$, $$u(\infty)=c_0=0.5$$ But one cannot determine the exact solution without another boundary condition. So the final solution is then $$u=0.5+c e^{-ax}$$

• @Terence, don't add things to the answer that wasn't the author's intent. If you think there are steps missing, write a comment, or better, post your own answer. – Dylan Mar 5 at 9:10

As pointed out in another answer, the generic solution to

$$\frac{d^2 u}{d x^2} + a\frac{d u}{d x} = 0$$

for $$a \ne 0$$ is actually

$$u = c_0 + c_1\exp(-ax)$$

As long as $$a>0$$ then we have

$$u(0) = c_0 \\ u(\infty) = c_0+c_1 \\ \Rightarrow c_1 = u(\infty) - u(0)$$

If $$a<0$$ then $$u(\infty)$$ is undefined as $$u$$ is unbounded as $$x \rightarrow \infty$$.

If $$a=0$$ then the generic solution is $$u=c_0+c_1x$$ and again $$u(\infty)$$ is undefined.