Category Archives: CAS

Computer Algebra Systems

Inscribed Triangle Challenge

@MathCeyhun posed an interesting geometry problem yesterday.

Even more interesting is that, as @MathCeyhun noted in a subsequent tweet, none of the posted solutions is correct.  There have been a few posted answers, but no solutions, so I thought I’d give it a try.

OBSERVATIONS

  • The perpendicular bisector of each chord was given, and perpendicular bisectors of chords always lie on radii of the circle.
  • If r is the radius of the circle, then the lengths of the extensions of the perpendicular bisectors are r-1, r-2, and r-3.
  • Nothing given guarantees anything special about the triangle, so I assumed it was scalene.  I called the side lengths 2x, 2y, and 2z to simplify the bisection labels.
  • Adding the bisector extensions, the radii to the vertices, and segment names and labels gave me this.

Inscribed_Triangle2

[Irrelevant to this problem, but I just realized by looking at this image that every triangle can be dissected into three isosceles triangles with congruent sides and a shared vertex point at the triangle’s circumcenter.  Pretty.]

SETTING UP MY SOLUTION 

Each isosceles triangle is bisected by the perpendicular bisector of its base from which I extracted three relationships from the Pythagorean theorem.

x^2+(r-1)^2=r^2 \longrightarrow x^2=(2r-1) \cdot 1

y^2+(r-2)^2=r^2 \longrightarrow y^2=(2r-2) \cdot 2

z^2+(r-3)^2=r^2 \longrightarrow z^2=(2r-3) \cdot 3

[The relationship between the half-sides, the extension of the radius beyond the triangle, and the radius is another pretty pattern.]

That gives 3 equations in 4 variables.  I needed one more to solve….

 

The area of \Delta ABC can be expressed two ways:  as the sum of the areas of the isosceles triangles, and using Heron’s formula.  From the areas of the isosceles triangles,

Area( \Delta ABC) = \frac{1}{2}(2x)(r-1) + \frac{1}{2}(2y)(r-2) + \frac{1}{2}(2z)(r-3)
Area( \Delta ABC) = x \cdot (r-1) + y \cdot (r-2) + z \cdot (r-3)

The sides of \Delta ABC are 2x, 2y, and 2z, so its semiperimeter is x+y+z and Heron’s formula gives its area as

Area( \Delta ABC) = \sqrt{(x+y+z)(-x+y+z)(x-y+z)(x+y-z)}.

The area of a given triangle is unique, so the two different area expressions are equivalent, giving a fourth equation.

SOLVING A SYSTEM & ANSWERING THE QUESTION

With four equations in four variables, I had a system of equations.  The algebra was messy, so I invoked my CAS to crunch it for me.

Inscribed_Triangle3

The question asked for the area of the triangle, so I just substituted my values back into the area formulas.

Inscribed_Triangle4

And 17.186… is clearly not one of the choices in the original problem.

 

A PLEA…

Recognizing the perpendicular bisectors, seeing all the right triangles, and connecting the multiple ways to describe the area of a triangle made this solution reasonably easy to find with the help of my computer algebra system (CAS), but I know the background algebra is, at best, cumbersome.  I hope there’s a more elegant solution, but I don’t see it.  Can anyone offer a suggestion?

Either way … this is definitely becoming a challenge problem for my Quantitative Reasoning class this coming week!

Advertisements

Quadratics + Tangent = ???

 

Here’s a very pretty problem I encountered on Twitter from Mike Lawler 1.5 months ago.

I’m late to the game replying to Mike’s post, but this problem is the most lovely combination of features of quadratic and trigonometric functions I’ve ever encountered in a single question, so I couldn’t resist.  This one is well worth the time for you to explore on your own before reading further.

