Using Resource Functions for K-College Math

Jeremy Stratton Smith and the Wolfram Alpha math team built 150 resource functions to turn classroom tasks into simple code. They created tape diagrams and sign charts for K-12, a CurveFitReport that shows residuals and fit metrics for data, and an ODE Viewer for exploring differential equations dynamically.
Chapters
My name is Jeremy Stratton Smith. I'm the lead developer for the Wolfram Alpha math content team and I will only be speaking for hopefully about five minutes. We have a number of developers from the math team here who are going to be talking about our resource functions that we've been developing for the sort of K through college math content. Okay, so we have a lot of content here and we've been developing these not just over the past year, but over really the past two and a half, three years. So we're not going to be able to cover everything. And this is really just sort of a surface level. These are the areas of content that we have resource functions for. And I encourage you to find the notebook that you're going to be seeing here today on pathable and to play around with the functions yourselves. OK, so as of this week, the WolframAlpha math team has now published 150 resource functions in a broad range of categories, all falling under the big umbrella of math. Right. So there's, there's this data set here. I encourage you to again download this and to look at that and see the whole range of what we've, we've developed. The original idea and reason we wanted to develop these resource functions was because in WolframAlpha Notebook Edition we want to provide translations in a concise and readable form from natural language into Wolfram language. And for many, many things, system functions, kernel functions do a great job of doing this, but for some more complicated things, such as finding the local minima of an expression in the, and giving results in a way that a, you know, high school or intro college level student would expect, we want to be able to sort of manipulate that ourselves or something like factoring. These are obviously things that you can do in the Wolfram language, but we have a particular form that we want to be using. For example, here we want to have the inactive factored integer as opposed to the slightly more involved result that you get from the Wolfram language factor function. So this was our, this was our original idea, but we've really expanded the idea and a number of developers on our team have taken things that have been built into Wolfram Alpha for a long time, or even new algorithms that just sort of fall into the broad category of mathematics. There's everything that you're going to see today from sort of low, lower level elementary math up through, you know, advanced, advanced things. So with that we're going to be talking about sort of the three broad categories of functions that we have fall into functions that are doing a more specific task than something that might be in the kernel does. We have a category called super functions which are really providing, you know, there is a task, but there's a whole bunch of different information that you might get out of performing this task or that's related to the task. And we've wrapped those into one function. And then we've also been able to build up interactivity and really making use of the full Wolfram Mathematica front end to build interactive and dynamic tools. Ok, so with that I'm going to hand things over to our first developer, Ann Marie, who can introduce herself.
Hello, my name is Annemarie and I'm a developer on the math content team. So, as Jeremy mentioned, we have these resource functions that cover a really wide range of topics at a wide range of levels, starting all the way at K kindergarten, in K through college. So some of the things that we can offer and build in the Wolfram language are visualizations of math topics, useful tool in teaching. And so here are a few examples of those. We have a function called do we want this tape diagram which will produce a common tool in K through 12, K through 5, mostly math that helps visualize fractions and at higher levels can help visualize operations with fractions. And also similar example is a pie chart which another tool we can use to visualize fractions and especially mixed numbers or fractions greater than one. Other visualizations that you can continue using throughout secondary math include a tool like a sign chart. So we have a sign chart resource function, again something that you can build in the Wolfram language that's now distilled into a single function called to. This resource function sign chart is really commonly used in calculus classes for function analysis to figure out where a certain function is positive or negative. And with calculus classes in mind, we have a more specific resource function that takes a function and shows you not only its sign chart, but the sign charts of its derivatives. So that's usually the context in when signed charts are used. So we have built that together. Moving right along after your high school career, you might get into some number theory. So we have various number theory related functions. For example closest prime, the closest prime to 4645 and lots of different resource functions. Again, all of these things are things that you can already do in WolframAlpha via these resource functions. You can do them right in your notebook. You can ask them in a wolframapha notebook edition query. And it's all sort of distilled, easy for educators and Students, that's the hope. And you can take it wherever you want to go, whether it's in the traditional sort of American math sequence or something like numeral representations. Also already available on the Wolfraff website, we can get representations of Mayan numerals, Babylonian numerals, and we've built up so far several different types of numeral systems that have graphic results. And it's sort of been a fun project just pushing the boundaries of what we could do with the Wolfram language and share in resource functions. So I'll pass it over to Nick, who'll talk about some of the work he's done in statistics.
Thank you. So kind of a group effort in the math team and beyond, I'm sure, is in the ongoing efforts to distill into the function repository things that take something like Mayan or Babylonian representations of numbers, stuff that would be fairly inaccessible, and then to make it accessible via these functions in the function repository or in the system. One exercise that's depending on which field of science you're in, you encounter in various degrees, either high school or college, or even graduate school for some more applied distance, biochemistry, et cetera. Students will do regression or curve fitting at some point in physics lab classes, is very common in biology lab courses. And even in grad school, students are learning to do this and can spend a couple hours hour long courses on how to do this in Excel, et cetera, from the first definition of the residuals all the way through to how to visualize the thing, get R squared, et cetera, and infer goodness of fit. We've made that incredibly simple in the Wolfram function repository, wherein say a high school or advanced middle school student even could call this with essentially a couple lines of code here, wherein in one line here, which I won't reevaluate these things we haven't pre evaluated, but you can generate some linear data that students might collect from a kinematics exercise with constant velocity. So you're aiming to fit a line and you can do that in one line of code with pretty much just plain English. Here you say curve fit report of your linear data, you define your variable and you tell it the functional form and you get out this representation of not only the fit itself, where you can visualize the residuals on the bottom right in a separate plot, but also a variety of other information, the adjusted r squared, the AIC, the BIC, the unadjusted r squared, etc. For inference of good of quality of fit. This essentially did in about one minute here with a preliminary description, what you could otherwise spend a couple hours implementing in Excel on your own, moving along. If we instead want to look at this from the perspective of kinematics, still in a physics lab, but we want to do it under constant acceleration instead of constant velocity, with some initial velocity, you can generate some quadratic data with a little bit of error to it and expand this cell here. And with the same exact ease of use, you have curve fit report, quadratic data, your variable that you want to fit it to a quadratic, and you get the quadratic fit out here of your kinematic motion under constant acceleration. The exact same provisions in terms of quality of fit, in terms of visualization of the report, the fit itself, the residuals, et cetera, are all available to students upon the click of a button there. And then finally, if you're in, say, a biology course or biochemistry course instead of a physics kinematics course, and you collected, say, relative surface area growth from the cross section of an agar plate, right, that would go from, say, one up to some larger value exponentially. You can, with the same ease of use, fit your exponential data that you've, that you've gathered to an exponential function and get the parameters out here, where I happen to know, was generated using a coefficient in the exponent of 1.25. Here you can see you reproduce that fairly well. And so in both physics lab courses, in biology courses, and anything else students want to explore, they don't necessarily have to know how to do much more than about one or two lines of code in order to implement these things because of the function repositories provisions here. The interface that you're seeing here is an example of these super functions that we've put together so as to aggregate a bunch of supplementary information along with the primary content that you're consuming there. And Jordan's going to go into a section on what the structure of these super functions are on a broader variety of super functions we have.
So today I'm going to be talking about our super functions here that Nick was mentioning. So we've been developing a wide variety of functions that return association of information. So, for instance, in a calculus classroom, you're going to want to know how to plot a tangent line and information about a tangent line. And so we've developed this technology here to allow the student to be able to see various representations of a tangent line. So, for instance, you can write a tangent line in slope intercept form. You also have the point slope form, and you also have standard forms and Depending upon what sort of activity you're looking at, you're going to want a different form of that equation. So the point being of developing these super functions is that you'll have ease of access to to the various properties of a function. So we also return the slope and the vertical intercept and the horizontal intercepts here. And you'll notice we also return this plot here. I want to point out you have different ways of accessing this information here. So if you just want a particular property you can specify with a string here that you just want to plot, and we'll return that information as well. So here we can see, and let me also point out here that the point slope form might be the easiest to see where the tangent line is going to have that point of tangency at. So here you can read directly off from this, that is at 2, comma 3 in a point slope equation form. And so we can use this to provide our tangent line here. And then we also have the ability to interact with manipulates as well. So in a calculus course, it might help to be able to see what happens as you vary a parameter. So we can just adjust the slider here and look at how the tangent line is adjusted as we adjust the slider here so you can see.
Where.
There'S horizontal tangents and so on and so forth here we can also represent this as a data set. So we can take that association. This provides this data set formatting here. So we get this nice formatting here as a data set. We can quickly read off the various equational forms here. And then we also have again, we have that plot. So during the summer of 2022, we had an intern that was working on.
Hello, everyone. As an intern here at Wolfram, I created several different types of resource functions. They had a lot of variety, but they mostly focus on visualizations. So my first one, rose curve properties, I took the rose curve polar curve, which looks like this here, more of like a. The shape of a rose and rose curve properties takes in the inputs for the type of curve and outputs everything you'd want to know about every single detail possible. Many of these were created from scratch and many of them are just visual. I took these visualizations and allowed you to select subplots, Subpedals, such as this one here, and it would give you the area, the surface area of what you have selected in Polar Curve Identifier. It does as it says, you input a polar curve and it will output its name, the inputs for the type of curve, and outputs everything you'd want to know about it, every single detail possible. Many of these were created from scratch and many of them are just visualizations of it. For rose curve analysis. I took these visualizations and allowed you to select subplots, subpetals such as this one here. And it would give you the area, the surface area of what you have selected. In Polar Curve Identifier. It does as it says. You input a polar curve and it will output its name. And this covers all of these different types. I think around 45 different types of polar curves. For color winding here you can input a type of polygon or a shape, for instance, and it will take the domain coloring, which is this nice hue that we see here, which is defined by the type of function that you input here. So here I just have the identity function. I've input a triangle or two different triangles and it will color appropriately and it'll give me a winding number such as this one here, which is the number of times it wraps the hue around in from red all the way back to red again around the hue wheel once. And it gives you such as the hue plot, the polygon plot, and the domain coloring, which is, if you didn't have the polygon, just what the entire plane would look like. For cosh curve points here it takes any set of points in 2D or 3D and assigns a cosh curve to it. You can change the orientation of it, the angle which it has. I added a nice input selection for regular polygons. So here I have a table of the different regular polygons and the number of steps of the cosh curve that has been applied. And you can also use this to have some of these name curves turn into cosh curve types of themselves. And then the last one I worked on, parameterize polygon, which was used in color winding, takes any inputs of points in 2D, 3D or beyond, and turns it into a piecewise function that parameterizes it linearly between each point. So you can see an example here. In 3D, you can parameterize the cube as I've done here. And you can even take shapes like this, this spiral, and you can apply a function to us that looks like a spiral from the top, but in actuality is this weird 3D shape with the function being applied to it. And here you can see an even more better example of this where I superimposed the parameterization on top of the actual plane of the 3D graph. And you can use this for analysis of a function along a specific curve.
Thank you, Jordan. So as You've seen we've covered a whole range of sort of traditional Wolfram language input output functionalities. And with our last few minutes here, I'm just going to wrap up talking about the interactive components that we've built in through the resource functions, through the function repository. So at this point, some of you may be familiar. We have a very flexible merger of plot and manipulate. That's one of sort of the most popular functions or pairs of functionalities in the math world to be able to interact dynamically with a plot so that you can have some parameters and you can see what impact those parameters have on a particular function in a visual manner. In this case, I'm going to jump through things here because I do recognize our time where we're coming along here, so I'm going to jump through these a little bit quickly. One of the original pieces that we built this up, sort of keeping in mind, was being able to along the lines of some of the functionalities that we've already seen for these super functions, we also sometimes want to be able to build in the interactivity directly into that. So, for example, here we're doing sort of a calculus analysis of whatever expression you pass in. And we're not only able to just find all these pieces, but we're also able to dynamically show where. Where, for example, one period of the sine curve is, and also show the derivative and inflection points if we want to do that on the same plot here. One of our recent employees who is unfortunately not able to be here, has also been working on a similar tool for working with odes. And I'm going to play the video here to show you all that.
Alpha Matti, I showed you the new Wolfram function repository function ODE Viewer. This function is useful to visualize the behavior of a system of differential equations in a dynamic way. And we can see here the basic usage issues needed to provide the system of differential equations with their corresponding values, the variables and an interval. It is possible to track the locator to see new solutions and the corresponding initial value is shown at the header and is updated dynamically with the selector. We can switch to a time series view and the plotrange can be adjusted with the interval. Sliders can be dragged in this way too, and it's possible to modify the. Interval, the original interval with values outside the original interval of the interval. Slider. Well, here is a system of differential equations. The type of node is shown at the top of the slope field, the kilogram points and the eigensystem them are shown at the bottom. In this example we can see the time series and in this case gridlines pop up menu is below the selector and gives different value for the number of grid lines. In this case there is not an interval. Here the Wolfram function repository function suggest plotrange is used to choose automatically a plot range an interesting plot range. And here is a nonlinear system also supported by OD Viewer. This is a system of three differential equations. The graphics can be rotated and the interactivities as usual for 3D graphics. This is an example of stiff system it just needed to provide a condition to stop integration using whenevent. And finally this is a system with multiple solutions. And to finish we can see here use a summary of the most important features of ODE Viewer Enjoy exploring the behavior of differential equations and thanks.
Awesome. So thank you to Enrique. Enrique joined us on Zoom today, so that has been one of his big projects that he's been working on. So in the last few moments here I'm just going to rush through. These are things that we've talked about at past tech conferences, but also built within the system for that we have and the packlet that we have been releasing our resource functions through. We have a number of additional interactive functionalities such as plot based quizzes which include automatic random question generation and automatic grading. I'm happy to talk about this more later and things which I will be talking about more tomorrow such as this geometric scene constructor which is tying into Wolfram Synthetic Geometry project. So like I said at the beginning, we have a lot of content here and I encourage you to come to any of the listed talks that you can see here. In particular, if you want to talk to us more about our functions or if you have questions or comments, please come to our office hour tomorrow at 3:30. All of us will be there and we would love to hear your feedback. So in the interest of time I think we can wrap up if there are any questions. I'm happy to take one or two now and yeah, thank you so much for joining. I see one question in the back, Noah. Yes. Okay, so the question is where is the documentation for these? And I will sort of throw this to the resource function folks, but when you use these as a resource function, the documentation lives online and if you, if you open this just as a symbol, this blob here does include a link to the documentation which is going to open that directly and here you get the whole documentation online. Okay, so all of these live within the function repository and are documented as such, so thank you.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






