NDSolve differences between mathematica 8 and 9

  • Mathematica
  • Thread starter EnSlavingBlair
  • Start date
  • Tags
    Mathematica
In summary, the user is having trouble with a particular expression on Mathematica 9, but it worked on Mathematica 8. The expression involves NDSolve and has an imaginary number. Mathematica 8 gave a result of an interpolating function, while Mathematica 9 gave an error message. The user is seeking help to understand the issue and cannot access Mathematica 8 regularly. The expert advises to use capital "I" for the imaginary number instead of escaping it.
  • #1
EnSlavingBlair
36
6
Hello,

I am using mathematica 9 and having some problems with a particular expression, but when I tried it on mathematica 8 it worked perfectly. My expression is:

NDSolve[{D[T[n,z], n]+i 2 D[T[n,z], {z,2}]+z^2 T[n,z]==0, T[0,z]==1, Derivative[0,1][T][n,5]==0, Derivative[0,1][T][n,0]==0}, T, {n,0,5}, {z,0,5}]

where i is the imaginary number, and on both I had a new window to work on, with nothing having been done previously on it.

Mathematica 8 gave me this:
{{T-> InterpolatingFunction[{{0.,5.},{0.,5.}},<>]}}

and mathematica 9 gave me this:
NDSolve::ndnum : Encountered non-numerical value for a derivative at n==0.`.>>

Does anyone know what is going on here? I cannot use mathematica 8, as I do not have continual access to that machine.

Thank you for your help.
 
Physics news on Phys.org
  • #2
The imaginary number in my code was entered as :esc: I :esc: not as the lower case i.
 
  • #3
Don't escape "I" for imaginary. Just use capital "I". :I: is capital Iota.
 

Related to NDSolve differences between mathematica 8 and 9

1. What are the major differences between NDSolve in Mathematica 8 and 9?

The major differences between NDSolve in Mathematica 8 and 9 include improved performance and support for more types of differential equations in version 9. Additionally, version 9 introduced new features such as automatic error control and adaptive precision, as well as improved syntax for specifying initial conditions.

2. Can NDSolve in Mathematica 9 solve the same types of differential equations as version 8?

Yes, NDSolve in Mathematica 9 can solve all of the same types of differential equations as version 8, plus additional types such as delay differential equations and differential-algebraic equations.

3. Are there any known compatibility issues when upgrading from Mathematica 8 to 9 for NDSolve?

While most code written for NDSolve in Mathematica 8 should work in version 9 without any changes, there have been some reported compatibility issues with specific functionalities. It is recommended to test your code thoroughly after upgrading to ensure everything is working as expected.

4. Does NDSolve in Mathematica 9 have any new features or improvements?

Yes, NDSolve in Mathematica 9 introduced several new features and improvements, including faster and more efficient algorithms, improved accuracy and stability, and new options for specifying boundary conditions and solving complex problems.

5. Can I still use NDSolve in Mathematica 8 even after upgrading to version 9?

Yes, you can still use NDSolve in Mathematica 8 after upgrading to version 9. However, it is recommended to update your code to take advantage of the new features and improvements in version 9 for optimal performance and accuracy.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
212
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
331
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top