Getting Started

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.)

  1. 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.
  2. 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”.
  3. Next, add a new worksheet: click “Create or upload files”:
  4. 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:
  5. 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.)
  6. 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?
  7. 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.
  8. 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)?
This entry was posted in Uncategorized. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email address is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar