# First Order Diffy Q Problem with Bernoulli/Integrating Factors

Homework Statement:
If dy/dy + y = (1-1/x)(1/(2y)), solve when x=1, y=1/sqrt(2). Hint: Use a substitution to get into the form of a first order differential equation
Relevant Equations:
integrating factor = e^integral(P(x))
v=y^(1-n)
dy/dx +P(x)y=Q(x)y^n
I seem to be getting an unsolvable integral here (integral calculator says it's an Ei function, which I've never seen). My thought was to use Bernoulli to make it linear and then integrating factors. Is that wrong? The basic idea is below:

P(x) 1, Q(x) = 1/2(1-1/x), n=-1, so use v=y^1- -1)=y^2

so y=sqrt(v), dy/dx=1/(2sqrt(v))dv/dx

Thus the equation becomes 1/(2sqrt(v))dv/dx + sqrt(v) = 1/sqrt(v) * 1/2(1-1/x))
Multiplying by 2* sqrt(v) gives dv/dx +2 v = (1-1/x)
Use the integrating factor e^2x gives: d/dx(v*e^(2x)) =e^(2x)(1-1/x) = e^(2x) - e^(2x)*1/x
ve^(2x) then just equals the antiderivative of e^(2x) - e^(2x)*1/x, but that second term seems to give a problem. Is my method incorrect? Not sure how to proceed.

Delta2
Homework Helper
Gold Member
I cant spot any mistakes in your solution (except that you got to learn using ##\LaTeX## )so it probably is correct.

I tried wolfram and it also gives the solution in terms of the Ei(2x) function
https://www.wolframalpha.com/input/?i=y'+y=(1-1/x)0.5(1/y)

Maybe check again the exact statement of the problem. There might be some typo after all.

haruspex
Homework Helper
Gold Member
2020 Award
Assuming you mean ##\frac{dy}{dx}+y=(1-\frac 1x)(\frac 1{2y})## (you wrote dy/dy), it already is a first order ODE.
This does suggest a typo,

Delta2
Delta2
Homework Helper
Gold Member
Assuming you mean ##\frac{dy}{dx}+y=(1-\frac 1x)(\frac 1{2y})## (you wrote dy/dy), it already is a first order ODE.
This does suggest a typo,
I think there he wanted to write first order linear

haruspex
Homework Helper
Gold Member
2020 Award
I think there he wanted to write first order linear
Yes, that fits. I agree it leads to a nasty integral; I had it in the form of a double exponential.