# General solution of 2-nd order ODE with power-law term and parametric constants

I'm trying to get a general solution to the given differential equation. What substitution I'm supposed to apply to get the solution? ρ,Ω and γ are constants.

eq = (x + ρ)^2 y''[x] +
3 ρ (x + ρ) y'[x] +
(9^-ρ γ^(-2 ρ) Ω^2 (x + ρ)^(2 - 2 ρ) + 2 ρ - 8 ρ^2) y[x] == 0

• Have you tried DSolve? May 15 at 16:21
• May 15 at 16:21
• Maple 2022 answers $y\! \left(x\right)=\textit{_}\mathit{C1} \left(x+\rho \right)^{-\frac{3 \rho}{2}+\frac{1}{2}} \mathrm{BesselJ}\! \left(-\frac{\sqrt{41 \rho^{2}-14 \rho +1}}{2 \rho -2},\frac{\Omega \sqrt{9^{-\rho} \gamma^{-2 \rho}}\, \left(x+\rho \right)^{1-\rho}}{-1+\rho}\right)+\textit{_}\mathit{C2} \left(x+\rho \right)^{-\frac{3 \rho}{2}+\frac{1}{2}} \mathrm{BesselY}\! \left(-\frac{\sqrt{41 \rho^{2}-14 \rho +1}}{2 \rho -2},\frac{\Omega \sqrt{9^{-\rho} \gamma^{-2 \rho}}\, \left(x+\rho \right)^{1-\rho}}{-1+\rho}\right)$. May 15 at 18:17
• The above is produced by dsolve((x + rho)^2*diff(y(x), x, x) + 3*rho*(x + rho)*diff(y(x), x) + (9^(-rho)*g^(-2*rho)*Omega^2*(x + rho)^(2 - 2*rho) + 2*rho - 8*rho^2)*y(x) = 0, y(x)); (g instead of gamma for a technical reason). May 15 at 18:35
• Thanks for your time. May 15 at 19:29

I suspect the factor (x + ρ)^(2 - 2 ρ) with a parameter in an exponent in one of the coefficients makes this a DE that DSolve cannot handle. If we replace ρ with an explicit integer, then the solution is a holonomic function, which falls within the scope of DSolve and for large values of ρ, DifferentialRoot.

Examples:

Table[DSolve[eq, y, x], {ρ, 4}]


From ρ = 3 to ρ = 5, we get solutions in terms of BesselI[], and it seems there might be a pattern; but three might not be enough terms to guess the pattern. Anyway, it seems to hint at a path of investigation. For ρ = 6 and higher, we get a DifferentialRoot, which won't expand to an explicit formula:

• But I need a parametric solution. Anyway, thanks for your time. May 15 at 18:06

Find general solution with variable transformation (x + \[Rho])^(2 - 2 \[Rho]) -> z, although not valid for all cases.

eq = Expand[
eq = (x + \[Rho])^2 y''[x] +
3 \[Rho] (x + \[Rho]) y'[
x] + (9^-\[Rho] \[Gamma]^(-2 \[Rho]) \[CapitalOmega]^2 (x + \
\[Rho])^(2 - 2 \[Rho]) + 2 \[Rho] - 8 \[Rho]^2) y[x] == 0];

