If
GeoGebra Math Apps Get our free online math tools for graphing, geometry, 3D, and more! GeoGebra is an open-source utility built specifically for helping users design mathematical objects of several types used for calculus, algebra and geometry.Since this is a Java-based application. Download GeoGebra Apps Free offline GeoGebra apps for iOS, Android, Windows, Mac, Chromebook and Linux. Easily construct triangles, drag points, draw parallel lines, intersect circles, save and share your results. Millions of people around the world use GeoGebra to learn mathematics and science. Create constructions with points, lines, circles, polygons, and angles. Explore interactive geometry by dragging points. Measure lengths and areas. Transform shapes by mirroring.
This article is about GeoGebra command.
Command Categories (All commands)
- Logical Commands
- If
- .. and others
![Geogebra 3d calculator Geogebra 3d calculator](/uploads/1/2/6/2/126236347/672429930.png)
- Let n = 3.
If(n3, x + y = 4)
yields line x + y = 4, because the condition on number n is met. - Let n = 4.
If(n3, x + y = 4)
creates an undefined object, because the condition on number n is not met .
Example: Let n be a number.
If(n3, x + y = 4, x - y = 4)
yields line x + y = 4 when n = 3, and line x - y = 4 for all n not equal to 3.3d Geogebra
Geogebra Graphing Calculator
Example:
If(a ≟ 1, 'Matthew', a ≟ 2,'Larry', a ≟ 3, 'Vivian', 'Alex')
When a=1 this returns the text 'Matthew', for a=2' it returns 'Larry', for a=3 'Vivian' and for all other values of a it yields 'Alex'.Geogebra Download
Conditional Functions
Geogebra Clasico
Examples:f(x) = If(x < 3, sin(x), x^2)
yields a piecewise function that equals sin(x) for x < 3 and x2 for x ≥ 3.f(x) = If(0 <= x <= 3, sin(x))
yields a function that equals sin(x) for x between 0 and 3 (and undefined otherwise).
Note: A shorter syntax for this is
f(x) = sin(x), 0 <= x <= 3
f(x) =If(x<-1,x²,-1<=x<=1,1,-x²+2)
yields the piecewise function f(x) = left{begin{matrix}{} x^{2}& : &x < -1 1& :& -1 ≤ x ≤ 1 -x^{2} + 2& : &text{otherwise} end{matrix}right .
- Derivative of If(condition, f(x), g(x)) gives If(condition, f'(x), g'(x)). It does not do any evaluation of limits at the critical points.
- See section: Boolean values for the symbols used in conditional statements.
If Command in Scripting
![Geogebra Geogebra](/uploads/1/2/6/2/126236347/806157959.jpg)
Example: Let n be a number, and A a point. The command
If(Mod(n, 7) 0, SetCoords(A, n, 0), SetCoords(A, n, 1))
modifies the coordinates of point A according to the given condition. In this case it would be easier to use SetCoords(A, n, If(Mod(n, 7) 0,0,1))
.Note: Arguments of If must be Objects or Scripting Commands, not assignments. Syntax
b = If(a > 1, 2, 3)
is correct, but b = 2 or b = 3 would not be accepted as parameters of If.( newcommand{vecs}[1]{overset { scriptstyle rightharpoonup} {mathbf{#1}} } ) ( newcommand{vecd}[1]{overset{-!-!rightharpoonup}{vphantom{a}smash {#1}}} )(newcommand{id}{mathrm{id}}) ( newcommand{Span}{mathrm{span}}) ( newcommand{kernel}{mathrm{null},}) ( newcommand{range}{mathrm{range},}) ( newcommand{RealPart}{mathrm{Re}}) ( newcommand{ImaginaryPart}{mathrm{Im}}) ( newcommand{Argument}{mathrm{Arg}}) ( newcommand{norm}[1]{| #1 |}) ( newcommand{inner}[2]{langle #1, #2 rangle}) ( newcommand{Span}{mathrm{span}}) (newcommand{id}{mathrm{id}}) ( newcommand{Span}{mathrm{span}}) ( newcommand{kernel}{mathrm{null},}) ( newcommand{range}{mathrm{range},}) ( newcommand{RealPart}{mathrm{Re}}) ( newcommand{ImaginaryPart}{mathrm{Im}}) ( newcommand{Argument}{mathrm{Arg}}) ( newcommand{norm}[1]{| #1 |}) ( newcommand{inner}[2]{langle #1, #2 rangle}) ( newcommand{Span}{mathrm{span}})