1. Apr 5, 2008

### Zenguy

I want to get some math software, something that does everything. :)
(or as close to that as practical)

Of course I want it to be really easy to use. :) Yes, I realize that
all of the above is impossible.

I guess the best question is, which is most popular among, say,

I have used Mathematica in the past, but after being initially
impressed I found I didn't like using it very much.

Thanks,

zenguy

2. Apr 5, 2008

### robphy

I use Maple.
I am also using Python with VPython, which uses some fast linear algebra libraries.

3. Apr 5, 2008

### CaptainQuaser

Maple is a very good math software, I use it also.
Mathematica is also decent, but I definitely prefer Maple

4. Apr 5, 2008

### CompuChip

I was going to recommend Mathematica, but seeing you tried and discarded it, I guess that's not an option. Still, it can do anything (almost anything you'd want to do in math, that is) and it can be very easy to use (though you are not restricted to making advanced use of it).
Unfortunately I have no experience with Maple.
Unfortunately I do have experience with Matlab, which I found less pleasant to work with than Mathematica, not to mention the fact it can't work symbolically.

Last edited: Apr 5, 2008
5. Apr 5, 2008

### Hootenanny

Staff Emeritus
I use have used Mathematica, but as CQ says, I prefer Maple. I also use GNUplot for plotting and Python if I'm doing a lot of batch calculations or numerical analysis (as rob say's it's LA libraries, among others, are excellent).

Last edited: Apr 5, 2008
6. Apr 5, 2008

### George Jones

Staff Emeritus
I also use Maple.

Not sure if you would consider it easy to use.

7. Apr 5, 2008

### ytoruno

matlab can work symbolically, though i do agree it is the lesser of all math software.

8. Apr 5, 2008

### ks_physicist

They each have their uses. Matlab is great for building simulations, and it does have symbolic ability, though if I recall correctly it does this by using the Maple kernel or a version thereof.

Maple is nice, but I have not used it as much as Matlab.

Mathematica is wonderful, except it is ungodly expensive. Sheesh.

These days, I use Matlab (the old edition I bought in grad school), Maxima (free), and a version of MuPad Light that I registered when it was still free.

9. Apr 5, 2008

### robphy

Maybe the best advice is to take advantage of what you have available, using the the right tool for the task at hand. Some are better at numerical calculations, others at symbolic computations. Some are good at interactive 3D-plotting, others at publication-quality plotting. Some have an active community where you can get help. Some are free and open source.

It's sometimes helpful to write a program that outputs a code snippet for another program. For instance, in my C code, I might have some debugging output that generates Maple code that I can paste into Maple and analyze there. Scripting languages, like Perl, Python, and even bash, can reduce the tedium of repetitive operations in exchanging data and code between software packages.

In short, you shouldn't choose just ONE software package.

10. Apr 5, 2008

### jhicks

I personally use matlab. It has many of the same features of a C-style programming language (minus pointers that i know of) and therefore can be used for complicated things such as simulations.

11. Apr 5, 2008

### f95toli

Matlab is probably the best software there is for purely numerical simulations (not counting programming languages such as C, Fortan etc), you can really do just about anything.
I have used Fortran 77 with MPI a few times (not my choice, my collaborator at the time liked it) to write simulations for parallell computers (clusters). This is the only thing that you can't really do in Matlab (although there is now a distributed computing toolbox).
Matlab used to be a bit slow but the more recent versions of Matlab includes routines that are usally fast enough (Mathwork is now using FFTW to do FFT, you can also use NAG etc) if you are running it on a single CPU. It now uses JIT compilation (similar to Java) so you can even use FOR loops without slowing down everything (which makes programs easier to understand)
The plotting routines in the more recent versions of Matlab are also good enought to produce graphs for papers and presentations.

But Matlab can't handle symbolic math very well (which has never been a problem for me) so if you are only planing to run relatively "simple" simulations e.g. Mathematica might be a more suitable choice. Matlab is also not very used friendly (but still much easier to use than a programming language like Python), but you get the hang of it after a while.

I have used Matlab for over 13 years now and I would literally not be able to do my job without it.

12. Apr 6, 2008

### mgiddy911

