Skip to main content
Engineering LibreTexts

11.1: Equations

  • Page ID
    14978
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    There are often many ways to access tools in Mathcad: through a menu at the top of the screen, a toolbar, a right click with the mouse, or a shortcut keystroke.

    Entering Text

    To enter simple text anywhere on the screen, click at the desired spot (a red plus sign will appear) and do one of the following:

    • Type “ (the region will become a text region). Then type your text.
    • Use the menu: Insert > Text Region
    • Start typing text (the region will become a text region after the first word).

    Different uses of the equals sign

    To enter equations in Mathcad, it is a bit trickier. There are in fact FOUR different ways to use an equals sign (these will be explained soon):

    • The evaluation equals sign (=)
    • The assignment equals sign (:=)
    • The symbolic equals sign (=)
    • The global equals definition (≡)

    Evaluation Equals Sign (=)

    Mathcad can be used as a simple calculator. To compute 1 + 1, 210, or 50.5, we type these, as one might expect, in the normal way and then type '='.

    \[1+1=2\nonumber\]

    \[2^{10}=1.024* 10^{3}\nonumber\]

    \[5^{0.5}= 2.236\nonumber\]

    For a few more advanced computations, we can try cos(π), sin(90°), √5, and ln(1/2).

    \[\cos(π)=-1\nonumber\]

    \[\sin(90°)=1\nonumber\]

    \[\sqrt{5}=2.236\nonumber\]

    \[\ln(\dfrac1{2})=-0.693\nonumber\]

    Creating the symbols in these calculations can be done in many ways! The trigonometric and natural logarithm are simply typed in as sin, cos and ln. The symbol for pi can be created from the Greek toolbar, or with the shortcut key ctrl+shift+p (or type p followed by ctrl+g). Note that the default is radian mode for the trig functions, but if you want degrees, type the word deg inside the trig function (just as it appears). To get a fraction, type 1, backslash and 2 (the format of the fraction and size of the parentheses are automatically done by Mathcad). To get the square root symbol, use the calculator toolbar (or shortcut key \).

    We especially encourage the reader to explore the toolbars, menus, keyboard shortcuts, mouse clicks, help files, etc. That’s how we learned a lot of Mathcad’s functionality. Also, if there is something that you can’t figure out, try your favorite internet search engine. We do.

    Assignment Equals Sign (:=)

    It is often useful to assign values to variables that can be used later. This is done with the assignment equals sign, created not by using the = key, but by typing a colon (:).
    For example, suppose we wanted to find the area of a circle of radius 5 meters. We could of course do the calculation “pi r squared” but we will instead store the value 5m in the variable radius and then compute and store the area in the variable Area. Make sure to type a colon instead of = in order to get the symbol :=.

    \[radius:=5π\nonumber\]

    \[Area:=π radius^2\nonumber\]

    Note that with the assignment equals, you don’t see the actual value of Area. To see the actual value, you need to either put in an additional line

    \[radius:=5π\nonumber\]

    \[Area:=π radius^2\nonumber\]

    \[Area=78.54m^2\nonumber\]

    (where the second equation with the variable Area does use the = sign) or type an additional equals sign (=) at the end of the line defining Area

    \[radius:=5π\nonumber\]

    \[Area:=π radius^2=78.54m^2\nonumber\]

    Symbolic Equals Sign (=)

    The symbolic equals sign (an equals sign appearing in bold font) is used in setting up an equation without actually providing any values for the variables. For example, in computing the area of a circle, we may not necessarily know the value of the radius, but want to use the equation “A equals pi r squared.” If we try to enter this with the assignment equals (without providing the radius value), we get an error (the variable radius is in red).

    Area:=π radius2

    To fix this, we use the symbolic equals sign (a bold equals sign) by typing Ctrl + =.

    Area:=π radius2

    One reason for using the symbolic equals is that you might want to later solve (symbolically) for the radius in terms of the area. We will show how to do this and give more reasons why you might want to use the symbolic equals sign in later sections.

    Global Equals Definition (≡)

    Consider the following example:

    Area:=π radius2

    \[radius:=5π\nonumber\]

    Why is the word radius in red? All of the parts of the computation are present, but for Mathcad, this is not enough. The order of the computations is important (as we will discuss further). Mathcad computations have the order “left to right, top to bottom” meaning that any variable used in a calculation must be defined previously (either higher up on the page, or to the left on the page). There is one exception to this rule - the global equals definition. The global equals definition is created using the tilde (∼) symbol. A variable that

    \[Area:=π radius^2\nonumber\]

    \[radius:=5π\nonumber\]

    Also, if a variable is defined globally, that does not mean that it will override another definition of the same variable, for example consider

    \[x:=3\nonumber\]

    \[2x=6\nonumber\]

    \[x=7\nonumber\]

    \[x:=2\nonumber\]

    \[x^2=4\nonumber\]

    Here we see that even though x is globally defined to be 7, the top line computation of 2x is using x equal to 3 and the bottom line computation of x2 is using x equal to 2.
    We strongly suggest against using the global equals definition. Finding errors in equations can be difficult enough without having to worry about possible miscalculations due to a globally defined variable.

    Key Idea 3: Variable Names

    In deciding on variable names, consider the following:

    • Variable names cannot begin with a number.
    • Use descriptive names such as “Area” instead of simply A
    • Try not to use variable names for predefined Mathcad units, like m (meter), c (speed of light), K (degrees Kelvin), etc. If you try to do so, the variable will be marked with a green squiggly line as a reminder.

    This page titled 11.1: Equations is shared under a CC BY-NC 3.0 license and was authored, remixed, and/or curated by Troy Siemers (APEX Calculus) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.