Solve the ODE $y'=1-\frac{y}{x}$

84 Views Asked by At

I substituted $u=\frac{y}{x}$ then tried to solve the ODE $$\frac{u'}{2u-1}= -\frac{1}{x}$$ and I came this far $$\frac{1}{2}\ln |{2u-1}|=- \ln |{x}| + c_1$$ but then in the solution there was the step $$c_1=\ln c_2 \in \mathbb{R}, c_2 > 0$$ to get $$\ln |2u-1|=\ln{(\frac{c_2}{x})^2}$$ but why do we have this additional step? Couldn't we just calculate the solution without this step?

2

There are 2 best solutions below

2
On BEST ANSWER

Yes, the step before is enough to get a general solution. However, we can assume the constant to be an expression of other constants. The last step is just for simplification to the right-hand side.

0
On

$y' = 1 - \dfrac{y}{x}; \tag 1$

$y' + \dfrac{y}{x} = 1; \tag 2$

$xy' + y = x; \tag 3$

$(xy)' = y + xy'; \tag 4$

$(xy)' = x; \tag 5$

$xy = \dfrac{x^2}{2} + C, \; C \; \text{the arbitrary constant}; \tag 6$

$y = \dfrac{x}{2} + \dfrac{C}{x}; \tag 7$

We Check:

$y' = \dfrac{1}{2} - \dfrac{C}{x^2}; \tag 8$

$\dfrac{y}{x} = \dfrac{1}{2} + \dfrac{C}{x^2}; \tag 9$

$1 - \dfrac{y}{x} = \dfrac{1}{2} - \dfrac{C}{x^2} = y'! \; \checkmark \tag{10}$