ODE solution with Mathematica 8

  • Context: Mathematica 
  • Thread starter Thread starter Dr.BOC
  • Start date Start date
  • Tags Tags
    Mathematica Ode
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 replies · 3K views
Dr.BOC
Messages
1
Reaction score
0
I'm having issues solving a 1st order ODE.
Here what happens:

NDSolve[{y'[x]/y[x] == k *Pi* r^2* Sqrt[1 + y'[x]^2], y[0] == 136/10}, y[x], {x, 0, 30}]
NDSolve::ndnum: Encountered non-numerical value for a derivative at x == 0.

Changing the x range is no help... I get the same message for any initial point...

k and r are given parameters.

Any idea what's wrong in my code?

Thanks
 
on Phys.org
Do you specify the values of k and r before executing the NDSolve? NDSolve is a numerical solution, so it can only work with numbers, not variables.

Alternatively, you can try using DSolve. Mathematica was able to find an analytic solution.