You are on page 1of 1

Differential equations: xy' + y = (y^2)lnx?

I am having a lot of trouble trying to solve this differential equation. I am gi


ven initial condition y(e) = 1/3. Can someone please show me how this is done?
This is a Bernoulli differential equation. Such equations are of the form:
y' + p(x)*y = q(x)*y^n
here, p(x) = 1/x, q(x) = (ln(x))/x, and n = 2
You can transform a Bernoulli differential equation into linear first-order equa
tion with the substitution:
u(x) = y(x)^(1-n)
In this case, we would use the subsitution:
u = 1/y, or y = 1/u
Then,
dy/dx = -1/u^2 du/dx
Plug this into the original differential equation:
y' + y/x = (y^2)(ln(x))/x
-(1/u^2)*du/dx + 1/(x*u) = (1/u^2)*(ln(x))/x
du/dx - u/x = -(ln(x))/x)
This is now a first-order linear equation for u(x). Solve it using an integratin
g factor (IF):
IF = exp(INTEGRAL of {-1/x dx}) = exp(-ln(x)) = 1/x
u(x) = x*INTEGRAL of {(-ln(x)/x^2) dx}
Integrating by parts gives:
u(x) = x*[ln(x)/x +1/x + c]
where c is the constant of integration.
u(x) = c*x + ln(x) + 1
Back substitute for u:
1/y = c*x + ln(x) + 1
y(x) = 1/(c*x + ln(x) + 1)

You might also like