I have been trying to use the method of characteristics to solve a system of two partial differential equations. The equations I am trying to solve are: $$\frac{\partial a}{\partial x}+g\frac{\partial a}{\partial y}=ab-a$$ $$\frac{\partial b}{\partial x}+g\frac{\partial b}{\partial y}=ab-b$$ Solving for $a$ and $b$, where $g$ is a constant.
The problem I have been having is with the right side of the equation. I have tried using the general matrix method to decouple the equations and solve them independently, but I have not been able to do so. I have not seen any examples where the right hand side has a dependency on both variables in the equation.
Any help would be greatly appreciated.
Edit: I should have mentioned the boundary conditions. At $x=0$, $a=\alpha$ and $b=\beta$ where $\alpha$ and $\beta$ are real, positive numbers.
$$\frac{\partial a}{\partial x}+g\frac{\partial a}{\partial y}=ab-a \tag 1$$ $$\frac{\partial b}{\partial x}+g\frac{\partial b}{\partial y}=ab-b \tag 2$$ Let $u(x,y)=a-b$ $$\frac{\partial u}{\partial x}+g\frac{\partial u}{\partial y}=-u$$ This is a first order linear PDE easy to solve. You get the general solution : $$u=e^{-x}F(y-gx) \tag 3$$ with arbitrary function $F$.
The condition $u(0,y)=\alpha-\beta$ implies $\alpha-\beta=e^0F(y-0)=F(y)$
Thus the function $F$ is constant and is known now : $F=\alpha-\beta$ $$u=(\alpha-\beta)e^{-x}$$ $$b=a-(\alpha-\beta)e^{-x}$$ Putting it into Eq.$(2)$ : $$\frac{\partial b}{\partial x}+g\frac{\partial b}{\partial y}=(a-1)\big(a-(\alpha-\beta)e^{-x}\big) \tag 4$$ This is a first order linear PDE. The Charpit-Lagrange characteristic equations are : $$\frac{dx}{1}=\frac{dy}{g}=\frac{da}{(a-1)\big(a-(\alpha-\beta)e^{-x}\big)}$$ A first characteristic equation comes from $\frac{dx}{1}=\frac{dy}{g}$ $$y-gx=c_1$$
A second characteristic equation comes from $\frac{dx}{1}=\frac{da}{(a-1)\big(a-(\alpha-\beta)e^{-x}\big)}$. solving thir Riccati ODE leads to : $$a=1+\frac{x+(\alpha-\beta)e^{-x}}{(\alpha-\beta)\text{Ei}\big((\alpha-\beta)e^{-x}-\exp\big(x+(\alpha-\beta)e^{-x}\big)\big)+c_2}$$ Ei is the special function called "Exponential Integral" : https://mathworld.wolfram.com/ExponentialIntegral.html
The general solution of the PDE $(4)$ is : $$a=1+\frac{x+(\alpha-\beta)e^{-x}}{(\alpha-\beta)\text{Ei}\big((\alpha-\beta)e^{-x}-\exp\big(x+(\alpha-\beta)e^{-x}\big)\big)+\Phi\big(y-gx \big)} \tag 5$$ with arbitrary function $\Phi$.
The condition $a(0,y)=\alpha$ gives :
$\alpha=1+\frac{0+(\alpha-\beta)e^{0}}{(\alpha-\beta)\text{Ei}\big((\alpha-\beta)e^{0}-\exp\big(0+(\alpha-\beta)e^{0}\big)\big)+\Phi\big(y-0 \big)} =1+\frac{(\alpha-\beta)}{(\alpha-\beta)\text{Ei}\big((\alpha-\beta)-\exp\big((\alpha-\beta)\big)\big)+\Phi\big(y\big)}$
This implies $\Phi(y)=$constant.
$\Phi=\frac{(\alpha-\beta)}{\alpha-1}-(\alpha-\beta)\text{Ei}\big((\alpha-\beta)-\exp\big((\alpha-\beta)\big)\big)$
The constant $\Phi$ is known now. We put it into $(5)$ which gives the solution : $$a=1+\frac{x+(\alpha-\beta)e^{-x}}{(\alpha-\beta)\text{Ei}\big((\alpha-\beta)e^{-x}-\exp\big(x+(\alpha-\beta)e^{-x}\big)\big)+\frac{(\alpha-\beta)}{\alpha-1}-(\alpha-\beta)\text{Ei}\big((\alpha-\beta)-\exp\big((\alpha-\beta)\big)\big)}$$ Then one found $b$ with : $$b=a-(\alpha-\beta)e^{-x}$$ Note that the specified condition leads to a solution which is function of $x$ only. If this was known from the very start the calculus would had been much simpler with a system reduced into ODEs instead of PDEs : $$\frac{d a}{d x}=ab-a$$ $$\frac{d b}{d x}=ab-b$$