The plotting templates that are posted on the Handouts page should be good enough for most of your plotting needs--they're convenient because you don't need sagetex and Sage to use them. But lately I've found myself graphing functions that can't be done with those templates, such as the Cantor function, and decided to make sagetex driven versions of those 2 templates. The image above shows the version with the magnifying glass--the zeta function, Weierstrass function, and a Fourier series have been plotted simultaneously. I've made the main tick marks thicker but the important change is seen in the circular magnified portion. The templates incorporate comments by reader Lazza posted on the Plotting with Sagetex page to get around a problem of having enough points to make the graph look good but not too many that it won't compile. The complicated functions would look like this (step size .01):
The Fourier plot doesn't look smooth and the Weierstrass function looks too smooth. Lazza's comments apply to the regular template as well.
Note that for the zeta function above, the red circle shows that the zeta function doesn't go to the bottom of the screen with step size .01. This issue, which was previously mentioned on the Plotting with Sagetex page, can sometimes be solved by increasing the number of points. But if there are too many points, the code doesn't run. Lazza's improvement allow for decreasing the step size in just the areas where more points are needed. For the zeta function, the problem area is before 1, so the x coordinates could be calculated as:
x2_coords = srange(LowerX,.8,.001)+ srange(1.2,UpperX,step)
Without step of .001 the function doesn't make it to the bottom but .01 is adequate for the right hand piece. Also, starting at 1.2 avoids all the non-plotted points in between the two pieces. And of course, you could break this into 3 intervals so that the step size of .001 is only used closer to .8, say .75 to .8, eliminating even more points. Once the x coordinates are determined the y coordinates follow easily with a simple statement:
y2_coords = [(zeta(t2)).n(digits=6) for t2 in x2_coords]
The two templates can be found on the Plotting with Sagetex page along with more information, such as how the graph paper feature can be turned off or having a frame instead of axes. With these templates you can have the same look and feel for whatever you're graphing plus the additional power of Sage.
So many stories that caught my eye over the past week!
- The NY Post tells us that a Brooklyn high school was caught giving students science credits they needed to graduate by taking math classes. "The scheme was engineered following the February transfer of the only 12th-grade science teacher at Lafayette HS, where most of about 350 students are immigrants, the source said...Principal Jon Harriman didn’t return a call seeking comment — and on Friday sent out an e-mail instructing school faculty not to speak with reporters.". Seems likely this story will continue to evolve.
- ProPublica has an audio interview with theJohannes Bohannon, Ph.D., mentioned in an earlier post, about how he was able to convince the world that chocolate can help you lose weight.
- I used to have tissues and antibacterial lotion for students to use, if they wanted, when they came into class. IFLScience explains "Why You Should Never Use Hand Sanitizer".
- Kotaku.com has the crazy story of a Thomas Jefferson high school student at the center of controversy: "The Korean media dubbed Sara Kim the “Genius Girl.” A young math whiz so brilliant that two elite universities, Harvard and Stanford, offered her dual admissions. Her father, an exec at Korean game company Nexon, must have been proud! Other people, however, were suspicious. ... Chosun.com, which ran the original story, received similar denials from both Harvard and Stanford in afollow-up report published today. In this latest update, Kim allegedly still says she is not lying and is sticking with her story that she has been accepted into both universities....While reporting this story, Chosun.com today writes it received an email on Monday signed by Harvard Public Affairs and Communications official Anna Cowenhoven, stating that Sara Kim had been accepted by the Ivy League university. The following day, Cowenhoven told the paper that the email was also a forgery.".
- Do you let kids eat in class or give out food to them? The NY Post also reports, "A Harlem boy allergic to peanuts died after school staff inadvertently gave him a nut-based candy bar and then failed to immediately administer an antidote or call an ambulance, his devastated mother charges...The tragedy was compounded by the fact that Brandon, the eldest of three kids, was due to be a bone-marrow donor for his younger brother, Tyler, who suffers from sickle cell anemia, ...."
- The Washington Post writes, "A Woodbridge teenager admitted in court Thursday that he was the secret voice behind a pro-Islamic State Twitter account, which once counted more than 4,000 followers, and that he helped another teen travel to join the Islamic State in Syria. Ali Shukri Amin, 17, a former student at Prince William County’s Osbourn Park High School who was arrested earlier this year, pleaded guilty to conspiring to provide material support to a terrorist organization. As part of a deal with prosecutors, he admitted that he helped arrange a successful trip to Syria for an 18-year-old Prince William County man who wanted to fight with the Islamic State."
- The tragic story of high school student Kalief Browder, first mentioned here, who spent 33 months in prison without a trial before charges were dropped has a tragic end: he committed suicide recently. The damage of torture and starvation haunted him after he was freed. "At Rikers, Browder spent two of his three years in solitary confinement. There, as he frequently recounted later, Browder was routinely brutalized and starved by guards and subjected to virtually unrestrained violence by other prisoners....After a visit with Browder in the psych ward at St. Barnabas Hospital in January, Gonnerman described him as “gaunt, restless and deeply paranoid.”She added: He had recently thrown out his brand-new television, he explained, “because it was watching me.” Condolences to his family on their unnecessary, tragic loss.
- ZeroHedge posts on BioMed Central: "A major publisher of scholarly medical and science articles has retracted 43 papers because of “fabricated” peer reviews amid signs of a broader fake peer review racket affecting many more publications."
- A school in Idaho is arming staff to protect students. According to the Guardian, "A tiny school district in Idaho far removed from law enforcement has purchased firearms and trained a handful of staff to use them should the same school shooting rampage that has occurred across the country take place. It takes at least 45 minutes for officers to reach the Garden Valley School district – a district made up of less than 300 students all taught in the same building – where limited funds have prevented the school from being able to afford hiring police officers to patrol the building during school hours."
- The NY Times reports on the crippling education budget problems in Arizona: "In the rural Saddle Mountain Unified School District 50 miles west of Phoenix, three new libraries have been locked since last year. In a neighboring county, an elementary school closed last month because there was no money to keep it open, even after the district agreed to shift to a four-day week....In Peoria, a suburb northwest of Phoenix, Curtis J. Smith, the principal at Peoria Elementary, said he had about $42,000 to pay for toilet paper and printing paper; athletic equipment and arts materials; and light bulbs, small repairs and cleaning materials for the school year that ended May 22. It amounts to only $68 for each of his 620 students over the school year. Next year, Mr. Smith will have roughly $32,000, or about $52 per student."
- There's plenty of buzz for this story which is continues the PC theme in schools mentioned in the last post--but this time it's in the UK. Several articles stand out from the rest: Huffington Post gives one woman's harsh, sarcastic perspective on the tone deaf statements by former Nobel Prize winner Tim Hunt which led to his resignation. Reason.com in "The Illiberal Persecution of Tim Hunt" provides my view: "In a normal world, a world which valued the freedom to make a doofus of oneself, that should have been the end of it. Seventy-two-year-old man of science makes outdated joke, tumbleweed rolls by, The End. But we don't live in a normal world. Certainly we don't live in a world where people are allowed to make off-color comments. And so with tedious, life-zapping predicability, Hunt fell victim to the offence-policers, to the machine of outrage being constantly cranked up by self-styled guardians of what we may think, say, and even joke about....What is truly alarming, what should really send a shiver down every liberal's spine, is not the words that came out of Hunt's mouth but the haranguing of him that followed, the shunning of him by the academy and possibly by the scientific elite itself...The response to Hunt is way more archaic than what Hunt said. Sure, his views might be a bit pre-women's lib, pre-1960s. But the tormenting and sacking of people for what they think and say is pre-modern. It's positively Inquisitorial...The Hunt incident is quite terrifying. For what we have here is a university, under pressure from an intolerant mob, judging a professor's fitness for office by his personal thoughts, his idea of humour. Profs should be judged by one thing alone: their depth of knowledge. It shouldn't matter one iota if they are sexist, stupid, unfunny, religious, uncouth, ugly, or whatever. All that should matter is whether they have the brainpower to do the job at hand. UCL and the mob's hounding of Hunt echoes the university of the pre-Enlightenment era, when only those who were 100 percent Good Catholics had a hope in hell of getting a job. Only now, academics must be unflinchingly in accordance with the commandments of PC rather than with Biblical thinking." Missing from most accounts is provided by one woman who, thankfully, has come to his defense. Sarah Vine of the Daily Mail writes, "His so-called sexist remarks were actually, it turns out, more a veiled mea culpa. His wife (an equally eminent scientist, immunology professor Mary Collins, who, ironically, has done much to further the standing of women in science) was once his student. She was already married when they met over the roaring flame of a Bunsen burner. They had an affair, she divorced her first husband — and she and Sir Tim have been together for the past 20 years. ‘I have fallen in love with people in the lab and people in the lab have fallen for me, and it’s very disruptive to the science,’ he said yesterday, trying in vain to calm the story and explain why he’d said what he’d said. ‘These emotional entanglements make life very difficult.". And after reminding the reader of other cases where men have been taken down for their not being sensitive enough (such as atrophysicist Matt Taylor reduced to tears for wearing "...a shirt emblazoned with scantily clad women of the comic-book variety...") continues, "Don’t get me wrong. I wouldn’t die in a ditch to defend any of these three men as being entirely innocent. You might say they were all a bit silly, or you might say they were just being men. But I would argue that the enraged response from women in all cases was wildly disproportionate...But the feminists aren’t prepared to cut them that slack. They spot a potential target, zone in on their off-the-cuff remark, or their lurid shirt, or their ill-advised joke, and harry away until they achieve their goal: emasculation, defenestration, prostration or gibbering apologies. But what does this tactic actually do for the feminist cause?". But there's an interesting side story from the Huffington Post piece (above): "In a recent article posted on the Science Magazine website, Alice Huang, herself a very successful scientist, dispensed advice to a young female researcher wondering how to cope with the perceived unwelcome advances of a senior male colleague. Dr. Huang's recommendation: put up with it. She went on to say that it was likely that the male colleague likely couldn't help himself and as such, should be forgiven. Following substantial (and in my view, highly warranted) backlash on social media, this article was quickly removed.". Bloomberg Business has that report under the prurient headlines "Academic Journal Deletes Article Telling Woman to Let Adviser Ogle Her Breasts". Like Nigel Short, notice the comments getting twisted in the headlines by a "journalist". Dr Huang, a woman, gets some heat for her advice which isn't PC enough. The original question and answer are posted; no information on whether she'll lose her job. But recognize that a man giving the same advice starts with an extra strike of being a many--so he can be freely labelled and abused (in a way a woman can't) by a reactionary mob. Unfortunately the younger generation has a much different set of acceptable standards than their parents. Check out "The Most Whiney, Thin-Skinned, Easily Offended Society In The History Of The World" posted on ZeroHedge which explains the thinking of today's younger crowd and the "microaggressions" they are taught to see, such as opening the car door for a woman. Microaggressions and people's need to make the perceived offender pay the price, regardless of the intent behind the comments get taken very seriously by today's schools and, in the US, by more and more businesses and individuals. If you don't have the proper opinion then, man or woman, the situation can get spin out of control very quickly.
- You can feel relieved now that the family which cheered too loudly at their daughter's graduation is no longer facing arrest warrants and jail time for cheering too loudly. WREG in Mississippi has the original coverage--with video for you to judge just how disruptive they were. Local channel KOAT has a more recent story telling us the school superintendent (Foster) dropped the charges: ""Our purpose in filing the complaints was not to place a hardship of any kind on the four individuals who disrupted the ceremony, but to protect the rights of the class of 2015," Foster said to WHBQ just minutes after dropping the charges.".
- American Radio Works has some nice podcasts. Here's one: "What Can Japan Teach Us About Teaching?"
- The NY Post again: "Reading? Math? Nah- let's teach kids to put on a condom". The article beginning sets the tone: "Can anyone spare a banana? New York City public schools are now offering demonstrations of how to put on a condom. Because, you know, they’ve already mastered teaching kids math and reading. So let’s move on to the important stuff. Well maybe not. Thirty six percent of students in the city were proficient in math and 31 percent were proficient in reading. With these teachers in charge of condom demonstrations, I think we’re headed for a lot of unintended pregnancies."