Sunday, November 13, 2011

Child made me a wonderful Halloween costume this year: 



Those poor chickens had no idea who they were up against.  It was a hard-fought battle, four-on-one, but let's face it, the outcome was never really in question.  Besides, there's nothing dishonorable with a retreat in the face of superior numbers.

While strolling through downtown as part of the city's Halloween activities, I noticed this sign on one of the storefronts:


The "around back in alley" part would really seal the deal for me, if I were looking to sell my gold or silver.  You can tell just from that that you're dealing a an upstanding, reputable businessperson.




Friday, November 04, 2011

Function transformations

I wish I had a little cheat-sheet like this during my math classes:

Given vertical translation a (+ to shift up, - to shift down), vertical scaling b (larger to grow, smaller to shrink), horizontal translation c (+ to shift right, - to shift left), and horizontal scaling d (larger to grow, smaller to shrink), the function transformation would be:

(f((x-c)/d)+a)/b

You can pick and choose values.  If you don't have a or c, replace with 0.  If you don't have b or d, replace with 1.

Assume our function f was the sine function.  sin(x):



Say we wanted to shift the whole function to the right by +1, i.e. up the x-axis.  c=1 and our transformation would be sin(x - [+1]):



Note how the graph used to cross the x-axis at 0 (red), but now crosses it at 1 (green).

Say we now wanted to stretch it longer, i.e. horizontally scale it.  Maybe stretch it twice as long.   If we choose a horizontal scaling factor of  d=2, our new function would be sin((x-1)/2):


Now perhaps we want to shift it upwards, e.g. a=1.  Our new function is sin((x-1)/2)+1:

And finally, we want to stretch our function in the vertical axis, perhaps also by double, so b=2.  (sin((x-1)/2)+1)*2:

 Before, it ranged from a minimum y of 0 to a maximum y of 2, now the maximum y is 4.