Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symbolic integration in Octave? (Need to Install extantion? How? - Using Ubuntu 12.04)

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!

like image 815
user1611107 Avatar asked Aug 26 '12 14:08

user1611107


1 Answers

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.

like image 107
carandraug Avatar answered Jan 03 '23 12:01

carandraug