Detailed Explanation
A differential equation is called homogeneous if it can be written as \( \frac{dy}{dx} = F\left(\frac{y}{x}\right) \), that is, the right side depends only on the ratio \( \frac{y}{x} \). For such equations we use the substitution \( y = vx \), where \( v \) is a function of \( x \). Differentiating gives \( \frac{dy}{dx} = v + x\frac{dv}{dx} \). This substitution converts the equation into a variables-separable form in \( v \) and \( x \), which we can then integrate. Finally, we use the given condition \( y = 1 \) when \( x = 1 \) to find the constant of integration and get the particular solution.
Formula Used
Substitution for homogeneous equations: \( y = vx \Rightarrow \frac{dy}{dx} = v + x\frac{dv}{dx} \). Also \( \int e^{-v}\,dv = -e^{-v} + C \) and \( \int \frac{1}{x}\,dx = \ln|x| + C \).
Solution
- Step 1: Write the equation in the form \( \frac{dy}{dx} \). From \( \left(xe^{y/x} + y\right)dx = x\,dy \), divide by \( x\,dx \): \[ \frac{dy}{dx} = \frac{xe^{y/x} + y}{x}. \] Simplify to get \[ \frac{dy}{dx} = e^{y/x} + \frac{y}{x}. \] The right side depends only on \( \frac{y}{x} \), so the equation is homogeneous.
- Step 2: Apply the substitution \( y = vx \). Then \[ \frac{dy}{dx} = v + x\frac{dv}{dx}. \] Also \( \frac{y}{x} = v \). Substituting into the equation from Step 1: \[ v + x\frac{dv}{dx} = e^{v} + v. \]
- Step 3: Cancel \( v \) from both sides: \[ x\frac{dv}{dx} = e^{v}. \] Now separate the variables \( v \) and \( x \): \[ \frac{dv}{e^{v}} = \frac{dx}{x}, \] which is the same as \[ e^{-v}\,dv = \frac{1}{x}\,dx. \]
- Step 4: Integrate both sides: \[ \int e^{-v}\,dv = \int \frac{1}{x}\,dx. \] This gives \[ -e^{-v} = \ln|x| + C. \]
- Step 5: Substitute back \( v = \frac{y}{x} \) to return to the original variables: \[ -e^{-y/x} = \ln|x| + C. \]
- Step 6: Apply the initial condition \( y = 1 \) when \( x = 1 \): \[ -e^{-1} = \ln 1 + C. \] Since \( \ln 1 = 0 \), we get \[ C = -e^{-1} = -\frac{1}{e}. \]
- Step 7: Substitute the value of \( C \) back into the general solution: \[ -e^{-y/x} = \ln|x| - \frac{1}{e}. \] Multiplying by \( -1 \) gives the neat form \[ e^{-y/x} = \frac{1}{e} - \ln|x|. \]
Final Answer
The particular solution is \[ e^{-y/x} + \ln|x| = \frac{1}{e}, \] equivalently \( e^{-y/x} = \frac{1}{e} - \ln|x| \).
Common Mistake
A common mistake is forgetting that after substituting \( y = vx \), the derivative becomes \( \frac{dy}{dx} = v + x\frac{dv}{dx} \) (using the product rule), not just \( x\frac{dv}{dx} \). Dropping the \( v \) term leads to a wrong separated equation and an incorrect answer.