This post contains detailed instructions for creating your first worksheet on CoCalc. It should take you about 15 minutes to work through. (Click on any of the screen shots below for a bigger version.)
- Visit https://cocalc.com . You will see a screen where you can create an account:
Fill out the form, using a real e-mail address, and you have an account. - You will be taken to a screen where you see a list of projects (currently empty):
Type in a title for your new project (e.g., Math342) and click “Create Project”. - Next, add a new worksheet: click “Create or upload files”:
- Now we’re in a Sage worksheet; your screen should look like this:
Type “2+2” and press Shift-Return. (That is, hold down the Shift key and press Return.) Sage should compute “4” for you:
- Admittedly, that’s not very impressive. The worksheet has some menus to help you get comfortable with Sage syntax and learn the names of functions. For example, we can graph a function by going to the “Plots” menu select “Function”. You can also plot functions of two variables. Play around with it a bit.
(Cool.) - Sage will (try to) solve systems of equations using the “solve” command. Type:
%var x y
solve([3*x+5*y==7, x-2*y==3],x,y)
and press shift-return.
Play around with it a bit. What happens if you give an inconsistent system? - We can also do this using a matrix. To create a matrix, type:
A=matrix([[3,5,7],[1,-2,3]])
To get Sage to print your matrix for you, type
A
and hit shift-return.
To get the row-reduced echelon form of A, type:
A.rref()
.
Try entering and row-reducing another matrix. - Matrix operations work as you expect. Addition is with +, multiplication with *, and inversion using A.inverse() or A^(-1).
Try it out. What happens if you ask Sage to do something that is not defined (e.g., add two matrices of different sizes, or invert a non-square or square but non-invertible matrix)?