Sage Interact: Triangle creator

TriangleCreatorI found myself looking for a triangle to insert into a test. It was going to be used as in a solve-the-triangle type of problem. The answer to the problem, though, could not have been the triangle graphic I wanted to use because the angles were too far off. It would be nice, I thought, to have a quick and easy was of creating triangles that would look like they should. The Triangle Creator fills that role. Specify 2 angles and this simple manipulative will create a triangle with those specific angles. You have the option to change the color and thickness of the lines and even add labels A, B, C as you can see in the screenshot above.

The math behind it is basic: start with a straight line segment from $latex (0,0)$ to $latex (2,0)$ and the user input of angles $latex \theta_1$ and $latex \theta_2$. To find where to place the 3rd point of the triangle note that the line to that 3rd point through $latex (0,0)$ is given by $latex y=\tan(\theta_1)$ and the equation of the line through $latex (2,0)$ and including the 3rd point is $latex (y-0)=\tan(180^{\circ}-\theta_2)(x-2)$. Solving the 2 equations simultaneously gives us $latex x=\frac{\tan(\theta_1)}{\tan(180^{\circ}-\theta_2)}(x-2)+2$ hence $latex y=\tan(\theta_1)\left(\frac{\tan(\theta_1)}{\tan(180^{\circ}-\theta_2)}\right)$. With that 3rd point we create the triangle. You can find the code for Triangle Creator on the Python/Sage page.

Magnus Carlsen: World Champion!

He's the highest rated chess player in history and yesterday, shortly before his 23rd birthday, Magnus Carlsen became the new world champion by securing a draw in the 10th game of the world championship. The match, scheduled for 12 games, ended with Carlsen winning 3 games and drawing 7. The final result wasn't a surprise to anybody who follows the game of chess; Carlsen has been playing world champion level chess for the past 3 or 4 years. He decided to not to compete for the world championship in the previous cycle because he thought the process was stacked against the challengers. Subsequent changes enticed Carlsen to compete in this current cycle and the result was virtually guaranteed.

The former world champion, Viswanathan Anand is one of the greatest natural chess talents to ever play but he had the misfortune of being great during much of Kasparov's dynasty.  Anand's performance over the last several years has been lackluster; I mentioned Anand's decline here and here. It was glaringly obvious that he had trouble winning against top players, couldn't keep his rating above 2800, and was more inclined to stumble in longer and more complicated games. If you check the current Live Chess ratings (the link is on the sidebar) you'll see he is currently ranked number 9 in the world.

Although chess is a young man's game a match gave Anand some potential chances to use his superior opening preparation to steal a game. But that never happened. Anand was unable to win a single game. Congratulations Magnus!

Here are some best reports I've read about Magnus Carlsen winning the world championship:

 

Sagetex: Composition of Functions

CompFcnFor those of you using Sagetex in creating randomized test/quizzes/worksheets/etc, I've added an other problem. I started off creating a list of functions that I wanted to use and put allowed the coefficients of each function to be determined at random. I've included some basic functions that all precalculus students should be familiar with at the beginning of the year. Of course you can easily modify this to suit your need

The resulting problem is shown above; click on the image for a larger version. The student must calculate the composition of the two functions. Sage calculates the answer for us, eliminating the time needed to make an answer key (and preventing any errors by us in making the key). The code is posted on the Sagetex: Functions page.

Sagetex: Trig Problem 2

TrigGraphingI've added a problem to the Sagetex: Trigonometry page. You need to "...plot the function $latex y=a\sin(bx+c)+d$ for at least 1 period. Find the amplitude, midline, period, and horizontal shift.". Although the problem uses sine, it's trivial to modify the problem to handle other trig functions as well. In generating the graph for the solution I've made the output look a little bit nicer as follows:

plt1 = plot(p1,(x,-(((pi/c)/b)+2*pi/b),((pi/c)/b)+2*pi/b))

This command uses the fact that 1 period for y=asin(bx-c) goes from c/b to c/b+2pi/b.
By starting the graph at -(((pi/c)/b)+2*pi/b) then about 2 periods get graphed and the graph doesn't looked as cramped as it would if, say, 8 periods were plotted.

Teacher shortages, revisited

As bad as public education is when seen from the outside, it's even worse on the inside; you see the problems and the stupidity up close and personal. The system is broken and it's not going to be fixed; it's massive bureaucracy and entrenched interest groups make meaningful change extremely difficult to achieve.

