14-02-2025

Problem: Solve the following differential equation: \[ (x+y)\left( \mathrm{d} x - \mathrm{d} y \right) = \mathrm{d} x + \mathrm{d} y. \]
Solution: The given equation is \begin{equation}\label{eq:14Feb2025-1} (x+y)\left( \mathrm{d} x - \mathrm{d} y \right) = \mathrm{d} x + \mathrm{d} y. \end{equation} Re-writing the above equation as \begin{equation}\label{eq:14Feb2025-2} (x + y -1) \mathrm{d} x = (x + y + 1) \mathrm{d} y \implies \frac{\mathrm{d} y}{\mathrm{d} x} = \frac{x + y - 1}{x + y + 1}. \end{equation} Let $v = x + y$. So we have \begin{align*} \frac{\mathrm{d} v}{\mathrm{d} x} = 1 + \frac{\mathrm{d}y}{\mathrm{d}x} \implies \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{\mathrm{d}v}{\mathrm{d}x} - 1. \end{align*} Substituting the above in Equation \eqref{eq:14Feb2025-2}, we get \begin{align*} \frac{\mathrm{d}v}{\mathrm{d}x} - 1 = \frac{v - 1}{v + 1} & \implies \frac{\mathrm{d}v}{\mathrm{d}x} = 1 + \frac{v - 1}{v + 1} \\ & \implies \frac{\mathrm{d}v}{\mathrm{d}x} = \frac{2v}{v + 1} \\ & \implies \left( \frac{v+1}{v} \right) \mathrm{d} v = 2\mathrm{d} x \\ & \implies \left( 1 + \frac{1}{v} \right)\mathrm{d} v = 2\mathrm{d} x \\ & \implies \int \left( 1 + \frac{1}{v} \right)\mathrm{d} v = \int 2 \mathrm{d} x \\ & \implies v + \ln v = 2x + c \\ & \implies x - y + c = \log (x + y). \end{align*} Thus, the solution to the given differential equation \eqref{eq:14Feb2025-1} is: \[ \textcolor{blue}{ \boxed{ x - y + c = \log (x + y). } } \]