# ParametricNDSolve not returning an interpolating function after specifying parameter vlaue

I am solving a set of 4 different ODEs with ParametricNDSolve. When I specify the a value for the parameter instead of getting out an interpolating function, I keep getting back a parameter function. Any helps?

Mukh1 = 0 == u''[x] + (h'[x]/h[x] + 1)*u'[x] + k^2/(ainit^2*Exp[2*x]*h[x]^2) -
2 + 4 h'[x]*\[Psi]''[x]/(h[x]*\[Psi]'[x]) + 2 (h'[x]/h[x])^2 +
5*h'[x]/h[x] +
1/h[x]^2* D[D[V[\[Psi][x]], \[Psi][x]], \[Psi][x]];

Mukh2 = 0 == v''[x] + (h'[x]/h[x] + 1)*v'[x] + k^2/(ainit^2*Exp[2*x]*h[x]^2) -
2 + 4 h'[x]*\[Psi]''[x]/(h[x]*\[Psi]'[x]) + 2 (h'[x]/h[x])^2 +
5*h'[x]/h[x] +
1/h[x]^2* D[D[V[\[Psi][x]], \[Psi][x]], \[Psi][x]];

Eq3 = h'[x] == -1/2*h[x]*\[Psi]'[x]^2;

Eq4 = 0 == \[Psi]''[x] + (h'[x]/h[x] + 3) \[Psi]'[x] +
1/h[x]^2*D[V[\[Psi][x]], \[Psi][x]];

m = ParametricNDSolve[{Mukh1, Mukh2, Eq3,Eq4, \[Psi][\[Alpha]0] == P0, h[\[Alpha]0] == H0, \[Psi]'[\[Alpha]0] == DP0, u == 1,u' == 0, v == 0, v' == 1}, {u, v, \[Psi]}, {x, -150, 160}, k]


When I run sol= m[0.3] I get: The final goal is to plot asymptotic values of u and v as a function of k. Any ideas on how I can get it to work? Also, the initial conditions are defined earlier in my code, so don't worry about that.

• What is V? In you code, there are v and V, but V doesn't in the variables. What is ainit,What is P0,What is H0? Nov 25, 2020 at 7:48
• as I said, these are defined earlier in my code. The entire code is quite long, so I didn't post all of it. Nov 25, 2020 at 8:13

Try ParametricNDSolveValue. Because you couldn't provide code here my example

sol = ParametricNDSolveValue[{x'[t] == Cos[om t], y'[t] == Sin[om t], x == 0, y == 0}, {x, y}, {t, 0, 10}, om]


Access of solution

Plot[Through[sol[t]], {t, 0, 10}] • OMG! thank you so much! I can't believe I was missing that. Nov 25, 2020 at 20:49