Links | Octave | R | TI Calculator | Maxima | WolframAlpha | GeoGebra | Sage | Latex

# Sage, CoCalc

 numerical approximation 2*pi.n()2*pi.n(digits=50) show it pretty show(expand((x+5)^2)) derivative var('x y')f(x,y) = 5*x^3*y^2diff(f,x,y).substitute(x=-1,y=5)

# Markdown / Latex

• Markdown cheatsheet
• Enclose inline equations in single dollar signs, e.g.
$y=\frac{2}{x}$
• Enclose full-line equations in double dollar signs, e.g.
$$f(x) = 2x+5$$
• Group expressions in curly braces, e.g.
$\sqrt{x^2+y^2}$
 headings # section## subsection images links text new line (double space) italic *text* bold **text** strike-out ~~text~~ horizontal line --- color green text lists - animals 1. zebra 2. yak - minerals 1. calcium 2. sodium  table | Col1 | Col2 | Col3 | | :----------- | :------: | ------------: | | Left-aligned | Centered | Right-aligned | | blah | blah | blah |  source code inline like this, or for a block:  int x=1 for (int i=1;i<=10;i++) x += i; printf("%d\n",x)   block quote sections prefix with "> " > this section will be set apart > from the surrounding material  fraction $\frac{ x+2 }{ x^2+1 }$ subscript and superscript $x_a^{12}$ functions $\sqrt{x} , \sqrt{x}, \cos(x), \ln(x), \min(x), \| \cdot \|$ greeks $\alpha, \beta, \pi, \sigma, \Sigma$ hats $\hat{x} , \tilde{x}$ integral symbol $\int , \iint , \oint$ misc symbols $\neq, \leq, \times, \rightarrow, \nabla, \pm, \subset, \cdots, \exists, \forall, \heartsuit$ limits $$\lim_{n \rightarrow \infty} \left( 1+\frac{1}{n} \right)^n = e$$ derivatives $\frac{dy}{dx}$$\frac{\partial y}{\partial x}$ matrix $\begin{bmatrix} a & b \\ c & d \end{bmatrix}$

# Octave

#### What is Octave?

Matlab has become a standard in scientific computing. It is a high-level numerical computing language, and can be used as both a programming language and command-line driven calculator. Matrices are the basic objects of computation.

Matlab is proprietary software, and can be quite expensive for some of the more state-of-the-art special toolboxes. Octave is a free and open-source clone of Matlab. It has essentially the same syntax and functionality, but is open-source and free!

#### Installing Octave

Octave is installed on selected lab computers, but you are strongly encouraged to install this software on your own PC.
1. Download the installer and save it to your Desktop.
2. Double-click on the file you just downloaded to begin the installer.
3. Agree to the license and all default settings.
4. Your install is now complete, and you should have a shortcut to Octave on your desktop and in your start menu. You can delete the original installer.

#### Matlab/Octave Quick Introduction

The Matlab user environment is just a plain console, where you can type commands and receive answers. Think of it as a specialized calculator, with the power to solve much larger and varied types of problems. Use the resource links above, in conjunction with the built-in 'help' command to see how a particular function works. The examples below will demonstrate some basic Matlab commands; you should experiment with them on your own.
• The up/down arrows conveniently allow you to scroll between previous commands.
• Put a semicolon at the end of a command to suppress output.
• Variables are case-sensitive.
• The example commands/output below should be self-explanatory.

>> A=[1 5 0 1000; 0 -3 1 200; 1 0 -1 0]
A =
1         5         0      1000
0        -3         1       200
1         0        -1         0

>> size(A)
ans =
3        4

>> A(1,4)
ans = 1000

>> A(2,:)
ans =
0        -3         1       200

>> A(:,2)
ans =
5
-3
0

>> B=A(1:3,1:3)
B =
1         5         0
0        -3         1
1         0        -1

>> B'
ans =
1         0         1
5        -3         0
0         1        -1

>> A([2,3],:)=A([3,2],:)
A =
1         5         0      1000
1         0        -1         0
0        -3         1       200