At my school the math dept uses Maple in general and the physics dept uses both Maple and Mathematica. I find Maple easier to use but that is my opinion. I haven't found anything in one that can't be done with the other though. Both are good for doing numerical approximations. This can be helpful in a DE class or for a project in a math class where solving by had may be nearly impossible.

13. Apr 6, 2008

### oedipa maas

I too started out with Mathematica. I prefer Maple over Mathematica for symbolic algebra, modeling and basic data analysis. I think the one thing that makes Maple really stand out is the fantastically thorough Help section. It's very detailed and there are lots of useful examples.

14. Apr 7, 2008

### Crosson

That's the problem with Mathlab, it is no better than a C compiler with the standard libraries, for which many free choices are available.

I recommend using Mathematica. It is more powerful than Maple for symbolics, way more powerful for numerics, and I prefer the functional programming language to Maple's procedural. The only areas where Matlab is better than Mathematica are such that C is better still, so for the purpose of an expensive math software the only choice based on power is Mathematica.

But everyone agrees that Mathematica has a steep learning curve, and that is a major fault.

15. Apr 7, 2008

### f95toli

I don't agree. Matlab is much easier to use than C and the fact that it is "interactive" really helps; for most simple problems you don't have to write a script (unless you want to). Also, good built in routines for plotting etc also really helps.
It is true that you can do the same thing in C (or Python), but it takes more time and is much less convenient; >50% of my calculations only require 10-20 lines of code in Matlab.
Also, there are plenty of free toolboxes to Matlab developed by other users and it is also possible to use standard libraries such as NAG.

Also, sorry if this is slightly OT, but WHEN do you actually need symbolic manipulation? I have used that exactly once and that was during my first course in QM (many years ago) when we needed to solve some horrible integrals; I never needed it in any other course and I have never used it in my research either, mainly because most "real" systems are so complicated (at least the ones I work with) that analytical solutions are rarely useful.
But perhaps it is simply due to the fact that I am (mainly) an experimental physicists?

16. Apr 7, 2008

### leon1127

Symbolic Package is helpful when you do mathematical research..... Once upon a time I had to verify that a function was indeed a solution to some parabolic PDE. It seems trivial calculus and yet it was so long (the function itself was half a page long with implicit function and functional everywhere) that it took 20+ hours to do it. And yes it was a simple calculus with 10 pages of calculations

I think matlab bind with mathematica is a very good combination to do research and verification. However if you need to do calculation you have to know C/C++ or other languages. Matlab is still too slow when you need to run large calculations. And I find maple hard to use because I am used to the powerfulness of mathematica... haha
I also personally hate the GUI of maple. making things more complicated than it can be

17. Apr 17, 2008

### Pollywoggy

I just got Maple and since I am not a student, I bought it for about twice the student price.
Maple has a personal use license but to get this, you need to buy it directly from Maplesoft and the personal use version is not available via the web. One has to phone them to buy it.

Perhaps Wolfram has something similar for the personal (home) and non-commercial user.
If you get Maple under the personal use license, you cannot use it in any activity that generates revenue.

18. Apr 22, 2008

### Zenguy

A Specific Problem (following Einstein)

These two equations follow a derivation of the Lorentz transformation by Einstein:
(but here we are just interested in the math)

x+ct = M(y+cr)
x-ct = L(y-cr)

x & t are spacetime coordinates in one reference frame; y & r are the corresponding
coordinates in a second frame. c is the speed of light. L and M are arbitrary constants.

2x = (M+L)y + (M-L)cr

Subtracting the same pair we get:

2ct = (M-L)y +(M+L)cr

Now we define:

A = (M+L)/2 and
B = (M-L)/2

substituting, we get:

x = Ay + Bcr
ct = By + Acr
----------------------------------------------------
OK, now that is all high school algebra, but I could not reproduce it with Mathematica.
I'm a beginner at Mathematica, but I can do most of the basic stuff. The problem arose trying to add two equations together. I could not get anything useful, as is done above, by adding two Mathematica equations together.

Is there a way to do it? (I mean to reproduce all of the above steps.)

Can Maple do it?

Thanks,

m

19. Apr 23, 2008

### ice109

i use mathematica and fortran90

20. Apr 23, 2008

### NeoDevin

Zenguy: using mathematica, with a little thought on the part of the user, makes solving this problem very simple.

