Skip to main content
Mathematics LibreTexts

8.2: Definition of a Variable Expression

  • Page ID
    14020
  • \( \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}}\)

    Evaluating Expressions

    © H. Feiner 2011

    youtube

    reserved

    Definition of a Variable Expression

    A variable expression is a collection of numbers, letters (variables), operations, grouping symbols, any mathematical symbol except an equal sign or an inequality sign.

    Part of an expression that can be added to or subtracted from another part.

    Parts of an expression related through multiplication are factors.

    Examples of expressions:

    \(2a+5\)

    \(3x^2-4y\)

    \(\displaystyle \frac{x^3-y^3}{x-y}\)

    \(V-\pi x^2y\)

    \((a+b)^2-a^2-b^2\)

    \(A-\displaystyle \frac{h}{2(B+b)}\)

    A rational expression involves a ratio (fraction) of two polynomials (to be defined in another chapter).

    \(\displaystyle \frac{x^2+6xy+5y^2}{x+2y}\)

    Evaluation of Expressions

    To evaluate means to find the value of something. Evaluating \(2a\) if \(a=5\) means finding the value of twice the number in the \(``a"-\)box which is known to be \(5\) (in this example). Open a set of parentheses in place of the variable \(a\), then drop the value of \(a=5\) into these parentheses. Thus \(2a=2(5)=10\).

    Example 1:

    Evaluate \(2a+5\) if \(a=-3\).

    Solution:

    \(\begin{array}{rcl lll} 2a+5&=&2()+5\\[5pt] &=&2(-3)+5\\[5pt] &=&-6+5\\[5pt] &=&-1 \end{array}\)
    Example 2:

    Evaluate \(3x^2-4(y-3)\) if \(x=-2\) and \(y=-3\).

    Solution:
    \(\begin{array}{rcl lll} 3x^2-4(y-3)&=&3()^2-4[()-3]\\[5pt] &=&3(-2)^2-4[(-3)-3]\\[5pt] &=&3(4)-4(-3-3)\\[5pt] &=&12-4(-6)\\[5pt] &=&12+24\\[5pt] &=&36 \end{array}\)
    Example 3:

    Evaluate \(\displaystyle \frac{x^3-y^3}{x-2y}\) if \(x=4\) and \(y=2\).

    Solution:

    \(\begin{array}{rcl lll} \displaystyle \frac{x^3-y^3}{x-2y}&=&\displaystyle \frac{()^3-()^3}{()-2()}\\[15pt] &=&\displaystyle \frac{(4)^3-(2)^3}{(4)-2(2)}\\[15pt] &=&\displaystyle \frac{64-8}{4-4}\\[15pt] &=&\displaystyle \frac{56}{0}\ \ \!\hbox{which is undefined}\\[15pt] \end{array}\)
    Example 4:

    Evaluate \(V-\pi x^2y\) if \(V=3,140\), \(x=10\) and \(y=3\). Approximate \(\pi=3.14\).

    Solution:

    \(\begin{array}{rcl lll} V-\pi x^2y&=&()-()()^2()\\[6pt] &=&(3,140)-(3.14)(10)^2(3)\\[6pt] &=&3,140-(3.14)(100)(3)\\[6pt] &=&3,140-(314)(3)\\[6pt] &=&3,140-942\\[6pt] &=&2,198 \end{array}\)
    Example 5:

    Evaluate \((a+b)^2-a^2-b^2\) if \(a=6\) and \(b=-6\).

    Solution:

    \(\begin{array}{rcl lll} (a+b)^2-a^2-b^2&=&[()+()]^2-()^2-()^2\\[5pt] &=&[(6)+(-6)]^2-(6)^2-(-6)^2\\[5pt] &=&(0)^2-36-36=-72 \end{array}\)

    Example 6:

    Evaluate \(A-\displaystyle \frac{h}{2(B+b)}\) if \(A=100\), \(h=40\), \(B=12\) and \(b=8\).

    Solution:

    \(\begin{array}{rcl lll} A-\displaystyle \frac{h}{2(B+b)}&=&()-\displaystyle \frac{()}{2[()+()]}\\[11pt] &=&(100)-\displaystyle \frac{(40)}{2[(12)+(8)]}\\[11pt] &=&100-\displaystyle \frac{40}{2(20)}\\[11pt] %&=&100-\displaystyle \frac{2}{2(1)}\\[10pt] &=&100-1=99 \end{array}\)

    Example 7:

    Evaluate \(\displaystyle \frac{x^2+6xy+5y^2+1.99}{x+2y}\) if \(x=0.4\) and \(y=1.5\).

    Solution:
    \(\begin{array}{rcl lll} \displaystyle \frac{x^2+6xy+5y^2+1.99}{x+2y}&=&\displaystyle \frac{()^2+6()()+5()^2+1.99}{()+2()}\\[10pt] &=&\displaystyle \frac{(0.4)^2+6(0.4)(1.5)+5(1.5)^2+1.99}{(0.4)+2(1.5)}\\[10pt] &=&\displaystyle \frac{0.16+(2.4)(1.5)+5(2.25)+1.99}{0.4+3}\\[10pt] %&=&\displaystyle \frac{3.76+11.25+1.99}{3.4}\\[10pt] &=&\displaystyle \frac{0.16+3.6+11.25+1.99}{3.4}\\[10pt] &=&\displaystyle \frac{3.76+11.25+1.99}{3.4}\\[10pt] &=&\displaystyle \frac{15.01+1.99}{3.4}\\[10pt] &=&\displaystyle \frac{17}{3.4}= \frac{170}{34}\\[10pt] &=&5 \end{array}\)
    Example 8:

    Evaluate \(4x^4-x^2+\displaystyle \frac{7}{9}\) if \(x=\displaystyle \frac{1}{2}\).

    Solution:
    \(\begin{array}{rcl lll} 4x^4-x^2+\displaystyle \frac{7}{9}&=&4()^4-()^2+\displaystyle \frac{7}{9}\\[10pt] &=&4\left(\displaystyle \frac{1}{2}\right)^4-\left(\displaystyle \frac{1}{2}\right)^2+\displaystyle \frac{7}{9}\\[10pt] &=&4\left(\displaystyle \frac{1}{16}\right)-\displaystyle \frac{1}{4}+\displaystyle \frac{7}{9}\\[10pt] &=&\displaystyle \frac{1}{4}-\displaystyle \frac{1}{4}+\displaystyle \frac{7}{9}\\[10pt] &=&\displaystyle \frac{7}{9}\\[10pt] \end{array}\)

    Example 9:

    Evaluate \(y-\displaystyle \frac{y_2-y_1}{x_2-x_1}(x-x_1)\) if \(x=4\), \(x_1=-2\), \(x_2=-5\), \(y=10\) \(y_1=9\) and \(y_2=7\).
    Solution:

    \(\begin{array}{rcl lll} y-\displaystyle \frac{y_2-y_1}{x_2-x_1}(x-x_1)&=&()-\displaystyle \frac{()-()}{()-()}[()-()]\\[15pt] &=&(10)-\displaystyle \frac{(7)-(9)}{(-5)-(-2)}[(4)-(-2)]\\[15pt] &=&10-\displaystyle \frac{-2}{-3}(6)\\[12pt] &=&10-\displaystyle \frac{-2}{-1}(2)\\[10pt] &=&10-4=6\\[10pt] %&=&10-4=6 \end{array}\)

    Example 10:

    A logging company cut a certain number (say T) of trees on Monday. On Tuesday the company cut 5 more trees than on Monday. On Wednesday the number of trees harvested was twice the number on Tuesday. On Thursday the number was half of the number on Monday.

    (a) Write an expression for the total number of trees cut on the four days.

    (b) If 22 trees were cut down on Monday, what was the total number of trees harvested on the four days?

    Solution:

    \(\begin{array}{lrl lll} \hbox{Trees cut on Monday}&T\\[5pt] \hbox{Trees cut on Tuesday}&T+5\\\\[5pt] \hbox{Trees cut on Wednesday}&2(T+5)\\[5pt] \hbox{Trees cut on Thursday}&\displaystyle \frac{T}{2}\\[5pt] \end{array}\)

    (a) Total number of trees cut:

    \(\begin{array}{rcl lll} T+(T+5)+2(T+5)+\displaystyle \frac{T}{2} &=&T+T+5+2T+10+\displaystyle \frac{T}{2}\\ &=& 4T+\displaystyle \frac{T}{2}+15=\frac{9T}{2}+15 \end{array}\)
    (b) Evaluate if \(T=22\):
    \(\begin{array}{rcl lll} \displaystyle \frac{9\cdot 22}{2}+15&=& \displaystyle \frac{9\cdot 2\cdot 11}{2}+15\\[10pt] &=&9\cdot 11+15\\[10pt] &=&99+15\\[10pt] &=&114\hbox{ trees.} \end{array}\)

    Example 11:

    Abel works \(14\) hours in a particular week. Bianca works \(12\) hours in that week. Abel gets paid $\(a\) per hour and Bianca earns $\(b\) per hour.

    (a) Write an expression for the total wages Abel and Bianca earn in that week.

    (b) Then evaluate that expression if Abel gets \(\$8\) per hour and Bianca earns \(\$12\) per hour.

    Solution:

    (a) Abel and Bianca earn \(14a+12b\) dollars in that week.
    (b) Evaluating \(14a+12b\) leads to
    \(\begin{array}{rcl lll} 14()+12()&=&14(8)+12(12)\\[10pt] &=&112+144\\[10pt] &=&\$256 \end{array}\)

    Like Terms

    Occasionally terms contain identical variables. Ghey look alike in an expression. These like-terms can and should be combined.

    \(2+3=5\). \(2\) apples added to \(3\) apples results in \(5\) apples.

    \(2x+3x=(x+x)+(x+x+x)=5x\)

    \(2x^2+3x^2=(x^2+x^2)+(x^2+x^2+x^2)=5x^2\)

    Don’t confuse with \((2x^2)(3x^2)=(2)(3)(x\cdot x)(x\cdot x)=6x^4\)
    Example 12:

    Combine like terms:

    \(2x^3+5x+9+6x^3+x-9\)

    Solution:

    \(\begin{array}{cl lll} &2x^3+5x+9+6x^3+x-9\\[10pt] =&\underline{2x^3}+\underline{\underline{5x}}+\underline{\underline{\underline{9}}}+\underline{6x^3}+\underline{\underline{x}}-\underline{\underline{\underline{9}}}\ \ \hbox{mark each like-term with its own symbol}\\[10pt] =&(\underline{2x^3}+\underline{6x^3})+(\underline{\underline{5x}}+\underline{\underline{x}})+(\underline{\underline{\underline{9}}}-\underline{\underline{\underline{9}}})&\hbox{}\\[10pt] =&8x^3+6x+0&\hbox{}\\ \end{array}\)
    Example 13:

    Combine like terms:

    \(7x^3+4[5(x+8)+6x^3-x-2]\)

    Solution:

    \(\begin{array}{cl lll} &7x^3+4[5(x+8)+6x^3-x-2]\\[10pt] =&7x^3+4[5(x+8)+6x^3-x-2]\ \ \hbox{Remember PEMDAS? Focus }\\[10pt] &\ \ \hbox{on innermost group (parentheses). Addition is the only operation.}\\[10pt] &\ \ \hbox{We cannot add an unknown (value unknown) to a constant}\\[10pt] &\ \ \hbox{ (a known non-varying number).}\\[10pt] =&7x^3+4[5x+5(8)+6x^3-x-2]\ \ \hbox{Use the distributive property}\\[10pt] &\ \ \hbox{of multiplication over addition to remove the parentheses. }\\[10pt] &\ \ \hbox{Remember that\)x\(is a number. }\\[10pt] =&7x^3+4[\underline{5x}+\underline{\underline{40}}+6x^3-\underline{x}-\underline{\underline{2}}]\ \ \hbox{Underline like-terms.}\\[10pt] =&\!7x^3\!+\!4[(5x\!-\!x)+(40\!-\!2)+6x^3]\ \ \hbox{Associate like-terms.}\\[10pt] =&7x^3+4[4x+38+6x^3]\ \ \hbox{Compute.}\\[10pt] =&7x^3+4[6x^3+4x+38]\ \ \hbox{Rewrite with exponents in decreasing order.}\\[10pt] =&7x^3+4(6x^3)+4(4x)+4(38)\ \ \hbox{Distribute multiplication over addition.}\\[10pt] =&\underline{7x^3}+\underline{24x^3}+16x+152\ \ \hbox{Compute.}\\[10pt] =&31x^3+16x+152 \end{array}\)

    Exercises 8

    1. Evaluate \(P-(2L+2W)\) if \(P=50\), \(L=9\) and \(W=4\).

    2. Evaluate \(S-(2x^2+2xy)\) if \(S=100\), \(x=-3\) and \(y=5\).

    3. Evaluate \(x-\displaystyle \frac{-b+\sqrt{b^2-4ac}}{2a}\) if
      \(x=10\), \(a=1\), \(b=-4\) and \(c=-21\).

    4. Evaluate \(D-16t^2+vt+h\) if
      \(D=200\), \(t=3\), \(v=20\) and \(h=128\).

    5. Evaluate \(S-a^2+b^2\) if \(S=169\), \(a=12\) and \(b=-5\).

    6. Evaluate \(y-\displaystyle \frac{y_2-y_1}{x_2-x_1}(x-x_1)\) if
      \(x\!=\!12\), \(x_1\! =\!9\), \(x_2\!=\!6\),
      \(y\!=\!19\), \(y_1\!=\!-7\) and \(y_2\!=\!-10\).

    7. (a) Write an expression for the total mileage traveled.

      (b) If \(32\) miles were traveled on Interstate \(405\), what was the total mileage traveled?

    8. Candy studies \(144\) pages for a test. Diane studies \(120\) pages for the same test. Candy gets \(c\) problems done per page studied and Diane finishes \(d\) problems per page.
      (a) Write an expression for the total number of problems Candy and Diane solve for the test. (Assume the number of problems on each page is the same.)
      (b) Then evaluate that expression if Candy completes \(3\) problems per page and Diane succeeds in finishing \(4\) problems per page.

    9. Simplify \(7x^4+11x^2-4x+9+3x^4-11x^3+4x+9\)

    10. \(9x^4+7[3(x+1)-6x^4-x+2]\)
    1. Evaluate \(P-(2L+2W)\) if \(P=50\), \(L=9\) and \(W=4\).
      Solution:
      \(\begin{array}{rcl lll} P-(2L+2W)&=&()-[2()+2()]\\[10pt] &=&(50)-[2(9)+2(4)]\\[10pt] &=&50-(18+8)\\[10pt] &=&50-26\\[10pt] &=&24 \end{array}\)

    2. Evaluate \(S-(2x^2+2xy)\) if \(S=100\), \(x=-3\) and \(y=5\).
      Solution:
      \(\begin{array}{rcl lll} S-(2x^2+2xy)&=&()-[2()^2+2()()]\\[8pt] &=&(100)-[2(-3)^2+2(-3)(5)]\\ [8pt] &=&100-[2(9)+(-6)(5)]\\ [8pt] &=&100-[18+(-30)]\\ [8pt] &=&100-(-12)=112 \end{array}\)

    3. Evaluate \(x-\displaystyle \frac{-b+\sqrt{b^2-4ac}}{2a}\) if \(x=10\), \(a=1\), \(b=-4\) and \(c=-21\).
      Solution:
      \(\begin{array}{rcl lll} x-\displaystyle \frac{-b+\sqrt{b^2-4ac}}{2a}&=&()-\displaystyle \frac{-()+\sqrt{()^2-4()()}}{2()}\\[10pt] &=&\!(10)\!-\!\displaystyle \frac{\!-\!(-4)\!+\!\sqrt{(-4)^2\!-\!4(1)(-21)}}{2(1)}\\[10pt] &=&10-\displaystyle \frac{4+\sqrt{16-4(-21)}}{2}\\[10pt] &=&10-\displaystyle \frac{4+\sqrt{16+84}}{2}\\[10pt] &=&10-\displaystyle \frac{4+\sqrt{100}}{2}\\[10pt] &=&10-\displaystyle \frac{4+10}{2}\\[10pt] &=&10-\displaystyle \frac{14}{2}\\[10pt] &=&10-7=3 \end{array}\)

    4. Evaluate \(D-16t^2+vt+h\) if \(D=200\), \(t=3\), \(v=20\) and \(h=128\).
      Solution:
      \(\begin{array}{rcl lll} D-16t^2+vt+h&=&()-16()^2+()()+()\\[10pt] &=&(200)-16(3)^2+(20)(3)+(128)\\[10pt] &=&200-16(9)+60+128\\[10pt] &=&200-144+60+128\\[10pt] &=&56+60+128\\[10pt] &=&116+128=44 \end{array}\)

    5. Evaluate \(S-a^2+b^2\) if \(S=169\), \(a=12\) and \(b=-5\).
      Solution:
      \(\begin{array}{rcl lll} S-a^2+b^2&=&()-()^2+()^2\\[15pt] &=&(169)-(12)^2+(-5)^2\\[15pt] &=&169-144+25\\[15pt] &=&25+25\\[15pt] &=&50 \end{array}\)

    6. Evaluate \(y-\displaystyle \frac{y_2-y_1}{x_2-x_1}(x-x_1)\) if \(x=12\), \(x_1=9\), \(x_2=6\), \(y=19\) \(y_1=-7\) and \(y_2=-10\).
      Solution:
      \(\begin{array}{cl lll} y-\displaystyle \frac{y_2-y_1}{x_2-x_1}(x-x_1)&=&()-\displaystyle \frac{()-()}{()-()}[(x)-(x_1)]\\[15pt] &=&(19)-\displaystyle \frac{(-10)-(-7)}{(6)-(9)}[(12)-(9)]\\[15pt] &=&19-\displaystyle \frac{-10+7}{6-9}(12-9)\\[15pt] &=&19-\displaystyle \frac{-3}{-3}(3)\\[15pt] &=&19-(1)(3)\\[15pt] &=&16 \end{array}\)

    7. (a) Write an expression for the total number of miles traveled.

      (b) If \(32\) miles were traveled on Interstate \(405\), what was the total mileage traveled?

      Solution:

      \(\begin{array}{lrl lll} \hbox{Miles traveled on Interstate\)405\(}&x\\[10pt] \hbox{Miles traveled on highway\)5\(}&x+17\\[10pt] \hbox{Miles traveled on highway\)18\(}&3(x)\\[10pt] \hbox{Miles covered on local streets}&\displaystyle \frac{x}{4}\\[10pt] \end{array}\)
      (a) Total number of miles:
      \(x+(x+17)+3x+\displaystyle \frac{x}{4}\).
      (b) Evaluate if \(x=32\)
      \(\begin{array}{rl lll} &x+(x+17)+3x+\displaystyle \frac{x}{4}\\ =&()+[()+17]+3()+\displaystyle \frac{()}{4}\\[10pt] =&(32)+[(32)+17]+3(32)+\displaystyle \frac{(32)}{4}\\[10pt] =&32+49+96+8\\[10pt] =&81+96+8\\[10pt] =&177+8\\[10pt] =&185 \end{array}\)

      The number of miles traveled is
      \(\displaystyle \frac{185}{4}=46.25\) miles.

    8. (a) Write an expression for the total number of problems Candy and Diane solve for the test.

      (b) Then evaluate that expression if Candy completes \(3\) problems per page and Diane succeeds in finishing \(4\) problems per page.

      Solution:

      (a) Candy and Diane complete \(144c+120d\) problems for the test.

      (b) Evaluating \(144c+120d\) leads to

      \(\begin{array}{rcl lll} 144c+120d&=&144()+120()\\[5pt] &=&144(3)+120(4)\\[5pt] &=&432+480\\[5pt] &=&912 \end{array}\)

    9. Solution:

      \(\begin{array}{cl lll} &7x^4+11x^2-4x+9+3x^4-11x^3+4x+9\\[15pt] =&\underline{7x^4}+\underline{\underline{\underline{11x^2}}}-\underbrace{4x}+\underbrace{\underbrace{9}}+\underline{3x^4}-\underline{\underline{11x^3}}+\underbrace{4x}+\underbrace{\underbrace{9}}\\[17pt] =&\underline{7x^4}+\underline{3x^4}-\underline{\underline{11x^3}}+\underline{\underline{\underline{11x^2}}}-\underbrace{4x}+\underbrace{4x}+\underbrace{\underbrace{9}}+\underbrace{\underbrace{9}}\\[17pt] =&(7x^4+3x^4)-11x^3+11x^2+(-4x+4x)+(9+9)\\[10pt] =&10x^4-11x^3+11x^2+18 \end{array}\)

    10. \(9x^4+7[3(x+1)-6x^4-x+2]\)

      Solution:

      \(\begin{array}{cl lll} &9x^4+7[3(x+1)-6x^4-x+2]\\[5pt] =&9x^4+7[3x+3-6x^4-x+2]\\[5pt] %=&9x^4-42x^4+14x+35\\[5pt] =&9x^4+7[\underline{3x}+\underline{\underline{3}}-\underline{\underline{\underline{6x^4}}}-\underline{x}+\underline{\underline{2}}]\\[10pt] %=&9x^4-42x^4+14x+35\\[5pt] =&9x^4+7[-\underline{\underline{\underline{6x^4}}}+\underline{3x}-\underline{x}+\underline{\underline{3}}+\underline{\underline{2}}]\\[15pt] =&9x^4+7[-6x^4+(3x-x)+(3+2)]\\[5pt] =&9x^4+7[-6x^4+2x+5]\\[5pt] =&9x^4+7(-6x^4)+7(2x)+7(5)\\[5pt] =&(9x^4-42x^4)+14x+35\\[5pt] =&-33x^4+14x+35\\[5pt] \end{array}\)


    This page titled 8.2: Definition of a Variable Expression is shared under a not declared license and was authored, remixed, and/or curated by Henri Feiner.

    • Was this article helpful?