# Is my approach to solve the following system of differential equations okay?

$$-A_g{d^2g\over dx^2} + B_g{dg\over dx} = C - Mgh \tag 1$$ $$-A_h{d^2h\over dx^2} + B_h{dh\over dx} = C - Mgh \tag 2$$

where, $A_g, B_g, A_h, B_h, C$ and $M$ are constants. And, $g$ and $h$ are dependent variables and $x$ is the independent variable.

I have tried to solve the problem in following way:

(1) - (2) $\Rightarrow -A_gD^2g + A_h D^2h + B_g Dg - B_hDh = 0$ [where, $D \equiv {d\over dx}$]

$\Rightarrow h = {B_gDg - A_gD^2g\over B_hD - A_hD^2} = {B_gg - A_gDg\over B_h - A_hD}$ [I am confused about this step. Can we express $h$ in this way?]

Now putting $h$ in (1) we can solve (1).

Is my procedure okay? And, is there any other way to solve the problem more easily and/or correctly?

-
Until 1)-2) it is ok, but then you "remove" the diff. operator $D^2$ from $h$ and this is not correct – Avitus Nov 11 '13 at 18:33

After subtracting (2) from (1) and setting $z=g-h$ we will have a second order homogeneous equation in $x$ and $z$: $-A_g z''+B_g z'=0$. Solving this equation we get $$z=c_1+c_2 \displaystyle e^{-\frac{B_g}{A_g}x}.$$ So $g= h+c_1+c_2 \displaystyle e^{-\frac{B_g}{A_g}x}$ and hence substituting this into the second one you will have a second order equation for $h$, but unfortunetly, it is nonlinear.
Thank you very much for your answer. But in my case $A_g\neq A_h$ and $B_g \neq B_h$. It would be great if you please help me for this case also. – crazy particle Nov 19 '13 at 20:56