Troubleshooting NDSolve Errors: Non-Numerical Values in ODE Integration

Click For Summary
SUMMARY

The forum discussion centers on troubleshooting an error encountered while using NDSolve in Mathematica for solving ordinary differential equations (ODEs). The specific error, "Encountered non-numerical value for a derivative at t==0," was identified by the user John, who suspected a formatting issue in the equations. The problematic term was "0.05.2," which should have been corrected to "0.05*2" to ensure proper evaluation. John later confirmed that he resolved the issue independently.

PREREQUISITES
  • Familiarity with Mathematica 12.3 syntax and functions
  • Understanding of ordinary differential equations (ODEs)
  • Knowledge of numerical methods for solving ODEs
  • Basic debugging techniques in programming
NEXT STEPS
  • Review Mathematica's NDSolve documentation for common error messages
  • Learn about debugging techniques specific to Mathematica
  • Explore best practices for formatting mathematical expressions in code
  • Investigate advanced numerical methods for ODE integration
USEFUL FOR

This discussion is beneficial for Mathematica users, particularly those working with numerical solutions to ordinary differential equations, as well as educators and students in applied mathematics or engineering fields.

JohnSimpson
Messages
89
Reaction score
0
I'm having a problem with NDSolve. See attached picture. I have a package generating a set of ODE's, which I display, and then the next line is the NDSolve integration. I get an "Encountered non-numerical value for a derivative at t==0" error, and I can't spot the mistake. The one thing that looks suspicious to me is the terms in the Equations of Motion that look like "0.05.2". It looks like it should be "0.05*2", but I don't understand why it doesn't just evaluate it.

Best Wishes
-John
 

Attachments

  • Mathematica.jpg
    Mathematica.jpg
    44.7 KB · Views: 459
Physics news on Phys.org
Please Ignore. I found my problem!
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K