• 沒有找到結果。

Assumptions About Variables

In some situations it is useful to restrict the domain of a variable. For example, you may want the variable to assume only positive values or only real values. Such restrictions are made with the function assume. The functions available for making or checking or removing assumptions are

assume additionally about unassume

These functions place restraints on speci c variables or on all variables, provide in-formation on the restraints, or remove restraints. The function assume enables you to place a restraint on a variable. The function additionally allows you to place addi-tional restraints without removing those already in place. The function about returns information on the restraints. The function unassume removes restraints. Allowable assumptions include

real complex integer positive negative nonzero

To enter the names of the functions and the names of the assumptions, put the insertion point in mathematics mode and type the name. It will turn gray when you type the last letter. The following assumptions are also allowed for real variables x and y, and

complex variables z:

x < y x < 3 x 6= 0 x y x 5 Im (z) > 0 Re (z) < 0 Re (z) 6= 0

The normal global default is the complex plane. Variables are assumed to be complex variables and solutions to equations include complex solutions.

I To change the global default domain for variables

1. In mathematics, type assume. (It will automatically turn gray.)

2. Click the expanding parentheses button . 3. Enter an allowable assumption and choose Evaluate.

I Evaluate

assume(real) = R

After making this assumption, only real solutions will be computed:

I Solve + Exact

x2= 1, No solution found. x2= 1, Solution is: 1; 1

I To return the global default domain to normal 1. In mathematics, type unassume.

2. Click the expanding parentheses button . 3. Choose Evaluate.

I Evaluate

unassume ()

In the default mode, both real and complex solutions will be computed:

I Solve + Exact

x2= 1, Solution is: i; i x4= 1, Solution is: i; 1; i; 1 Here is another example.

I Evaluate

assume (positive) = (0; 1)

After making this assumption, only positive real solutions will be computed:

I Solve + Exact

x2= 1, Solution is: 1 x4= 1, Solution is: 1

The global default will return to normal when you close and reopen Scienti c Work-Place or Scienti c Notebook.

I To check the status of the global default

1. In mathematics, type about. (It will automatically turn gray.) 2. Click the expanding parentheses button .

3. Choose Evaluate.

I Evaluate

about() = Global

This response indicates that there are no special global assumptions in force; that is, the global default is normal.

I To place a restraint on a variable 1. In mathematics, type assume.

2. Click the expanding parentheses button .

3. Type the variable name, followed by a comma, followed by the desired assumption.

4. Choose Evaluate.

I To restrain the variable n to be a positive integer

Place the insertion point in the expression assume (n; positive), and choose Evalu-ate.

An additional assumption placed on n with assume would negate any previous assumption. To place another assumption on a variable without removing previous assumptions, use the function additionally. Evaluation of assume(n; positive) and additionally(n; integer), followed by evaluation of about(n), produces the following:

I Evaluate

assume(n; positive) = (0; 1)

additionally(n; integer) = Z \ (0; 1) about(n) = Z \ (0; 1)

I To clear the assumptions about a variable

Select the variable and choose De nitions + Unde ne.

or

Evaluate unassume (name of variable).

I De nitions + Unde ne n

or I Evaluate

unassume (n)

You can check the status of the variable n with the function about.

I Evaluate about(n) = n

This response indicates there are no assumptions on the variable n.

If you assume that n is an integer, the system will recognize that n2is a positive integer.

I Evaluate

assume(n; integer) = Z about n2 = Z \ [0; 1)

n2+ 1 = n2+ 1

I To restrict the domain of a complex variable z

Make assumptions on the real and imaginary parts of z.

I Evaluate

assume (Re (z) > 0) = (0; 1) + iR

additionally (Im (z) < 0) = (0; 1) + i ( 1; 0)

I To restrict the domain of a real variable x 1. Make the assumption that x is real.

2. Use the function additionally to place additional restraints on x.

I Evaluate

assume (x; real) = R