Code (Text):
e1 = (x+c t == M(y + c r));
e2 = (x-c t == L(y-c r));
Solve[{e1/.M->(A+B), e2/.L->(A-B)}, {x,t}]
Returns

Code (Text):

{{x->B c r + A y, t->(A c r + B y)/c}}

All that is required is to multiply the solution for t by c to get your desired solution. Alternatively (though the method becomes more problem specific if you do this) you could instead define ct as a single variable, and solve for it.

Often times with Mathematica it is not possible to get the particular form of the solution you're looking for, as Mathematica relies on it's own rules for simplifying and ordering an expression. You can see here that I inverted your equations for A and B by myself, if this were more complicated, an extra step in between would be to first invert them using Solve[], and then use the resulting rule in the following Solve[] statement. Usually with a little careful thinking on the part of the user, you can get something pretty close to a form you like, especially if you have an idea what the solution should look like (hey, it's easier to solve by hand too if you already know the solution).

21. Apr 23, 2008

### Zenguy

NeoDevin: Thanks, that's a helpful response. The "." and "->" operators are new to me. I could not find anything about them in the documentation. They appear to designate a substitution. Also, I'm confused about your use of (A+B) & (A-B) rather than (M+L)/2 and (M-L)/2. I really don't understand how you arrived at your final result. But maybe that's because I don't understand what ".__->" does.

m

22. Apr 23, 2008

### George Jones

Staff Emeritus
In general relativity, computer symbolic manipulation is used extensively. I can't imagine doing the calculations by hand for the spacetime on which I am now working.

A recent general relativity book comments on this:

"Calculating the curvature tensor from a given metric tensor is tedious and time-consuming, and seemingly innocent errors made along the way cause great chaos in the final results. In order to obtain a reliable result, every step of the calculation must be carefully verified. A relatively simple calculation typically takes several hours; in complicated cases it can extend to months...

The modern computer algebra programs are fairly easy to use, and the reduction in time and effort required to do a calculation is dramatic. Instead of doing a routine calculation for weeks, one can have the result in less than a minute. ... these calculation are done 'by hand' essentially only by students for educational purposes. In research work, the computers have taken over the field completely."

23. Apr 23, 2008

### Zenguy

with Maple?

George, you mentioned that you use Maple. Can Maple reproduce my simple algebra above?

Thanks,

m

24. Apr 23, 2008

### NeoDevin

/. means to apply a substitution rule, so if I put in an expression e1 as

e1/. M->(A+B)

that means expression e1, but that everywhere there is an M, it substitutes in (A+B). I used A+B and A-B because I inverted the relationship you gave, so that it could be substituted in. If it's a non-trivial relationship, then simply use:

Solve[{A == (M+L)/2,B == (M-L)/2}, {M,L}]

to get the expressions for M and L. I skipped that step because it's fairly straightforward.

Edit: For more info on the replacement operator, search your help/documentation for either /.'' or ReplaceAll'', and it should come up.

Last edited: Apr 23, 2008
25. Apr 23, 2008

### robphy

Code (Text):

restart;
S1:=solve( {x+c*t=M*(y+c*r), x-c*t=L*(y-c*r)} , {x,c*t} );
S2:=solve( {A=(M+L)/2, B=(M-L)/2} , {M,L} );
subs( S2,S1);simplify(%);

yields
$$S1:= \left\{ x=-1/2\,Lcr+1/2\,My+1/2\,Mcr+1/2\,Ly,ct=1/2\,Lcr+1/2\,My+1/2 \,Mcr-1/2\,Ly \right\}$$
$$S2:= \left\{ L=-B+A,M=A+B \right\}$$

\begin{align*} \bigg\{ x&=-\frac{\left( -B+A \right) cr}{2}+\frac{\, \left( A+B \right) y}{2} +\frac{\, \left( A+B \right) cr}{2}+\frac{\, \left( -B+A \right) y}{2}, \\ ct&= \frac{\, \left( -B+A \right) cr}{2} +\frac{\, \left( A+B \right) y}{2} +\frac{\, \left( A+B \right) cr}{2} -\frac{\, \left( -B+A \right) y}{2} \bigg\} \end{align*}

$$\left\{ x=crB+yA,ct=crA+yB \right\}$$

Maybe the above can be streamlined.
(I cleaned up a little of Maple's $$\LaTeX$$ output.)