# Monthly Archives: October 2012

## Extending graph control

This article takes my idea from yesterday’s post about using $g(x)=\sqrt \frac{\left | x \right |}{x}$ to control the appearance of a graph and extends it in two ways.

• Part I below uses Desmos to graph $y=(x+2)^3x^2(x-1)$ from the left and right simultaneously
• Part II was inspired by my Twitter colleague John Burk who asked if this control could be extended in a different direction.

Part I: Simultaneous Control

When graphing polynomials like $y=(x+2)^3x^2(x-1)$, I encourage my students to use both its local behavior (cubic root at $x=-2$, quadratic root at $x=0$, and linear root at $x=1$) and its end behavior (6th degree polynomial with a positive lead coefficient means $y\rightarrow +\infty$ as $x\rightarrow\pm\infty$). To start graphing, I suggest students plot points on the x-intercepts and then sketch arrows to indicate the end behavior.  In the past, this was something we did on paper, but couldn’t get technology to replicate it live–until this idea.

In class last week, I used a minor extension of yesterday’s idea to control a graph’s appearance from the left and right simultaneously.  Yesterday’s post suggested  multiplying  by $\sqrt \frac{\left | a-x \right |}{a-x}$ to show the graph of a function from the left for $x.  Creating a second graph multiplied by $\sqrt \frac{\left | x-b \right |}{x-b}$ gives a graph of your function from the right for $b.  The following images show the polynomial’s graph developing in a few stages.  You can access the Desmos file here.

First graph the end behavior (pull the a and b sliders in a bit to see just the ends of the graph) and plot points at the x-intercepts.

From here, you could graph left-to-right or right-to-left.  I’ll come in from the right to show the new right side controller. The root at $x=1$ is linear, so decreasing the b slider to just below 1 shows this.

Continuing from the right, the next root is a bounce at $x=0$, as shown by decreasing the b slider below 0.  Notice that this forces a relative minimum for some $0.

Just because it’s possible, I’ll now show the cubic intercept at $x=2$ by increasing the a slider above 2.

All that remains is to connect the two sides of the graph, creating one more relative minimum in $-2.

The same level of presentation control can be had for any function’s graph.

Part II: Vertical Control

I hadn’t thought to extend this any further until my colleague asked if a graph could be controlled up and down instead of left and right.  My guess is that the idea hadn’t occurred to me because I typically think about controlling a function through its domain.  Even so, a couple minor adjustments accomplished it.  Click here to see a vertical control of the graph of $y=x^3$ from above and below.

Enjoy.

## Controlling graphs and a free online calculator

When graphing functions with multiple local features, I often find myself wanting to explain a portion of the graph’s behavior independent of the rest of the graph.  When I started teaching a couple decades ago, the processor on my TI-81 was slow enough that I could actually watch the pixels light up sequentially.  I could see HOW the graph was formed.  Today, processors obviously are much faster.  I love the problem-solving power that has given my students and me, but I’ve sometimes missed being able to see function graphs as they develop.

Below, I describe the origins of the graph control idea, how the control works, and then provide examples of polynomials with multiple roots, rational functions with multiple intercepts and/or vertical asymptotes, polar functions, parametric collision modeling, and graphing derivatives of given curves.

BACKGROUND:  A colleague and I were planning a rational function unit after school last week wanting to be able to create graphs in pieces so that we could discuss the effect of each local feature.  In the past, we “rigged” calculator images by graphing the functions parametrically and controlling the input values of t.  Clunky and static, but it gave us useful still shots.  Nice enough, but we really wanted something dynamic.  Because we had the use of sliders on our TI-nSpire software, on Geogebra, and on the Desmos calculator, the solution we sought was closer than we suspected.

REALIZATION & WHY IT WORKS: Last week, we discovered that we could use $g(x)=\sqrt \frac{\left | x \right |}{x}$ to create what we wanted.  The argument of the root is 1 for $x<0$, making $g(x)=1$.  For $x>0$, the root’s argument is -1, making $g(x)=i$, a non-real number.  Our insight was that multiplying any function $y=f(x)$ by an appropriate version of g wouldn’t change the output of f if the input to g is positive, but would make the product ungraphable due to complex values if the input to g is negative.

