Академический Документы
Профессиональный Документы
Культура Документы
http://math-blog.com/2007/06/04/a-10-minute-tu...
Home
About
Math Books
Privacy Policy
Table of Contents
Write for us
Applied Math
Essential Math
History
Math Education
Math News
Math Websites
Software
Suggested Reading
Tutorial
Unsolved Problems
Maxima as a calculator
You can use Maxima as a fast and reliable calculator whose precision is arbitrary within
the limits of your PCs hardware. Maxima expects you to enter one or more commands
and expressions separated by a semicolon character (;), just like you would do in many
programming languages.
(%i1) 9+7;
1 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
(%o1)
(%i2) -17*19;
(%o2)
(%i3) 10/2;
(%o3)
Maxima allows you to refer to the latest result through the % character, and to any
previous input or output by its respective prompted %i (input) or %o (output). For
example:
(%i4) % - 10;
(%o4)
(%i5) %o1 * 3;
(%o5)
For the sake of simplicity, from now on we will omit the numbered input and output
prompts produced by Maximas console, and indicate the output with a => sign. When
the numerator and denominator are both integers, a reduced fraction or an integer value
is returned. These can be evaluated in oating point by using the oat function (or boat
for big oating point numbers):
8/2;
=>
8/2.0;
=>
2/6;
=>
float(1/3);
=>
1/3.0;
=>
26/4;
=>
float(26/4);
=>
2 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
Please note that Maxima only oers the natural logarithm function log. log10 is not
available by default but you can dene it yourself as shown below:
log10(x):= log(x)/log(10);
=>
log10(10)
=>
Symbolic Calculations
factor enables us to nd the prime factorization of a number:
factor(30!);
=>
3 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
Please note that Maxima wont accept 2x as a product, it requires you to explicitly
specify 2*x. If you wish to obtain the TeX representation of a given expression, you can
use the tex function:
tex(%);
=> $$-\sin ^2x+2\,\cos x\,\sin x+\cos ^2x$$
2D and 3D Plotting
Maxima enables us to plot 2D and 3D graphics, and even multiple functions in the same
chart. The functions plot2d and plot3d are quite straightforward as you can see below.
The second (and in the case of plot3d, the third) parameter, is just the range of values for
x (and y) that dene what portion of the chart gets plotted.
plot2d(x^2-x+3,[x,-10,10]);
4 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
Limits
limit((1+1/x)^x,x,inf);
=> %
limit(sin(x)/x,x,0);
=>
limit(2*(x^2-4)/(x-2),x,2);
=>
limit(log(x),x,0,plus);
=>
limit(sqrt(-x)/x,x,0,minus);
=>
Dierentiation
diff(sin(x), x);
=>
diff(x^x, x);
5 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
=>
We can calculate higher order derivatives by passing the order as an optional number to
the di function:
diff(tan(x), x, 4);
=>
Integration
Maxima oers several types of integration. To symbolically solve indenite integrals use
integrate:
integrate(1/x, x);
=>
For denite integration, just specify the limits of integrations as the two last parameters:
integrate(x+2/(x -3), x, 0,1);
=>
integrate(%e^(-x^2),x,minf,inf);
=>
Series Expansions
Series expansions can be calculated through the taylor method (the last parameter
species the depth), or through the method powerseries:
niceindices(powerseries(%e^x, x, 0));
=>
taylor(%e^x, x, 0, 5);
6 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
=>
The trunc method along with plot2d is used when taylors output needs to be plotted (to
deal with the
in taylors output):
plot2d([trunc(%), %e^x], [x,-5,5]);
I hope youll nd this useful and that it will help you get started with Maxima. CAS can
be powerful tools and if you are willing to learn how to use them properly, you will soon
discover that it was time well invested.
Sponsors message: Math Better Explained is an insightful ebook and screencast series
that will help you deeply understand fundamental mathematical concepts, and see math
in a new light. Get it here.
Possibly related articles:
1. 3 awesome free Math programs
2. Refresh your High School Math skills
3. What kind of Math did they teach you?
1.
Alex says:
September 11, 2009 at 10:14 am
Hi
Im alex..I write because I knew Maxima last year and using there in linux, its
7 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
amazing!!!..But now I want install Maxima in WinXP (for work) and I fail the
conguration because there is a problem with a socket!!!
How Can I do?
thanks (Sorry for my English)!!!
Bie!!!
Reply
2.
Hank says:
September 20, 2009 at 1:08 am
Hi
Dont forget to check out the best Maxima tutorial IMHO:
http://www.csulb.edu/~woollett/
Cheers!
Reply
3.
4.
5.
Alexandros says:
September 26, 2009 at 6:06 am
I exit maxima with Ctrl-D.
Reply
6.
8 din 17
09.11.2014 00:04
7.
http://math-blog.com/2007/06/04/a-10-minute-tu...
paulb says:
September 12, 2011 at 10:37 pm
try
f(x):=sum(i, i, 1, x);
plot2d(f(x),[x,1,20]);
Reply
8.
Rob says:
November 14, 2009 at 6:31 pm
When I try your example:
trigsimp(2*cos(x)^2 + sin(x)^2);
I get
=> \displaystyle \cos(x)^2+1
instead of
=> \displaystyle \cos ^2x+1
9 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
Reply
jerzy says:
March 10, 2012 at 3:44 pm
Maxima gives correct result, because:
2*cos(x)^2 + sin(x)^2=
cos(x)^2+cos(x)^2 + sin(x)^2=
cos(x)^2+1
where
cos(x)^2 + sin(x)^2=1
Reply
9.
10.
AKE says:
February 22, 2010 at 2:41 pm
Very nice tutorial introduction! Highly recommended rst intro to Maxima.
Ive put together a selection of the Maxima resources that Ive found most useful
over the years, including a succinct instruction cheatsheet, a guide to programming
subroutines/scripts, and a Mathematica-Maxima syntax conversion chart.
Theyre available here:
http://mathscitech.org/articles/maxima
Enjoy!
Reply
11.
10 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
12.
Alexander says:
April 23, 2010 at 12:19 pm
I am recently retired and cut my math curious teeth with Mathematica for
students circa fall 2000. The past ten years i have developed computer parametric
geometry to explor gravity curves and have a written manuscript that would work
best with a symbolic logic program such as Derive or Mathematica in the back
cover. TI didt want to look at it (Derive had more then enough power to study
simple curvature relations) and Mathematica never replied. I know it would push
education of math beyond expectations simply because I had so much fun doing it.
Can any one out there help get this project air borne. Not in education I had no
idea Maxima or others existed and there is little dierence betwixt utility gained!
Thanks for the tutorial and I will attempt the download and application.
Reply
13.
Ricardo M says:
August 24, 2011 at 5:27 pm
Men necesito un gran favor! necesito saber si sabes resolver problemas de
optimizacion lineal con este programa, se lo agradeceria mucho!
Reply
14.
synhedionn says:
September 6, 2011 at 6:49 am
Hi,
In Maxima: sum(i,i,1,n); gives sum(i,i,1,n);
Cant it give n(n+1)/2?
Reply
Reply
15.
11 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
Reply
16.
17.
jerzy says:
March 10, 2012 at 3:53 pm
Clear, simple, useull, beautiful work. Thanks.
Reply
18.
RockyRoad says:
April 3, 2012 at 6:31 am
Great work Antonio, thank you very much
Inspiring ? Yes !
Im nearly new to CAS programs (played a bit with gnuplot though), my last math
classes are over 25 years old now not easy !
Im delighted to discover what Maxima can do for me and feel eager to refresh and
and expand my math notions and practice.
Your tutorial could do that !
Reply
19.
M Kanagasabapathy says:
May 6, 2012 at 1:57 am
Dear Antonio Cangiano,
Excellent and Nice tutorial. Kindly proceed for higher computations , tensors,
numerical simulations etc., if possible. It can be benecial for researchers and
students.
Dr M Kanagasabapathy
Reply
20.
12 din 17
phobos says:
May 8, 2012 at 7:07 am
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
21.
KSO says:
May 8, 2012 at 8:38 pm
Im trying to add random noise to a function, but the random() function only
generates a single number, giving me an oset. I want my function to plot a
Lorentzian curve, for example, but I want random white noise added to every point,
not just one. I used the following function denition:
Lno(G,x0,x):=(
r:random(x),
1/%pi*(0.5*G)/((x-x0)^2+(0.5*G)^2)+r
);
and tried another
Lnoi(G,x0,x):=1/%pi*(0.5*G)/((x-x0)^2+(0.5*G)^2)+random(1.2);
All I get is a smooth Lorentzian curve with a random oset when I plot using plot2d,
not random noise at every point.
Does anyone know how to do this?
Reply
22.
albert says:
September 17, 2012 at 10:16 am
I think your introductory page is brilliant.
There is however one aspect that might be improved. You could draw slightly more
attention to the variables and the fact that they can contain any result. It took me a
13 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
23.
Dante says:
May 20, 2013 at 7:36 am
I dont know why wxMaxima doesnt solve my limit. I input the limit and it returns
the same limit written with LaTeX :S I dont knwo what Im doing wrong.
This is the limit im trying to solve:
limit([ln(x^2+1)/((5*sen(x))+x)]+6,x,0);
Reply
24.
Reply
25. rendering spirals | Spirotaxis says:
August 27, 2013 at 1:06 am
[] to re-derive this approximation formula for an Archimedean spiral rather than a
circle. I read a tutorial on using wxMaxima, then created a worksheet to chug
through the derivation. The spiral may be composed of an []
Reply
14 din 17
09.11.2014 00:04
26.
http://math-blog.com/2007/06/04/a-10-minute-tu...
mahtab says:
September 18, 2013 at 7:38 am
What is dierent between Maxima and other softwares such as Matlab and Scilab?
what is benets and features of my called softwares?
Reply
27.
Reply
28. Was man in MATH-BLOG.COM lernen kann | Mathematik mit Maxima says:
November 21, 2013 at 4:24 am
[] Quelle: http://math-blog.com/2007/06/04/a-10-minute-tutorial-for-solvingmath-problems-with-maxima/ []
Reply
29.
30.
Older Comments
15 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
Leave a Reply
Name (required)
Website
Submit Comment
Notify me of follow-up comments by email.
Notify me of new posts by email.
Join Our Mailing List
* indicates required
Email Address *
First Name
Subscribe
Recommended Math Books
Click here to see our math book list.
16 din 17
09.11.2014 00:04
http://math-blog.com/2007/06/04/a-10-minute-tu...
Search
Search
Sponsors
Authors
Antonio Cangiano
Chris Waggoner
David Binner
Dr Michael Taylor (PhD, CPhys)
Gregory Thole
Jessica Cangiano
John F. McGowan, Ph.D.
Katherine Stange
Marvin Ray Burns
Michael Koploy
Tony McDaniel
Categories
Select Category
Math Links
New Books
Not Even Wrong
Polymathematics
Technical Blogging
The N-Category Caf
The Unapologetic Mathematician
Zen and the Art of Programming
Copyright Math-Blog 2007 - 2014. All rights reserved.
17 din 17
09.11.2014 00:04