Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$\displaystyle x \frac{dy}{dx}+2y=\frac{2}{x} \ln(x)$. Differential equations is one of my toughest subjects, could someone please help with solving

share|cite|improve this question
This is linear. Are you aware of the general method to solve it(with the integrating factor)? – Ishan Banerjee Mar 6 '13 at 12:11
This one is linear. There's a method for solving these which you surely have access to. – Gerry Myerson Mar 6 '13 at 12:11
First step I'm suppose to divide everything by x, then? – user58315 Mar 6 '13 at 12:13
  1. Divide by $x$. The eq. becomes: $$ \dfrac{dy}{dx} + 2 \dfrac{y}{x} = \dfrac{2}{x^2} \ln{x} $$
  2. Calculate the Integrating Factor. $$ \text{I.F.} = e^{\int{\dfrac{2}{x} dx}} = e^{2\ln{x}} = x^2 $$
  3. Multiply the whole eq. by $x^2$. $$ x^2 \dfrac{dy}{dx} + 2xy = 2 \ln{x} $$
  4. Let $u = x^2y$, so $$ \dfrac{du}{dx} = x^2 \dfrac{dy}{dx} + 2xy $$
  5. The original eq. now becomes: $$ \dfrac{du}{dx} = 2 \ln{x} $$
  6. Integrate both sides, w.r.t $x$: $$ u = 2 \int{ \ln{x} \text{ } dx} = 2 \left( x \ln{x} - x\right) $$
  7. Replace $u$ in terms of $x$ and $y$. $$ y = \dfrac{2}{x} \cdot \left( \ln{x} - 1 \right) + \text{I} $$

where, $I$ is the integrating constant.

share|cite|improve this answer

We get $$y'+y\frac{2}{x}=\frac{2\ln x}{x^2}$$

which is a first order linear ordinary differential equation. This is of the form $$ y' + y\cdot P(x)=Q(x)$$ whose solution is given by $$y\cdot e^{\int P(x)dx}=\int \left[Q(x)\cdot e^{\int P(x)dx} dx\right] + C.$$

So, the solution of the given DE is $$y\cdot e^{\int \frac{2}{x}dx}=\int \left[\frac{2\ln x}{x^2}\cdot e^{\int \frac{2} {x}dx} dx\right] + C.$$ Hope you can finish the solution on your own.:)

share|cite|improve this answer
Got it, thanks! – user58315 Mar 6 '13 at 12:43
@user58315, Welcome.:) – juniven Mar 6 '13 at 12:46
@user58315, You have not yet accepted my answer.:) – juniven Mar 6 '13 at 12:48

If we do not know any systematic methods, we can rewrite the equation as $x^2\frac{dy}{dx}+2xy=2\ln x$ and recognize the left-hand side as the derivative of $x^2y$. It follows that $$x^2y=\int 2\ln x\,dx=2x\ln x-2x+C.$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.