>> rref(A)
ans =
1        0        0      500
0        1        0      100
0        0        1      500
>> A\b
ans =
500
100
500

>> inv(A)*b
ans =
500
100
500

 sum a series  S=0; for k=1:100, S = S + 1/k; end; S  recursive sequence  B=; for k=1:40 B(end+1) = 1.05*B(end) + 5500; end printf("%2d %12.2f\n",[0:40;B]); plot(0:40,B,'+')  plot contours/surface x = -8:.1:8; y = -8:.1:8; [X,Y]=meshgrid(x,y); Z = sin(sqrt(X.^2+Y.^2)) ./ sqrt(X.^2+Y.^2); mesh(Z); contour(Z); meshc(Z);

# R Statistics Software

#### What is R?

R is a free open-source statistical software package. Think of it as a calculator on steroids. It has a command-line interface, and can serve as a programming language. It can do simulations, graphs, and analysis on data that you enter yourself, or download from the web.

#### Installing R

R is installed on selected lab computers, but you are strongly encouraged to install this software on your own PC.
1. Download the exe file and save it to your Desktop.
2. Double-click on the file you just downloaded to begin the installer.
3. Agree to the license and all default settings.
4. Your install is now complete, and you should have a shortcut to R on your desktop and in your start menu. You can delete the original installer.
5. If you use a Mac or Linux, you can find install info here.

#### R Quick Introduction

• These commands illustrate some basic R functionality.
• The up/down arrows conveniently allow you to scroll between previous commands.
• Put a semicolon at the end of each command.
• Variables names are case-sensitive.
• A data set may have multiple columns - to access one column use "datasetName$columnName"  q(); quit R ctime = c(10,45,5,10,7,7);define data set vector ctime; show the data set length(ctime); length of the data set class = read.table("m:/m201/class.txt",header=T); read data set as a table from a file summary(class$siblings);                           1-var summary data
sd(class$siblings); standard deviation stem(class$shoe);                       stem and leaf plot
barplot(table(class$siblings)); histogram hist(class$shoe,freq=F);                histogram of quantitative data
boxplot(class$shoe); boxplot boxplot(class$shoe ~ class$gender); parallel boxplots seq(1,100,2) list 1 to 100 by 2's sample(1:30, 7); sample without replacement sample(1:30, 7, replace=T); sample with replacement rnorm(10, mean=100, sd=15); sample from normal distribution x = matrix( sample(1:0,7*20, replace=T, c(.6,.4)), ncol=7);totals = rowSums(x); simulate binomial (20 sims, n=7, p=.6) n = 6; sims = 100; x = matrix( rexp(n*sims, 1/4), ncol=n); sampleMeans = rowSums(x) / n; simulate sampling dist of xbar prop.test(30, 50, p=.5, conf.level=.95, alternative="two.sided") one sample proportion test t.test(class$shoe, mu = 10, conf.level=.95, alternative="two.sided")   t-test on sample mean



# TI 83/84 Calculator

 enter data STAT-EDIT; fill in data vals in L1, and optionally frequency in L2 restore lost list STAT-5-ENTER One variable summary STAT-CALC, 1VarStats L1 (,L2) factorial 5 [[math , prb , ! ]] permuation 5 [[ math, prb, nPr ]] 2 combination 5 [[ math, prb, nCr ]] 2 binomial for exactly x binompdf(n, p, x) binomial for less than or equal to x binomcdf(n, p, x) full binomial distribution binompdf(n,p) [ -> L2 ] normal for x between a and b normalcdf(a,b,mu,sigma) (use +/- E99 for infinity) normal distribution, given a percentile area A, find x invnorm(A,mu,sigma) conf int / hyp test for proportion STAT-TESTS-1-PropZInt/Test conf int / hyp test for sample mean STAT-TESTS-TInterval/Test conf int / hyp test for 2-sample proportion STAT-TESTS-2-PropZInt/Test conf int / hyp test for 2-sample mean STAT-TESTS-2-SampTInt/Test hyp test for standard deviations STAT-TESTS-2-SampFTest linear regression / correlation enter data in L1,L2, and then STAT-TESTS-LinRegTTest ANOVA enter data in L1,L2,L3,etc, and then STAT-TESTS-ANOVA(L1,L2,L3) chi-squared test for independence enter contingency table in MATRIX-EDIT, then STAT-TESTS-chi^2

