6

I would like to calculate the following symbolic expression in GNU Octave:

int(exp(ikx-|k|^n),k,-infinity,infinity) , (- it would a function of 'x' of-course, where 'x' is an array of data.)

  • I don't succeed.

  • I understood, searching a bit in the internet, that Octave does not come initially with a built-in 'Symbolic math' suite.

Is this true? How do I download and install it (using Ubuntu 12.04, from the 'Terminal'?)?

Thanking u on advance!

1 Answer 1

7

Yes. GNU octave is the core program and language. What you are looking for are functions from the symbolic package that belong to Octave-Forge. They are two different but related projects. Let me remind you that the symbolic maths toolbox is also not part of Matlab core, it's a different product.

To install them in Ubuntu, it depends on how you installed Octave:

  1. from the Ubuntu repositories? If so, sudo apt-get install octave-symbolic.
  2. compiled it Octave yourself? Start Octave and at the Octave prompt pkg install -forge symbolic
  3. from one of the up to date PPAs? Check if they also have the sybolic package and install that one

I can tell you in advance that the symbolic package has been unmaintained for a long time, and doesn't work very well with latest Octave versions (it was written for a very old version of Octave). The advice usually is to switch to Maxima which is designed exactly for that. Since 2015 the symbolic package is again actively maintained. However, Octave is still a programming language aimed at numerical computing. If all your problems require symbolic computations, then consider using a computer algebra system. Maxima is often recommended.

2
  • Thank you very much for the detailed answer. - I've installed Octave through the 'Ubuntu software center' --> which option from the above means this case? Does 'Maxima' fit also for numerical calculations (~ recommend in addition, or instead of Octave?)? Aug 26, 2012 at 15:02
  • @user1611107 if you installed from "Ubuntu software center", then it's from the Ubuntu repositories (option #1). You should be able to find octave-symbolic on the "Ubuntu software center". I never used Maxima myself but you can do numerical computation with it as well, it's just not so good at it. You may want to use both. If you are not bound to these languages, maybe you should take a look at Sage instead.
    – carandraug
    Aug 26, 2012 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.