Difference between revisions of "CAS View"

From GeoGebra Manual
Jump to: navigation, search
m (added code tags)
Line 33: Line 33:
 
===Row References===
 
===Row References===
  
You can refer to other rows in the CAS view in two ways
+
You can refer to other rows in the CAS view in two ways:
  
* Static row references insert text from another row, so your input is changed.
+
* Static row references substitute the equation/formula/etc from another row, and '''won't''' be updated if the row is subsequently changed
 
** <code>#</code> inserts the previous output
 
** <code>#</code> inserts the previous output
 
** <code>#5</code> inserts the output of row 5
 
** <code>#5</code> inserts the output of row 5
* Dynamic row references use text from another row, but don't change your input.
+
* Dynamic row references substitute the equation/formula/etc from another row, and '''will''' be updated if the row is subsequently changed
 
** <code><nowiki>$</nowiki></code> inserts the previous output
 
** <code><nowiki>$</nowiki></code> inserts the previous output
 
** <code><nowiki>$</nowiki>5</code> inserts the output of row 5
 
** <code><nowiki>$</nowiki>5</code> inserts the output of row 5

Revision as of 21:56, 29 December 2012

The CAS view allows you to use GeoGebra's CAS (Computer Algebra System) for symbolic computations. The view consists of cells, each of them has an input field at the top and output display at the bottom. You can use these input fields in the same way as the normal Input Bar, with following differences:

  • you can use variables that were not assigned any value, e.g. (a+b)^2 evaluates to a^2+2*a*b+b^2
  • = is used for equations and := for assignments. This means that a=2 will not assign value 2 to a. See the section about assignments for details.
  • multiplication should be marked explicitly. While in the Input Bar you can use both a(b+c) and a*(b+c) for multiplication, in CAS only the latter is valid.

Basic input

  • Enter: evaluate input
  • Ctrl + Enter: evaluate numerically the input, e.g. sqrt(2) yields 1.41.
  • Alt + Enter: check input but do no evaluate input, e.g. b + b stays as b + b. Note that assignments are always evaluated, e.g. a := 5
  • In an empty row type:
    • Space bar for previous output
    • ) for previous output in parentheses
    • = for previous input
  • Suppress output with a semicolon at the end of your input, e.g. a := 5;

Toolbar

  • Clicking a button in the toolbar applies a command to the currently edited row
  • You can select part of the input text to only apply the operation to this selected part

Variables

Assignments & Connection with GeoGebra

  • Assignments use the := notation, e.g. b := 5, a(n) := 2n + 3
  • To free up a variable name again, use Delete[b]
  • To redefine a variable or function , you must do so in the same cell, otherwise it will be treated as a new variable and renamed
  • Variables and functions are always shared between the CAS view and GeoGebra if possible. If you define b:=5 in the CAS view, then you can use b in all of GeoGebra. If you have a function f(x)=x^2 in GeoGebra, you can also use this function in the CAS view.
Note:
The output will always be just the expression after the :=, e.g. if you type b:=5 the output will be 5.

Row References

You can refer to other rows in the CAS view in two ways:

  • Static row references substitute the equation/formula/etc from another row, and won't be updated if the row is subsequently changed
    • # inserts the previous output
    • #5 inserts the output of row 5
  • Dynamic row references substitute the equation/formula/etc from another row, and will be updated if the row is subsequently changed
    • $ inserts the previous output
    • $5 inserts the output of row 5

Equations

  • Equations are written using the simple Equals sign, e.g. 3x + 5 = 7
  • You can perform arithmetic operations on equations, e.g. (3x + 5 = 7) - 5 subtracts 5 from both sides of the equation. This is useful for manual equation solving.
  • LeftSide[3x + 5 = 7] returns 3 x + 5 and RightSide[3x + 5 = 7] returns 7

Commands and Tools

For a complete list of commands and tools see CAS Commands and CAS tools.

© 2024 International GeoGebra Institute