ODE solution with Mathematica 8

In summary, the individual is having trouble solving a 1st order ODE using NDSolve. The issue may be due to not specifying the values of k and r before execution or the use of variables in the equation. Alternatively, using DSolve may provide an analytic solution.
  • #1
Dr.BOC
1
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
 
Physics news on Phys.org
  • #2
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.
 

1. What is an ODE solution in Mathematica 8?

An ODE solution in Mathematica 8 refers to the solution of a differential equation using the software Mathematica 8. Mathematica 8 has built-in functions and algorithms specifically designed to find solutions to ordinary differential equations (ODEs).

2. How do I solve an ODE using Mathematica 8?

To solve an ODE using Mathematica 8, you can use the built-in function DSolve. This function takes in the ODE as an input and returns the general solution in the form of a Mathematica expression. You can also specify initial or boundary conditions to find a particular solution.

3. Can Mathematica 8 solve all types of ODEs?

No, Mathematica 8 may not be able to solve all types of ODEs. It can only solve ODEs that have analytical solutions. If an ODE does not have an analytical solution, Mathematica 8 will not be able to find a solution. In such cases, numerical methods may be used to approximate the solution.

4. How accurate are the ODE solutions obtained with Mathematica 8?

The accuracy of the ODE solutions obtained with Mathematica 8 depends on various factors such as the complexity of the ODE, the specified precision, and the numerical methods used. In general, Mathematica 8 provides accurate solutions to ODEs, but it is always recommended to check the solution for correctness.

5. Can I visualize the ODE solutions in Mathematica 8?

Yes, you can visualize the ODE solutions in Mathematica 8 using the built-in plotting functions. Once you have obtained the solution using DSolve, you can use functions such as Plot or ParametricPlot to plot the solution and visualize it. This can help in understanding the behavior of the solution over a range of values.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
256
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
217
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
869
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
Back
Top