Sides of Equations Applying same operations on both sides of = Manual Operations on the Sides What: Use ff to duplicate the manual ways handling equations as taught in school teachings. Why: To make sure you understand how to manipulate sides of an equation on your own. How: Simply try to duplicate what the teacher does to solve an equation by working the sides. Time To Complete: 3 hours. Manully set the lhs and rhs variables to some expressions of choice and then commence, step by step, applying the same arithmetic operations to both sides. In this example, the equation x-3 = 17*y +9 is being solved for y namely the equation is transformed to a new equation with y alone on either side as the solution. lhs = x - 3; rhs = 17 * y + 9; lhs = lhs - 9; rhs = rhs - 9; lhs = lhs / 17; rhs = rhs / 17; show lhs also rhs; save as sides; Output "lhs" → (-12 + x)/17 "rhs" → y © 2012-Present CCN Studios Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Right hand side vs. Left hand side What: Different sides to an operator e.g. == Why: Proper treatment of the sides of an operator e.g. == results in much functionality Time To Complete: 3 hours .left and .right In Free Form Programming Language (ff) the dot operator, namely the dot on your keyboard, allows for accessing parts of an expression! For a given equation e.g. eq, in the ff program below, the lhs or x^2-1+y can be accessed by the expression eq.left and a/b+c by the expression eq.right. eq = (x^2-1+y == a/b+c); lhs = eq.left; show lhs; rhs = eq.right; show rhs; save as sides; Output "lhs" → -1 + x^2 + y "rhs" → a/b + c The programmer is not required to use a symbol e.g. eq for this . access, as long as using the ( ) operator the results would be the same: tmp = (x^2-1+y == a/b+c).left; show tmp; save as lhsrhs; Output "tmp" → -1 + x^2 + y ⊕ In Free Form Programming Language (ff), the Symbol ⊕ is one of several unassigned operators. As you can see the . operator works perfectly even if the operator in use is not defined! This is a core language aspect of ff that allows undefined variables as well as undefined functions and undefined operators alike. eq = (x^2-1+y) ⊕ (a/b+c); lhs = eq.left; show lhs; rhs = eq.right; show rhs; save as sides; Output "lhs" → -1 + x^2 + y "rhs" → a/b + c Try different operators. eq = (x^2-1+y) <= (a/b+c); lhs = eq.left; show lhs; rhs = eq.right; show rhs; save as sides; Output "lhs" → -1 + x^2 + y "rhs" → a/b + c © 2012-Present CCN Studios Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Subtract from Sides What: Subtract the same expression from the both sides of == Why: Such side-wise subtraction is an essential computation for solving equations Time to Complete: 3 hours eq = (x -3 == 17*y + 9); lhs = eq.left - 9; rhs = eq.right - 9; eq2 = (lhs == rhs); show eq2; save as sides; Output "eq2" → -12 + x == 17*y Output "lhs" → (-12 + x)/17 "rhs" → y © 2012-Present CCN Studios Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Add to Sides What: Add the same expression to the both sides of == . Why: Such side-wise addition is an essential computation for solving equations. Time to Complete: 3 hours. eq = (x -3 == 17*y - 9); lhs = eq.left + 9; rhs = eq.right + 9; eq2 = (lhs == rhs); show eq2; Output "eq2" → 6 + x == 17y © 2012-Present CCN Studios Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Divide both Sides What: Divide both sides of == by the same expression. Why: Such side-wise division is an essential computation for solving equations. Time to Complete: 3 hours. eq = (x - 3 == 17*y); lhs = eq.left / 17; rhs = eq.right /17; eq2 = (lhs == rhs); show eq2; save as lhsrhs; Output "eq2" → (-3 + x)/17 == y © 2012-Present CCN Studios Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Multiply both Sides What: Multiply both sides of == by the same expression. Why: Such side-wise multiplication is an essential computation for solving equations. Time to Complete: 4 hours. eq = (x - 3 == y / 13); lhs = eq.left * 13; rhs = eq.right * 13; eq2 = (lhs == rhs); show eq2; Output "eq2" → 13*(-3 + x) == y Output "eq2" → 13*(-3 + x) == y Apply expand[ ] to one side eq = (x - 3 == y / 13); lhs = eq.left * 13; rhs = eq.right * 13; eq2 = (lhs == rhs); show eq2; lhs = expand[eq2.left]; rhs = eq2.right; eq3 = (lhs == rhs); show eq3; save as lhsrhs; Output "eq2" → 13*(-3 + x) == y "eq3" → -39 + 13*x == y © 2012-Present CCN Studios Creative Commons Attribution-NonCommercial-ShareAlike 4.0