Archive for January, 2009
Say you have a file called alpha.txt that contains
a
b
c
and another file called numbers.txt that contains
1
2
3
and you want to concatenate them together such that the resulting file reads
a 1
b 2
c 3
Of course this is a fairly trivial thing to do in any number of programming languages but I believe in not programming anything if I can possibly get away with it. With that in mind here is a standard Linux command (included in Ubuntu at least but probably in most other versions of Linux as well) that will do this for you.
paste alpha.txt nums.txt > joined.txt
By default, the paste command separates fields by tabs but you can easily change this with the -d switch. For example
paste alpha.txt num.txt -d , > joined.txt
results in a comma separated value (CSV) file
a,1
b,2
c,3
REDUCE is a computer algebra system that has been in active development for over 40 years and is used by scientists across the world. Until recently you had to pay for it but it has now been made open source and so is available free of charge from Sourceforge. I have never used it but that may be about to change as it seems to have some very nice functionality. I lifted the following (incomplete) feature list directly from the application’s website
- automatic and user controlled simplification of expressions
- calculations with symbolic matrices
- arbitrary precision integer and real arithmetic
- analytic differentiation and integration
- factorization of polynomials
- facilities for the solution of a variety of algebraic equations
- calculations with a wide variety of special functions
- Dirac matrix calculations of interest to high energy physicists
So far, the only executable I have found is for Windows but I haven’t dug very deeply so more might be there. If are a user of REDUCE or if you have a play with it and find something nice then feel free to say something about it in the comments section.
The latest version of the free open source computer algebra system, Maxima, was released back in late December but I missed it because it was not mentioned on the news page of the main site. It is available for download from the Source Forge project page though. Along with the usual round of bug-fixes and enhancements, this version comes with a lot of extra support for special functions such as the Incomplete Gamma Function and the Error Function.
For more details concerning what is new in version 5.17 check out the general and special function change logs.
I’ve not done one of these for a while. Calculate the following indefinite integral.
![]()
Where the W stands for the Lambert W function.
Full disclosure: I know the result and have verified it by differentiating but I don’t know how to obtain it.
Update: The solution has been posted here.