additionally (x < 10) = ( 1; 10) additionally (x 10) = [ 10; 10)

I Solve + Exact

sin x = 0, Solution is: 3 ; 2 ; ; 0; ; 2 ; 3

Formula

The Formula dialog provides a way to enter an expression and a Compute operation.

What appears on the screen is the result of the operation and depends upon active de ni-tions of variables that appear in the formula. Formulas remain active in your document–

that is, changing de nitions of relevant variables will change the data on the screen.

I To insert a formula

1. Click on the Field toolbar or, from the Insert menu, choose Formula.

2. In the Formula area, enter a mathematics expression.

3. In the Operation area, select the operation you want to perform on the expression.

(Click the arrow at the right of the box for a list of available operations.) 4. Choose OK.

The results of the operation will be displayed on your screen.

With Helper Lines on, a Formula can be identi ed by a colored background. The default is yellow.

I To change the formula background color

1. Choose Tag + Appearance and check Modify Style Defaults.

2. Under Tag Properties, choose Special Objects, from the drop-down list, chose For-mulas, and choose Modify.

3. Select background color and choose OK.

4. Choose Save if you wish to make a permanent change in the screen style, and choose OK.

Example Choose Insert + Formula. In the Formula box, type a, and under Opera-tions choose Evaluate. Choose OK.

The a will appear on your screen at the position of the insertion point. Now, at any point in your document, de ne a = sin x. The formula a will be replaced by the expression sin x. Make another de nition for a. The formula will again be replaced by the new de nition everywhere the formula a appears in the document.

Example Insert a 2 2 matrix. With the insertion point in the rst input box, click . In the Formula box, type a. Under Operations, choose Evaluate. Choose OK.

Repeat for each matrix entry, typing, in turn, b, a + 2b, and (a b)2in the formula box to obtain the following matrix:

a b

a + 2b (a b)2

Now de ne a = sin x and b = cos x. The matrix will be replaced by the following matrix.

sin x cos x

sin x + 2 cos x (sin x cos x)2

De ne a = ln x and b = ex. The matrix will be replaced by the following matrix.

ln x ex

ln x + 2ex (ln x ex)2

Example Insert a table with 2 columns and 5 rows. Insert formulas x, y, z, and x + y + z in the column on the right, with Operation: Evaluate.

Date Income

01/31/2002 x

02/28/2002 y

03/31/2002 z

Total x + y + z

De ne each of x = 20:56, y = 18:92, z = 23:45 to obtain the table Date Income

01/31/2002 20:56 02/28/2002 18:92 03/31/2002 23:45 Total 62:93

Multiple choice examinations with variations can be constructed using formulas.

A formula in a quiz question depends on de nitions that are made globally for the document—they are not local to each question or variant. For this reason, we recom-mend using a Math Name (see page 110) instead of a single character name for each variable.

The following example outlines a way for manually constructing a quiz with variants.

For information on an automatic way to create such examinations with random variants, see Help + Contents, Create Exams and Quizzes.

Example The variables a1 and b1 shown in the sample question below are math names entered as formulas.

Click and then click , or use Insert + Formula followed by Insert + Math Name.

Turn on Helper Lines and look for background color to check that each of the entries a1, b1 or b1 = a1 is entered in a formula.

The sample question has the following appearance with neither of the variables a1 or b1 de ned:

For which values of the variable x is a1 x b1 < 0?

a. x < b1 = a1 b. x > b1 = a1 c. x > b1 d. x < b1 e. None of these

Now de ne a1 = 2 and b1 = 5 by placing the insertion point in each equation and choosing De nitions + New De nition. You will obtain the following result:

For which values of the variable x is 2x 5 < 0?

a. x < 5=2 b. x > 5=2 c. x > 5 d. x < 5 e. None of these

After printing a quiz, make different de nitions for all the variables such as a1 and b1 to obtain variations of the quiz.

相關文件