# Using v substitution for first order homogenous DE and constraining solution

• I
Mayhem
TL;DR Summary
Understanding this substitution for a first order homogenous equation as well as a solution to an example of such an equation.
My considers a type of differential equation $$\frac{\mathrm{d} y}{\mathrm{d} x} = f\left(\frac{y}{x} \right )$$ and proposes that it can be solved by letting ##v(x) = \frac{y}{x}## which is equivalent to ##y = xv(x)##. Then it says $$\frac{\mathrm{d} y}{\mathrm{d} x} = v + x\frac{\mathrm{d} v}{\mathrm{d} x}$$ without any further explanation. Is it correctly understand that it just let's ##\frac{\mathrm{d} y}{\mathrm{d} x} = y' = \left(xv(x) \right)' = v + x \frac{\mathrm{d} v}{\mathrm{d} x} ## ?

Next, I would like to ask if I'm understanding this right. For the DE $$\frac{\mathrm{d} y}{\mathrm{d} x} = \frac{x^2+xy+y^2}{x^2}$$ the solution is $$y = x\tan{\left(\ln(|x|) + C \right)}$$ (I got the same answer as the book). But shouldn't it be noted that this solution is only true for ##-\pi/2 < y/x < \pi/2##? The book mentions nothing of the sort in the answer key.

Delta2

Homework Helper
2022 Award
Summary:: Understanding this substitution for a first order homogenous equation as well as a solution to an example of such an equation.

My considers a type of differential equation $$\frac{\mathrm{d} y}{\mathrm{d} x} = f\left(\frac{y}{x} \right )$$ and proposes that it can be solved by letting ##v(x) = \frac{y}{x}## which is equivalent to ##y = xv(x)##. Then it says $$\frac{\mathrm{d} y}{\mathrm{d} x} = v + x\frac{\mathrm{d} v}{\mathrm{d} x}$$ without any further explanation. Is it correctly understand that it just let's ##\frac{\mathrm{d} y}{\mathrm{d} x} = y' = \left(xv(x) \right)' = v + x \frac{\mathrm{d} v}{\mathrm{d} x} ## ?
Yes.
Next, I would like to ask if I'm understanding this right. For the DE $$\frac{\mathrm{d} y}{\mathrm{d} x} = \frac{x^2+xy+y^2}{x^2}$$ the solution is $$y = x\tan{\left(\ln(|x|) + C \right)}$$ (I got the same answer as the book). But shouldn't it be noted that this solution is only true for ##-\pi/2 < y/x < \pi/2##? The book mentions nothing of the sort in the answer key.

To determine $C$, you need to apply an initial condition $y(x_0) = y_0$ where $x_0 \neq 0$. Using a more convenient definition of $C$ the general solution is $$y = x\tan \left( \ln \left| \frac{x}{x_0}\right| + C\right)$$ where the aboluste value signs are not strictly necessary as $x$ and $x_0$ will have the same sign so $x/x_0 > 0$ and we obtain $$\frac{y_0}{x_0} = \tan C.$$ Now the range of $\tan$ is the whole of $\mathbb{R}$ so such a $C$ always exists, and is equal to $\arctan(y_0/x_0) \in (-\frac 12\pi, \frac12\pi)$.

The solution is valid for $$-\frac{\pi}{2} < \ln \left|\frac{x}{x_0}\right| + \arctan\left(\frac{y_0}{x_0}\right) < \frac{\pi}{2}.$$.

Mayhem and Delta2
Mayhem
Yes.

To determine $C$, you need to apply an initial condition $y(x_0) = y_0$ where $x_0 \neq 0$. Using a more convenient definition of $C$ the general solution is $$y = x\tan \left( \ln \left| \frac{x}{x_0}\right| + C\right)$$ where the aboluste value signs are not strictly necessary as $x$ and $x_0$ will have the same sign so $x/x_0 > 0$ and we obtain $$\frac{y_0}{x_0} = \tan C.$$ Now the range of $\tan$ is the whole of $\mathbb{R}$ so such a $C$ always exists, and is equal to $\arctan(y_0/x_0) \in (-\frac 12\pi, \frac12\pi)$.

The solution is valid for $$-\frac{\pi}{2} < \ln \left|\frac{x}{x_0}\right| + \arctan\left(\frac{y_0}{x_0}\right) < \frac{\pi}{2}.$$.
How do I learn to think like this? I don't think this line of reasoning would have come to me no matter how long I looked at the problem.

Delta2
Mentor
How do I learn to think like this?
Experience.
Solving differential equations requires a bag of tricks that you learn as you go along.

Delta2
Mayhem
Experience.
Solving differential equations requires a bag of tricks that you learn as you go along.
Seems reasonable. I think the same is true for integrals.