[ Previous | Next | Contents ]


7. Algebraic Manipulation

Among the powerful features of DERIVE is its ability to manipulate expressions and equations algebraically. For example, DERIVE is able to simplify and factor expressions and to solve many types of equations. You will learn about a few of these capabilities in this chapter.

7.1 - Simplifying Expressions

The [S]implify command can be used to automatically perform a number of simplification steps. These steps normally include combining like terms, applying the laws of exponents to integer exponents, expanding products and integer powers of polynomials, and finding common denominators.

Example 7.1: Simplify the expression (3x² - 5x + 1)³ - (4x² + 8 x - 3)².

Solution: [A]uthor the expression as described in the previous chapter and then select the [S]implify command from the command menu. Your screen should look similar to Figure 7.2.

Figure 7.2

The "#1" following the "SIMPLIFY expression:" prompt indicates that expression 1 is the highlighted expression. Since that is the expression you want simplified, just press [Enter]. The simplified expression will appear on the screen below the original, as illustrated by Figure 7.3.

Figure 7.3

In some instances, the [S]implify command may not produce the result you want. One possible remedy is to use the [E]xpand command discussed in Factoring and Expanding Expressions. Another is to use the left and right arrow keys to highlight only a portion of the expression to be simplified.

Example 7.4: Show that the expression simplifies to .

Solution: If you attempt to simplify the entire expression as we did in Example 7.1, DERIVE will return the answer

Instead, after entering the original expression, press the left arrow key once to highlight just the first term of the expression. Now follow the simplification procedure exactly as in Example 7.1 and you will get the desired result.

7.2 - Factoring and Expanding Expressions

The [F]actor and [E]xpand commands are especially useful when working with polynomial and rational expressions. As the name implies, the [F]actor command factors expressions as much as possible. When you select the [F]actor command from the command menu, you will be prompted for the expression to be factored and you will also be asked to select the level of factoring. The request for the level of factoring will come in the form of the sub-menu shown in Figure 7.5.

Figure 7.5

The menu items[R]ational, ra[D]ical, and [C]omplex refer to the domain over which the factoring will be done. In most cases, [R]ational factoring will be sufficient, although ra[D]ical may at times be desirable.

Example 7.6: Factor the expression x + 2x³ - 3 x² - 8x - 4.

Solution: [A]uthor the expression and type the sequence of commands [F]actor [Enter] [R]ational. The factored expression will be displayed as shown in expression 2 in Figure 7.7. If you want the expression factored even further, type[F]actor [Enter] ra[D]ical. The result of this factorization is shown in expression 3 in Figure 7.7.

Figure 7.7

The [E]xpand command does just the opposite of the [F]actor command—it takes factored expressions and multiplies them out. You may wish to try it on the expression (x + 1)²(x² - 2) from Example 7.6 to see that it returns the original unfactored expression.

7.3 - Substituting Values

The [M]anage [S]ubstitute command can be used to substitute values for all occurrences of the variables in an expression. The replacement values can be numbers, variables, or even expressions.

Example 7.8: Substitute the expression x + 1 in place of x in the expression 2x² - 5x + 1.

Solution: [A]uthor the expression 2x² - 5x + 1 and select [M]anage [S]ubstitute. Press [Enter] to answer the "MANAGE SUBSTITUTE expression:" prompt. The next request will be for a "MANAGE SUBSTITUTE value:". Type x+1 and press [Enter]. The answer will be given as 2(x + 1)² - 5(x + 1) + 1. If you wish to simplify the answer further, use the [S]implify command.

When substituting decimal values for variables, an additional step is required if you wish to see a simplified numerical answer. This step involves the use of the appro[X] command, as illustrated in Example 7.9 below.

Example 7.9: Evaluate the expression 2x² - 5x + 1 for x=.

