Re: Manipulation of equations and inequalities in "high-school style"
- To: mathgroup at smc.vnet.net
- Subject: [mg19598] Re: Manipulation of equations and inequalities in "high-school style"
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Sat, 4 Sep 1999 01:34:30 -0400
- Organization: University of Western Australia
- References: <7q9hdf$o62@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Silvano D'Orazio wrote: > Does anybody know a Mathematica (3 or 4) package which allows > manipulaton of equations and inequalities like high-school students > are supposed to do? > > For example > > 2x+a = x-b subtract a > 2x = x-b-a divide by 2, subtract x > x = -b-a > > or > > (2^x-1)^(1/2) = 5b log both sides > (1/2)(x-1)log2 = log5 + logb multiply by 2, divide by log2 > > 2(log5 + logb) add 1 > x-1 = -------------- > log2 > > and so on. Here is a short Notebook which illustrates one way of doing this. Notebook[{ Cell[TextData[{ "If you modify ", Cell[BoxData[ FormBox[ StyleBox["Equal", "Input"], TraditionalForm]]], " (following Maeder) so that ", Cell[BoxData[ FormBox[ StyleBox["Listable", "Input"], TraditionalForm]]], " operations are automatically applied to both sides of any equality," }], "Text", CellTags->{"Equal", "Listable"}], Cell[BoxData[ \(TraditionalForm\`\(Unprotect[Equal];\)\)], "Input"], Cell[BoxData[ \(TraditionalForm\`listableQ(f_) := MemberQ(Attributes(f), Listable)\)], "Input"], Cell[BoxData[ \(TraditionalForm\`Equal /: \ lhs : f_Symbol? listableQ[___, \ _Equal, \ ___]\ := \n\ \ \ \ \ \ \ \ Thread[\ Unevaluated[lhs], \ Equal\ ]\)], "Input"], Cell[BoxData[ \(TraditionalForm\`\(Protect[Equal];\)\)], "Input"], Cell[TextData[{ "you can directly manipulate equations, ", StyleBox["e.g.", FontSlant->"Italic"], "," }], "Text"], Cell[BoxData[ \(TraditionalForm\`\(a + 2\ x == x - b;\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(TraditionalForm\`% - a\)], "Input"], Cell[BoxData[ \(TraditionalForm\`2\ x == \(-a\) - b + x\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(TraditionalForm\`% - x\)], "Input"], Cell[BoxData[ \(TraditionalForm\`x == \(-a\) - b\)], "Output"] }, Open ]], Cell["or", "Text"], Cell[BoxData[ \(TraditionalForm\`\(\ at 2\^\(x - 1\) == 5\ b;\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ FormBox[ RowBox[{"Simplify", "[", RowBox[{\(log(%)\), ",", RowBox[{"x", "\[Element]", TagBox["\[DoubleStruckCapitalR]", (Reals&)]}]}], "]"}], TraditionalForm]], "Input"], Cell[BoxData[ \(TraditionalForm\`1\/2\ \((x - 1)\)\ \(log(2)\) == log(5\ b)\)], "Output"] }, Open ]], Cell[TextData[{ "Note that ", Cell[BoxData[ FormBox[ RowBox[{"x", "\[Element]", TagBox["\[DoubleStruckCapitalR]", (Reals&)]}], TraditionalForm]]], " is required here. Then we can proceed:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(TraditionalForm\`2 %\)], "Input"], Cell[BoxData[ \(TraditionalForm\`\((x - 1)\)\ \(log(2)\) == 2\ \(log(5\ b)\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(TraditionalForm\`%\/\(log(2)\)\)], "Input"], Cell[BoxData[ \(TraditionalForm\`x - 1 == \(2\ \(log(5\ b)\)\)\/\(log(2)\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(TraditionalForm\`% + 1\)], "Input"], Cell[BoxData[ \(TraditionalForm\`x == \(2\ \(log(5\ b)\)\)\/\(log(2)\) + 1\)], "Output"] }, Open ]] } ] ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________