If I make a slider for parameter a, then $g_2(x)=\sqrt \frac{\left | a-x \right |}{a-x}$ will have output 1 for all $x.  That means for any function $y=f(x)$ with real outputs only, $y=f(x)\cdot g_2(x)$ will have real outputs (and a real graph) for $x only.  Aha!  Using a slider and $g_2$ would allow me to control the appearance of my graph from left to right.

NOTE:  While it’s still developing, I’ve become a big fan of the free online Desmos calculator after a recent presentation at the Global Math Department (join our 45-60 minute online meetings every Tuesday at 9PM ET!).  I use Desmos for all of the following graphs in this post, but obviously any graphing software with slider capabilities would do.

EXAMPLE 1:  Graph $y=(x+2)^3x^2(x-1)$, a 6th degree polynomial whose end behavior is up for $\pm \infty$, “wiggles” through the x-axis at -2, then bounces off the origin, and finally passes through the x-axis at 1.

Click here to access the Desmos graph that created the image above.  You can then manipulate the slider to watch the graph wiggle through, then bounce off, and finally pass through the x-axis.

EXAMPLE 2:  Graph $y=\frac{(x+1)^2}{(x+2)(x-1)^2}$, a 6th degree polynomial whose end behavior is up for $\pm \infty$, “wiggles” through the x-axis at -2, then bounces off the origin, and finally passes through the x-axis at 1.

Click here to access the Desmos graph above and control the creation of the rational function’s graph using a slider.

EXAMPLE 3:  I believe students understand polar graphing better when they see curves like the  limacon $r=2+3cos(\theta )$ moving between its maximum and minimum circles.  Controlling the slider also allows users to see the values of $\theta$ at which the limacon crosses the pole. Here is the Desmos graph for the graph below.

EXAMPLE 4:  Object A leaves (2,3) and travels south at 0.29 units/second.  Object B leaves (-2,1) traveling east at 0.45 units/second.  The intersection of their paths is (2,1), but which object arrives there first?  Here is the live version.

OK, I know this is an overly simplistic example, but you’ll get the idea of how the controlling slider works on a parametrically-defined function.  The $latex \sqrt{\frac{\left | a-x \right |}{a-x}}$ term only needs to be on one of parametric equations.  Another benefit of the slider approach is the ease with which users can identify the value of t (or time) when each particle reaches the point of intersection or their axes intercepts.  Obviously those values could be algebraically determined in this problem, but that isn’t always true, and this graphical-numeric approach always gives an alternative to algebraic techniques when investigating parametric functions.

ASIDE 1–Notice the ease of the Desmos notation for parametric graphs.  Enter [r,s] where r is the x-component of the parametric function and s is the y-component.  To graph a point, leave r and s as constants.  Easy.

EXAMPLE 5:  When teaching calculus, I always ask my students to sketch graphs of the derivatives of functions given in graphical forms.  I always create these graphs one part at a time.  As an example, this graph shows $y=x^3+2x^2$ and allows you to get its derivative gradually using a slider.

ASIDE 2–It is also very easy to enter derivatives of functions in the Desmos calculator.  Type “d/dx” before the function name or definition, and the derivative is accomplished.  Desmos is not a CAS, so I’m sure the software is computing derivatives numerically.  No matter.  Derivatives are easy to define and use here.

I’m hoping you find this technology tip as useful as I do.

## Air Sketch app follow-up

I mentioned in my Air Sketch review last week that one of its biggest drawbacks, IMO, was that I could not use multiple blank pages when running the app.

PROBLEM SOLVED:  I created a 10-page blank document in MS Word by inserting 9 page breaks and nothing more, and printed that doc to a pdf file in Dropbox.  From my Dropbox app on my iPad, I open the 10-page blank pdf into Air Sketch.  Voila!  I now have a 10-page scrollable blank document on which I can take all the notes I need!  As a pdf, Air Sketch and compress any inking into a new pdf and save it wherever I need.  Obviously, I could create a longer blank pdf with more pages if needed, but I couldn’t see any classes going beyond 10 pages.