Solution: Assuming you have already [A]uthored the expression in the previous example, use the up arrow key to highlight the expression. Then select [M]anage [S]ubstitute followed by [Enter]. Type pi or [Alt-P] and press [Enter]. The answer will be given as 2² - 5 + 1. Now select appro[X] from the command menu and press [Enter] when prompted with "APPROX expression:". The final answer will be given as 5.03124, which is correct to 5 decimal places. If you would like more accuracy, you can increase the number of decimal places using the [O]ptions [P]recision command.

Another way to evaluate expressions without using [M]anage [S]ubstitute is to enter the expression as a function definition and then evaluate the function using normal function notation. For example, you could [A]uthor the function f(x):=2x^2-5x+1 (don't forget the colon) and then [A]uthor the expression f(x+1) and [S]implify. The result will be the same as Example 7.8. We will look at functions in more detail in Functions.

7.4 - Solving Equations

When solving equations with DERIVE, we must make a distinction between exact and approximate solutions. To illustrate this distinction, consider the equation x² - 2. The two solutions of this equation are and , both of which are exact. The approximate solutions, correct to 4 decimal places, are 1.4142 and 1.4142. The so[L]ve command can be used to find exact solutions for many types of equations. In fact, unless you tell DERIVE otherwise, it will always attempt to find exact solutions first. If so[L]ve fails to find any exact solutions, you can change DERIVE to approximate mode using the [O]ptions [P]recision [A]pproximate command and then try again. In approximate mode, the so[L]ve command will prompt you to enter the lower and upper bounds of an interval in which to search for a solution. Examples 7.10 and 7.12 illustrate the two solving modes.

Example 7.10: Find the exact solutions of x³ + 2x - 3 = 0.

Solution: Enter the equation using the [A]uthor command. Select so[L]ve from the command menu and press [Enter] when prompted with "SOLVE expression:". The three solutions will be displayed on the screen as shown in Figure 7.11.

Figure 7.11

The i with the hat above it in expressions 3 and 4 indicates that those solutions are complex numbers.

DERIVE is capable of solving exactly any polynomial equation of degree 4 or less and even many polynomial equations of higher degree. Equations involving the so-called transcendental functions (e.g. trigonometric, logarithmic, and exponential functions) can often only be solved approximately.

Example 7.12: Find the approximate solution of cosx = x in the interval [0,1].

Solution: [A]uthor the equation and try to solve it exactly. Notice that DERIVE is unable to solve it exactly but simply rearranges the equation. Now change to approximate mode by typing [O]ptions [P]recision [A]pproximate [Enter]. Press the up arrow key to highlight the equation, select so[L]ve again, and press [Enter] for the "SOLVE expression:" prompt. The final request will be for the lower and upper bounds of the interval. The default values of -10 and 10 can be changed as follows. Enter 0 (zero) for the lower bound and use the [Del] key to remove any trailing characters. Then press [Tab] to move to the upper bound, enter 1, and again delete any other characters. Your screen should similar to Figure 7.13.

Figure 7.13

When you are satisfied that both the lower and upper bounds are correct, press [Enter]. The approximate solution, correct to 6 decimal places, is 0.739085. If you want more accuracy, you can change the default number of decimal places in the [O]ptions [P]recision sub-menu.

The so[L]ve command is also often able to solve equations for one variable in terms of the others. The procedure is similar to that of Example 7.10 with the additional step of specifying the variable that you wish to solve for.

Example 7.14: Solve the linear equation 2x - 3y = 6 for y in terms of x.

Solution: Author the equation and change to exact mode by typing [O]ptions [P]recision [E]xact [Enter]. Select so[L]ve and press [Enter] for the "SOLVE expression:" prompt. In answer to the "SOLVE variable:" prompt, type y and press [Enter]. The result is shown in Figure 7.15.

Figure 7.15


[ Previous | Next | Contents ]


Copyright © 1995, Mark E. Gruenwald.
This file may be copied on the condition that its entire contents, including this copyright notice, remain intact.