Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168742
Image: ubuntu2004
First experments of Sage Veikko Keränen -2009 Rovaniemi University of Applied Sciences veikko.keranen@ramk.fi Edited by Shijing Zhang iamshijingzhang@gmail.com
First Experments
3+3 # To execute, please press Shift+Enter button
\newcommand{\Bold}[1]{\mathbf{#1}}6
2^10
\newcommand{\Bold}[1]{\mathbf{#1}}1024
Hints for typing In order to get pretty output please choose the "Typeset" button on the top of the this page
pi
\newcommand{\Bold}[1]{\mathbf{#1}}\pi
1/2
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{1}{2}
1/2*pi
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{1}{2} \, \pi
sqrt(2)
\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{2}
sqrt(1/x^2)
<html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{\frac{1}{x^{2
/span> }}}
precision
1/3.
\newcommand{\Bold}[1]{\mathbf{#1}}0.333333333333333
n(1/3.,digits=4)
\newcommand{\Bold}[1]{\mathbf{#1}}0.3333
n(2^(1/2.), digits=4)
\newcommand{\Bold}[1]{\mathbf{#1}}1.414
n(sqrt(2), digits=4)
\newcommand{\Bold}[1]{\mathbf{#1}}1.414
Some numerical computing
2.^1000
\newcommand{\Bold}[1]{\mathbf{#1}}1.07150860718627 \times 10^{301}
sin(pi/12)
\newcommand{\Bold}[1]{\mathbf{#1}}-\frac{1}{12} \, {(\sqrt{3} - 3)} \sqrt{6}
pi.n(digits=5)
\newcommand{\Bold}[1]{\mathbf{#1}}3.1416
pi.n(digits=50)
\newcommand{\Bold}[1]{\mathbf{#1}}3.1415926535897932384626433832795028841971693993751
Algebraic manipulation
expand((x+1)*(x-1))
\newcommand{\Bold}[1]{\mathbf{#1}}x^{2} - 1
expand((x+1)^3)
\newcommand{\Bold}[1]{\mathbf{#1}}x^{3} + 3 \, x^{2} + 3 \, x + 1
factor(x^2-1)
\newcommand{\Bold}[1]{\mathbf{#1}}{(x - 1)} {(x + 1)}
factor(x^2+x-12)
\newcommand{\Bold}[1]{\mathbf{#1}}{(x - 3)} {(x + 4)}
Greatest common divisor and Least common multiple
gcd(15,150)
\newcommand{\Bold}[1]{\mathbf{#1}}15
gcd(1456,456789)
\newcommand{\Bold}[1]{\mathbf{#1}}1
lcm(15,150)
\newcommand{\Bold}[1]{\mathbf{#1}}150
lcm(123456,654322)
\newcommand{\Bold}[1]{\mathbf{#1}}40389988416