As you work with the symbolic processor, you will undoubtedly discover two things:
• many problems can only be solved numerically, and
• many more problems yield such lengthy expressions that you’ll wish you had solved them numerically.
For a computer, symbolic operations are, in general, much more difficult than the corresponding numerical operations. In fact, if you write down a complicated function at random, the chance is very small that either its roots or its integral can be expressed in a simple closed form. For example, there is no formula for the roots of a general polynomial of degree 5 or higher, even though exact roots can be found for some special cases.
Many deceptively simple-looking functions made up of elementary pieces like powers and roots, exponentials, logs, and trigonometric functions have no closed-form integral that can be expressed in terms of these same functions.
When an equation has several solutions, Mathcad sometimes returns only a partial solution and asks if you want this result placed in the clipboard. If you click “OK,” Mathcad shows a vector containing the solutions found and the word “Root”. In the clipboard, in place of the word “Root” you will see an expression of the form “Root Of (function_oCZ)”. The roots of the indicated function are solutions of the original equation.
As with other symbolic operations, the answers you get depend on whether the constants in your equation contain decimal points. If your constants are pure rational numbers like 112 or 4, the symbolic solver will try to find an exact solution. For example, the solution to the second equation in Figure 17-17 is exact. But if you had defined a to be “34.0” instead of “34”, Mathcad would have given approximate numerical value.
Symbolic calculations can easily produce answers so long that they don’t fit conveniently in your window. If the answer consists of the sum of several terms, you can reformat such an answer by using Mathcad’s “Addition with line break” operator described in the section “List of operators” .
To break an expression with plus signs:
• Click just to the right of the term that appears immediately before the plus sign at which you want to break the expression.
• Press [Space] until the all the terms from the first to the selected on are held between the two editing lines.
• Press [Del]. The plus sign just after the editing lines will disappear.
• Now type [Ctrl][Enter] to insert the plus with break.
You can repeat this process if there are several terms connected by plus signs. Sometimes, a symbolic answer will be so long that you can’t conveniently display it in your worksheet. When this happens, Mathcad will ask if you want the answer placed in the clipboard. If you click “OK,” Mathcad places a string representing the answer
on the clipboard.
When you examine the contents of the clipboard, you’ll see an answer written in a Fort ran-like syntax as shown in Figure 17-23. This syntax uses the following conventions:
• The symbols +, -, *, and / stand for the basic arithmetic operations. Exponentiation is denoted by “**”.
• The derivative of (ix) with respecttox is written “diff(f(x), x) “. The nth derivative is “diff(f(x), x$n) “.
• A “D” also stands for the partial derivative operator. The nth derivative is” (D, n) “.
The partial derivative of a function with respect to its nth argument is “(D[n]) “.
• The integral of (ix) with respect to x is written “int(f(x), x) “.
• The summation and product operators appear as “sum( )” and “product( )”.
• The operator “@” denotes function composition. For example, ([email protected])(x) is the same as sin(exp(x)). A “@ @” represents repeated composition, so ([email protected]@2)(x) is the same as Mx)).
• “Root Of (equation)” stands for any root of an algebraic equation. (For example, “Root Of (Z**2 + 1)” represents either i or -i .)
• You may see embedded font codes (like “MFNT _03_”) preceding the variable name to indicate the font in which the variable name is to appear.
To insert the answer as text into your Mathcad worksheet:
• Click in an empty area.
• Choose Paste from the Edit menu.
To save a long clipboard answer as a separate text file, choose Save As from the Clipboard’s File menu.