enter image description here

How to fix a ParametricNDSolveValue? - "ParametricNDSolveValue::ndnum: Encountered non-numerical value for a derivative at t == 0."

I have tried everything. But I keeps coming up with errors.

soP = ParametricNDSolveValue[{y''[t]+ by'[t]+k1y@t + k2hf[y@t]=10+ a Sin[w t],y[0]=-.1,y'[0]=.2},{y@t,y'[t]},{t,tz},{k1,k2,a,w,b,tz}]

sb1 = soP[13, 5, .1, 4, .01];

  • 1
    $\begingroup$ Where is your code? $\endgroup$ – cvgmt Oct 29 at 1:59
  • $\begingroup$ You need to post your code, not images of your code. $\endgroup$ – No name Oct 29 at 2:18
  • 2
    $\begingroup$ hf[] is undefined, it appears. Or maybe you need a space between the 2 and the h in k2hf. $\endgroup$ – Michael E2 Oct 29 at 2:49
  • $\begingroup$ You can format inline code and code blocks by selecting the code and clicking the {} button above the edit window. The edit window help button ? is useful for learning how to format your questions and answers. You may also find this meta Q&A helpful $\endgroup$ – Michael E2 Oct 29 at 2:52
  • $\begingroup$ YOu define soP as an expression "soP=.. " but you use it as a function: "soP[13, 5, .1, 4, .01]". You must define SoP as function like: soP[arguments,..]:= .. $\endgroup$ – Daniel Huber Oct 29 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.