I still don’t get some of the hot linke or multiple image tools of SMART Notebook (see below), but this work-around clears a major usage hurdle for me.

OK, one problem solved, but a few more are realized:

• It would be very cool if I could copy-paste images within Air Sketch–something akin to cloning on a SMART Board.
• Also, while I can import images, it seems that I can operate on only one at a time.  Inserting a 2nd erases the writing and insert of a previous image.  It can be undone, but I still get just 1 image at a time.  Worse, inserting an image takes me out of editing my 10-page blank pdf, so I can’t layer images on top of my pdf files in the current Air Sketch version.

These issues aside, Air Sketch remains a phenomenal piece of software and MY STUDENTS LOVE IT!  I hope the Air Sketch editors take note of these for future editions.

Aside:  Another teacher at my school independently discovered one of my suggestions in my first review of Air Sketch–that you can run one piece of software (as a math teacher, I often run CAS, nSpire, or statistical packages) through the projector while my students keep the written notes on their laptops/iPads/smart phones via the local Web page to which Air Sketch is publishing.  Having two simultaneous technology packages running without flipping screens has been huge for us.

I’ve rarely been so jazzed by a piece of software that I felt compelled to write a review of it.  There’s plenty of folks doing that, so I figured there was no need for me to wander into that competitive field.  Then I encountered the iPad Air Sketch app (versions: free and \$9.99 paid) last Monday and have been actively using in all of my classes since.

Here’s my synopsis of the benefits of Air Sketch after using it for one week:

–Rather than simply projecting my computer onto a single screen in the room, I had every student in my room tap into the local web page created by Air Sketch.  Projection was no longer just my machine showing on the wall; it was on every student machine in the room.  Working with some colleagues, we got the screen projections on iPhones, iPads, and computers.  I haven’t projected onto Windows machines, but can’t think of a reason in the world why that wouldn’t happen.

–In my last class Friday, I also figured out that I could project some math software using my computer while maintaining Air Sketch notes on my kids’ computers.  No more screen flipping or shrunken windows when I need to flip between my note-taking projection software and other software!

–When a student had a cool idea, I handed my iPad to her, and her work projected live onto every machine in the room.  About half of my students in some classes have now had an opportunity to drive class live.

–This is really cool:  One of my students was out of country this past week on an athletic trip, so he Skyped into class.  Air Sketch’s Web page is local, so he couldn’t see the notes directly, but his buddy got around that by sharing his computer screen within Skype.  The result:  my student half way around the globe got real-time audio and visual of my class.

–This works only in the paid version:  We reviewed a quiz much the way you would in Smart Notebook—opened a pdf in Air Sketch and marked it live—but with the advantage of me being able to zoom in as needed without altering the student views.

–Finally, because the kids can take screen shots whenever they want, they grabbed portions of the Air Sketch notes only when they needed them.  My students are using laptops with easily defined screen shot capture areas, but iPad users could easily use Skitch to edit down images.

–Admittedly, other apps give smoother writing, but none of them (that I know) project.   Air Sketch is absolutely good enough if you don’t rush.

By the way, the paid version is so much better than the free, allowing multiple colors, ability to erase and undo, saving work, and ability to ink pdfs.

Big down side:  When  you import a multi-page pdf, you can scroll multiple pages, but when creating notes, I’m restricted to a single page.  I give my students a 10-15 second warning when I’m about to clear a screen so that any who want cant take a screen shot.  It would be annoying to have to save multiple pages during a class and find a way to fuse all those pdfs into one document before posting.  The ad on the Air Sketch site was (TO ME) a bit misleading when it showed multiple pages being scrolled.  As far as I can tell, that happened on a pdf.  Perhaps it’s my bad, but I assumed that could happen when I was inking regular notes.  Give me this, and I’ll drop Smart Notebook forever.  Admittedly, SN has some features that Air Sketch doesn’t but I’m willing to work around those.

Overall, this is a GREAT app, and my students were raving about it last week.  I’ll certainly be using it all of my future presentations.

## Exponential Derivatives and Statistics

This post gives a different way I developed years ago to determine the form of the derivative of exponential functions, $y=b^x$.  At the end, I provide a copy of the document I use for this activity in my calculus classes just in case that’s helpful.  But before showing that, I walk you through my set-up and solution of the problem of finding exponential derivatives.

