# Solving a second-order non-linear boundary value problem

The original post can be found here.

I have a system of coupled, non-linear ODEs.

$$J = \mu*e*n(x)*E(x) + \mu*K*T*\frac{dn(x)}{dx}$$

$$\frac{dE(x)}{dx} = \frac{4*\pi*e}{\epsilon}[N_D(x) -n(x)]$$

The first equation is drift-diffusion, the second is Gauss' Law. I am interested in solving this system self-consistently for the carrier profile, n(x), and the electric field, E(x), using finite differences. The current, J, the mobility, μ, elementary charge, e, are known. The doping profile ND(x) is known, and I have boundary conditions for the carrier concentration n(0)=ND(0) and n(L)=ND(L).

I can decouple this system in the following way. From (2), I obtain the result:

$$n = N - \frac{\epsilon}{4\pi e} \dot{E}$$

Differentiating this value:

$$\dot{n} = \dot{N} - \frac{\epsilon}{4\pi e} \ddot{E}$$

Introducing these equations into (1) yields: $$\ddot{E}=\frac{4\pi e}{\epsilon}\dot N + \frac{4\pi e^2}{\epsilon kT}EN -\frac{4\pi e}{\epsilon \mu kT}J - \frac{e}{kT} E\dot{E}$$ This equation can apparently be integrated to yield a functional relationship for E(x). Using the following substitutions: \begin{eqnarray*} a(x) &=& \frac{4\pi e}{\epsilon}\dot N(x) -\frac{4\pi e}{\epsilon \mu kT}J\\ b(x) &=& \frac{4\pi e^2}{\epsilon kT}N(x)\\ \end{eqnarray*} Apparently, the decoupled ODE for $\ddot{E}$ can be integrated to yield: $$\frac{x}{L} = \frac{\frac{1}{2}\frac{b(x)}{b_0}\log \frac{E(x)}{E_0} + \frac{E(x)}{E_0}( \frac{a(x)}{a_0} - \frac{E(x)}{E_0})}{\frac{1}{2}\frac{b_L}{b_0}\log \frac{E_L}{E_0} + \frac{E_L}{E_0}( \frac{a_L}{a_0} - \frac{E_L}{E_0})}$$ Using the boundary conditions that the derivative of the field vanishes at x = 0, x = L. And where $E_0=-\frac{b_0}{a_0}$ and $E_L=-\frac{b_L}{a_L}$. I am not sure how this result is obtained. I'd appreciate any help.