This pelican was perched atop a post in the St. Marys River on a slightly overcast, March day.
(c) TealComp.com 20130322

This work is shared under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
|||||
|
This pelican was perched atop a post in the St. Marys River on a slightly overcast, March day. (c) TealComp.com 20130322
Part of keeping systems safe and secure involves keeping them properly patched. This can be quite a chore when you need to manage many systems. One way of easing this burden is to let each system automatically apply some or all updates and patches. This is easy to set up on Ubuntu systems. Note: All commands should be entered with superuser privileges.
Well, that’s it! References:
![]() Maxima is a free and open source software system for manipulation of symbolic and numeric expressions, high-precision numeric computations, and plotting in two and three dimensions. Maxima is a descendant of Macsyma, the computer algebra system developed in the 1960s at MIT that inspired commercial systems, such as Maple and Mathematica. Maxima was maintained by William Shelter from 1982 until 2001, releasing the code under the GNU General Public License (GPL) in 1998. Maxima is currently maintained by an active group of users and developers.
Getting MaximaMaxima is likely already in your favorite Linux distribution’s standard repository. For example, on Debian or one of its derivatives (like Ubuntu), you can install Maxima and one of its graphical front-ends, wxMaxima, with a command like:
Interacting with MaximaWhether you start Maxima by entering ‘maxima’ on the command-line or by clicking an application launcher icon depends on your operating system and how Maxima itself was installed. The figure below illustrates the command-line (terminal) version of Maxima. Graphical interfaces also exist for Maxima, which can provide some useful shortcuts to features and functions within Maxima. The one shown in the figure below is wxMaxima.
Maxima is most often used in interactive mode in which users input commands and review outputs. Input lines are automatically labeled with a ‘%i’ followed by a line number. Output lines receive the same treatment, but with ‘%o’. The above figure of the terminal interface shows the prompt ‘(%i1)’ for the user to input the first command. wxMaxima may present a blank window and no prompt until the user has typed something. Issuing a command to Maxima is fairly straight-forward. For example, we perform a simple computation with: (%i1) 6 * 7 + 13; And, Maxima returns: (%o1) 55 Note that “(%i1)” and “(%o1)” are not typed, they are automatically generated by Maxima. Our input is just the “6 * 7 + 13;” part and Maxima’s output is “55.” In the terminal version of Maxima, we just press the ENTER key after our input to have Maxima perform the computation. For wxMaxima, we need to press the key combination, SHIFT+ENTER. When are are done with our Maxima session, we can exit by issuing the quit() command:
Using Maxima as a CalculatorLet’s do a few more computations … We can reference previous inputs or outputs in new calculations: (%i2) %o1 / 5; Maxima returns: (%o2) 11 As a shortcut, we can reference the immediately previous output with just the percent symbol (‘%’): (%i3) % * 6; (%o3) 66 Let’s try another:
(%i4) 22 / 7;
22
(%o4) --
7
Notice here that, when the numerator and denominator are both integers, Maxima returns a reduced fraction or integer. If we want to have this fraction evaluated as a floating-point, we can use Maxima’s float() function: (%i5) float(%o4); (%o5) 3.142857142857143 And, like any decent, scientific calculator, Maxima provides a large number of built-in operators and functions. For instance,
(%i6) cos(4*%pi/3);
1
(%o6) - -
2
That is, the cosine of four-thirds of pi is negative one-half.
Doing Algebra with MaximaFirst and foremost, Maxima is a computer algebra system. Let’s try doing some examples … (%i7) expand( (x + 2*y)^2 ); Maxima returns:
2 2
(%o7) 4 y + 4 x y + x
Maxima does an admirable job of representing mathematical expressions in the terminal, but it is not quite publication ready. Fortunately, Maxima can generate output in TeX, a popular and well-supported typesetting system, through its tex() function.
(%i8) tex(%o7);
$$4\,y^2+4\,x\,y+x^2\leqno{\tt (\%o7)}$$
(%o8) "(\%o7)"
In wxMaxima, we can also click on an expression and choose to copy it as LaTeX or as an image. Expression as an Image
We can create and assign values to variables in Maxima with the colon (‘:’) operator: (%i9) radius:2; height:10; (%o9) 2 (%o10) 10 Here, we assigned the value, 2, to the variable, radius, and 10 to the variable, height. And, we did so on the same input line, remembering to terminate each command with a semicolon (‘;’). Maxima outputs the result of each command by default. The output of a variable assignment is just the value of the variable. In some cases, we may not wish to see such output. With Maxima’s alternate command terminator, the dollar-sign (‘$’), we can suppress the output. Thus: (%i10) radius:2$ height:10$ Now, let’s make use of our radius and height variables to compute the volume of a cylinder: (%i11) volume: %pi * radius^2 * height; (%o11) 40 %pi That is, the computed volume is stored in the variable, volume, and is 40 times the constant pi. Remember that Maxima is a symbolic calculator and, since pi can not be represented with complete precision, Maxima normally does not attempt to evaluate it. We can, however, instruct Maxima to approximate a numerical answer by appending “,numer” to our expression: (%i12) volume,numer; (%o12) 125.6637061435917 We can define functions too:
(%i13) volume(radius,height) := %pi * radius^2 * height;
2
(%o13) volume(radius, height) := %pi radius height
And, now, we can use our defined function: (%i14) volume(2, 10); (%o14) 40 %pi (%i15) volume(3, 8), numer; (%o15) 226.1946710584651 If we have an equation, say 2*x^2 – 16 = 0, and we need to solve for the value of x, Maxima can help: (%i16) solve(2*x^2-32, x); (%o16) [x = - 4, x = 4] Maxima can also solve a system of equations: (%i17) solve([2*x - 3*y = 16, 3*x + y = 2], [x, y]); (%o17) [[x = 2, y = - 4]]
Crunching Calculus with MaximaMaxima can perform symbolic differentiation:
(%i17) diff( x^2 * cos(x), x );
2
(%o17) 2 x cos(x) - x sin(x)
and integration:
(%i18) integrate(%e^(2*x) - sin(x), x);
2 x
%e
(%o18) cos(x) + -----
2
‘%e’ is the base of the natural logarithms and is another of Maxima’s pre-defined constants.
For definite integration, just specify the limits: (%i19) integrate(cos(x), x, 0, %pi/2); (%o19) 1
Plotting with MaximaMaxima offers us many plotting options and functions. We can create a simple, two-dimensional plot with plot2d(): (%i20) plot2d(x^3*sin(x), [x, -2*%pi, 2*%pi]); and, for 3-D plots, there is plot3d(): (%i21) plot3d(sin(x)*cos(2*y),[x,-4,4],[y,-4,4],[grid,50,50]);
Saving a Maxima SessionThe constants, variables, and functions we build in a Maxima session could represent a lot of hard work. If we wish to save some or all of this and later recall it, Maxima provides the save(), load(), and loadfile() functions to help us do this. (%i66) save("mysession");
To save specific variables, functions, and so on, just list them after the filename: (%i67) save("/home/lucy/maxima/myvolumes.mac", volume);
Note that the “.mac” extension is not required. Loading a saved session is as easy as calling the load() or loadfile() function with the desired filename. The main difference between these two is that loadfile() typically requires us to specify the path and extension to our saved file. loadfile("/home/lucy/maxima/myvolumes.mac");
Citing Maxima in Academic PublicationsMaxima should be cited as:
Obviously, substitute the version number and release year as appropriate.
Getting Help in MaximaMaxima does have a fairly detailed, built-in help, which can be accessed with “describe(topic)” or “? topic.” For example,
(%i22) describe(permutation);
-- Function: permutation (<n>, <r>)
Returns the number of permutations of <r> objects selected from a
set of <n> objects.
To use this function write first `load(functs)'.
There are also some inexact matches for `permutation'.
Try `?? permutation' to see them.
(%o22) true
This description could just as easily been displayed by issuing, (%i22) ? permutation Notice that, in addition to describing the permutation() function and its arguments, we are also told that we must first load functs into our session with (%i23) ?? permutation; 0: permutation (Package functs) 1: permutations (Functions and Variables for Sets) 2: random_permutation (Functions and Variables for Sets) Enter space-separated numbers, `all' or `none': For some functions, there are also well-prepared examples. We can access these with the example(topic) function, as in: (%i24) example(factor); Learning More About MaximaWe have barely scratched the surface of Maxima’s capabilities. There are many resources on the Internet, some of which are listed here:
The Electronic Frontier Foundation is working hard to defend bloggers’ legal rights. If you post or share information online, you should check out EFF’s Legal Guide for Bloggers. Planet Four is a cool, citizen science project in the Zooniverse, where ordinary people can help scientists identify and measure features on the surface of Mars. Image: NASA/JPL/University of Arizona Currently, the Planet Four project scientists are asking for help finding and marking “fans” and “blotches” on the Martian surface. It is believed that these . . . → Read More: Planet Four So, you need to create a short clip from a longer video. Sure, you could launch your favorite GUI video editor, like OpenShot or Kdenlive, and manipulate your video. But, why not use the command-line for such a simple edit? This is where the Libav or FFmpeg project comes in handy. Both projects provide tools . . . → Read More: Clipping videos from the command-line The young, crescent Moon was the “star” of this twilight … Crescent Moon at Twilight (c) TealComp.com 20130313 This work is shared under a Creative Commons Attribution-ShareAlike 3.0 Unported License. . . . → Read More: Crescent Moon steals the show OpenShot is a free, open-source, non-linear video editor currently available for Linux. OpenShot has an impressive feature list. The creators of OpenShot want to bring their product to other operating systems, including Mac OS X and Windows, and they’re trying to fund this effort through a KickStarter campaign. As we’ve discussed here and here, KickStarter . . . → Read More: OpenShot Video Editor KickStarter Campaign This article is not intended as a full treatment of this topic. There are far too many options and considerations to do it justice in one article. First, we need some definitions … Watermarks: Originally, a watermark was a faint impression on paper. This idea is carried over to digital videos as a . . . → Read More: Watermarking a video from the command-line Green-Winged Macaw This green-winged macaw (a.k.a. red-and-green macaw) was seen at the Alligator Farm Zoological Park in St. Augustine, FL. The green-winged macaw (scientific name, Ara chloropterus) is a neotropical parrot found in the woodlands and forests of northern and central South America. While its colorful plumage is mostly red, like the scarlet macaw . . . → Read More: Green-Winged Macaw |
|||||
|
Copyright © 2013 TealScientific - All Rights Reserved Privacy Policy. Powered by WordPress & Atahualpa |
|||||