# 8.2: Definition of a Variable Expression - Mathematics

## Evaluating Expressions

### 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:

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

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

Solution:
(egin{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]&=&36end{array})
Example 3:

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

Solution:

(egin{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:

(egin{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,198end{array})
Example 5:

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

Solution:

(egin{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=-72end{array})

Example 6:

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

Solution:

(egin{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=99end{array})

Example 7:

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

Solution:
(egin{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]&=&5end{array})
Example 8:

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

Solution:
(egin{array}{rcl lll}4x^4-x^2+displaystyle frac{7}{9}&=&4()^4-()^2+displaystyle frac{7}{9}[10pt]&=&4left(displaystyle frac{1}{2} ight)^4-left(displaystyle frac{1}{2} ight)^2+displaystyle frac{7}{9}[10pt]&=&4left(displaystyle frac{1}{16} ight)-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:

(egin{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=6end{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:

(egin{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:

(egin{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}+15end{array})
(b) Evaluate if (T=22):
(egin{array}{rcl lll}displaystyle frac{9cdot 22}{2}+15&=&displaystyle frac{9cdot 2cdot 11}{2}+15[10pt]&=&9cdot 11+15[10pt]&=&99+15[10pt]&=&114hbox{ 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.
(egin{array}{rcl lll}14()+12()&=&14(8)+12(12)[10pt]&=&112+144[10pt]&=&$256end{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)(xcdot x)(xcdot x)=6x^4) Example 12: Combine like terms: (2x^3+5x+9+6x^3+x-9) Solution: (egin{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: (egin{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+152end{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: (egin{array}{rcl lll}P-(2L+2W)&=&()-[2()+2()][10pt]&=&(50)-[2(9)+2(4)][10pt]&=&50-(18+8)[10pt]&=&50-26[10pt]&=&24end{array}) 2. Evaluate (S-(2x^2+2xy)) if (S=100), (x=-3) and (y=5). Solution: (egin{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)=112end{array}) 3. Evaluate (x-displaystyle frac{-b+sqrt{b^2-4ac}}{2a}) if (x=10), (a=1), (b=-4) and (c=-21). Solution: (egin{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=3end{array}) 4. Evaluate (D-16t^2+vt+h) if (D=200), (t=3), (v=20) and (h=128). Solution: (egin{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=44end{array}) 5. Evaluate (S-a^2+b^2) if (S=169), (a=12) and (b=-5). Solution: (egin{array}{rcl lll}S-a^2+b^2&=&()-()^2+()^2[15pt]&=&(169)-(12)^2+(-5)^2[15pt]&=&169-144+25[15pt]&=&25+25[15pt]&=&50end{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: (egin{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]&=&16end{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: (egin{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) (egin{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]=&185end{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 (egin{array}{rcl lll}144c+120d&=&144()+120()[5pt]&=&144(3)+120(4)[5pt]&=&432+480[5pt]&=&912end{array}) 9. Solution: (egin{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+18end{array}) 10. (9x^4+7[3(x+1)-6x^4-x+2]) Solution: (egin{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}) ## Which are the Bound and Free Variables in these expressions? I referenced 1 and 2. Source: p 29, How to Prove It by Daniel Velleman The free variables [hereafter abbreviated to FV] in a statement stand for objects that the statement says something about. The fact that you can plug in different values for a free variable means that it is free to stand for anything. Bound variables [hereafter abbreviated to BV], on the other hand, are simply letters that are used as a convenience to help express an idea and should not be thought of as standing for any particular object. A bound variable can always be replaced by a new variable without changing the meaning of the statement, and often the statement can be rephrased so that the bound variables are eliminated altogether. Source: p 457, A Concise Introduction to Logic (12 Ed, 2014) by Patrick Hurley The variables that occur in statement functions are called free variables because they are not bound by any quantifier. In contrast, the variables that occur in statements are called bound variables.$color <1. lim_dfrac :>$By definition$h :approx 0$so$h$is a BV. Nothing binds$x$so$x$is a FV.$color<2. int. int f(x_1. x_n) , dx_1 . , dx_n:>$How does the indefinite integral above bind$x_j forall, 1 leq j leq n$?$large<3. forall x, , exists y, phi(x, y, z):>>$I am confused why Wikipedia states$x, y$as BV and$z$as FV.$4.$In the answer of user 'dtldarek', what is meant by:$x = x land forall x. x = x$? ## Streaming Expressions and Math Expressions Visualizations: Gallery of streaming expression and math expression visualizations. Getting Started: Getting started with streaming expressions, math expressions, and visualization. Data Loading: Visualizing, transforming and loading CSV files. Searching, Sampling and Aggregation: Searching, sampling, aggregation and visualization of result sets. Transforming Data: Transforming and filtering result sets. Scalar Math: Math functions and visualization applied to numbers. Vector Math: Vector math, manipulation and visualization. Variables and Vectorization: Vectorizing result sets and assigning and visualizing variables. Matrix Math: Matrix math, manipulation and visualization. Text Analysis and Term Vectors: Text analysis and TF-IDF term vectors. Probability: Continuous and discrete probability distribution functions. Statistics: Descriptive statistics, histograms, percentiles, correlation, inference tests and other stats functions. Linear Regression: Simple and multivariate linear regression. Curve Fitting: Polynomial, harmonic and Gaussian curve fitting. Time Series: Time series aggregation, visualization, smoothing, differencing, anomaly detection and forecasting. Interpolation and Numerical Calculus: Interpolation, derivatives and integrals. Signal Processing: Convolution, cross-correlation, autocorrelation and fast Fourier transforms. Simulations: Monte Carlo simulations and random walks Machine Learning: Distance, KNN, DBSCAN, K-means, fuzzy K-means and other ML functions. Computational Geometry: Convex Hulls and Enclosing Disks. ## Why are variables important? Science is messy. We like to think of experimentation as a simple process of “change one thing and record what happens,” but in reality, every possible subject of study has dozens of different factors that can impact the results—the variables. Scientists are trained to be careful when setting all the variables for an experiment. In many experiments, even minor unintended fluctuations in some factor can make the findings inaccurate or misleading. The results of experiments are sometimes later debunked after it has been revealed that variables somehow skewed the results. Understanding the importance of variables will make you more likely to draw sound conclusions and less likely to fall for claims based on faulty science. For example, when examining suspicious statistics or experiment results, a good place to start is to ask what variables were involved, including whether control variables were used and what they were. Knowing the variables is crucial to critical thinking. ## Defining Variables - Concept Variables are used throughout math after Algebra, and are important to understand. A defining variable is a symbol, such as x, used to describe any number. When a variable is used in an function, we know that it is not just one constant number, but that it can represent many numbers. Variables are instrumental in understanding problems relating to graphing. One thing you're going to learn really quickly about algebra is that it's not just involving numbers, but it uses a lot of letters too. And what the letters are, are officially called variables. A variable is a letter or a symbol used to represent any number. And it's kind of tricky because the letter is going to represent the same number within that specific problem but the same letter could represent different numbers between different problems. Let me show you what I mean. Let's say I had this problem that said x+5=8. That was like problem one on my homework. And then problem two on my homework said x take away 4 is equal to 10. So you can probably do these in your head, think about what number x might stand for. What number plus gives you the answer 8? Most of you guys in your head can tell x=3. That's problem one. Look at problem 2. It uses the same letter but it's going to be a different number. What number take away 4 gives us the answer 10? 14. So the trick with variables is that it's the same letter and it represents any number like it could be, sometimes x would be like a fraction, sometimes x will be a decimal but the trick is that it might be different numbers from one problem to the next. When you come across variables, it's something that's kind of new because you're going to be dealing with letters and numbers. But use your logic and slow down. Think about what the variable stands for and if it helps you, turn it into words in your head like I did. Like what number plus 5 gives you 8. That's a really great strategy to help when you're working with variables. ## Frequently asked questions about variables You can think of independent and dependent variables in terms of cause and effect: an independent variable is the variable you think is the cause, while a dependent variable is the effect. In an experiment, you manipulate the independent variable and measure the outcome in the dependent variable. For example, in an experiment about the effect of nutrients on crop growth: • The independent variable is the amount of nutrients added to the crop field. • The dependent variable is the biomass of the crops at harvest time. Defining your variables, and deciding how you will manipulate and measure them, is an important part of experimental design. A confounding variable, also called a confounder or confounding factor, is a third variable in a study examining a potential cause-and-effect relationship. A confounding variable is related to both the supposed cause and the supposed effect of the study. It can be difficult to separate the true effect of the independent variable from the effect of the confounding variable. In your research design, it’s important to identify potential confounding variables and plan how you will reduce their impact. Quantitative variables are any variables where the data represent amounts (e.g. height, weight, or age). Categorical variables are any variables where the data represent groups. This includes rankings (e.g. finishing places in a race), classifications (e.g. brands of cereal), and binary outcomes (e.g. coin flips). You need to know what type of variables you are working with to choose the right statistical test for your data and interpret your results. Discrete and continuous variables are two types of quantitative variables: Simply write down the truth table, which is quite simple to find, and deduce your CNF and DNF. egin <| c | c | c | c |>hline X & Y & Z & hline T & T & T & T hline T & T & F & F hline T & F & T & F hline T & F & F & T hline F & T & T & F hline F & T & F & T hline F & F & T & T hline F & F & F & F hline end If you want to find DNF, you have to look at all rows that ends with$T$. When you find those rows, take the$x, y,$and$z$values from each respective column. Thus, you get$(x wedge y wedge z) vee (x wedge eg y wedge eg z) vee ( eg x wedge y wedge eg z) vee ( eg x wedge eg y wedge z).$Similarly, you can find CNF$ (lnot x lor lnot y lor z) land (lnot x lor y lor lnot z) land (x lor lnot y lor lnot z) land (x lor y lor z) $Aha. In such a more general setting you can interpret$oplus$as addition modulo 2. E.g., if you have 5 variables$a_1, ldots, a_4 in <0, 1>$. Then$a_1 oplus cdots oplus a_4 = (a_1 + ldots + a_4) mod 2$. Using this fact, you can write down your CNF. In fact, this "method" uses implicitly truth tables. For example, assume that we want to find the CNF of$a oplus b oplus c oplus d$. Then you have to enumerate all disjunctions of$a, b, c, d$with an even number of negations. In the CNF you will find$(a vee b vee c vee d)$,$( eg a vee eg b vee c vee d)$,$( eg a vee b vee eg c vee d)$etc. but not$( eg a vee b vee c vee d)$. Note that in general transforming formulas by equivalence transformations to CNF and DNF is NP-hard. ## Algebra Homework Help : Algebraic Terms and Definitions In algebra, the letter that stands for an unknown number is called a variable . The variables in 8x 2 y 3 are x and y. The number that multiplies a variable or variables is called the coefficient . It is usually written in front of the variable or variables. The coefficient in 9yz 4 is 9. When the coefficient is 1, it is typically not written (i.e., 1yz 4 = yz 4 and 1a 3 = a 3 ). The power to which a variable is raised is called the exponent . The exponent in 7a 5 is 5. When the exponent is 1, it is typically not written (i.e., 6y 1 z 4 = 6yz 4 ). Any variable or number raised to the power zero gives one (i.e., x 0 = 1). Any number or variable or product of numbers and variables is called a monomial . Each of the following is an example of a monomial : 5, −7, x, y, 6xyz, −9yz 4 , 2.3a 3 A monomial or the sum of two or more monomials is called a polynomial . Each of the following is an example of a polynomial : 6xyz, 5a 3 − 21, 4x 2 − 9y 2 , 2x + 3y + 4z, 5x 2 + 6x + 7 Each monomial that makes up a polynomial is referred to as a term of the polynomial. A polynomial that has two (unlike) terms is called a binomial (e.g., 6a 3 − 23 and 5x 2 + 18y 2 ). A polynomial that has three (unlike) terms is called a trinomial . (e.g., 3x + 5y + 7z and 6x 2 + 9x + 12). Like terms are those that have exactly the same variables and exponents. They may differ only in their coefficients. Importantly, the only algebraic terms that can be combined (added or subtracted) are like terms. Thus, 7y 2 z and −9y 2 z are like terms, but x 2 y and xy 2 are unlike terms. A collection of algebraic terms connected by mathematical symbols is called an algebraic expression , and an algebraic expression whose parts are not separated by + or − signs is called a term. Thus, 5x 2 + 3xy + 2y 2 is an algebraic expression with three terms 5x 2 , 3xy and 2y 2 . A statement that two algebraic expressions are equal is called an equation . Each of the following is an example of an equation : 2x + 7 = 5x − 8 x 2 + 5x + 6 = 0 An equation where the highest power to which a variable is raised is one is called a linear equation . Thus, 3x − 7 = 7x + 3 is an example of a linear equation. An equation where the highest power to which a variable is raised is two is called a quadratic equation . Thus 3x 2 + 6x + 10 = 0 is an example of a quadratic equation. An equation where the highest power to which a variable is raised is three is called a cubic equation . Thus 7x 3 + 8x + 9 = 0 is an example of a cubic equation. An equation where the highest power to which a variable is raised is four is called a quartic equation . Thus 7x 4 + 15x 3 + 8x 2 + 9 = 0 is an example of a quartic equation. ## Variables: Exploring Expressions and Equations Students will solve real-world problems using variables in algebraic expressions and equations. ### Quick links to lesson materials: ### Teach This Lesson ### Objectives • Determine dependent and independent variables in real-world situations. • Write algebraic expressions and equations to represent real-world situations. • Solve algebraic equations given the value of a variable. • Solve expressions and equations containing positive and negative rational numbers. ### Materials • Digital Interactive Tool: “Launching Into Expressions and Equations” (optional) • Interactive whiteboard OR computer/projector hookup (optional) • Internet connection (optional) • Computers for small groups and/or all students (optional) • Planning a Trip to the Amazon: Using Variables to Represent Numbers and Write Expressions printable • Exploring the Amazon: Translating a Real-World Situation From a Word Problem Into an Equation printable • Answer Key for Adventures in Expressions and Equations Note: The lesson includes both online and printable components but was designed to be a meaningful learning experience whether or not the online components are used. ### Lesson Directions ### INTRODUCTION TO NEW MATERIAL Step 1: Introduce the lesson by telling students that they will be describing the world’s largest habitat, the ocean. Ask students: What are some of the threats to this habitat’s life-forms? What are some solutions for combating these threats? Step 2: Tell students that Ireland implemented a solution in 2002 to combat the amount of litter present in the ocean: they began to charge a €0.15 tax for each plastic shopping bag that customers used at stores. (A euro is worth about the same amount as an American dollar, and its sign is € rather than$.)

Ask: If a shopper requires 1 plastic shopping bag, how much tax will they pay for the plastic bag? (€0.15) 2 plastic bags? (€0.30) 3 plastic bags? (€0.45) Ask students if there is some general way that they can calculate the tax a customer would pay for any number of plastic bags that they use? Have pairs discuss and then share their thoughts with the class. At this point, verbal descriptions, rather than expressions or equations, can and should be suggested (example: multiply the number of bags they use by €0.15).

Step 3: Define variable, independent variable, and dependent variable for students.

• variable: an unknown or changing value
• independent variable: a variable whose value does not depend on another variable’s value a freely chosen value (often represented by x)
• dependent variable: a variable whose value relies on the value of the independent variable (often represented by y)

In the situation described above, ask students to identify the independent variable and the dependent variable. Then have them discuss in pairs why the number of bags used is the independent variable and why the total tax charged is the dependent variable. Have students share their thoughts with the class.

Step 4: Define expression, equation, and algebraic equation:

• expression: a mathematical phrase including numbers, operators, and/or variables (examples: 7 b + 2 40xy)
• equation: a statement that shows two equal expressions (examples: 23 + 7 = 30 9 = 9)
• algebraic equation: an equation that includes variables (examples: 0.8 + c = 40 6h = g)

Tell students that often independent variables are assigned the letter x, and dependent variables are assigned the letter y. If, however, they would like to represent values with other letters, such as b for bags and t for tax, that is often done as well. Ask students to discuss the relationship between the number of bags used and the tax charged, and write an equation relating the two values.

Step 5: Model for students how to solve the equation (y = 0.15x) for a given number of bags. Then have students practice this skill with other values of x.

Step 6:
Tell the students that Ireland has had to spend money in order to implement and enforce the new tax. Each year, Ireland has to pay €350,000 to administer the plan. What algebraic equation could represent the amount of money spent to administer the plan for a given number of years? (y = €350,000x, where x is the number of years the plan has run) When the tax began, it cost a fixed €1,200,000 to set up the plan. Tell students to modify their equation to include the fixed setup cost of the plan. (y = €350,000x + €1,200,000, where x is the number of years the plan has run) Then have students practice solving the equation with different values of x.

Step 7: Tell students that Ireland increased its plastic bag tax to €0.22 in 2007. Suppose a family has a budget of €100 to spend on groceries each week. What equation can represent the amount of money a family can spend on groceries in relation to the number of plastic bags they use for the groceries? (y = €100 – €0.22x) Have students solve this equation for a variety of numbers of plastic bags.

### GUIDED PRACTICE and INDEPENDENT PRACTICE

Step 8: Mix and match from among these digital and printable materials below depending on your class’s needs and technological capabilities.

These engaging materials situate students in real-world scenarios of exploration—from an astronaut blasting off into space to a biologist swimming the Amazon River. This highlights the value of math in real-world situations and careers, in which expressions and equations are necessary tools for solving problems.

• Module 1 of the Digital Interactive Tool: Variables in Expressions and Equations.
• Planning a Trip to the Amazon: Using Variables to Represent Numbers and Write Expressions
• Exploring the Amazon: Translating a Real-World Situation From a Word Problem Into an Equation

### Lesson Extensions

Tell students that another factor concerning scientists is sea level trends. Individually, or as a class, they can visit tides and current website in order to identify and write equations for sea level changes in various areas of the world over a certain number of years. They can then solve the equations to determine the sea level change for a specified number of years in those areas.

## Evaluation of Simple Arithmetic Expressions

We use the operator precedence and associativity rules to determine the meaning and value of an expression in an unambiguous manner. Recall that the operators in an expression are bound to their operands in the order of their precedence. If the expression contains more than one operator at the same precedence level, they are associated with their operands using the associativity rules. Table summarizes these rules for arithmetic and assignment operators.

If the given expression is simple, we can often directly convert it to its mathematical form and evaluate it. However, if the given expression is complex, i. e., it contains several operators at different precedence levels, we need a systematic approach to convert it to a mathematical equation and evaluate it. The steps to convert a given valid C expression to its mathematical form (if possible) and to evaluate it are as follows:

1. First determine the order in which the operators are bound to their operands by applying the precedence and associativity rules. Note that after an operator is bound to its operand(s), that sub-expression is considered as a single operand for the adjacent operators.

2. Obtain the equivalent mathematical equation for given C expression (if possible) by following the operator binding sequence (obtained in step 1).

3. Determine the value of the given expression by evaluating operators in the binding sequence.

The steps to determine operator binding in an arithmetic expression are explained below with the help of the expression -a+ b * c – d I e + f.

1. The unary operators (unary +, unary – , ++ and – -) have the highest precedence and right-to-left associativity. Thus, the given expression is first scanned from right to left and unary operators, if any, are bound to their operands. The order is indicated below the expression as follows:

2. The multiplicative operators (*, I and %) have the next highest precedence and left to- right associativity. Thus, the expression is scanned from left-to-right and the multiplicative operators, if any, are bound to their operands as shown below. (Observe that after completion of the above step, sub-expressions -a, b * c and d I e will be operands for the remaining operator bindings.)

3. The additive operators (+ and -) have the next highest precedence and left-to-right associativity. Hence, the expression is scanned from left-to-tight and the additive operators, if any, are bound to their operands as shown below. Observe that the operands for the first + operator are the sub-expressions -a and b * c. Similarly, the operands for the – operator are -a+ b * c and d /e.

Now we can write the mathematical equation for the given C expression by following the operator binding sequence as shown below:

Now the given expression can be evaluated, again by following the operator binding sequence, as shown below. Assume that the variables a, b, c, ct, e and f are of type float and are initialized with values as a= 1. 5, b = 2. 0, c = 3. 5, ct= 5.0, e = 2. 5 and f = 1. 25.

Remember that except for some operators (& & || ? : and the comma operator), the C language does not specify the order of evaluation of sub-expressions. Thus, the sub expressions at the same level can be evaluated in any order. For example, the sub expressions -a, b * c and ct I e in the above expression can be evaluated in any order.

The procedure explained above can also be used to check the validity of an expression. The given expression is valid if we arrive at a single operand (or value) after all the operators in the given expression are considered. Consider a more complex arithmetic expression: -a–+ -b++ * –c. This expression appears to be invalid due to the excessive use of operators. It contains three operands a, b and c and seven operators, five of which are unary (-, ++ and –) and the other two are binary operators (+ and *). However, using the operator binding steps, we can easily verify that it is a valid expression: