Sovardipk

2022-07-06

I'm taking an elementary differential equations class and we got our first exam back and I don't understand why I was wrong on one of the questions. I got a 96, and the professor said there were quite a few d's and f's, so I didn't want to quibble about this.
Anyway, the problem was $\frac{dy}{dx}=\frac{1}{x+y+2}$ and I chose the sub $u=x+y+2$, with $\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dx}=\frac{dy}{du}\left(1+\frac{1}{u}\right)$ and then plugged in the expression for $\frac{dy}{dx}$, separated the equation and solved for y in terms of u and then substituted back to get $y=\mathrm{ln}\left(x+y+3\right)+c.$ The professor took issue with my expression for $\frac{dy}{dx}$, saying that I couldn't differentiate y w.r.t. u if y is part of u. Is this correct?

Yair Boyle

Expert

Your solution seems fine, although it is an implicit solution. I think an easier way to solve the DE
$\frac{dy}{dx}=\frac{1}{x+y+2}$
is to arrange as
$\frac{dx}{dy}=x+y+2.$
This is a first-order linear equation for x(y). I get
$x\left(y\right)=C{e}^{y}-y-3.$
It's possible to solve for y using the Lambert W function, but it's rather messy and doesn't provide as much insight.

Do you have a similar question?