<s>[INST] Solve : $(2x - 4y + 5) \frac{dy}{dx} + x - 2y + 3 = 0 , y(2) = 2.5$ I have to find the solution of following differential equation:
$$(2x - 4y +  5) \frac{dy}{dx} + x - 2y + 3 = 0 , y(2) = 2.5$$
It can be re-written as
$$(2(x - 2y) +  5) \frac{dy}{dx} + (x - 2y) + 3 = 0$$
let $u = (x-2y)$
so, on differentiating both sides with respect to $x$ we get
$$\frac{du}{dx} =  1 - 2\cdot\frac{dy}{dx}$$
$$\therefore \frac{dy}{dx} = \frac{1 - \frac{du}{dx}}{2}$$
using this value in initial equation we get,
$$(2u + 5) (\frac{1-\frac{du}{dx}}{2}) + u + 3 = 0$$
On further solving we get
$$\frac{2u + 5}{4u + 11}.\frac{du}{dx} = 1$$
Integrating both sides with respect to $x$, we get
$$\int \frac{2u + 5}{4u + 11}.du = \int dx$$
$$\implies \int (\frac{1}{2} - \frac{1}{8u + 22})\cdot du = x + C$$
$$\implies \frac{1}{2}\cdot u - \frac{1}{8} \ln(8u + 22) = x + C$$
putting the value of $u$ in the above equation we get,
$$\implies \frac{1}{2} (x-2y) - \frac{1}{8} ln(8(x - 2y)+ 22) = 2 + C$$
we have, when $x = 2 , y = 2.5.$
When I put these value of $x$ and $y$ in  the above equation to obtain the value of $C$
$ln(-negative Value)$ is obtained, what is wrong here?
The answer given in the book is :
$$4x + 8y + ln(4x - 8y + 11) = 28$$
 [/INST] There's a mistake in following step and it is rectified in next step
$ \frac{1}{2}\cdot u - \frac{1}{8} \ln(8u + 22) = x + C$
$\implies  \frac{1}{2}\cdot u - \frac{1}{8} \ln(|8u + 22|) = x + C$
$\implies  \frac{1}{2}\cdot (x-2y) - \frac{1}{8} \ln(|8x-16y + 22|) = x + C$
When $x=2$ $y=2.5$, therefore
$\implies  \frac{1}{2}\cdot (2-5) - \frac{1}{8} \ln(|8*2-16*2.5 + 22|) = 2 + C$
$\implies  \frac{1}{2}\cdot (-3) - \frac{1}{8} \ln(|16-16*2.5 + 22|) = 2 + C$
$\implies   - \frac{1}{8} \ln(2) = 3.5 + C$
$\implies   - \frac{1}{8} \ln(2)-3.5=  C$
Therefore our solution becomes
$\implies  \frac{1}{2}\cdot (x-2y) - \frac{1}{8} \ln(|8x-16y + 22|) = x  - \frac{1}{8} \ln(2)-3.5$
$\implies  4x-8y -  \ln(|8x-16y + 22|) = 8x  -  \ln(2)-28$
$\implies 4x+8y + \ln(|8x-16y + 22|)-\ln2=28$
$\implies  4x+8y + {\ln(|4x-8y + 11|)}=28$
</s>