Is it possible to eliminate a variable from these two differential equations? I have two second order differential equations in three variables that I need to use to establish a relation between two of the variables.
The equations are
$\alpha$ $ x $ + $\beta$$y$ = $A$$(cx + x'')$$ $ + $\gamma$r
$\alpha$ $ x $ + $\beta$$y$ = $B$$(cx + x'')$$ $ + $\delta$r
where $x$, $y$, $r$ are functions of $z$, and $\alpha$, $\beta$, $\gamma$, $\delta$, $A$, $B$ are constants, and $x''$ = $\frac{\partial^2x}{\partial^2z}$.
I need to get a relation between $y$ and $r$ by eliminating $x$ from the equations, but cannot manage to do this. Is it actually possible to eliminate $x$ from these equations?
Any help would be greatly appreciated.
 A: $$
\cases{B\alpha x  + B\beta y = B A(cx + x'') + B\gamma r \\
A\alpha x  + A\beta y = AB(cx + x'')  + A\delta r
}$$
subtracting the second from the first ode we have
$$
\alpha(B-A)x+\beta(B-A)y = (B\gamma-A\delta)r
$$
and now if $A\ne  B$
$$
x = \left(\frac{B\gamma-A\delta}{B-A}\right)r-\beta y
$$
after that we can substitute the found $x$ into the odes.
A: [If $c$ isn't constant this doesn't work.]
Rearranging your first Eqn gives
\begin{align}
x''+(c-\frac{\alpha}{A})x=\frac{\beta y-\gamma r}{A}\equiv f(z)
\end{align}
Letting
\begin{align}
u&=\kappa x+x'\\
u'&=\kappa x'+x'',
\end{align}
and substituting into your ODE gives that
\begin{align}
u'+\frac{Ac-\alpha}{A\kappa}u-\left[\frac{Ac-\alpha}{A\kappa}+\kappa\right]x'=f(z),
\end{align}
define $\kappa$ such that your $x'$ term goes to zero. . .
\begin{align}
u'-\kappa u=f(z),
\end{align}
using integrating factor arrive at the solution for $u$
\begin{align}
u(z)=e^{\kappa z}\left(c_1+\int e^{-\kappa z}f(z)\mathrm dz\right)\equiv f_2(z).
\end{align}
Then solve for $x$ using the definition of $u$
\begin{align}
x(z)=e^{-\kappa z}\left(c_2+\int e^{\kappa z}f_2(z)\mathrm dz\right),
\end{align}
or written out completely,
\begin{align}
x(z)=e^{-\kappa z}\left(c_2+\int\left[ e^{2\kappa z}\left(c_1+\int e^{-\kappa z}\left[\frac{\beta y-\gamma r}{A}\right]\mathrm dz\right)\right]\mathrm dz\right).
\end{align}
I hope this helps.
Pro tip: You can use this method to solve linear, non-homogeneous, constant-coefficient ODE's of any order!
