Homogenous, linear, first-order, ordinary differential equation mistake

I am trying to solve a homogeneous, first-order, linear, ordinary differential equation but am running into what I am sure is the wrong answer. However I can't identify what is wrong with my working?!

$\displaystyle \frac{dy}{dx}=\frac{-x+y}{x+y}=\frac{1-\frac{x}{y}}{1+\frac{x}{y}}$. Let $z=x/y$, so that $y=x/z$ and $\displaystyle \frac{dy}{dx}=\frac{z-x\frac{dz}{dx}}{z^2}=\frac{1-z}{1+z}.$ Then $\displaystyle z-x\frac{dz}{dx}=\frac{z^2-z^3}{1+z} \implies -x\frac{dz}{dx}=-\frac{z^3+z}{z+1} \implies \frac{dx}{x}=\frac{dz}{z^2+1} \implies \arctan(z)=\ln(|x|)+C \implies z=\tan(\ln(|x|)+C)$

Thus $\displaystyle y = \frac{x}{\tan(\ln(|x|)+C)}$.

However, my book: *A Modern Introduction to Differential Equations 2nd edition by Henry Ricardo* says "this first-order equation is homogeneous and can be solved implicitly".

They pursued the method of letting $z=y/x$ and obtained the solution as

$\displaystyle 2\arctan(y/x)+\ln(x^2+y^2)-C=0$.

Why are the two different substitutions, which should both be suitable, giving me two different answers?

Re: Homogenous, linear, first-order, ordinary differential equation mistake

Quote:

Originally Posted by

**abscissa** I am trying to solve a homogeneous, first-order, linear, ordinary differential equation but am running into what I am sure is the wrong answer. However I can't identify what is wrong with my working?!

$\displaystyle \frac{dy}{dx}=\frac{-x+y}{x+y}=\frac{1-\frac{x}{y}}{1+\frac{x}{y}}$. Let $z=x/y$, so that $y=x/z$ and $\displaystyle \frac{dy}{dx}=\frac{z-x\frac{dz}{dx}}{z^2}=\frac{1-z}{1+z}.$ Then $\displaystyle z-x\frac{dz}{dx}=\frac{z^2-z^3}{1+z} \implies -x\frac{dz}{dx}=-\frac{z^3+z}{z+1} \implies \frac{dx}{x}=\frac{dz}{z^2+1} \implies $

I believe your last equality is incorrect.

$\displaystyle \frac{z^3+z}{z+1}=\frac{z(z^2+1)}{z+1}$

so you would have

$\displaystyle \frac{dx}{x}=\frac{(z+1)}{z(z^2+1)}dz$

i.e. you can't cancel out what you have.

Re: Homogenous, linear, first-order, ordinary differential equation mistake

Let V = y/x. V + xdv/dx = -1 + V/1+V, xdv/dx = -1-V^2/1+V, -(1+V/1+V^2)dv = dx/x, -arctan(V) - 1/2ln|1+V^2| = ln|x| + C, 2arctan(y/x) + ln|1+y^2/x^2| + 2ln|x| - C = 0,

finally, 2arctan(y/x) + ln|x^2+y^2| - C = 0.

Re: Homogenous, linear, first-order, ordinary differential equation mistake

In what sense is this a "linear" equation?