One of the many issues that deeply disturbs me are the numerous barriers that are placed in front of potential teachers. I've mentioned it before, and I had numerous issues getting into the system myself. I still remember being told I'd need to demonstrate that I was strong enough in math to teach at the high school level. When I reminded the bureaucrat I had 3 degrees in math from accredited schools I was rebuked, "You're not qualified unless I say you're qualified.". That meant, among other requirements, taking a multiple choice test which required the purchase of a graphing calculator. The level of the questions was below what I had experienced in high school and yet it is the only acceptable  measure of my math qualifications. Why aren't degrees from accredited schools recognized? Whatever the reason, the result is more time, effort, and money to become certified. And remember, top private schools don't value a teaching certificate, they care about the having teachers with advanced degrees.

The accumulation of barriers typically adds about 2 years of extra garbage to go through if you want to enter the public school system. I was reminded of that yet again with 2 recent articles. The first is article, "The Repurposed Ph.D." gives you a look into the poverty of a group: "Most held doctorates; a few were either close to completion or had left before finishing"..."One attendee recalled scraping by on $9,000 a year.". They've had to abandon academics because they can't make a living wage. But more than just the personal, anecdotal information, the statistics are staggering:

  • "According to a 2011 National Science Foundation survey, 35 percent of doctorate recipients — and 43 percent of those in the humanities — had no commitment for employment at the time of completion."
  • "Fewer than half of Ph.D.’s are expected to land tenure-track jobs."
  • "In this view, Ph.D. programs, with their false promises, lure students to serve as cheap labor, first as teaching assistants, then as poorly paid adjuncts when tenure-track jobs elude them."

What's not mentioned in the article are these academics going on to the high school level. That's almost certainly due to the fact they can't because of the various barriers I've experienced first hand myself; barriers that take time and money to overcome for people who, in not having a job, lack the financial means to pursue. Qualified to teach freshman at college for slave wages with no benefits they are completely unable to teach students one year younger in the public school system because of the certification requirements.

The second article is "From Welfare to Tenure Track" on the Chronicle of Education's website. The person at the center of the article had a Ph.D. in medieval history and was unable to get more than an adjunct position where "Her adjuncting brought in $900 a month, $750 of which went immediately toward rent. To make the remaining $150 last longer, she learned tricks familiar to those with little room for financial maneuvering: stretching two pounds of hamburger meat over six meals, reminding her daughter to use a washable rag instead of paper towels, asking friends if they had an extra roll of toilet paper when she ran out. At times she borrowed her mother’s car to drive to campus—about 100 miles round trip—because she couldn’t afford to fill up her own gas tank"...."[she] ended up relying on food stamps and Medicaid, barely scratching out a living for herself and her 17-year-old daughter. When she wasn’t grading papers, or worrying about keeping the lights on and the hot water running, she was trawling the Web in search of articles about the brutal academic job market and colleges’ use of adjuncts.".

Again, the anecdotal information is buttressed with statistics: "She had a point, and she wasn’t speaking just for herself. Between 2007 and 2010 the numbers of Ph.D.-holders receiving aid more than tripled, from just shy of 10,000 to 33,000.".

If the public schools are interested in getting "experts in the field" to teach at the high school level, there is a huge supply of people who would be willing and able to teach, if given the chance. But the numerous nuisance barriers (such as making someone with a graduate degree prove they have mastered their subject, or passing a test on the US Constitution to teach math) on top of the legitimate barriers (background check) make it onerous for people with limited financial means to pursue. Making it easier for these people who are passionate and knowledgeable in their field to teach in a public school without the nuisance barriers would tighten the supply of people qualified to teach at the college level and ultimately force colleges to pay a more reasonable wage. During these tough economic times, it's even more imperative. But nobody in the system wants that; that would make a teaching certificate less important if it could be replaced by actually being knowledgeable in the field.

SageTex: Trig Problem 1

RefTriDegI've added a page for trigonometry problems with SageTex. The first problem is of the form: "Use reference triangles to find the sine/cosine/tangent/etc of the angle x (in degrees). You can copy parts of the basic code into your SageTex test template to create randomized test problems with solutions. That means less time making up tests and a smaller chance of a mistake in the answer key.

The code has a several aspects that can be used in other problems:

  • Angles are put into a list and chosen randomly for the problem
  • You can prevent certain angles from being chosen, if you think that's important
  • the nsimplify command puts the solution in the form we expect (eg $latex \frac{\sqrt{2}}{2}$)

Of course the code can be easily modified to handle angles in radians but, unfortunately, fractions involving $latex \pi$, such as $latex \frac{3\pi}{4}$ are rewritten by Sage so that $latex \pi$ is written outside the fraction. That's either no big deal or really irritating depending on how particular you are. While I look for a simple way to avoid that issue, I've posted the first problem, using degrees, on SageTex: Trigonometry page.