My full thoughts and explorations follow.  I have landed on some nice insights and what I believe is an elegant solution (in Insight #5 below).  Leading up to that, I share the chronology of my investigations and thought processes.  As always, all feedback is welcome.

WARNING:  HINTS AND SOLUTIONS FOLLOW

Investigation  #1:

My first thoughts were influenced by spoilers posted as quick replies to Mike’s post.  The coefficients of the underlying quadratic, A^2-9A+1=0, say that the solutions to the quadratic sum to 9 and multiply to 1.  The product of 1 turned out to be critical, but I didn’t see just how central it was until I had explored further.  I didn’t immediately recognize the 9 as a red herring.

Basic trig experience (and a response spoiler) suggested the angle values for the tangent embedded in the quadratic weren’t common angles, so I jumped to Desmos first.  I knew the graph of the overall given equation would be ugly, so I initially solved the equation by graphing the quadratic, computing arctangents, and adding.

tan1

Insight #1:  A Curious Sum

The sum of the arctangent solutions was about 1.57…, a decimal form suspiciously suggesting a sum of \pi/2.  I wasn’t yet worried about all solutions in the required [0,2\pi ] interval, but for whatever strange angles were determined by this equation, their sum was strangely pretty and succinct.  If this worked for a seemingly random sum of 9 for the tangent solutions, perhaps it would work for others.

Unfortunately, Desmos is not a CAS, so I turned to GeoGebra for more power.

Investigation #2:  

In GeoGebra, I created a sketch to vary the linear coefficient of the quadratic and to dynamically calculate angle sums.  My procedure is noted at the end of this post.  You can play with my GeoGebra sketch here.

The x-coordinate of point G is the sum of the angles of the first two solutions of the tangent solutions.

Likewise, the x-coordinate of point H is the sum of the angles of all four angles of the tangent solutions required by the problem.

tan2

Insight #2:  The Angles are Irrelevant

By dragging the slider for the linear coefficient, the parabola’s intercepts changed, but as predicted in Insights #1, the angle sums (x-coordinates of points G & H) remained invariant under all Real values of points A & B.  The angle sum of points C & D seemed to be \pi/2 (point G), confirming Insight #1, while the angle sum of all four solutions in [0,2\pi] remained 3\pi (point H), answering Mike’s question.

The invariance of the angle sums even while varying the underlying individual angles seemed compelling evidence that that this problem was richer than the posed version. 

Insight #3:  But the Angles are bounded

The parabola didn’t always have Real solutions.  In fact, Real x-intercepts (and thereby Real angle solutions) happened iff the discriminant was non-negative:  B^2-4AC=b^2-4*1*1 \ge 0.  In other words, the sum of the first two positive angles solutions for y=(tan(x))^2-b*tan(x)+1=0 is \pi/2 iff \left| b \right| \ge 2, and the sum of the first four solutions is 3\pi under the same condition.  These results extend to the equalities at the endpoints iff the double solutions there are counted twice in the sums.  I am not convinced these facts extend to the complex angles resulting when -2<b<2.

I knew the answer to the now extended problem, but I didn’t know why.  Even so, these solutions and the problem’s request for a SUM of angles provided the insights needed to understand WHY this worked; it was time to fully consider the product of the angles.

Insight #4:  Finally a proof

It was now clear that for \left| b \right| \ge 2 there were two Quadrant I angles whose tangents were equal to the x-intercepts of the quadratic.  If x_1 and x_2 are the quadratic zeros, then I needed to find the sum A+B where tan(A)=x_1 and tan(B)=x_2.

From the coefficients of the given quadratic, I knew x_1+x_2=tan(A)+tan(B)=9 and x_1*x_2=tan(A)*tan(B)=1.

Employing the tangent sum identity gave

\displaystyle tan(A+B) = \frac{tan(A)+tan(B)}{1-tan(A)tan(B)} = \frac{9}{1-1}

and this fraction is undefined, independent of the value of x_1+x_2=tan(A)+tan(B) as suggested by Insight #2.  Because tan(A+B) is first undefined at \pi/2, the first solutions are \displaystyle A+B=\frac{\pi}{2}.

Insight #5:  Cofunctions reveal essence

The tangent identity was a cute touch, but I wanted something deeper, not just an interpretation of an algebraic result.  (I know this is uncharacteristic for my typically algebraic tendencies.)  The final key was in the implications of tan(A)*tan(B)=1.

This product meant the tangent solutions were reciprocals, and the reciprocal of tangent is cotangent, giving

\displaystyle tan(A) = \frac{1}{tan(B)} = cot(B).

But cotangent is also the co-function–or complement function–of tangent which gave me

tan(A) = cot(B) = tan \left( \frac{\pi}{2} - B \right).

Because tangent is monotonic over every cycle, the equivalence of the tangents implied the equivalence of their angles, so A = \frac{\pi}{2} - B, or A+B = \frac{\pi}{2}.  Using the Insights above, this means the sum of the solutions to the generalization of Mike’s given equation,

(tan(x))^2+b*tan(x)+1=0 for x in [0,2\pi ] and any \left| b \right| \ge 2,

is always 3\pi with the fundamental reason for this in the definition of trigonometric functions and their co-functions.  QED

Insight #6:  Generalizing the Domain

The posed problem can be generalized further by recognizing the period of tangent: \pi.  That means the distance between successive corresponding solutions to the internal tangents of this problem is always \pi each, as shown in the GeoGebra construction above.

Insights 4 & 5 proved the sum of the angles at points C & D was \pi/2.  Employing the periodicity of tangent,  the x-coordinate of E = C+\pi and F = D+\pi, so the sum of the angles at points E & F is \frac{\pi}{2} + 2 \pi.

Extending the problem domain to [0,3\pi ] would add \frac{\pi}{2} + 4\pi more to the solution, and a domain of [0,4\pi ] would add an additional \frac{\pi}{2} + 6\pi.  Pushing the domain to [0,k\pi ] would give total sum

\displaystyle \left( \frac{\pi}{2} \right) + \left( \frac{\pi}{2} +2\pi \right) + \left( \frac{\pi}{2} +4\pi \right) + \left( \frac{\pi}{2} +6\pi \right) + ... + \left( \frac{\pi}{2} +2(k-1)\pi \right)

Combining terms gives a general formula for the sum of solutions for a problem domain of [0,k\pi ]

\displaystyle k * \frac{\pi}{2} + \left( 2+4+6+...+2(k-1) \right) * \pi =

\displaystyle = k * \frac{\pi}{2} + (k)(k-1) \pi =

\displaystyle = \frac{\pi}{2} * k * (2k-1)

For the first solutions in Quadrant I, [0,\pi] means k=1, and the sum is \displaystyle \frac{\pi}{2}*1*(2*1-1) = \frac{\pi}{2}.

For the solutions in the problem Mike originally posed, [0,2\pi] means k=2, and the sum is \displaystyle \frac{\pi}{2}*2*(2*2-1) = 3\pi.

I think that’s enough for one problem.

APPENDIX

My GeoGebra procedure for Investigation #2:

  • Graph the quadratic with a slider for the linear coefficient, y=x^2-b*x+1.
  • Label the x-intercepts A & B.
  • The x-values of A & B are the outputs for tangent, so I reflected these over y=x to the y-axis to construct A’ and B’.
  • Graph y=tan(x) and construct perpendiculars at A’ and B’ to determine the points of intersection with tangent–Points C, D, E, and F in the image below
  • The x-intercepts of C, D, E, and F are the angles required by the problem.
  • Since these can be points or vectors in Geogebra, I created point G by G=C+D.  The x-intercept of G is the angle sum of C & D.
  • Likewise, the x-intercept of point H=C+D+E+F is the required angle sum.

 

 

 

 

 

 

Applications of Logarithm Algebra

This post discusses two higher level applications of logarithmic algebra typically seen by students in Algebra 2.

An aspect of brain and learning research I incorporate in my classes is that concepts are committed more securely to long-term memory when the ideas are introduced, some time elapses, and are then re-encountered.  The idea is that when you “learn” an idea, have a chance to “forget” it, and then have an opportunity to re-learn it or see it in a new context, you strengthen your long-term understanding .  In this spirit, I introduce exponential and logarithmic algebra in Algebra 2 classes and then return to those ideas multiple times.  Here are two extensions from following courses–one from Calculus and one from PreCalculus/Statistics.

LOGARITHM EXTENSION #1:  CALCULUS

Scenario:  Whether by hand or with a CAS for rapid data creation, students explore derivatives of variations of ln(k*x) for any k>0.

logcalc1

When all return \frac{1}{x}, most initially can’t quite believe the value of is irrelevant.  Those who recall transformations are further disturbed that the slope of y=ln(k*x) is invariant under all levels of horizontal scaling.  Surely when a curve is stretched, its slope changes, right?

The most common resolution I’ve seen invokes the Chain Rule to cancel k algebraically .

\frac{d}{dx} ln \left( k*x \right) = \frac{1}{k*x} * k = \frac{1}{x}

This proves the derivative of ln(k*x) is invariant for all k>0, but it doesn’t get at WHY.  Many students remain dissatisfied.  Enter log algebra.

As explained at the end of my previous post, every horizontal stretch of any log graph is equivalent to a vertical translation of the parent graph.  That’s the core of what’s being claimed by the not-fully-appreciated log algebra property,

log_b(k*x) = log_b(k) + log_b(x).

Applied to this problem, \frac{d}{dx} ln \left( k*x \right) = \frac{1}{x} because ln(k*x) = ln(k) + ln(x), making every instance of y=ln(k*x) a simple vertical translation of y=ln(x).  Their derivatives are equal precisely because all derivatives with respect to x are invariant under vertical translations.  Knowing the family of logarithmic functions has the special property that every horizontal scale change is equivalent to some vertical slide completely explains the paradox.

LOGARITHM EXTENSION #2:  PRECALCULUS/STATISTICS

SCENARIO:  Having only experienced linear regressions, students encounter curved Quadrant I data and need to find a model.

Balancing multiple perspectives, it is critical for students to see mathematics used in precise algebraic scenarios and in “fuzzy” scenarios like fitting lines to data that are inevitably imprecise due to inherent variability in the measured data.  In my Algebra 2 classes, we explore linear regressions and how they work alongside the precise algebra of finding equations of lines and more general polynomials that must pass through given specific predetermined ordered pairs.

sd1

I typically don’t move beyond linear regressions in Algebra 2, but return in PreCalculus and Statistics classes to the reality that we may understand how to fit lines to generally linear data, but we are limited if the data curves.  For curved Quadrant I data (like above), it is difficult to know what curve might model the information.  Exponential functions and power functions (and others) have this shape, but these are wildly different types of functions.  How can you know which to use?  Re-enter logarithms…

(The remainder of this post is is an overly abbreviated explanation meant only to show a powerful use of log algebra.  If there’s interest, I can explore the complete connection between exponential, linear, and power regressions in another post.)

If you suspect data is exponential, then an equation of the form y = a*b^x will model the data, while power data should be modeled by y=a*x^b.  The equations are similar, and both have exponents.  From prior experiences with log algebra, some students recall that logarithmic functions have the unique algebraic property of being able to write expressions with exponents in an equivalent form without exponents.

Applying logs to the exponential equation and applying log algebra gives

y=a*b^x
ln(y) = ln \left( a*b^x \right)
ln(y) = ln(a) + x*ln(b).

The parallel application to power functions is

y=a*x^b
ln(y) = ln \left( a*x^b \right)
ln(y) = ln(a) + b*ln(x).

In both cases, the last equation is a variation of a linear equation–a transformed y-value equal to a constant, ln(a) added to the product of another constant and either x or a transformed x.  That is, both are some form of Y=B+MX.

So, familiar logarithms allow you to change unfamiliar and significantly curved exponential or power data back into a familiar linear form.  At their cores, exponential and power regressions are just simple transformations of linear regressions.  In another post in which the previous image was explained, I leveraged this curve-straightening idea in a statistics class to have my students discover the formula for standard deviations of distributions of sample means.

CONCLUSION:

Research shows that aiming for student mastery on initial exposure is counterproductive.  We all learn best by repeated exposure to concepts with time gaps between experiences.  Hopefully these two examples can give two good ways to bring back log algebra.

From another perspective, exploring the implications of mathematics beyond just algebraic manipulations often grants key insights to scenarios that don’t seem related to when ideas were first encountered.

Quadratics and CAS

I’m returning to my ‘blog after a prolonged absence.  My next several posts will explore ideas I shared and learned at the USACAS-10 conference hosted at Hawken School last weekend.

Finding equations for quadratic functions has long been a staple of secondary mathematics.  Historically, students are given information about some points on the graph of the quadratic, and efficient students typically figure out which form of the equation to use.  This post from my Curious Quadratics a la CAS presentation explores a significant mindset change that evolves once computer algebra enters the learning environment.

HISTORIC BACKGROUND:

Students spend lots of time (too much?) learning how to manipulate algebraic expressions between polynomial forms.  Whether distributing, factoring, or completing the square, generations of students have spent weeks changing quadratic expressions between three common algebraic forms

Standard:  y=a*x^2+b*x+c

Factored:  y=a*(x-x_1)(x-x_2)

Vertex:  y=a*(x-h)^2+k

many times without ever really knowing why.  I finally grasped deeply the reason for this about 15 years ago in a presentation by Bernhard Kutzler of Austria.  Poorly paraphrasing Bernhard’s point, he said in more elegant phrasing,

We change algebraic forms of functions because different forms reveal different properties of the function and because no single form reveals everything about a function.

While any of what follows could be eventually derived from any of the three quadratic forms, in general the Standard Form explicitly gives the y-intercept, Factored Form states x-intercepts, and Vertex Form “reveals” the vertex (duh).  When working without electronic technology, students can gain efficiency by choosing to work with a quadratic form that blends well with given information.  To demonstrate this, here’s an example of the differences between non-tech and CAS approaches.

COMPARING APPROACHES:

For an example, determine all intercepts and the vertex of the parabola that passes through (10, 210)(5, 40), and (-2, -30).

NON-TECH:  Not knowing anything about the points, use Standard form, plug in all three points, and solve the resulting system.

y=a*x^2+b*x+c
210 = 100a+10b+c
40 = 25a+5b+c
-30 = 4a-2b+c

Use any approach you want to solve this 3×3 system to get a=2, b=4, and c=-30.

That immediately gives the y-intercept at -30.  Factoring to y=2(x+5)(x-3) or using the Quadratic Formula reveals the x-intercepts at -5 and 3.  Completing the square or leveraging symmetry between the known x-intercepts gives the vertex at (-1,-32).  Some less-confident students find all of the hinted-at manipulations in this paragraph burdensome or even daunting.

CAS APPROACH:  By declaring the form you want/need, you can directly get any information you require.  In the next three lines on my Nspire CAS, notice that the only difference in my commands is the form of the equation I want in the first part of the command.  Also notice my use of lists to simplify substitution of the given points.

quad2

The last line’s output gave two solutions only because I didn’t specify which of x1 and x2 was the larger x-intercept, so my Nspire gave me both.

The -30 y-intercept appears in the first output, the vertex in the second, and the x-intercepts in the third.  Any information is equally simple to obtain.

CONCLUSION:

In the end, it’s all about knowing what you want to find and how to ask questions of the tools you have available.  Understanding the algebra behind the solutions is important, but endless repetition of these tasks is not helpful, even though it may be easy to test.

Instead, focus on using what you know, explore for patterns, and ask good questions.  …And teach with a CAS!

 

Binomial Expansion Variation

Several years ago, I posed on this ‘blog a problem I learned from Natalie Jackucyn:

For some integers A, B, and n, one term of the expansion of (Ax+By)^n is 27869184x^5y^3.  What are the values of A, B, and n?

In this post, I reflect for a moment on what I’ve learned from the problem and outline a solution approach before sharing a clever alternative solution one of my students this year leveraged through her CAS-enabled investigation.

WHAT I LEARNED BEFORE THIS YEAR

Mostly, I’ve loved this problem for its “reversal” of traditional binomial expansion problems that typically give A, B, and n values and ask for either complete expansions or specific terms of the polynomial.  Both of these traditional tasks are easily managed via today’s technology.  In Natalie’s variation, neither the answer nor how you would proceed are immediately obvious.

The first great part of the problem is that it doesn’t seem to give enough information.  Second, it requires solvers to understand deeply the process of polynomial expansion.  Third, unlike traditional formulations, Natalie’s version doesn’t allow students to avoid deep thinking by using technology.

In the comments to my original post, Christopher Olah and a former student, Bryan Spellman, solved the problem via factoring and an Excel document, respectively.  Given my algebraic tendencies, I hadn’t considered Bryan’s Excel “search” approach, but one could relatively easily program Excel to provide an exhaustive search.  I now think of Bryan’s approach as a coding approach to a reasonably efficient search of the sample space of possible solutions.  Most of my students’ solutions over the years essentially approach the problem the same way, but less efficiently, by using one-case-at-a-time expansions via CAS commands until they stumble upon good values for A, B, and n.  Understandably, students taking this approach typically become the most frustrated.

Christopher’s approach paralleled my own.  The x and y exponents from the expanded term show that n=5+3=8.  Expanding a generic (Ax+By)^8 then gives a bit more information.  From my TI-Nspire CAS,

binomial1

so there are 56 ways an x^5y^3 term appears in this expansion before combining like terms (explained here, if needed).  Dividing the original coefficient by 56 gives a^5b^3=497,664, the coefficient of x^5y^3.

binomial2

The values of a and b are integers, so factoring 497,664 shows these coefficients are both co-multiples of 2 and 3, but which ones?  In essence, this defines a system of equations.  The 3 has an exponent of 5, so it can easily be attributed to a, but the 11 is not a multiple of either 5 or 3, so it must be a combination.  Quick experimentation with the exponents leads to 11=5*1+3*2, so 2^1 goes to a and 2^2 goes to b.  This results in a=3*2=6 and b=2^2=4.

WHAT A STUDENT TAUGHT ME THIS YEAR

After my student, NB, arrived at a^5b^3=497,664 , she focused on roots–not factors–for her solution.  The exponents of a and b suggested using either a cubed or a fifth root.

binomial3
binomial3

The fifth root would extract only the value of a if b had only singleton factors–essentially isolating the a and b values–while the cubed root would extract a combination of a and b factors, leaving only excess a factors inside the radical.  Her investigation was simplified by the exact answers from her Nspire CAS software.

binomial4

From the fifth root output, the irrational term had exponent 1/5, not the expected 3/5, so b must have had at least one prime factor with non-singular multiplicity.  But the cubed root played out perfectly.   The exponent–2/3–matched expectation, giving a=6, and the coefficient, 24, was the product of a and b, making b=4.  Clever.

EXTENSIONS & CONCLUSION

Admittedly, NB’s solution would have been complicated if the parameter was composed of something other than singleton prime factors, but it did present a fresh, alternative approach to what was becoming a comfortable problem for me.  I’m curious about exploring other arrangements of the parameters of (Ax+By)^n to see how NB’s root-based reasoning could be extended and how it would compare to the factor solutions I used before.  I wonder which would be “easier” … whatever “easier” means.

As a ‘blog topic for another day, I’ve learned much by sharing this particular problem with several teachers over the years.  In particular, the initial “not enough information” feel of the problem statement actually indicates the presence of some variations that lead to multiple solutions.  If you think about it, NB’s root variation of the solution suggests some direct paths to such possible formulations.  As intriguing as the possibilities here are, I’ve never assigned such a variation of the problem to my students.

As I finish this post, I’m questioning why I haven’t yet taken advantage of these possibilities.  That will change. Until then, perhaps you can find some interesting or alternative approaches to the underlying systems of equations in this problem.  Can you create a variation that has multiple solutions?  Under what conditions would such a variation exist?  How many distinct solutions could a problem like this have?

Computers vs. People: Writing Math

Readers of this ‘blog know I actively use many forms of technology in my teaching and personal explorations.  Yesterday, a thread started on the AP-Calculus community discussion board with some expressing discomfort that most math software accepts sin(x)^2 as an acceptable equivalent to the “traditional” handwritten sin^2 (x).

From Desmos:sine1

Some AP readers spoke up to declare that sin(x)^2 would always be read as sin(x^2).  While I can’t speak to the veracity of that last claim, I found it a bit troubling and missing out on some very real difficulties users face when interpreting between paper- and computer-based versions of math expressions.  Following is an edited version of my response to the AP Calculus discussion board.

MY THOUGHTS:

I believe there’s something at the core of all of this that isn’t being explicitly named:  The differences between computer-based 1-dimensional input (left-to-right text-based commands) vs. paper-and-pencil 2-dimensional input (handwritten notation moves vertically–exponents, limits, sigma notation–and horizontally).  Two-dimensional traditional math writing simply doesn’t convert directly to computer syntax.  Computers are a brilliant tool for mathematics exploration and calculation, but they require a different type of input formatting.  To overlook and not explicitly name this for our students leaves them in the unenviable position of trying to “creatively” translate between two types of writing with occasional interpretation differences.

Our students are unintentionally set up for this confusion when they first learn about the order of operations–typically in middle school in the US.  They learn the sequencing:  parentheses then exponents, then multiplication & division, and finally addition and subtraction.  Notice that functions aren’t mentioned here.  This thread [on the AP Calculus discussion board] has helped me realize that all or almost all of the sources I routinely reference never explicitly redefine order of operations after the introduction of the function concept and notation.  That means our students are left with the insidious and oft-misunderstood PEMDAS (or BIDMAS in the UK) as their sole guide for operation sequencing.  When they encounter squaring or reciprocating or any other operations applied to function notation, they’re stuck trying to make sense and creating their own interpretation of this new dissonance in their old notation.  This is easily evidenced by the struggles many have when inputting computer expressions requiring lots of nested parentheses or when first trying to code in LaTEX.

While the sin(x)^2 notation is admittedly uncomfortable for traditional “by hand” notation, it is 100% logical from a computer’s perspective:  evaluate the function, then square the result.

We also need to recognize that part of the confusion fault here lies in the by-hand notation.  What we traditionalists understand by the notational convenience of sin^2(x) on paper is technically incorrect.  We know what we MEAN, but the notation implies an incorrect order of computation.  The computer notation of sin(x)^2 is actually closer to the truth.

I particularly like the way the TI-Nspire CAS handles this point.  As is often the case with this software, it accepts computer input (next image), while its output converts it to the more commonly understood written WYSIWYG formatting (2nd image below).

sine2

sine3

Further recent (?) development:  Students have long struggled with the by-hand notation of sin^2(x) needing to be converted to (sin(x))^2 for computers.  Personally, I’ve always liked both because the computer notation emphasizes the squaring of the function output while the by-hand version was a notational convenience.  My students pointed out to me recently that Desmos now accepts the sin^2(x) notation while TI Calculators still do not.

Desmos: sine4

The enhancement of WYSIWYG computer input formatting means that while some of the differences in 2-dimensional hand writing and computer inputs are narrowing, common classroom technologies no longer accept the same linear formatting — but then that was possibly always the case….

To rail against the fact that many software packages interpret sin(x)^2 as (sin(x))^2 or sin^2(x) misses the point that 1-dimensional computer input is not necessarily the same as 2-dimensional paper writing.  We don’t complain when two human speakers misunderstand each other when they speak different languages or dialects.  Instead, we should focus on what each is trying to say and learn how to communicate clearly and efficiently in both venues.

In short, “When in Rome, …”.

Roots of Complex Numbers without DeMoivre

Finding roots of complex numbers can be … complex.

This post describes a way to compute roots of any number–real or complex–via systems of equations without any conversions to polar form or use of DeMoivre’s Theorem.  Following a “traditional approach,” one non-technology example is followed by a CAS simplification of the process.

TRADITIONAL APPROACH:

Most sources describe the following procedure to compute the roots of complex numbers (obviously including the real number subset).

  • Write the complex number whose root is sought in generic polar form.  If necessary, convert from Cartesian form.
  • Invoke DeMoivre’s Theorem to get the polar form of all of the roots.
  • If necessary, convert the numbers from polar form back to Cartesian.

As a very quick example,

Compute all square roots of -16.

Rephrased, this asks for all complex numbers, z, that satisfy  z^2=-16.  The Fundamental Theorem of Algebra guarantees two solutions to this quadratic equation.

The complex Cartesian number, -16+0i, converts to polar form, 16cis( \pi ), where cis(\theta ) = cos( \theta ) +i*sin( \theta ).  Unlike Cartesian form, polar representations of numbers are not unique, so any full rotation from the initial representation would be coincident, and therefore equivalent if converted to Cartesian.  For any integer n, this means

-16 = 16cis( \pi ) = 16 cis \left( \pi + 2 \pi n \right)

Invoking DeMoivre’s Theorem,

\sqrt{-16} = (-16)^{1/2} = \left( 16 cis \left( \pi + 2 \pi n \right) \right) ^{1/2}
= 16^{1/2} * cis \left( \frac{1}{2} \left( \pi + 2 \pi n \right) \right)
= 4 * cis \left( \frac{ \pi }{2} + \pi * n \right)

For n= \{ 0, 1 \} , this gives polar solutions, 4cis \left( \frac{ \pi }{2} \right) and 4cis \left( \frac{ 3 \pi }{2} \right) .  Each can be converted back to Cartesian form, giving the two square roots of -16:   4i and -4i .  Squaring either gives -16, confirming the result.

I’ve always found the rotational symmetry of the complex roots of any number beautiful, particularly for higher order roots.  This symmetry is perfectly captured by DeMoivre’s Theorem, but there is arguably a simpler way to compute them.

NEW(?) NON-TECH APPROACH:

Because the solution to every complex number computation can be written in a+bi form, new possibilities open.  The original example can be rephrased:

Determine the simultaneous real values of x and y for which -16=(x+yi)^2.

Start by expanding and simplifying the right side back into a+bi form.  (I wrote about a potentially easier approach to simplifying powers of i in my last post.)

-16+0i = \left( x+yi \right)^2 = x^2 +2xyi+y^2 i^2=(x^2-y^2)+(2xy)i

Notice that the two ends of the previous line are two different expressions for the same complex number(s).  Therefore, equating the real and imaginary coefficients gives a system of equations:

demoivre5

Solving the system gives the square roots of -16.

From the latter equation, either x=0 or y=0.  Substituting y=0 into the first equation gives -16=x^2, an impossible equation because x & y are both real numbers, as stated above.

Substituting x=0 into the first equation gives -16=-y^2, leading to y= \pm 4.  So, x=0 and y=-4 -OR- x=0 and y=4 are the only solutions–x+yi=0-4i and x+yi=0+4i–the same solutions found earlier, but this time without using polar form or DeMoivre!  Notice, too, that the presence of TWO solutions emerged naturally.

Higher order roots could lead to much more complicated systems of equations, but a CAS can solve that problem.

CAS APPROACH:

Determine all fourth roots of 1+2i.

That’s equivalent to finding all simultaneous x and y values that satisfy 1+2i=(x+yi)^4.  Expanding the right side is quickly accomplished on a CAS.  From my TI-Nspire CAS:

demoivre1

Notice that the output is simplified to a+bi form that, in the context of this particular example, gives the system of equations,

demoivre6

Using my CAS to solve the system,

demoivre2

First, note there are four solutions, as expected.  Rewriting the approximated numerical output gives the four complex fourth roots of 1+2i-1.176-0.334i-0.334+1.176i0.334-1.176i, and 1.176+0.334i.  Each can be quickly confirmed on the CAS:

demoivre3

CONCLUSION:

Given proper technology, finding the multiple roots of a complex number need not invoke polar representations or DeMoivre’s Theorem.  It really is as “simple” as expanding (x+yi)^n where n is the given root, simplifying the expansion into a+bi form, and solving the resulting 2×2 system of equations.

At the point when such problems would be introduced to students, their algebraic awareness should be such that using a CAS to do all the algebraic heavy lifting is entirely appropriate.

As one final glimpse at the beauty of complex roots, I entered the two equations from the last system into Desmos to take advantage of its very good implicit graphing capabilities.  You can see the four intersections corresponding to the four solutions of the system.  Solutions to systems of implicit equations are notoriously difficult to compute, so I wasn’t surprised when Desmos didn’t compute the coordinates of the points of intersection, even though the graph was pretty and surprisingly quick to generate.

demoivre4