# Is it possible to avoid the singularity problem of a 2nd order differential equations by restricting the solution range?

I would greatly appreciate your help in implementation of Mathematica for solving a 2nd order differential equation expressing some important engineering problem.

Apparently, this equation has no analytical solution. Therefore I attempt to solve it numerically with maximal possible approach to the analytical effect, while using the ParametricNDSolve command.

The equation has 3 variables: n, Ω and ψ and differentiation is by z. Actually, z = 1. n can be above zero and below it, however the values rarely exceed ±3. Ω and ψ are positive numbers and they can reach big values. As the 1st approach I have defined n = 3. The expression is:

Solution = ParametricNDSolve[{Ω f''[z] - f'[z] - ψ f[z]^n == 0,
f - Ω f' == 1,f' == 0}, f, {z, 1, 1}, {Ω, ψ}];


Unfortunately Mathematica is unable restrict itself to z = 1 and produces the singularity messages at z < 1.

My question is thus following: is it possible to restrict the solution to z=1 without attempting to solve at z<1?

• Is it f''[z][z] or f''[z] or z f''[z] ?? Nov 9 '15 at 10:44
• it is f''[z], sorry for this typo Nov 9 '15 at 11:05
• Because one boundary condition is at z = 0 and the other at z = 1, ParametricNDSolve must integrate from 0 to 1. Nov 10 '15 at 3:26

Because boundary conditions are specified at z = 0 and at z = 1, ParametricNDSolve must integrate between those two endpoints. However, this does not in general prevent obtaining a solution.

s = ParametricNDSolveValue[{Ω f''[z] - f'[z] - ψ f[z]^3 == 0,
f - Ω f' == 1, f' == 0}, f, {z, 0, 1}, {Ω, ψ}];


which then can be evaluated at s[Ω, ψ]. For instance,

Plot[Evaluate[Table[s[Ω, ψ], {ψ, 5}]], {Ω, 1, 5}, AxesLabel -> {Ω, f}] It is the case that stiffness is encountered at small Ω for ψ == 5.

The parameter ψ can be eliminated by rescaling f by ψ^(-1/(n - 1)), which reduces parameter space from two to one dimensions. With the rescaled f designated g,

t = ParametricNDSolveValue[{Ω g''[z] - g'[z] - g[z]^3 == 0, g - Ω g' == 1,
g' == 0}, g, {z, 0, 1}, {Ω}]
Plot[t[Ω], {Ω, 1, 20}, PlotRange -> {{0, 20}, All}, AxesLabel ->
{"Ω", "f \!$$\*SuperscriptBox[\(ψ$$, FractionBox[$$1$$, $$n - 1$$]]\)" • Thank you a lot! I have the following question: perhaps the singularity could be avoided or reduced by defining other solution method? Nov 10 '15 at 8:03
• @SitraAhra Although there probably are several ways to avoid this issue, I recommend the rescaling shown in the addendum above. Nov 11 '15 at 2:53
• Thank you a lot! Indeed the rescaling solves the problem, for all positive values of Ω and n. Thank you a lot again! Nov 13 '15 at 8:52