eq2 = eq /. y -> (y[(# + \[Rho])^(2 - 2 \[Rho])] &) // Expand

sol = Flatten@Solve[z == (x + \[Rho])^(2 - 2 \[Rho]), x]


This transformation and further equalities below are not valid for all x-rho combinations. Use Reduce[z == (x + \[Rho])^(2 - 2 \[Rho]), x, Reals]  to get further information. I use it here to show how to proceed in general.

eq3 = eq2 /. sol

eq4 = eq3 /. (z^(1/(2 - 2 \[Rho])))^(2 - 2 \[Rho]) -> z // Expand

Together /@ (
z^(2/(2 - 2 \[Rho])) (z^(1/(2 - 2 \[Rho])))^(-2 \[Rho]) //
PowerExpand)

(*   z   *)

Together /@ ((z^(1/(2 - 2 \[Rho])))^(2 - 2 \[Rho]) // PowerExpand)

(*   z   *)

Together /@ (
z^(2/(2 - 2 \[Rho])) (z^(1/(2 - 2 \[Rho])))^(2 - 4 \[Rho]) //
PowerExpand)

(*   z^2   *)

eq5 = eq4 /.
z^(2/(2 - 2 \[Rho])) (z^(1/(2 - 2 \[Rho])))^(-2 \[Rho]) ->
z /. (z^(1/(2 - 2 \[Rho])))^(2 - 2 \[Rho]) -> z /.
z^(2/(2 - 2 \[Rho])) (z^(1/(2 - 2 \[Rho])))^(2 - 4 \[Rho]) -> z^2

dsol5 = DSolve[eq5, y, z]

(*   {{y -> Function[{z},
2^(Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2) - (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(2 - 4 \[Rho] + 2 \[Rho]^2))
3^(\[Rho] (Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2) - (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(2 - 4 \[Rho] + 2 \[Rho]^2)))
z^((-1 + 3 \[Rho] - Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2])/(
4 (-1 + \[Rho])) +
1/2 (-(Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2)) + (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(
2 - 4 \[Rho] + 2 \[Rho]^2))) \[Gamma]^(\[Rho] (Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2) - (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(
2 - 4 \[Rho] + 2 \[Rho]^2))) (-1 + \[Rho])^(
Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2) - (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(
2 - 4 \[Rho] + 2 \[Rho]^2)) (4 9^\[Rho] \[Gamma]^(2 \[Rho]) -
8 9^\[Rho] \[Gamma]^(2 \[Rho]) \[Rho] +
4 9^\[Rho] \[Gamma]^(2 \[Rho]) \[Rho]^2)^(-((-1 + 3 \[Rho] -
Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2])/(
4 (-1 + \[Rho])))) \[CapitalOmega]^(-(Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2)) + (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(
2 - 4 \[Rho] + 2 \[Rho]^2) + (-1 + 3 \[Rho] - Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(2 (-1 + \[Rho])))
BesselJ[-(Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 (-1 + \[Rho]))), (2 Sqrt[z] \[CapitalOmega])/Sqrt[
4 9^\[Rho] \[Gamma]^(2 \[Rho]) -
8 9^\[Rho] \[Gamma]^(2 \[Rho]) \[Rho] +
4 9^\[Rho] \[Gamma]^(2 \[Rho]) \[Rho]^2]] C[1] Gamma[
2/(2 - 2 \[Rho]) - (2 \[Rho])/(2 - 2 \[Rho]) + Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2]/(2 - 2 \[Rho])] +
2^(-(Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2)) + (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(2 - 4 \[Rho] + 2 \[Rho]^2))
3^(\[Rho] (-(Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2)) + (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(2 - 4 \[Rho] + 2 \[Rho]^2)))
z^((-1 + 3 \[Rho] + Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2])/(
4 (-1 + \[Rho])) +
1/2 (Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2) - (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(
2 - 4 \[Rho] + 2 \[Rho]^2))) \[Gamma]^(\[Rho] (-(Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2)) + (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(
2 - 4 \[Rho] + 2 \[Rho]^2))) (-1 + \[Rho])^(-(Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2)) + (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(
2 - 4 \[Rho] + 2 \[Rho]^2)) (4 9^\[Rho] \[Gamma]^(2 \[Rho]) -
8 9^\[Rho] \[Gamma]^(2 \[Rho]) \[Rho] +
4 9^\[Rho] \[Gamma]^(2 \[Rho]) \[Rho]^2)^(-((-1 + 3 \[Rho] +
Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2])/(
4 (-1 + \[Rho])))) \[CapitalOmega]^(
Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2]/(
2 - 4 \[Rho] + 2 \[Rho]^2) - (\[Rho] Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(
2 - 4 \[Rho] + 2 \[Rho]^2) + (-1 + 3 \[Rho] + Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2])/(2 (-1 + \[Rho])))
BesselJ[Sqrt[1 - 14 \[Rho] + 41 \[Rho]^2]/(2 (-1 + \[Rho])), (
2 Sqrt[z] \[CapitalOmega])/Sqrt[
4 9^\[Rho] \[Gamma]^(2 \[Rho]) -
8 9^\[Rho] \[Gamma]^(2 \[Rho]) \[Rho] +
4 9^\[Rho] \[Gamma]^(2 \[Rho]) \[Rho]^2]] C[
2] Gamma[-(1/(-1 + \[Rho])) + \[Rho]/(-1 + \[Rho]) + Sqrt[
1 - 14 \[Rho] + 41 \[Rho]^2]/(2 (-1 + \[Rho]))]]}}   *)


See, where used equalities are not valid

Plot3D[Re[
z^(2/(2 - 2 \[Rho])) (z^(1/(2 - 2 \[Rho])))^(-2 \[Rho])], {z, -5,
5}, {\[Rho], -4, 4}, PlotPoints -> 100]

Plot3D[Re[
z^(2/(2 - 2 \[Rho])) (z^(1/(2 - 2 \[Rho])))^(2 - 4 \[Rho])], {z, -5,
5}, {\[Rho], -4, 4}, PlotPoints -> 100]


Finaly backtransformate from z to x. (Didn't do intensiv testing of the range of validity of the result dsol)