# Maxima

 submit commands for processing shift-enter define a function f(x):=x^2; f(2); make a sequence makelist([n,1/n],n,1,10); find a limit limit((n+1)/n,n,inf); Taylor series taylor(exp(x), x, 0, 8); parametric plot plot2d ([parametric, cos(t), sin(t), [t, 0, 2*%pi], [nticks,100]]); parametric plot load(draw); draw2d(parametric(cos(t),sin(t),t,0,2*%pi)); draw3d(parametric(cos(t),sin(t),t,t,0,2*%pi)); animated plot load(draw); r(t):=[cos(t),sin(t)]; Tmin:0; Tmax:4*%pi; n:50; with_slider_draw( T, makelist(Tmin+i*(Tmax-Tmin)/n,i,0,n), xrange = [-2,2], yrange = [-2,2],grid=true,dimensions=[600,500], label([printf(false,"t=~8,3f",T),0,0]), parametric(r(t),r(t),t,0,T) , point_size=2,point_type=filled_circle,color=red, points([r(T)]) ); 3d surface plot load(draw); draw3d(enhanced3d=true,surface_hide=true,xu_grid=50,yv_grid=50,xlabel="x",ylabel="y", contour_levels=10,contour=base,explicit(sin(x*y),x,-2,2,y,-2,2)); vector valued functions load(eigen); load(vect); r(t):=[sin(t), cos(t), t]; define(v(t), diff(r(t),t) ); define(speed(t), sqrt(v(t).v(t)) ); define(T(t), unitvector(v(t)) ); define(a(t), diff(v(t),t) ); define(Tprime(t), diff(T(t),t) ); define(N(t), unitvector(Tprime(t)) ); define(aT(t), diff(speed(t),t)); define(aN(t), sqrt(a(t).a(t) - aT(t)^2) ); define(kurv(t), aN(t) / (v(t).v(t)) ); define(R(t), 1/kurv(t) ); define(B(t), express(T(t)~N(t)) ); float(v(1)); float(a(1)); float(aT(1)*T(1) + aN(1)*N(1));  Lagrange multipliers f(x,y):=x^2+2*y^2; g(x,y):=y-x^2+4; solns:solve( [ diff(f(x,y),x)-L*diff(g(x,y),x), diff(f(x,y),y)-L*diff(g(x,y),y), g(x,y)], [x,y,L])$for soln in solns do ( print(soln," f=",float(ev(f(x,y),soln))) );  Milk-maid problem load(draw)$ load(mnewton)$f(x,y):=sqrt((x+1)^2+y^2)+sqrt((x-1)^2+y^2); g(x,y):=(x^2+3*y-6)*(y-2)-3*x; x0:-2; x1:2; y0:-2; y1:4; draw2d( grid = true, color = black, point_size = 5,point_type = filled_square, points([ [-1,0], [1,0] ]), color = blue,line_width = 4, implicit(g(x,y) = 0,x,x0,x1,y,y0,y1), line_width=2, color = red, implicit(f(x,y)=2.03,x,x0,x1,y,y0,y1), color = orange, implicit(f(x,y)=2.1,x,x0,x1,y,y0,y1), color = purple, implicit(f(x,y)=2.5,x,x0,x1,y,y0,y1), color = forest_green,implicit(f(x,y)=3,x,x0,x1,y,y0,y1), color = brown, implicit(f(x,y)=3.5,x,x0,x1,y,y0,y1), color = pink, implicit(f(x,y)=4,x,x0,x1,y,y0,y1) )$ soln:mnewton([ g(x,y), diff(f(x,y),x)-L*diff(g(x,y),x), diff(f(x,y),y)-L*diff(g(x,y),y) ], [x,y,L], [1,.5,0]); ev(f(x,y),soln); 

# GeoGebra

• Sequence[ (n,1/n), n,1,20 ]