# Solution to an annoying ODE

I'm very sorry if this is a duplicate, but searching for a specific equation is rather difficult. I have encountered the following ODE during my physics research (have a PDE which has a similarity solution), and am wondering whether there's any chance of obtaining an analytic solution to it: \begin{equation} x y' = -2(A(y) y')' ,\end{equation} for $y(x)$ with $y'=\frac{\mathrm{d}y}{\mathrm{d}x}$, just to be clear.

$A(y) = 1-\zeta y(4-3y)$, for $\zeta \ge 0$, although I suspect that if we find ourselves invoking that we've probably already failed, so maybe treat $A(y)$ as being generic for now. I've fiddled around with it, but without much success. In terms of boundary conditions, well, they're up for grabs, was hoping the solution would tell me a bit more about them; physically $0 \le y \le 1$, and would probably like to prescribe Dirichlet conditions on either side of a finite domain. If it helps, I got to this equation using this: https://arxiv.org/pdf/0710.4000.pdf , around page 5.

Of course, asymptotic solutions as $x\rightarrow 0$ or $x\rightarrow \pm \infty$ would also be very cool, as would advice about how to tackle it numerically if analytic solution attempts prove fruitless.

• Your equation has $y=const.$ as a solution. Also, not sure if your second formula is correct. Try differentiating it and seeing if you get back your ODE. – user254433 Jun 15 '17 at 16:48
• Oh yeah, I forgot about the y=const. solution, although I'd like something more general. As for the second equation, I think you're right, I miscounted the number of y's knocking around; will fix! – JDM Hellier Jun 15 '17 at 17:33
• There is a non-constant linear solution when $\zeta \ne 0$ which I found by assuming $y''=0.$ – DanielWainfleet Jun 15 '17 at 18:58
• Hmmmm, ok, with a little help from Mathematica, if I try $y = ax + b$, we get $$x \left(12 a^3 \zeta +a\right)+12 a^2 b \zeta -8 a^2 \zeta = 0,$$ which suggests that $y = i \sqrt{\frac{1}{12\zeta}} x + \frac{2}{3}$ should solve it, is that the kinda thing you were getting at @DanielWainfleet ? As for the series expansion, that's kinda cool and I had considered it but I would like to know what happens for reasonably beefy $\zeta$s on their way to 1, which will probably be outside its zone of convergence. – JDM Hellier Jun 15 '17 at 19:17

I found a couple additional facts, so I'll also include what I mentioned in the comments below:

Case 1: $y=const.$ is a solution for any constant, so we omit this solution in what follows.

(Correction to my earlier comment: $y(x)=ax+b$ is not a solution if $a,b\neq 0$)

Case 2: if $\zeta=0$, then $y''(x)=-x y'(x)/2$, and $y(x)=a+b\text{ erf}(x/2)$, where $\text{erf}(x)=\frac{2}{\sqrt{\pi}}\int_{-\infty}^xe^{-t^2}dt$, and $a,b=const.$

Case 3: Suppose now $\zeta\neq 0$. Put $\mu=-4+\frac{3}{\zeta}\in(-4,\infty)$, and change variables by setting $$y(x)=\frac{2+z\left(\sqrt{\frac{3}{2\zeta}}x\right)}{3}.$$ Then $z$ solves $$\frac{d}{dt}[(z^2+\mu)z'(t)]+tz'(t)=0.$$

Case 4: $\mu=0$ ($\zeta=3/4$). In this case, we have the ODE $$\frac{d}{dt}[z^2z'(t)]+tz'(t)=0,$$ which is dilatation invariant under $t\mapsto at$, $z\mapsto az$. Consequently, if we set $z(t)=t\,u(\ln|t|)$ and $u'(s)=w(u(s))$, we obtain the following first order ODE for $w(u)$:

$$w'(u)=-\frac{1}{2}\left(\frac{w^2+u^2}{uw}+\frac{u+w}{u^2w}+\frac{5}{2}\right),$$

which Mathematica could not solve, unfortunately.

Case 5: $\mu>0$ ($0<\zeta<3/4$). Putting $z(t)=\mu^{1/2}w(t)$ gives $$\frac{d}{dt}[(w^2+1)w'(t)]+tw'(t)=0.$$

Case 6: $\mu<0$ ($\zeta>3/4$). Putting $z=(-\mu)^{1/2}w$ gives $$\frac{d}{dt}[(w^2-1)w'(t)]+tw'(t)=0.$$

Unlike Case 4, the equations of Cases 5 and 6 have no obvious symmetries, so analytic integration seems impossible for them. However, we can try asymptotic analysis. I will only do analysis in $w$, since the analysis in $x$ is involved.

Case A: $|w|\ll 1$. This will apply for both Cases 5 and 6. Setting $w=\epsilon f_0+\epsilon^2 f_1+\cdots$ and letting $\epsilon\to 0$, we want $f_0$ to solve $$\pm f_0''(t)+tf_0'(t)=0,$$ where $+$ is Case 5, and - is Case 6. The solution is $f_0(t)=a+b \text{ erf}(t/\sqrt{2})$ if $+$, and $f_0(t)=a+b \text{ erfi}(t/\sqrt{2})$ if $-$. Note that the latter blows up at infinity. In any case, $$w(t)=\epsilon f_0(t)+O(\epsilon^2)$$ is a solution as $\epsilon\to 0$, where $\epsilon$ is an arbitrary small parameter of the same order of magnitude as the initial condition $w(0)$.

Note that this is valid for all $\zeta$ considered, since $\epsilon$ does not depend on $\zeta$.

Case B: $|w|\gg 1$. This recovers Case 4. So if you can solve this $\zeta=3/4$ equation, say, numerically, then you obtain solutions for all other values of $\zeta$ as well, provided they satisfy $|w|\gg 1$.

Case C: $|w|\approx 1$, and $\mu<0$ (i.e. Case 6). The idea is to make the coefficient $w^2-1$ vanish. Put $w(t)=1+\epsilon f_0(\epsilon^{-1/2}t)+\epsilon^2 f_1(\epsilon^{-1/2}t)+\cdots$ and let $\epsilon\to 0$: $$\frac{d}{ds}[2f_0(s)f_0'(s)]+sf_0'(s)=0.$$ This is invariant under the dilatation $s\mapsto as$, $f_0\mapsto a^2f_0(s)$, so we can put $f_0(s)=s^2 g(\ln|s|)$, $g'(r)=h(g(r))$ as before and obtain a first order ODE for $h=h(g)$. (Mathematica couldn't solve this one either).

Anyways, I hope some of this helps. I can't promise the above is typo-free, so I would verify Case A for yourself, since this one might be of some use.

• Excellent work @user254433 , you have managed to make a lot more progress than I was expecting to be possible! I'm guessing this isn't the first time you tangled with an obnoxious ODE? You seem to have a nice system for dealing with them :) A small formatting thing: It looks to me as if "Case 3" is more like a lead-in to the other cases than a case in its own right, is that correct or am I misunderstanding? Otherwise this is great, I'm gonna leave it a few days in case anyone wants to add anything and then I'll mark it as the answer. – JDM Hellier Jun 17 '17 at 16:29
• Happy to help. Annoying nonlinear ODEs also show up in applied math, so you're in good company. Yes, Case 3 is just a lead-in; the next real case is 4. Let me know if I can clarify anything else. – user254433 Jun 17 '17 at 16:41