Primality Test (isPrime)

The “isPrime” function determines whether the number provided as the argument is prime (returns TRUE) or not (returns FALSE). The syntax of the “isPrime” function is shown below.

isPrime(Exp/List[ ) ]• Exp or all of the elements of List must be integers.

Problem

Operation

Determine whether the numbers 51 and 17 are[isPrime] { 51 , 17 })w
prime.

 

(isPrime({51, 17})

 

 

 

Equal Symbols and Unequal Symbols (=, , <, >, s, t)You can use these symbols to perform a number of different basic calculations.

Problem

 

Operation

To add 3 to both sides of x = 3.x + 3 = 6(X= 3 )+ 3 w

 

 

 

Subtract 2 from both sides of y s 5.y – 2 s 3(Y; 5 )- 2 w

 

 

 

Tip

In the “Syntax” explanations of each command under “2-7 Using the Action Menu”, the following operators are indicated as “Eq/Ineq”: =, , <, >, s, t. Whether or not the “Eq/Ineq” operators include the “” operator is specified for each command by a separate note.

An expression that contains multiple equation or inequality operators cannot be input as a single expression. For output expressions, an expression can be output with multiple operators only in the case of inequality operators that are facing in the same direction (example: –1 < x < 1).

Example: solve(x2 – 1 < 0, x) w{–1 < x < 1}
“with” Operator ( )

The “with” ( I ) operator temporarily assigns a value to a variable. You can use the “with” operator in the following cases.

To assign the value specified on the right side of to the variable on the left side of

To limit or restrict the range of a variable on the left side of in accordance with conditions provided on the right side of

The following is the syntax for the “with” ( I ) operator.Exp/Eq/Ineq/List/MatEq/Ineq/List/(and operator)

You can put plural conditions in a list or connected with the “and” operator on the right side. “” can be used on the left side or the right side of .

Problem

 

Operation

Evaluate x2 + x + 1 when x = 3.

13

X{ 2 +X+ 1 UX= 3 w
For x2 – 1 = 0, determine the value of x when x > 0..X{ 2 - 1 = 0 ,X)UX> 0 w

 

{x = 1}

 

 

 

 

Determine the value of abs (x) when x > 0.

x

4XeUX> 0 w

 

 

 

Chapter 2: Main Application

53