Solving an elliptic superlinear problem using NDSolve

I'm trying to solve the above differential equation using the shooting method. When i set Method -> {"Shooting", "StartingInitialConditions" -> {z[0] == 0, z'[0] == 1} i get a solution, but it is equal to zero. I need a solution that is different of zero. When i increase the value of z'[0], say to z'[0]=1000 Mathematica stay running for a long time and i get no solution. How can i solve this?

Here is the code:

n = 3.;
xf = 10000.;
s = NDSolve[
{
-z''[t] == (1 + (n - 2) t)^(1/(2 - n) (2 (n - 1) + 0.001)) z[
t]^2 (Sin[z[t]+2])
, z[0] == 0, z'[xf] == 0}, z, {t, 0, xf},
Method -> {"Shooting",
"StartingInitialConditions" -> {z[0] == 0, z'[0] == 1}
}
] // Chop
Plot[Evaluate[z[t] /. s], {t, 0., 10}, PlotRange -> All]


This problem appears to satisfy the boundary condition z'[t] == 0 at large t only for z[t] == 0, as can be seen from.

s = ParametricNDSolve[{-z''[t] == (1 + (n - 2) t)^(1/(2 - n) (2 (n - 1) + 10^-3))
z[t]^2 (Sin[z[t] + 2]), z[0] == 0, z'[0] == sl}, {z, z'}, {t, 0, xf}, {sl}]
Plot[Table[Evaluate[z'[n][t] /. s],{n, -1, 1, 1/4}], {t, 0, 100}, PlotRange -> All]


or

Plot[z'[sl][100] /. s, {sl, -10, 10}, PlotRange -> All, AxesLabel -> {"z'[0]", "z'[100}"}]


• how did you got the first graphic? Apr 20, 2017 at 3:02
• ParametricNDSolve provides solutions to differential equations for various parameters, in this case z'[0]. The first graphic displays solutions for z'[0] with values given by Range[-1, 1, 1/4], Apr 20, 2017 at 3:51
• n = 3.; p = 2.; xf = 1000000.; s = ParametricNDSolveValue[{-z''[ t] == (1 + (n - 2) t)^(1/(2 - n) (2 (n - 1) + 10^-5)) z[ t]^2 Sin[z[t] + 2] , z[0] == 0, z'[xf] == bc2}, z'[xf], {t, 0, xf}, bc2] do you know why after solving this equation the following plot take so long? Plot[s[bc2], {bc2, 0, 2.1}] Apr 23, 2017 at 18:22
• ParametricNDSolve does not actually solve the ODE until the parameter bc2 is specified. Plot probably requires several tens of solutions, and each is slow, because xf is very large. Apr 23, 2017 at 22:34