# A second order nonlinear ODE

In my research (in differential geometry) I recently came across the following nonlinear second order ode: $$\frac{f''(x)}{f'(x)}-\frac{2}{x}+\frac{f'(x)+1}{2f(x)-x-1}+\frac{f'(x)-1}{2f(x)+x}=0$$ It actually arose from the symmetry reduction of some pde. I know from an analysis of the equation that there exists a 1-parameter family of solutions. Moreover I also know two explicit solutions; $$f(x)=x+\frac{1}{2}$$ $$f(x)=\frac{1}{4}+\frac{1}{4}(1+3x)\sqrt{(1+2x)}$$ The existence of these 2 solutions, expressible in terms of elementary functions, makes me wonder if one can in fact find more (if not all) explicit solutions to this ode. Note that both these solutions are well defined at $$x=0$$, although the ode itself is singular at that point! It is not too hard to show that any solution well-defined at $$x=0$$ requires $$f(0)=\frac{1}{2}$$ and $$f'(0)=1$$.

As far as I am aware there are no standard tricks for these type of fully nonlinear odes. I have been trying to simplify the ode by various substitutions but without any success.

I was hoping that someone might be able to spot a clever transformation, or even argue that it is impossible to find any other explicit solutions. I would also be interested to know of any references where such a class of ode that might have been studied.

This also leads me to ask if there is any general theory known about when can a solution to an ode (say of second order) be expressed in terms of elementary functions, or is it just a case-by-case study? Thanks!

• It appears that $f(x) = -x$ is another solution. Note that this solution is also "globally regular" but does not satisfy your condition that $f(0) = 1/2$ and $f'(0) = 1$. – Willie Wong Apr 28 at 13:38
• Another solution is $$f(x) = \frac14 - \frac14(1+3x) \sqrt{1+2x}$$ Note: my two solutions are obtained from yours by the symmetry transformation $$f(x) \mapsto 1/2 - f$$ – Willie Wong Apr 28 at 13:54
• @willie wong: you are right, i didnt realize the given ode is nonautonomous! – Piyush Grover Apr 28 at 14:24
• @WillieWong Thanks for pointing out that $\mathbb{Z}_2$ symmetry – u184 Apr 29 at 8:29
• If you use the ansatz $f(x)=a_0+a_1x+a_2 x^2 \dots$, put $a_0=1/2$, $a_1=1$ and multiply everything out you get that $a_2$ can be chosen arbitrary whereas then $a_3=-2a_2/5$, $a_4=a_3a_2+3/5$. You can define a formal power series by iteratively solving for the next coefficient. However I am not sure if that power series converges for every $a_2$. The solution with the square root seems to be the case $a_2=5/8$. I am not sure if the other power series can be simplified for other $a_2$'s. – user35593 May 7 at 14:50

Not a solution just the octave code related to the comment above

function nonlinear_ode

%number of new coefficients (starting at a_3)
n=4;

%initial guess
x0=rand(1,n);

%values of a_2 that are considered
as=-5:5

x=zeros(length(as),n);
for i=1:length(as)
x(i,:)=fsolve(@(x) fun(x,as(i)),x0);
end

for i=1:n
polyfit(as,x(:,i)',n)
end

end

function y = fun(x,a)

f=[1/2 1 a x];
df=f(2:end).*(1:length(f)-1);
d2f=df(2:end).*(1:length(df)-1);

%nominators
n{1}=d2f;
n{2}=-2;
n{3}=df;
n{3}(1)=n{3}(1)+1;
n{4}=df;
n{4}(1)=n{4}(1)-1;

%denominators
d{1}=df;
d{2}=[0 1];
d{3}=2*f;
d{3}(1:2)=d{3}(1:2)-[1 1];
d{4}=2*f;
d{4}(2)=d{4}(2)+1;

for k=1:4

yk=n{k};
for j=1:4
if j~=k
yk=conv(yk,d{j});
end
end

if k==1
y=yk;
else
y=y+yk;
end

end

%restrict to first terms
y=y(1:length(f));

end


Output

ans =

-1.1592e-18 -1.0962e-17 6.4646e-17 -4.0000e-01 -3.0447e-16

ans =

6.2764e-17 2.5432e-17 -4.0000e-01 6.0000e-01 3.3331e-15

ans =

-1.2474e-09 1.8926e-09 1.1886e+00 -1.1429e+00 -4.3242e-08

ans =

-2.8979e-09 5.0286e-01 -3.3600e+00 2.4286e+00 -1.2213e-07