Numerical ODE solving is a whole topic on its own. It is covered in many books. Take a look e.g. at Numerical Recipes, which has a very gentle introduction, if I recall correctly.
Can you give me an example? Which numerical method would be the best alternative for coding in C?
If you want something quick and clear, I highly recommend you to checkout Dr. Shen's videos on
Pick the control points from Mathematica's InterpolationFunction (assign x to some values and evaluate them) and use the formulae presented in the videos above.
InterpolationFunction
Hello Shengui;
Thanks for this suggestion. In the output it gives me an interpolating function but i dont see what the function is? What are the coefficients and degree etc? Interpolating functions seem embedded inside mathematica so its not possible to see what the function is. Therefore i cannot code it in c environment. Anyother suggestions?
Try
sol = NDSolve[{-x^2 + (0.231486 - 0.2290576*Cos[y[x]]) Derivative[1][y][x]^2 == 0, y'[0] == 0}, y, {x, 0, 2}]