I should add: if I were presenting this formally, I'd pick examples so that
no X results or alternatives were duplicates.

-- 
Raul

On Tuesday, December 11, 2012, Raul Miller <[email protected]> wrote:
> First off, I agree with you that this is difficult.
>
> When I was first presented with the derivation of the quadratic
> equation, I could not have done the derivation myself -- it's not a
> completely trivial task.  And, doing it with unfamiliar notation does
> not make it easier.
>
> That said, when I work with J, I prefer working with concrete
> examples.  This corresponds to the "check your work" admonition that
> my teachers had repeated to my classes over and over.
>
> So, using trial and error, I picked a few examples:
>
> C=: 2 2 6 6 4
> B=: 3 3 9 9 9
> A=: 1 1 3 3 5
> X=: _1 _2 _1 _2 _1
>
> And, these do work with the p. notation, producing zeros:
>
>    (C,.B,.A) p. X
> 0 0 0 0 0
>
> But I think for this kind of work I would be more comfortable using
> addition and multiplication:
>
>    C+(X*B)+(X*X*A)
> 0 0 0 0 0
>
> We know, by our choice of problem, that A is not zero, so:
>
>    (C%A)+(X*B%A)+(X*X*A%A)
> 0 0 0 0 0
>    (C%A)+(X*B%A)+(X*X)
> 0 0 0 0 0
>
> At this point we want to break out the sub-expression involving X from
> the sub-expression which does not contain X:
>
>    (X*B%A)+X*X
> _2 _2 _2 _2 _0.8
>    -C%A
> _2 _2 _2 _2 _0.8
>
> And we can add (B%2*A)*(B%2*A) to both expressions, and the consequent
> results will still be equal:
>
>    (X*B%A)+(X*X)+(B%2*A)*(B%2*A)
> 0.25 0.25 0.25 0.25 0.01
>    (-C%A)+(B%2*A)*(B%2*A)
> 0.25 0.25 0.25 0.25 0.01
>
> Since we are using B%2*A a lot, let's introduce a new symbol for it
> (and of course the new symbol substitutes into the above equation,
> retaining the previous result):
>
>    D=:B%2*A
>    (X^2)+(2*X*D)+D^2
> 0.25 0.25 0.25 0.25 0.01
>    (-C%A)+D^2
> 0.25 0.25 0.25 0.25 0.01
>
> The first equation involving D can be simplified (presumably we are
> already familiar with the pattern from Pascal's triangle):
>
>    (X+D)^2
> 0.25 0.25 0.25 0.25 0.01
>
> Now we can take the square roots:
>
>    %:(X+D)^2
> 0.5 0.5 0.5 0.5 0.1
>    X+D
> 0.5 _0.5 0.5 _0.5 _0.1
>    %:(-C%A)+D^2
> 0.5 0.5 0.5 0.5 0.1
>
> Whoa... what happened here?  When I use %: I only get positive roots,
> but I can see from my example that some results are negative.  This
> gets into an issue which I feel is sometimes glossed over when using
> the concept of "free variables" -- X can take on a variety of values,
> so the concept of "equality" is ambiguous.
>
> But we can find both the positive and negative roots in J by using (,:-)%:
>
>    (,:-)%:(-C%A)+D^2
>  0.5  0.5  0.5  0.5  0.1
> _0.5 _0.5 _0.5 _0.5 _0.1
>
> And the structure of this answer is I think an important issue --
> there are going to be two square roots, and what we are looking for is
> the presence of our X values in one of the alternatives.
>
> Anyways, living with this limitation, we subtract D from both of our
equations:
>
>    X
> _1 _2 _1 _2 _1
>    (-D)+"1 (,:-)%:(-C%A)+D^2
> _1 _1 _1 _1 _0.8
> _2 _2 _2 _2   _1
>
> And we can see that our X values are present in the computed result.
> But we should substitute back using our definition of D so that we are
> working with the original terms:
>
>    (-(B%2*A))+"1 (,:-)%:(-C%A)+(B%2*A)^2
> _1 _1 _1 _1 _0.8
> _2 _2 _2 _2   _1
>
> And, at this point, we might want to simplify that equation -- we can
> put 2*A into the denominator:
>
>    ((-B)+"1 (,:-)%:(-2*2*A*C)+B^2)(%"1)2*A
> _1 _1 _1 _1 _0.8
> _2 _2 _2 _2   _1
>
> Note that we need the "1 because of my (,:-) notation and my using a
> list of values for our examples, but further exploration of that topic
> is beyond the scope of usual presentations of the quadratic equation.
>
> Anyways, some notes here:
>
> 1) using a computer to check my work helped me see when I am going off
> track.  J is designed for this, and trying to use J without using the
> computer for this purpose is going to take more effort.  I have left
> out the trials I made which were erroneous (either syntax errors or
> faulty thinking), and this is usual practice in mathematics (but
> discovering mistakes is I think an important part of learning to use
> math).
>
> 2) there are no books or materials that I know of which present the
> quadratic equation in this fashion. Deriving it by hand is going to
> involve more work than looking it up.
>
> 3) the difficulties presented here are just a small slice of the
> difficulties facing both the student and the educator when dealing
> with any variation on how concepts are presented.
>
> 4) the concept of equality in the context of free variables is, I
> think, a topic which does not get enough attention in many
> presentations.  As a result, many students will invent bogus concept
> of "equality" which will cause difficulties for them later.
>
> 5) This quadratic equation derivation is just one example of the use
> of J to present a subject which involves mathematics.  But a typical
> student will have a background involving many years of work involving
> whatever notations and a variety of mathematical concepts.  You can't
> reasonably expect to equal that level of skill by working just one or
> two examples using J.
>
> FYI,
>
> --
> Raul
>
> On Tue, Dec 11, 2012 at 9:23 AM, Johann Hibschman <[email protected]>
wrote:
>> I can't pretend to either be an educator, but for my own use, I've found
>> that J makes for a great computational notation and a great notation for
>> writing about mathematics on computers, it doesn't work well for me as a
>> pen-and-paper notation for actually doing math.
>>
>> If I'm writing something up, I'm naturally contrained to a single linear
>> line of text, and I don't have to worry about how long it takes me to
>> handwrite symbols. If I'm doing work on paper, on the other hand, I can
>> work in two dimensions with fractions, and it matters that I find "*" to
be
>> a relatively slow symbol to draw.
>>
>> Similarly, "traditional" notation naturally maps to simple algebraic
>> manipulation in a way that J doesn't. If I have
>>
>>     e = a + 2*b + c + d   (traditional)
>>
>> I can write
>>
>>     e - 2*b = a + c + d
>>
>> while the same tokens in J,
>>
>>     e = a+2*b+c+d
>>
>> can only naturally be "split" rather than reordered.
>>
>>     (e-2*b+c+d) = a
>>
>> Even, then, the "split" only works for an initial element, since it's not
>> true that
>>
>>     e = a-b-c-d
>>
>> is the same as
>>
>>     (e+c-d) = a-b
>>
>> I'm not that satisfied with these examples. The point I'm trying to
express
>> is that since J expressions are strictly cumulative, most manipulations
>> require an awareness of the entire expression, unlike algebraic notation,
>> whch builds on the associativity and commutativity of addition.
>>
>> As an example, I found it much easier to work out a basic derivation of
the
>> quadratic formula in traditional notation rather than in J notation. In
J,
>> it would be hopeless if I didn't use the polynomial verb.
>>
>>     0= (c,b,a) p. x
>>     0= ((c%a),(b%a),1) p. x
>>     (*:-:b%a) = (((c%a)+*:-:b%a),(b%a),1) p. x
>>     ((-c%a)+*:-:b%a) = *:((-:b%a),1) p. x
>>     (*:-:%a)*((*:b)-4*a*c) = *:((-:b%a),1) p. x
>>     ((],-) (%:(*:b)-4*a*c))%2*a) = ((-:b%a),1) p. x
>>     x = (2*a)%~b (+,-) %:(*:b)-4*a*c
>>
>> vs.
>>
>>     0 = c + bx + ax^2
>>     0 = c/a + (b/a) x + x^2
>>     b^2/4a^2 = c/a + b^2/4a^2 + (b/a) x + x^2
>>     b^2/4a^2 - c/a = (b/2a + x)^2
>>     (b^2 - 4ac)/4a^2 = (b/2a + x)^2
>>     +- sqrt(b^2 - 4ac)/2a = b/2a + x
>>     x = (-b +- sqrt(b^2 - 4ac))/2a
>>
>> Writing out the J on paper took forever, with lots of fiddly little
colons
>> and adding extra parentheses to make the expressions work. I often had to
>> "go back" and insert parenthesis around expressions, which isn't a
problem
>> on a computers, but is a nuisance on paper.
>>
>> Lest you think this is a trivial example, it extends (I think) to bigger
>> problems. If I try to imagine working my way through a typical (say)
>> undergraduate physics E&M problem set using J notation, I think I'd grind
>> to a halt.
>>
>> J is optimized for feeding into a computer, not for writing on a
whiteboard
>> or on paper. I know APL was used as a non-computer notation, but I think
>> the "funny symbols" actually help there, and even then it seems like
such a
>> linear way to work.
>>
>> Now, I have no easy way to extrapolate to greater educational policy,
but I
>> can say that I'm glad to have both notations at my disposal now:
>> traditional for working things out symbolically and J for implementing
and
>> experimenting numerically.
>>
>> Regards,
>> Johann
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to