##
This **preview** shows page *1*
out of 2 **pages**.

*View Full Document*

End of preview. Want to read all 2 pages?

Upload your study docs or become a GradeBuddy member to access this document.

View Full Document**Unformatted text preview:**

Math 1A: introduction to functions and calculus Oliver Knill, 2011Lecture 36: Artificial intelligenceToday, we study the intriguing question in AI:What does it take to build an artificial calculus teacher?Machines assist us already in many domains: heavy work is done by machines and robots,accounting by computers and fighting by drones. Lawyers and doctors are assisted by artificialintelligence. There is no reason why teaching is different. The web has become a ”gigantic brain”to which virtually any question can be asked or googled: ”Dr Know” in Spielberg ’s movie ”AI”is humbled: enter symptoms for an illness and get a diagnosis, enter a legal question and findprevious cases. Enter a calculus problem and get an answer. Building an artificial calculusteacher involves calculus itself: such a bot must connect dots on various levels: understandquestions, read and grade papers and exams, write good and original exam questions, know aboutlearning and pedagogy. Ideally, it should also have ”ideas” like to ”make a lecture on artificialintelligence”. But first of all, our AI friend needs to know calculus and be able to generate andsolve calculus problems.1Generating calculus problemsHaving been involved in a linear algebra book project once, helping to generating solutions toproblems, I know that some calculus books are written with help of computer algebra systems.They generate problems and solutions. This applies mostly t o drill problems. In order to generateproblems, we first must build random functions. Our AI engine ”sofia” knew how to generaterandom problems with solutions. Random functions are involved when asked ”give me an exampleof a function”. This is easy: the system would generate functions of reasonable complexity:Call the 10 functions {sin, cos, log, exp, tan, sqt, pow, inv, sca, tra } basic functions.Here sqt(x) =√x and inv(x) = 1/xkfor a random integer k between −1 and −3, pow(x) = xkfora random integer k between 2 and 5. sca(x) = kx is a scalar multiplication for a random nonzerointeger k between −3 and 3 and tra(x) = x+k translates for a random integer k between −4 and 4.Second, we use addition, subtraction multiplication, division and composition to build more com-plicated functions:A basic operation is an operation from the list {f ◦ g, f + g, f ∗ g, f/g, f − g }.The operation xyis not included because it is equivalent to exp(x log(y)) = exp ◦(x ·log). We cannow build functions of various complexities:1In the academic year of 2003/2004, thanks to a grant from the Harvard Provost, I could work with under-graduates Johnny Carlsson, Andrew Chi and Mark Lezama on a ”c alculus chat bot”. We spent a couple ofhours per week to enter mathematics and general knowledge, build interfaces to various computer algebra systemslike Pari, Mathematica, Macs yma and build a web interface. We fed our knowledge to already known chat botsand newly built ones and even ha d various bots chat with each other. We conceptionally explored the question ofautomated learning of the bots from the conversations as well as to add context to the c onversation, s inc e botsneeds to remember previous topics mentioned to understand some questions. We learned how immense the task is.In the mean time it has become business. Companies like Wolfram research have teams of mathematicians andcomputer scientists working on content for the ”Wolfram alpha” engine. Having recently seen a group at work herein Cambridge on Mas s Av, I guess they generate probably in one day as much content as our Sofia g roup could doin a week for our ”pet project”.12A random function of complexity n is obtained by taking n random basic functionsf1, . . . , fn, and n random basic operato rs ⊕1, . . . , ⊕nand forming fn⊕nfn−1⊕n−1··· ⊕2f1⊕1f0where f0(x) = x and where we start forming the function from theright.1 Visitor: ”Give me an easy function”: Sofia looks for a function of complexity one: likex tan(x), or x + log(x), or −3x2, o r x/(x − 3).2 Visitor: ”Give me a function”: Sofia returns a random function of complexity two:x sin(x) − tan(x), or −e√x+√x or x sin(x)/ log(x) or tan(x)/x4.3 Visitor: ”Give me a difficult function”: Sofia builds a random function of complexity fourlike x4e−cos(x)cos(x)+tan(x), or x−√x−ex+log(x)+cos(x), or (1+x)(x cot(x)−log(x))/x2,or (−x + sin(x + 3) − 3) csc(x)Now, we can build a random calculus problem. To give you an idea, here are some templates forintegration problems:A random integration problem of complexity n is a sentence from the sentencelist { ”Integrate f(x) = F (x)”, ”Find the anti derivative of F (x)”, ”What is theintegral of f (x) = F (x)?”, ”You know the derivative of a function is f′(x) = F (x).Find f(x).” }, where F is a random function of complexity n.4 Visitor ”Give me a differentiation problem”. Sofia: Diff erentiate f(x) = x sin(x) −1x2.The answer is2x3+ sin(x) + x cos(x).5 Visitor: ”Give me a difficult integration problem”. Sofia: F ind f if f′(x) =1x+3 sin2(x) + sin(sin(x))cos(x). The answer is log(x) + sin3(x) − cos(sin(x)).6 Visitor: ”Give me an easy extremization problem”. Sofia: Find the extrema of f(x) =x/ log(x). The answer is x = e.7 Visitor: Give me an extremization problem”. Sofia: Find the maxima and minima off(x) = x − x4+ log(x). The extrema are−q9 +√31532/3− 83√6 +vuut83√6 −9 +√31532/3 1 + 6r29+√3153−83q6(9+√3153)!225/63√36p9 +√3153.The last example shows the perils of random generation. Even so the function had decent com-plexity, the solution was difficult. Solutions can even be transcendental. This is not a big deal:just generate a new problem. By the way, all the above problems and solutions have been gen-erated by Sofia. The dirty secret of calculus books is that there are maybe a t housand differenttype of questions which are usually asked. This is a reason why textbooks have become boringclones of each other and companies like ”Aleks”, ”demidec” etc exist which constantly mine theweb and course sites like this and homework databases like ”webwork” which contain thousandsof pre-compiled problems in which randomness is already built in.Automated problem generation is the ”fast food” of teaching and usually not healthy.But like ” fast food” has evolved, we can expect more and more computer assistingin calculus teaching.Be assured that for this

View Full Document