I am trying to solve the following set of coupled differential equations ( variables are p,n and psi) using the bvp solver in python :-
1. d2n/dx2-(d2psi/dx2)n-(dpsi/dx)(dn/dx)=k1 in domain 1
2. d2p/dx2+(d2psi/dx2)p+(dpsi/dx)(dp/dx)=k2 in domain 1
3. d2psi/dx2= k*(p-n) in domain 1
4. d2psi/dx2= 0 in domain 2 where domain 1 is given by x<=L and domain 2 is given by L<x<=(L+t)
subjected to the boundary conditions :
p(0)= p0, n(0)= n0, psi(0)= 0, p(L)= p0*exp(-psi/Vth), n(L)= n0*exp(psi/Vth), psi(L+t)= 5.
I can set the equations up. But considering the fact that there are two different domains where the equations are to be solved, I am facing some trouble. Any help regarding the same would be highly appreciated.