Background:

I use this lesson after my students have explored the definition of the derivative and have computed the algebraic derivatives of polynomial and power functions. They also have access to TI-nSpire CAS calculators.

The definition of the derivative is pretty simple for polynomials, but unfortunately, the definition of the derivative is not so simple to resolve for exponential functions.  I do not pretend to teach an analysis class, so I see my task as providing strong evidence–but not necessarily a watertight mathematical proof–for each derivative rule.  This post definitely is not a proof, but its results have been pretty compelling for my students over the years.

Sketching Derivatives of Exponentials:

At this point, my students also have experience sketching graphs of derivatives from given graphs of functions.  They know there are two basic graphical forms of exponential functions, and conclude that there must be two forms of their derivatives as suggested below.

When they sketch their first derivative of an exponential growth function, many begin to suspect that an exponential growth function might just be its own derivative.  Likewise, the derivative of an exponential decay function might be the opposite of the parent function.  The lack of scales on the graphs obviously keep these from being definitive conclusions, but the hypotheses are great first ideas.  We clearly need to firm things up quite a bit.

Numerically Computing Exponential Derivatives:

Starting with $y=10^x$, the students used their CASs to find numerical derivatives at 5 different x-values.  The x-values really don’t matter, and neither does the fact that there are five of them.  The calculators quickly compute the slopes at the selected x-values.

Each point on $f(x)=10^x$ has a unique tangent line and therefore a unique derivative.  From their sketches above, my students are soundly convinced that all ordered pairs $\left( x,f'(x) \right)$ form an exponential function.  They’re just not sure precisely which one. To get more specific, graph the points and compute an exponential regression.

So, the derivatives of $f(x)=10^x$ are modeled by $f'(x)\approx 2.3026\cdot 10^x$.  Notice that the base of the derivative function is the same as its parent exponential, but the coefficient is different.  So the common student hypothesis is partially correct.

Now, repeat the process for several other exponential functions and be sure to include at least 1 or 2 exponential decay curves.  I’ll show images from two more below, but ultimately will include data from all exponential curves mentioned in my Scribd document at the end of the post.

The following shows that $g(x)=5^x$ has derivative $g'(x)\approx 1.6094\cdot 5^x$.  Notice that the base again remains the same with a different coefficient.

OK, the derivative of $h(x)=\left( \frac{1}{2} \right)^x$ causes a bit of a hiccup.  Why should I make this too easy?  <grin>

As all of its $h'(x)$ values are negative, the semi-log regression at the core of an exponential regression is impossible.  But, I also teach my students regularly that If you don’t like the way a problem appears, CHANGE IT!  Reflecting these data over the x-axis creates a standard exponential decay which can be regressed.

From this, they can conclude that  $h'(x)\approx -0.69315\cdot \left( \frac{1}{2} \right)^x$.

So, every derivative of an exponential function appears to be another exponential function whose base is the same as its parent function with a unique coefficient.  Obviously, the value of the coefficient depends on the base of the corresponding parent function.  Therefore, each derivative’s coefficient is a function of the base of its parent function.  The next two shots show the values of all of the coefficients and a plot of the (base,coefficient) ordered pairs.

OK, if you recognize the patterns of your families of functions, that data pattern ought to look familiar–a logarithmic function.  Applying a logarithmic regression gives

For $y=a+b\cdot ln(x)$, $a\approx -0.0000067\approx 0$ and $b=1$, giving $coefficient(base) \approx ln(base)$.

Therefore, $\frac{d}{dx} \left( b^x \right) = ln(b)\cdot b^x$.

Again, this is not a formal mathematical proof, but the problem-solving approach typically keeps my students engaged until the end, and asking my students to  discover the derivative rule for exponential functions typically results in very few future errors when computing exponential derivatives.

Feedback on the approach is welcome.

Classroom Handout:

Here’s a link to a Scribd document written for my students who use TI-nSpire CASs.  There are a few additional questions at the end.  Hopefully this post and the document make it easy enough for you to adapt this to the technology needs of your classroom.  Enjoy.