Partial Differential with Integrating Factor

I have the following:

$\dfrac{dx}{dz} = \dfrac{x(x+y)}{(y-x)(2x+2y+z(x,y))}$

I've tried to solve through using an integrating factor, i.e. I rearranged to get:

$\dfrac{dz(x,y)}{dx} - \dfrac{(y-x)}{x(x+y)}z(x,y) = \dfrac{2(y-x)}{x}$

and used IF $= \dfrac{(x+y)^2}{x}$. I do get an eventual (fairly messy, but ok) answer. I would appreciate any feedback on the validity of the method - in other words, because $z$ is a function of $x$ and $y$, is it 'acceptable' to rearrange it in this way and then use integrating factor.

Help/feedback very appreciated.

-

You can solve the differential equation by considering $\frac{dz}{dx}$ instead of $\frac{dx}{dz}$. Given,

$$\dfrac{dx}{dz} = \dfrac{x(x+y)}{(y-x)(2x+2y+z(x,y))}$$

$$\implies \dfrac{dz}{dx} = \dfrac{(y-x)(2x+2y+z(x,y))}{x(x+y)}=\frac{(y-x)}{x(x+y)}z + \frac{2(y-x)}{x} .$$

$$\implies \dfrac{dz}{dx} = \frac{(y-x)}{x(x+y)}z + \frac{2(y-x)}{x}.$$

Now, the above is a linear first order differential equation which can be solved using standard techniques. Keeping in mind that the constant is a function in $y$, the solution is

$$z(x,y) = \frac{-{x}^{3}-2\,y\,x^2-2\,{{{y}^{3}}}+2\,x\,{y}^{2}\ln(x)+x\,g(y)}{(x+y)^2}$$

-
Thanks very much for your help, I appreciate it and it now makes sense to me! – Sarah24 Dec 11 '12 at 18:19
@Sarah24: You are welcome. Glad to assist. Keep the hard work. – Mhenni Benghorbal Dec 11 '12 at 18:39

It would be better in this context either to use partial derivative sign, or suppress $y$ as an argument and treat it purely as a parameter. To cross-check your solution a calculation by means of variating the constant of integration can be carried out. First solve the homogeneous equation $$\frac{dz}{z}=\frac{y-x}{x\left(x+y\right)}dx$$ $$\frac{dz}{z}=\frac{x+y-2x}{x\left(x+y\right)}dx$$ $$\frac{dz}{z}=\frac{dx}{x}-2\frac{d\left(x+y\right)}{x+y}$$ $$z=\frac{C(y)x}{\left(x+y\right)^{2}}\tag{1}$$ Now variate $C$ in $x$ $$C=C\left(x,y\right)$$ $$z_x=\frac{C_xx}{\left(x+y\right)^{2}}+C\left[\frac{1}{\left(x+y\right)^{2}}-\frac{2x}{\left(x+y\right)^{3}}\right]=\\\frac{C_x\left(x\right)x}{\left(x+y\right)^{2}}+C\frac{y-x}{\left(x+y\right)^{3}}$$ Inserting the results in the original equation: $$\frac{C_xx}{\left(x+y\right)^{2}}+C\frac{y-x}{\left(x+y\right)^{3}}-\frac{y-x}{x\left(x+y\right)}\frac{Cx}{\left(x+y\right)^{2}}=\frac{2\left(y-x\right)}{x}$$ $$\frac{C_xx}{\left(x+y\right)^{2}}=\frac{2\left(y-x\right)}{x}$$ Solving for $C_x$: $$C_x=\frac{2\left(x+y\right)^{2}\left(y-x\right)}{x^{2}}=2\frac{\left(x^{2}+2xy+y^{2}\right)\left(y-x\right)}{x^{2}}=2\frac{x^{2}y+2xy^{2}+y^{3}-x^{3}-2x^{2}y-xy^{2}}{x^{2}}=2\frac{-x^{3}-yx^{2}+xy^{2}+y^{3}}{x^{2}}$$ $$C_x=2\left(-x-y+\frac{y^{2}}{x}+\frac{y^{3}}{x^{2}}\right)$$ Now integrate with respect to $x$: $$C=2\left(-\frac{x^{2}}{2}-xy+y^{2}\ln x-\frac{y^{3}}{x}\right)+C_0(y)$$ Substitute in $(1)$ to get the final result.

-
Thank-you, also a useful answer. – Sarah24 Dec 11 '12 at 18:21