Solving algebra problems step by step with wxMaxima

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Curve Sketching

Learning algebra in school often involves "curve sketching," or drawing a curve based on an f(x) algebraic function. This is a perfect example of where wxMaxima excels. The curvesketching.wxm batch file provides an example [8]. When you view the file with a text editor, you'll discover that it's a simple text file with the .wxm extension. It contains a sample curve-sketching exercise.

The simple syntax of this file is noticeable at first glance. Each command is enclosed in a comment composed of three lines. The first line is in square brackets and describes the character and start of the command. The second line contains the actual content of the command, and the third line ends the command. If you read this file with the wxMaxima program, you see only the second line. To get the result seen in Figure 4, after loading the file, you would use either Edit | Cell | Evaluate all cells or Ctrl+R.

Figure 4: wxMaxima allows for structured documentation. To see the result, use the application's menu entries to evaluate each line (known as a "cells").

If the cell has a reference to a result, this result could become untenable with a new evaluation. Therefore, you should use an absolute reference such as %o17 (the result of the 17th calculation) only if all the previous evaluations are done again in the proper order.

Relative addresses such as a simple % (in the last exercise) involve the risk that preceding lines will change when processing the file and the reference is no longer valid. This risk, however, applies only to users who routinely create real programs for evaluation. Using the program interactively, you can reference at will. Using the Cell menu entry, you can add the different cells at relevant file locations. Simple text cells are in blue and have the nature of a comment. Cells of the Section and Subsection types are automatically numbered, which allows you to structure a task.

Curve sketching doesn't run quite automatically. You first have to assign it a function. In the curvesketching.wxm file the f(x):=x^3/(x^2-4) function is an example of this. If necessary, you can start by modifying the definition by editing the input line. Whether the definition needs to be verified depends on the type of function. Polynomials don't need verification in that their scope encompasses the entire set of real numbers (see the "Totally Real" box). The curvesketching.wxm file includes a function where the polynomial in the denominator needs to evaluate to non-zero. This happens using the solve(x^2-4=0,x); line in the script used to solve the equation. The definition range excludes the solution from the full set of real numbers (D=R\{-2,2} ).

Totally Real

wxMaxima works with complex numbers, like any CAS – but unlike high school math classes where students work with real numbers. Hence, the application providing solutions that lie in the set of complex numbers makes it unsuited for teaching math.

Rewriting Equations

The mechanized derivation of equations with wxMaxima sometimes deviates strongly from a manual one. In curve sketching, for example, the software gives the third derivative in a rather complicated form (Figure 5), whereas the original author of the problem [7] had a much simpler one (Figure 6).

Figure 5: wxMaxima defines the third derivative with the define command, resulting in a rather complicated function.
Figure 6: The original author's version of the example is a much simpler one.

You can identify both functions as identical by recasting the equation. The software provides the simplify and ratsimp (rational simplify) functions, as well as factor and expand . Using these functions skillfully, you can see that both derivatives are the same (Figure 7).

Figure 7: Using factor, you can see that the third derivative matches in the manual and software versions.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content