# How to solve differential equation $(y'/y)'=a((b/x^2)+xy)$?

In a physics problem I'm working on, the following differential equation has appeared

$$\left(\frac{y'}{y}\right)'=a\left(\frac{b}{x^2}+xy\right),~~(x>0)$$

The first approaches tried were those that were outlined in this previous question of mine. Alas, there is a new complicating term (the $1/x^2$ one) that makes this quite complicated.

This time, wolframalpha doesn't give me a closed form solution, so I don't know exactly what to expect.

If it helps, I'm looking for solutions that are big but not divergent near the origin (i.e. for small values of $x$), and that decay down (along with all its derivatives) to 0 at infinity..

• Where did this problem come from? Mechanics? – Demetri Pananos Oct 11 '16 at 14:22
• @DemetriP Statistical Mechanics/Thermodynamics. I'm trying to find the charge density of an electron gas at temperature $T$ surrounding a sphere of charge $Q$. The differential equation that I asked in the linked question was for a similar problem (just with the sphere replaced with an infinite plate of charge density $\sigma$), and the solutions to that differential equation made good physical sense. – Arturo don Juan Oct 11 '16 at 16:07
• @DemetriP This comes from using a technique similar to the Thomas-Fermi approximation. I approximate the field produced by the electron-gas as being a fixed field, independent of time. Then the problem becomes reduced to using the equation of state for an ideal gas of non-interacting electrons and the "external" potential due to the sphere and the electron gas. – Arturo don Juan Oct 11 '16 at 16:09

Hint:

Let $y=x^{-ab}e^u$ ,

Then $y'=x^{-ab}e^uu'-abx^{-ab-1}e^u=x^{-ab}e^u(u'-abx^{-1})$

$\therefore(u'-abx^{-1})'=\dfrac{ab}{x^2}+ax^{1-ab}e^u$

$u''+\dfrac{ab}{x^2}=\dfrac{ab}{x^2}+ax^{1-ab}e^u$

$u''=ax^{1-ab}e^u$

Approach $1$:

$\therefore\dfrac{d^2x}{du^2}=-ae^ux^{1-ab}\left(\dfrac{dx}{du}\right)^3$

When $ab\neq2$ ,

Let $\begin{cases}t=\dfrac{dx}{du}\\v=x^{2-ab}\end{cases}$ ,

Then $\dfrac{d^2v}{dt^2}=\dfrac{tv^{-\frac{ab-1}{ab-2}}}{ab-2}\left(\dfrac{dv}{dt}\right)^2$

Which reduces to a generalized Emden–Fowler equation.

Approach $2$:

Let $\begin{cases}t=x^{3-ab}e^u\\v=xu'\end{cases}$ ,

Then $t(v+3-ab)v'=at+v$

Which reduces to an Abel equation of the second kind.

Three types of solution:

(1)=closed form (generally)

(2)=series expansion around $0$ (special cases)

(3)=series expansion around $1$ (generally)

$(1)$

$\displaystyle (\ln y)''=\frac{ab}{x^2}+axy$

$\displaystyle y:=cx^{-ad}$ where $c$ and $d$ unknown and $a\ne 0$

$\displaystyle \frac{ad}{x^2}=\frac{ab}{x^2}+\frac{ac}{x^{ad-1}}$

=> $\enspace\displaystyle d=\frac{3}{a}\enspace$ and $\enspace\displaystyle c=\frac{3}{a}-b$

One solution is $\enspace\displaystyle y:=(\frac{3}{a}-b)x^{-3} \,$ .

A second solution would be linear independend of $y$.

Note:

The homogeneous ($b=0$) and inhomogeneous ($b\neq 0$) solution have the same term here.

It’s not possible to put two solutions $y_1$ and $y_2$ together to one solution $y:=Ay_1+By_2$ ($A,B\in\mathbb{R}$), because it’s (generally) $y_1^Ay_2^B\neq Ay_1+By_2$ .

$(2)$

$\displaystyle (\ln y)''=\frac{ab}{x^2}+axy\enspace$ with $\enspace y:=x^{-ab}e^z$

It follows $z''=ax^{1-ab}e^z$ .

A series expansion around $0$ is only possible for $1-ab\in\mathbb{N}_0$.

$(a)\enspace$ I show the expansion here for the homogeneous case $b=0$ : $\enspace y:=e^z$.

$z''=axe^z$

A Taylor series expansion around $0$ for $z$ can be created by:

$z(0):=C_1$

$z'(0):=C_2$

$z''(0)=0$

$z'''(0)=ae^{C_1}$

$z^{(4)}(0)=2C_2ae^{C_1}$

$z^{(5)}(0)=3C_2^2ae^{C_1}$

$z^{(6)}(0)=4C_2^3ae^{C_1}+4(ae^{C_1})^2$

$z^{(7)}(0)=5C_2^4ae^{C_1}+30C_2(ae^{C_1})^2$

$z^{(8)}(0)=6C_2^5ae^{C_1}+138C_2^2(ae^{C_1})^2$

$z^{(9)}(0)=7C_2^6ae^{C_1}+504C_2^3(ae^{C_1})^2+98(ae^{C_1})^3$

$z^{(10)}(0)=8C_2^7ae^{C_1}+1160C_2^4(ae^{C_1})^2+800C_2(ae^{C_1})^3$

...

$n\geq 2$ : $\enspace\displaystyle z^{(n)}(0)=\sum\limits_{k=1}^{\lfloor\frac{n}{3}\rfloor}a_{n,k}C_2^{n-3k}(ae^{C_1})^k\enspace$ with $\enspace a_{n,k}\in\mathbb{N}$ , $\enspace a_{n,1}=n$

Series around $0$: $\enspace\displaystyle z=\sum\limits_{k=0}^\infty\frac{x^k}{k!}z^{(k)}(0)$

$(b)\enspace$ But the easiest case here is $ab=1$ with $\enspace y:=e^z$.

$z''=ae^z$

$z(0):=C_1$

$z'(0):=C_2$

The coefficients of a Taylor series expansion around $0$ for $z$ with $n\geq 2$ are

$\enspace\displaystyle z^{(n)}(0)=\sum\limits_{k=1}^{\lfloor\frac{n}{2}\rfloor}b_{n,k}C_2^{n-2k}(ae^{C_1})^k\enspace$ with $\enspace b_{n,k}\in\mathbb{N}$ , $\enspace b_{n,1}=1$

$(3)$

$\displaystyle (\ln y)''=\frac{ab}{x^2}+axy\enspace$ with $\enspace y:=x^{-ab}e^z$

It follows $z''=ax^{1-ab}e^z$ .

A series expansion around $1$ for $z$ begins with :

$z(1):=D_1$

$z'(1):=D_2$

$z''(1)=ae^{D_1}$

$z'''(0)=-ae^{D_1}(ab-1-D_2)$

$z^{(4)}(0)=ae^{D_1}((ab-1)ab-2(ab-1)D_2+D_2^2)+(ae^{D_1})^2$

$z^{(5)}(0)=-ae^{D_1}((ab+1)(ab-1)ab-3ab(ab-1)D_2+3(ab-1)D_2^2-D_2^3)$ $\enspace \enspace \enspace \enspace \enspace \enspace -(ae^{D_1})^2(4(ab-1)-4D_2)$

...

Series around $1$: $\enspace\displaystyle z=\sum\limits_{k=0}^\infty\frac{(x-1)^k}{k!}z^{(k)}(1)$

• I'm no expert, but wouldn't one expect two solutions from an ODE of second degree? – Giovanni De Gaetano Oct 19 '16 at 11:03
• @Giovanni De Gaetano : Thanks for the hint. - But here it's less complicate, we have $\ln y$ instead of $y$ . Generally it's necessary to distinguish between the homogeneous and the non-homogeneous case ($b=0$). – user90369 Oct 19 '16 at 11:50
• Thanks for the answer! I was actually referring to the homogeneus equation already. Could you please add some details to the answer to let me understand why is the claimed one the only solution? Even with your hint regarding having $\log(y)$ instead of $y$, I do not see it straight away. – Giovanni De Gaetano Oct 19 '16 at 13:05
• @Giovanni De Gaetano : Assume two solutions $y1$ and $y2$ . We can substract the two equations and see that there is no linear connection. – user90369 Oct 19 '16 at 13:50
• @user90369 "No linear connection" doesn't mean uniqueness. It just means two independent solutions can't be linearly combined to give another one. That's it. By the way, thanks for the answer! – Arturo don Juan Oct 19 '16 at 17:35