# Gauge transformation of differential equations.

It is well known that linear ordinary differential equations (ODEs) can be mapped onto each other by an appropriate change of variables. This fact can be than used to find solutions of a given ODE (target ODE) as appropriately rescaled solutions of a different ODE (input ODE). There are basically three types of transformations that one can apply.

1. A change of abscissa $$x \rightarrow \theta(x)$$ and $$d/d x \rightarrow 1/\theta^{'}(x) d/d x$$,

2. A change of ordinate $$y(x) \rightarrow m(x) y(x)$$ ,

3. A gauge transformation $$y(x) \rightarrow r_0(x) y(x) + r_1(x) y^{'}(x)$$.

See [1] for a more detailed discussion of those notions.

In here we focused on the last possibility and found the following result.

Let $$f(x)$$ be a solution of the following ODE(the input ODE): $$$$f^{''}(x) + Q(x) f(x)=0$$$$ Now define $$$$g(x) := f(x) + \frac{1}{\int Q(x) dx} \cdot f^{'}(x)$$$$ then the function $$g(x)$$ satisfies the following ODE(the target ODE): $$$$g^{''}(x) + \left( \frac{Q'(x)}{\int Q(x) \, dx}+Q(x)-\frac{2 Q(x)^2}{(\int Q(x) \, dx)^2}\right) g(x)=0$$$$

Likewise define: $$$$h(x) := \left(\frac{f(x)}{x_0-x} + f^{'}(x)\right)\cdot \frac{1}{\sqrt{Q(x)}}$$$$ then the function $$h(x)$$ satisfies the following ODE(the target ODE): $$$$h^{''}(x) + \left(-\frac{3 Q'(x)^2}{4 Q(x)^2}+\frac{(x-x_0) Q''(x)-2 Q'(x)}{2 Q(x) (x-x_0)}+Q(x)-\frac{2}{(x-x_0)^2}\right) h(x)=0$$$$

Finally define

$$$$h_1(x) := \left(f(x) + \frac{\imath}{\sqrt{Q(x)}} \cdot f^{'}(x)\right) \cdot \frac{Q(x)^{3/4}}{\sqrt{Q^{'}(x)}}$$$$

then the function $$h_1(x)$$ satisfies the following ODE(the target ODE): $$$$h_1^{''}(x) + \left( \frac{3 Q'(x)^2}{16 Q(x)^2}+\frac{3 i Q'(x)}{2 \sqrt{Q(x)}}-\frac{i \sqrt{Q(x)} Q''(x)}{Q'(x)}+\frac{2 Q^{(3)}(x) Q'(x)-3 Q''(x)^2}{4 Q'(x)^2}+Q(x)\right) h_1(x)=0$$$$

As usual we verify those results with the help of Mathematica. We have:

In[433]:= Clear[Q]; Clear[g]; Clear[f]; x =.; x0 =.;
g[x_] := f[x] + 1/Integrate[Q[x], x] f'[x];
Simplify[(g''[
x] + (Q[x] - (2 Q[x]^2)/(\[Integral]Q[x] \[DifferentialD]x)^2 +
Derivative[1][Q][x]/\[Integral]Q[x] \[DifferentialD]x) g[
x]) /. { Derivative[2][f][x] :> -Q[x] f[x],
Derivative[3][f][x] :> -Q'[x] f[x] - Q[x] f'[x]}]
Clear[Q]; Clear[g]; Clear[f];
g[x_] := (f[x]/(x0 - x) + f'[x])/Sqrt[Q[x]];
Simplify[(g''[
x] + (Q[x] - 2/(x - x0)^2 - (3 Derivative[1][Q][x]^2)/(
4 Q[x]^2) + (-2 Derivative[1][Q][x] + (x - x0) (
Q^\[Prime]\[Prime])[x])/(2 (x - x0) Q[x])) g[x]) /. {
Derivative[2][f][x] :> -Q[x] f[x],
Derivative[3][f][x] :> -Q'[x] f[x] - Q[x] f'[x]}]
Clear[Q]; Clear[g]; Clear[f];
g[x_] := (f[x] + I/Sqrt[Q[x]] f'[x])/(Sqrt[Derivative[1][Q][x]]/Q[x]^(
3/4));
Simplify[(g''[
x] + (Q[x] + (3 I Derivative[1][Q][x])/(2 Sqrt[Q[x]]) + (
3 Derivative[1][Q][x]^2)/(16 Q[x]^2) - (
I Sqrt[Q[x]] (Q^\[Prime]\[Prime])[x])/
Derivative[1][Q][x] + (-3 (Q^\[Prime]\[Prime])[x]^2 +
2 Derivative[1][Q][x]
\!$$\*SuperscriptBox[\(Q$$,
TagBox[
RowBox[{"(", "3", ")"}],
Derivative],
MultilineFunction->None]\)[x])/(4 Derivative[1][Q][x]^2)) g[x]) /. {
Derivative[2][f][x] :> -Q[x] f[x],
Derivative[3][f][x] :> -Q'[x] f[x] - Q[x] f'[x]}]

Out[435]= 0

Out[438]= 0

Out[441]= 0


Having said all this my question would be firstly are those results known and if yes what other possible gauge transformations can we come up with that lead to relatively simple target ODEs.

Update:

The result above is actually a special case of a more generic result. Let $$f(x)$$ satisfy the ODE as above. Now define $$$$g(x) := \frac{f(x) + r_1(x) \cdot f^{'}(x)}{\sqrt{1+Q(x) r_1(x)^2 + r_1^{'}(x)}}$$$$ Then the function $$g(x)$$ satisfies the following ODE: $$$$g^{''}(x) + \frac{P(x)}{4\left( 1+Q(x) r_1(x)^2 + r_1^{'}(x)\right)^2} \cdot g(x)=0$$$$ where $$\begin{eqnarray} &&P(x):=\\ &&4 r_1(x) Q'(x) \left(3 r_1'(x)^2+4 r_1'(x)+1\right)+\\ &&-3 r_1(x)^4 Q'(x)^2+2 r_1(x)^2 \left(Q''(x) \left(r_1'(x)+1\right)-3 Q'(x) r_1''(x)\right)+\\ &&2 Q(x) \left(r_1(x)^4 Q''(x)+2 r_1(x)^3 Q'(x)+r_1^{(3)}(x) r_1(x)^2+6 r_1'(x)^3+12 r_1'(x)^2+8 r_1'(x)-6 r_1(x) r_1'(x) r_1''(x)+2\right)+\\ &&8 Q(x)^2 r_1(x)^2 \left(2 r_1'(x)+1\right)+4 Q(x)^3 r_1(x)^4+\\ &&2 r_1^{(3)}(x)-3 r_1''(x)^2+2 r_1^{(3)}(x) r_1'(x) \end{eqnarray}$$

Now if we take firstly $$r_1^{'}(x) + Q(x) r_1(x)^2=0$$ and secondly $$r_1^{'}(x) + 1=0$$ and thirdly $$1+Q(x) r_1(x)^2=0$$ then we get the first, the second and the third case respectively.

Now let us look at some particular cases.

Firstly we can also take $$Q(x)=0$$ then we immediately get the following interesting result: The ODE : $$\begin{eqnarray} g^{''}(x) + \frac{2 r_1^{(3)}(x)-3 r_1''(x)^2+2 r_1^{(3)}(x) r_1'(x)}{4\left( 1 + r_1^{'}(x)\right)^2} \cdot g(x)=0 \end{eqnarray}$$ is solved by $$$$g(x) = \frac{C_1+C_2(x+r_1(x))}{\sqrt{1+r_1^{'}(x)}}$$$$

Note that the result above can still be simplified by defining $$u(x) := r_1^{''}(x)/(1+r^{'}(x))$$. Then we have the following ODE: $$\begin{eqnarray} g^{''}(x) + \left( 1/2 u^{'}(x) - 1/4 u(x)^2\right) \cdot g(x)=0 \end{eqnarray}$$ which is solved by: $$$$g(x) = \frac{C_1+C_2\int \exp(\int u(x) dx) dx}{\sqrt{\exp(\int u(x) dx)}}$$$$

In[460]:= FullSimplify[(D[#, {x,
2}] + (1/2 u'[x] - 1/4 u[x]^2) #) & /@ {(C[1] +
C[2] (Integrate[Exp[Integrate[u[x], x]], x]))/
Sqrt[Exp[Integrate[u[x], x]]]}]

Out[460]= {0}


Secondly, we can take : $$\begin{eqnarray} Q(x)&=& \frac{B}{x^{2+n}}\\ r_1(x)&=& A x^{n+1} \end{eqnarray}$$ Then define: $$\begin{eqnarray} {\mathfrak A}_0 &=&4 B\\ {\mathfrak A}_1 &=&4 A B (2 A B+3 n+2)\\ {\mathfrak A}_2&=&2 A \left(2 A^3 B^3+2 A^2 B^2 (3 n+2)+A B \left(5 n^2+5 n+2\right)+n \left(n^2-1\right)\right)\\ {\mathfrak A}_3&=&-A^2 n (n+2) (A B+n+1)^2 \end{eqnarray}$$ Then we have that the ODE: $$\begin{eqnarray} g^{''}(x) + \left( \frac{{\mathfrak A_0} + {\mathfrak A_1} x^n + {\mathfrak A_2} x^{2 n} + {\mathfrak A_3} x^{3 n}}{4 x^{n+2} \left(A x^n (A B+n+1)+1\right)^2}\right) \cdot g(x)=0 \end{eqnarray}$$

is solved by: $$\begin{eqnarray} g(x) = C_+ \frac{y_+(x) + A x^{n+1} y_+^{'}(x)}{\sqrt{1+A(1+n+A B)x^n}} + C_- \frac{y_-(x) + A x^{n+1} y_-^{'}(x)}{\sqrt{1+A(1+n+A B)x^n}} \end{eqnarray}$$ where $$$$y_\pm(x)= \sqrt{x} J_{\pm\frac{1}{n}}\left(-2\frac{\sqrt{B}}{n} x^{-n/2} \right)$$$$

In[162]:= A =.; B =.; n =.; x =.; Clear[y]; Clear[g];
y1[x_] = Sqrt[x] BesselJ[1/n, -2 Sqrt[B]/n x^(-n/2)];
y2[x_] = Sqrt[x] BesselJ[-1/n, -2 Sqrt[B]/n x^(-n/2)];

eX = (D[#, {x, 2}] + ((
4 B + 4 A B (2 + 2 A B + 3 n) x^n +
2 A (2 A^3 B^3 + 2 A^2 B^2 (2 + 3 n) + n (-1 + n^2) +
A B (2 + 5 n + 5 n^2)) x^(2 n) -
A^2 n (2 + n) (1 + A B + n)^2 x^(3 n))/(
4 x^(2 + n) (1 + A (1 + A B + n) x^n)^2)) #) & /@ {(
y1[x] + A x^(n + 1) y1'[x])/Sqrt[A (1 + A B + n) x^n + 1] , (
y2[x] + A x^(n + 1) y2'[x])/Sqrt[A (1 + A B + n) x^n + 1]};

{A, B, n, x} = RandomReal[{0, 1}, 4, WorkingPrecision -> 50];
eX

Out[167]= {0.*10^-46 + 0.*10^-46 I, 0.*10^-48 + 0.*10^-47 I}


[1] M von Hoeij, R Debeerst, W Koepf, Solving differential equations in terms of Bessel functions, https://www.math.fsu.edu/~hoeij/papers.html

• I do not see any examples where these two transformations simplify the equation. Maybe you could show some? (Unless the question is a teaser for the linked paper?) Commented Oct 12, 2018 at 20:43
• I'd say it makes sense to start with a known $f(x)$ and to see if the transformed equations are interesting enough on their own, and if there are known solutions. If yes, and no, then we obtained a new and useful result Commented Oct 12, 2018 at 20:47
• @ Yuriy S My goal in here is only to generate ODEs with varying coefficients whose solutions are known. This would be the direct problem. I accomplished that. Of course solving the indirect problem,i.e. mapping some known $f(x)$ onto a solution of a given ODE is much more interesting. I have cited the paper since it contains some tools for that purpose. Commented Oct 15, 2018 at 16:11

In fact you need to find some "representative special cases" to give some interchange points.

It is obviously solely analyzing for example the function forms of

$$Q_{n+1}(x)=\dfrac{Q_n'(x)}{\int Q_n(x)~dx}+Q_n(x)-\dfrac{2Q_n(x)^2}{(\int Q_n(x)~dx)^2}$$

$$Q_{n+1}(x)=-\dfrac{3Q_n'(x)^2}{4Q_n(x)^2}+\dfrac{\dfrac{Q_n''(x)}{2}-\dfrac{Q_n'(x)}{x}}{Q_n(x)}+Q_n(x)-\dfrac{2}{x^2}$$

$$Q_{n+1}(x)=\dfrac{3Q_n'(x)^2}{16Q_n(x)^2}+\dfrac{3iQ_n'(x)}{2\sqrt{Q_n(x)}}-\dfrac{i \sqrt{Q_n(x)}Q_n''(x)}{Q_n'(x)}+\dfrac{2Q_n^{(3)}(x)Q_n'(x)-3Q_n''(x)^2}{4Q_n'(x)^2}+Q_n(x)$$

should be disaster.

For example $$h''(x)+\left(-\dfrac{3Q'(x)^2}{4Q(x)^2}+\dfrac{\dfrac{Q''(x)}{2}-\dfrac{Q'(x)}{x}}{Q(x)}+Q(x)-\dfrac{2}{x^2}\right)h(x)=0$$ ,

A quite notable "representative special cases" appears when $$Q(x)=ae^{bx}$$ ,

i.e. $$h''(x)+\left(ae^{bx}-\dfrac{b^2}{4}-\dfrac{b}{x}-\dfrac{2}{x^2}\right)h(x)=0$$ ,

Which can consider an interchange points of second-order linear ODEs with mixed polynomial and exponential function coefficients.

$$(ae^{bx}+cx+d)y''(x)-ab^2e^{bx}y(x)=0$$

$$(x+a)y''(x)+(be^{cx}+d)y'(x)+bce^{cx}y(x)=0$$

And try another types of change of abscissa, change of ordinate, etc. to link another ODEs.

Following the thoughts set out by doraemonpaul we try $$Q(x) = (A x+B)/(C x+D)$$ in the second case. Then we easily get the following result. Let : $$\begin{eqnarray} &&\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!v(x):= e^{-\frac{i \sqrt{A} (C x+D)}{C^{3/2}}} \left(C_1 U\left(\frac{i (B C-A D)}{2 \sqrt{A} C^{3/2}},0,\frac{2 i \sqrt{A} (D+C x)}{C^{3/2}}\right)+C_2 L_{\frac{i (A D-B C)}{2 \sqrt{A} C^{3/2}}}^{-1}\left(\frac{2 i \sqrt{A} (C x+D)}{C^{3/2}}\right)\right) \end{eqnarray}$$ where $$U(a,b,x)$$ is the confluent hypergeometric function and $$L_n^{(a)}(x)$$ are the Laguerre polynomials.

Now define: $$\begin{eqnarray} {\mathcal P}_0&:=&-3 A^2 D^2 x_0^2+2 A B D x_0 (C x_0+2 D)+4 B^3 D x_0^2+B^2 \left(C^2 x_0^2-4 C D x_0-8 D^2\right)\\ {\mathcal P}_1&:=&-2 \left(A^2 D x_0 (2 C x_0-5 D)+3 B^2 \left(-2 A D x_0^2+C^2 x_0+2 C D\right)+2 A B \left(-C^2 x_0^2+C D x_0+5 D^2\right)-2 B^3 x_0 (C x_0-2 D)\right)\\ {\mathcal P}_2&:=&3 A^2 D (4 C x_0-5 D)-3 B^2 \left(-4 A C x_0^2+8 A D x_0+C^2\right)+6 A B \left(2 A D x_0^2-2 C^2 x_0-5 C D\right)+4 B^3 (D-2 C x_0)\\ {\mathcal P}_3&:=&4 \left(A^2 D \left(A x_0^2-6 C\right)+3 A B^2 (D-2 C x_0)+A B \left(3 A C x_0^2-6 A D x_0-2 C^2\right)+B^3 C\right)\\ {\mathcal P}_4&:=&4 A \left(3 A B (D-2 C x_0)+A \left(A C x_0^2-2 A D x_0-2 C^2\right)+3 B^2 C\right)\\ {\mathcal P}_5&:=&4 A^2 (A (D-2 C x_0)+3 B C)\\ {\mathcal P}_6&:=&4 A^3 C \end{eqnarray}$$ and $$$$y(x):= \left( \frac{v(x)}{x_0-x} + v^{'}(x)\right) \sqrt{\frac{C x+D}{A x+B}}$$$$ then we have: $$\begin{eqnarray} y^{''}(x) + \frac{\sum\limits_{j=0}^6 {\mathcal P}_j x^j}{4(A x+B)^2 (C x+D)^2(x-x_0)^2} \cdot y(x) = 0 \end{eqnarray}$$ Agan this wee piece of code confirms that:

In[28]:= A =.; B =.; CC =.; DD =.; x0 =.; x =.; Clear[y]; Clear[v];
Q[x_] = (A x + B)/(CC x + DD);
v[x_] = E^(-((I Sqrt[A] (DD + CC x))/CC^(
3/2))) (C[1] HypergeometricU[(I (B CC - A DD))/(
2 Sqrt[A] CC^(3/2)), 0, (2 I Sqrt[A] (DD + CC x))/CC^(3/2)] +
C[2] LaguerreL[(I (-B CC + A DD))/(2 Sqrt[A] CC^(3/2)), -1, (
2 I Sqrt[A] (DD + CC x))/CC^(3/2)]);
P = {4 B^3 DD x0^2 - 3 A^2 DD^2 x0^2 + 2 A B DD x0 (2 DD + CC x0) +
B^2 (-8 DD^2 - 4 CC DD x0 +
CC^2 x0^2), -2 (-2 B^3 x0 (-2 DD + CC x0) +
A^2 DD x0 (-5 DD + 2 CC x0) +
2 A B (5 DD^2 + CC DD x0 - CC^2 x0^2) +
3 B^2 (2 CC DD + CC^2 x0 - 2 A DD x0^2)),
4 B^3 (DD - 2 CC x0) + 3 A^2 DD (-5 DD + 4 CC x0) -
3 B^2 (CC^2 + 8 A DD x0 - 4 A CC x0^2) +
6 A B (-5 CC DD - 2 CC^2 x0 + 2 A DD x0^2),
4 (B^3 CC + 3 A B^2 (DD - 2 CC x0) + A^2 DD (-6 CC + A x0^2) +
A B (-2 CC^2 - 6 A DD x0 + 3 A CC x0^2)),
4 A (3 B^2 CC + 3 A B (DD - 2 CC x0) +
A (-2 CC^2 - 2 A DD x0 + A CC x0^2)),
4 A^2 (3 B CC + A (DD - 2 CC x0)), 4 A^3 CC};
y[x_] = (v[x]/(x0 - x) + v'[x]) Sqrt[(CC x + DD)/(A x + B)];
eX = (D[#, {x, 2}] +
Sum[P[[1 + i]] x^i, {i, 0, 6}]/(
4 (B + A x)^2 (DD + CC x)^2 (x - x0)^2) #) & /@ {y[x]};

{A, B, CC, DD, x0, x} = RandomReal[{0, 1}, 6, WorkingPrecision -> 50];
Simplify[eX]

Out[35]= {(0.*10^-43 + 0.*10^-43 I) C[
1] + (0.*10^-43 + 0.*10^-43 I) C[2]}


In this answer we will start from the Gaussian hypergeometric ODE. We firstly transform the abscissa by $$x \rightarrow (A x+ B)/(C x+D)$$ and then we transform the ordinate $$y \rightarrow m \cdot y$$ in such a way as to bring the resulting ODE to its normal form. Having done all this we use a gauge transformation $$y \rightarrow y + (x_0-x) \cdot y^{'}$$. This leads to a following result. Define: $$\begin{eqnarray} a&:=&1-b+c\\ b&:=&\frac{\sqrt{B (B+(c-2) c D)}+B c+B}{2 B}\\ f(x)&:=& \frac{x+B}{x+D} \end{eqnarray}$$ Now let $$\begin{eqnarray} &&v(x):=\\ &&(x+B)^{c/2} (x+D)^{(1-a-b)/2} \left( C_2 f(x)^{1-c} \, _2F_1(a-c+1,b-c+1;2-c;f(x))+C_1 \, _2F_1(a,b;c;f(x))\right) \end{eqnarray}$$ and now define: $$\begin{eqnarray} {\mathfrak P}_0&:=& -3 B^3 D^2 x_0^2\\ {\mathfrak P}_1&:=& 2 B^2 D x_0 (5 B D-B x_0-D x_0)\\ {\mathfrak P}_2&:=&B \left(B^2 \left(-15 D^2+4 D x_0+x_0^2\right)+4 B D x_0 (D-x_0)+D^2 x_0^2\right)\\ {\mathfrak P}_3&:=&-6 B^3 (3 D+x_0)-B^2 \left(\left(-c^2+2 c+2\right) x_0^2+18 D^2+8 D x_0\right)-2 B D x_0 \left((c-1)^2 x_0+3 D\right)+(c-2) c D^2 x_0^2\\ {\mathfrak P}_4&:=&-3 B^3-2 B^2 \left(\left(c^2-2 c+6\right) x_0+10 D\right)-B \left(-4 \left(c^2-2 c-3\right) D x_0+3 D^2+3 x_0^2\right)-2 (c-2) c D^2 x_0\\ {\mathfrak P}_5&:=&B^2 \left(c^2-2 c-2\right)-2 B \left((c-1)^2 D+3 x_0\right)+(c-2) c D^2\\ {\mathfrak P}_6&:=&B \end{eqnarray}$$ and $$\begin{eqnarray} y(x)&:=&\left(\frac{v(x)}{x_0-x}+v^{'}(x)\right) \frac{(x+B)(x+D)}{\sqrt{x}} \end{eqnarray}$$ Then we have: $$$$y^{''}(x) + \frac{\sum\limits_{j=0}^6 {\mathfrak P}_j x^j}{4 B (x+B)^2(x+D)^2(x-x_0)^2} \cdot y(x)=0$$$$

In[2]:= A =.; B =.; CC =.; DD =.; a =.; b =.; c =.; d =.; x0 =.; x \
=.; Clear[f]; Clear[v]; Clear[Q]; Clear[y];
a = 1 - b + c;
b = (B + B c + Sqrt[B (B + (-2 + c) c DD)])/(2 B);
f[x_] = (x + B)/(x + DD);
v[x_] = (B + x)^(
c/2) (DD + x)^(-(1/
2) (-1 + a + b)) (C[1] Hypergeometric2F1[a, b, c, f[x]] + (-1)^(
1 - c) f[x]^(1 - c)
C[2] Hypergeometric2F1[1 + a - c, 1 + b - c, 2 - c, f[x]]);

y[x_] = (v[x]/(x0 - x) + v'[x]) ((x + B) (x + DD))/Sqrt[x];

P = {-3 B^3 DD^2 x0^2, 2 B^2 DD x0 (5 B DD - B x0 - DD x0),
B (4 B DD (DD - x0) x0 + DD^2 x0^2 +
B^2 (-15 DD^2 + 4 DD x0 + x0^2)), (-2 + c) c DD^2 x0^2 -
6 B^3 (3 DD + x0) - 2 B DD x0 (3 DD + (-1 + c)^2 x0) -
B^2 (18 DD^2 + 8 DD x0 + (2 + 2 c - c^2) x0^2), -3 B^3 -
2 (-2 + c) c DD^2 x0 - 2 B^2 (10 DD + (6 - 2 c + c^2) x0) -
B (3 DD^2 - 4 (-3 - 2 c + c^2) DD x0 + 3 x0^2),
B^2 (-2 - 2 c + c^2) + (-2 + c) c DD^2 -
2 B ((-1 + c)^2 DD + 3 x0), B};

eX = (D[#, {x, 2}] +
Sum[P[[1 + j]] x^j, {j, 0, 6}]/(
4 B x^2 (B + x)^2 (DD + x)^2 (x - x0)^2) #) & /@ {y[x]};

{B, DD, x0, c, x} = RandomReal[{0, 1}, 5, WorkingPrecision -> 50];

Simplify[eX]

Out[11]= {(0.*10^-46 + 0.*10^-46 I) C[
1] + (0.*10^-46 + 0.*10^-46 I) C[2]}


Here is another quite interesting case. Here we started from the Gaussian hypergeometric ODE and then we transformed the abscisaa $$x \rightarrow (A x+B)/(C x+D)$$ and then the ordinate $$y(x)=m(x) \cdot v(x)$$. In this case we took an arbitrary $$m(x)$$ instead of choosing it so that we obtain a normal form of the ODE. Therefore we ended up with an ODE of the form $$v^{''}(x) + a_1(x) v^{'}(x)+a_0(x) v(x)$$. Now what we did was to carry out the gauge transformation for some very special gauge which simplifies the resulting equations. We defined $$V(x):=(v(x)+r(x) v^{'}(x))/\left(r(x) \sqrt{a_0(x)} \exp(-1/2 \int a_1(x) dx)\right)$$ where the gauge $$r(x)$$ has been chosen to obey the following ODE $$r^{'}(x)+1-a_1(x) r(x)=0$$ and $$\exp(\int a_1(x) dx) = x^n$$. After playing around with parameters we chose one special case that leads to a neat final ODE. Define: $$\begin{eqnarray} a&:=& \frac{1}{2} \left(3+ \frac{\sqrt{C^2 x_1 \left(C^2 x_1-1\right)}}{C^2 x_1}\right)\\ b&:=& \frac{1}{2} \left(3 -\frac{\sqrt{C^2 x_1 \left(C^2 x_1-1\right)}}{C^2 x_1}\right)\\ c&:=&2 \end{eqnarray}$$ Now define $$\begin{eqnarray} w(x)&:=& \frac{1}{x+x_1} C_1 F_{2,1}\left[a,b,c,\frac{x_1}{x+x_1}\right]\\ V(x)&:=& (x_1+x) x^{3/2} \left( \frac{x_0}{x_0 x+x^2} w(x)+w^{'}(x)\right) \end{eqnarray}$$ Then we have: $$\begin{eqnarray} \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!V^{''}(x) + \frac{\frac{1}{4} x^3 \left(-\frac{1}{C^2}+6 x_0-2 x_1\right)+\frac{1}{4} x^2 \left(-\frac{2 x_0}{C^2}-3 \left(x_0^2-4 x_0 x_1+x_1^2\right)\right)-\frac{x x_0 \left(2 C^2 x_0 x_1-6 C^2 x_1^2+x_0\right)}{4 C^2}+\frac{x^4}{4}+\frac{x_0^2 x_1^2}{4}}{x^2(x+x_1)^2(x+x_0)^2} V(x)=0 \end{eqnarray}$$

In[76]:= n = 2;
B =.; CC =.; x0 =.; x1 =.; x =.; Clear[r]; Clear[w]; Clear[V]; a =.; \
b =.; c =.;
a = 1/2 (3 + Sqrt[CC^2 x1 (-1 + CC^2 x1)]/(CC^2 x1));
b = 1/2 (3 - Sqrt[CC^2 x1 (-1 + CC^2 x1)]/(CC^2 x1));
c = 2;

w[x_] = 1/(x1 + x) (C[1] Hypergeometric2F1[a, b, c, x1/(x + x1)]);
V[x_] = (x1 + x) x^(3/2) (x0/(x0 x + x^2) w[x] + w'[x]);
eX = (D[#, {x, 2}] + (
x^4/4 + 1/4 x^3 (-(1/CC^2) + 6 x0 - 2 x1) + (x0^2 x1^2)/4 - (
x x0 (x0 + 2 CC^2 x0 x1 - 6 CC^2 x1^2))/(4 CC^2) +
1/4 x^2 (-((2 x0)/CC^2) - 3 (x0^2 - 4 x0 x1 + x1^2)))/(
x^2 (x1 + x)^2 (x + x0)^2) #) & /@ {V[x]};

{B, CC, x0, x1, x} = RandomReal[{0, 1}, 5, WorkingPrecision -> 50];
Simplify[eX]

Out[85]= {(0.*10^-43 + 0.*10^-44 I) C[1]}