franklampard8 said:
How do you solve (analytically or numerically) a differential equation of this form,
$$\frac{\mathrm{d}y(x)/\mathrm{d}x}{\mathrm{d}z(x)/\mathrm{d}x} = a[1-y(x)-z(x)] + b$$
where a, b are constants. Also,
$$y(0) = z(0) = 0$$
Since you have only one equation, but two unknown functions y(x) and z(x) the problem remains undefined. You cannot obtain one function y(x) and one function z(x), but an infinity of couples.
Nevertheless, tne differential equation allows to express a relationship beteween each couple y(x) and z(x). The relationship is on the form y=function of z.
Now, how to obtain y = y(z) ?
dy/dz = a(-y-z)+b
(dy/dz)+a*y = b -a*z
(dY/dz)+a*Y = 0 --> Y = c*exp(-a*z)
c --> f(z)
y = f(z)*exp(-a*z)
dy/dz = (df/dz)exp(-a*z)-a*f*exp(-a*z)
(df/dz)exp(-a*z)-a*f*exp(-a*z) +a*f*exp(-a*z) = b -a*z
(df/dz)exp(-a*z) = b -a*z
df = (b-a*z)exp(a*z)*dz
f = (1/a)*(-a*z+b+1)*exp(a*z)+C
y = (1/a)*(-a*z+b+1) +C*exp(-a*z)
y(0)=z(0)=0 --> 0 = (1/a)*(b+1) +C --> C = -(b+1)/a
y = (1/a)*(-a*z+b+1) -((b+1)/a)*exp(-a*z)
if you want, you can chose any derivable function z(x). Then, the related function y(x) is :
y(x) = (1/a)*(-a*z(x)+b+1) -((b+1)/a)*exp(-a*z(x))
This proves that, due to the incomplete wording, there are an infinity of solutions.