A matter of style? Algebra, Arithmetic, Variables

Click For Summary

Discussion Overview

The discussion centers around the use of variables in mathematical problem-solving, particularly in engineering, physics, and mathematics contexts. Participants explore why some individuals avoid using variables in numeric problems and the implications of this choice on problem-solving efficiency and clarity.

Discussion Character

  • Debate/contested
  • Conceptual clarification
  • Technical explanation

Main Points Raised

  • Some participants question why individuals often avoid using variables in solving numeric problems, suggesting that this could lead to less efficient problem-solving.
  • One participant recalls a preference for solving problems with variables first to avoid arithmetic mistakes, highlighting a personal strategy that aids in error detection.
  • Another participant emphasizes the flexibility of using variables in programming, noting that meaningful variable names can enhance readability and help identify errors.
  • Concerns are raised about the generalization of using variables for "all" numbers, with an example provided where defining a variable for a constant (like the number 2 in a perimeter formula) may not be necessary.
  • Discussion includes the idea of carrying units of measure with variables to prevent errors in unit conversions, particularly between metric and English systems.
  • Some participants express a preference for using named constants in programming to improve code readability and maintainability, illustrating this with an example of defining a constant for pixels per inch.

Areas of Agreement / Disagreement

Participants express differing views on the necessity and practicality of using variables in all mathematical contexts. While some advocate for their use for clarity and error reduction, others challenge the idea that all numbers should be represented as variables, indicating a lack of consensus on this approach.

Contextual Notes

Participants acknowledge that the discussion involves varying levels of complexity in mathematical problems, including ratios, rational expressions, and mixtures, which may influence the decision to use variables.

symbolipoint
Homework Helper
Education Advisor
Gold Member
Messages
7,682
Reaction score
2,113
TL;DR
Different people like to or are forced to choose variables and some do not. I wonder if this is a matter of style or how a person was taught.
When people graduate and have their degrees in engineering or physics or mathematics or what they may have done, some of these people will use some mathematics, very often which is some-what complicated (or not) arithmetic. Why will some people choose to strictly avoid using variables in the numeric problems they solve? Why would these people not choose variables for what they are looking for? Further, why so rarely anyone give variables to all numbers involved in a problem situation (assuming only rational or linear or maybe quadratic relationships) and solve for what is wanted, all in variables like to have a formula as a result; and then to use that formula for any example which fits the situation? Seems strange to me that a person would go through their courses Algebra 1 through Calc&AnalyticGeometry 3, several different science or engineering courses, and then later when on the job never use some variables to solve some multi-step numeric problems. Did anybody of the group recall like in first learning Physics: Assign variables to everything, and then solve all in variables, and to substitute the values last?
 
Mathematics news on Phys.org
symbolipoint said:
Did anybody of the group recall like in first learning Physics: Assign variables to everything, and then solve all in variables, and to substitute the values last?
I heard it. Did not always agree w/ it.
 
Yes, I tended to work that way anyway because I would make simple arithmetic mistakes and doing it at the end made it easier to find.

In programming you get a lot more flexibility using variables over literal constants. Choosing the right variable names can self-document your expressions and help you spot errors before they drive you crazy.

I know the time I've used the quick expedient of a literal constant I'd regret it later when I had to locate usages and change them struggling over whether the constant I'm looking at with the same value is the one I need to change.
 
  • Like
Likes   Reactions: Stephen Tashi and symbolipoint
Emphasis added
symbolipoint said:
Further, why so rarely anyone give variables to all numbers involved in a problem situation
I have a problem with 'all' in the sentence above. The generalization here should not be taken to extremes, as in the following example.
Problem:
I have a small garden whose dimensions are 10 ft. by 20 ft. How much fencing do I need to buy to fully enclose this garden.
Solution:
Let two = 2
Let width = 10
Let length = 20
Perimeter = two * (width + length) = 2 * (10 + 20) = 60

Because it is not likely that the formula for the perimeter of a rectangle is likely to change in the next few years, there is need to define a variable for the constant 2 in this formula.
 
  • Like
Likes   Reactions: SammyS
Mark44 said:
Emphasis added
I have a problem with 'all' in the sentence above. The generalization here should not be taken to extremes, as in the following example.
Problem:
I have a small garden whose dimensions are 10 ft. by 20 ft. How much fencing do I need to buy to fully enclose this garden.
Solution:
Let two = 2
Let width = 10
Let length = 20
Perimeter = two * (width + length) = 2 * (10 + 20) = 60

Because it is not likely that the formula for the perimeter of a rectangle is likely to change in the next few years, there is need to define a variable for the constant 2 in this formula.
Understood.
The intent of the question is about more involved number-situations, using or needing ratios, rational expressions, volumes, compositions of mixtures.
 
One other thing folks can do with variables is to carry the units of measure (UoM) so that once again you've self documented the data in a way to at least spot a UoM error. In my field, we are constantly worried about converting english to metric and back again or radian measure to degrees and back. The scientific side prefers the metric units by the enduser prefers english measure.

There are guidelines for variable naming that some folks use or used to use. One such example was Symonyi notation where variable prefixes told you the datatype or usage of the variable. It was kind of cool to use until you realized that each programmer might extend it using their own personal conventions and then it got harder to read.

Early FORTRAN had some builtin conventions where variables starting with the letters I thru N where considered INTEGERs and anything else was a REAL. FORTRAN did allow you to override the convention but then that would confuse other programmers maintaining your code.
 
symbolipoint said:
Did anybody of the group recall like in first learning Physics: Assign variables to everything, and then solve all in variables, and to substitute the values last?

I don't recall being taught it explicitly, but it's probably the approach my professors used and certainly the approach I prefer myself. The symbols give the equation meaning, and it's much easier to see at a glance what's going on.

I definitely use this approach in computer programming as well, and I think that's recommended in computer science. That is, to use named variables or constants rather than numerical values. For instance if you are writing code for something that uses 72 pixels per inch you'd define a constant PIXELSPERINCH to be 72. There may be other constants that depend on that value, so they'd be given as formulas in terms of PIXELSPERINCH.

In coding this has the practical advantage that you can change PIXELSPERINCH to be a different value and it automatically corrects all code that depends on that value. But it also includes the readability when values have a meaningful name, not just a number.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K