What's New in Calculus & Algebra?

Devendra Kapitiya walks through Wolfram Language 14's calculus and algebra updates: control systems now integrated into DSolveValue, new numerical integration functions for complex analysis, a TruncateSum tool for infinite series, and NSolve upgraded to find multiple roots using monodromy. New matrix types and finite-field support also ship.
Chapters
Hello everyone, my name is Devendra Kapitiya and I'm the manager of Calculus and Algebra at Wolfram. It is great pleasure to welcome you to this talk on what's new in calculus and algebra. Now version 14 of the Wolfram language is very close to release, so this talk will mostly Talk about version 14 features. But I'll also talk a little bit about other projects the team has been doing during the last year since we last met. And it should be clear to you that this work is a product of the hard efforts of a large number of people throughout the company and also announce a few talks which will happen which are related to my own talk. So let me now give you an outline of this talk itself. So I'm going to begin with calculus and this time we have taken a bit of a kind of challenge and and try to integrate control systems into the calculus functionality. So I'll talk about that. I'll talk about numerical vector and contour integrals, a continuation of the story in version 13.3, a new function called truncate sum. And then I'll go on to a kind of a big algorithmic breakthrough in equation solving where we can solve very large system of equation. I say what very large means when I come to it. Another big project that's been going on version 13.3 is finite fields, which has now come to maturity in version 14.0. And it's now a beautiful complete body of knowledge, both on the pure math side and the applied side. So I'll talk a little about that. Linear algebra, we have new structured matrices and we have support for interval computational matrices. Those are two, both really excellent improvements. I'll talk about those. We have one new special function, bilateral hypogenic PFQ, but that itself is completing a very large, almost 25, 30 year old program. So I'll talk about that a little bit. And then for us as a team, documentation is always a big thing. So I'll talk about some interactions with another website in the company, Math World, which is close to our own reference website, and we'll see about some interaction between those two. And finally, as a team, we kind of work very close to education, so I'll talk about online course initiatives which have been perhaps one of the really big things that happened this year. So with that plan understood, let's now talk with the first feature which is support for control systems and calculus. But you tell me I don't know what a control system is. I'm not an engineer. Well, I like to say that control systems are all around us. And we use them daily, more or less, at least if you're in this country. So for example, the cruise control on your car is a control system. It's got the word control in it. The heater, the air conditioner, all kind of things are control systems. And we use them all the time. So at the simplest level, what you have is you have a system that like a black box, could be a motor, could be something you don't touch that it's just, it just works. There's some kind of power coming in me like an input. There's some output, maybe some mechanical energy that's, you know, flowing out. And then there is a controller which regulates input based on the output to make sure that things are nice and stable. But we can in fact ignore this and make the input time dependent. And then everything is even simpler. So in version 14, we will have support for such a system inside DSOL value. Now, you've used dsolve value and dsolve for equations. Those will be working forever. Don't worry, we're not trying to touch any of that. But now in the new release, you'll be able to say you have an input function which is feeding a system and you want to find the output, the response of system, and you can do that. Dsolve value. So U is the time dependent input. The system could either be a state space model, describe the state of system, or slightly more technical, but a lot more insightful, a transfer function model which is like what we'd call Laplace space view, which is much more interesting from many points of view. And the response itself could be something which is an impulse response. You know, you quickly strike something and then do it, don't do it ever again. That's an impulse response, like a direct delta or some more general output response, etc. So this is kind of a rain a big experiment we are trying out. I hope you like it. So as an example, let's talk about a transfer function model over here. So you see the S over here is a Laplace variable. That's a transfer function model. What you do over here is you look at the poles of the system of the rational function and you see over here that the denominator square plus five has got two roots and they are both slightly to the left of the x axis, Y axis, sorry, and they are both placed symmetric about the x axis. So these are the two roots. And if you know your Laplace transform really well, then that tells you that the system is going to have A combination of oscillatory behavior and exponentially decaying behavior. Okay. And so if you ask DSOL value in the new release to take this transfer function model, which is never done before, and find the impulse response response to direct delta, it gives you back this combination of exponential decay and oscillatory behavior that comes from the negative 1/2 over here and the square root of 19 comes from there. So it's exactly mirroring the behavior in Laplace space. And you can also work out the output for a, let's say sinusoid input. And you get back this answer here, which is not absolutely clear because the input could be pretty much arbitrary. So what you do is you ask yourself question, how do I check this? Well, luckily we have a new function called unilateralconvolve in version 14 which will let you do it. So, idea is you take the input, you take the impulse response, which just found out over here, and you convolve them like, you know, mixing dough to make cookies. Okay? And lo and behold, the answer which you get is exactly the output response for that input. So convolution along with the impulse response is all you need in some sense to understand system. So your results, that's the blue line, blue curve is the impulse response which mirrors system. Exactly. The orange line is output response. That depends upon the input. But pretty much the impulse response tell you the whole story. And of course not all systems are continuous. They could be discrete as well. So you've got support and rsol value and recurrence table for those discrete time systems. Now of course, the point is this is a large area. It should be clear to you that calculus and control systems is a big thing for us. And so we have a nice talk today by Aram Manacelian. It's a wonderful talk. I strongly recommend you to attend it and learn the whole area. Okay, so onto vector contour integrals, which are continuation as said of the 13.3 story. So in version 13.3 we had line integrate surface, integrate contraintegrate. Now you got and N attached over the numerical versions of those you see over here. And why would you need those? Well, as an example, let's look at this classical figure called a Dupin cyclade. So classical surface started with Dupin, who was a student of Moshe. And in fact these cyclades have been studied by a lot of famous people. Arthur Cayley and John Clark Maxwell, etc. So James Clark Maxwell. So this is a very, very well known surface. There's a beautiful Plot, which you also saw on my cover slide. And now what you can do is you can ask the question, what is the volume of this Dupin cyclade? Now, the point, you probably just want a numerical approximation. You don't want the exact answer. So you say, okay, choose a vector field whose divergence is one. And you can see over here, that's 1 over 3 plus 1 over 3 plus 13 gives you one for divergence. And then you can apply the Gauss theorem to use N surface integrate to give you a numerical approximation for the volume of the cyclide. But now found out as a numerical surface integral. And of course you can, being a numerical function, you can work with high precision. You can call all kinds of different methods and check your answer at higher precision. So my point is that even in the few months that we have shipped version 13.3, it's clear to me that, that we need alternatives to symbolic competition in this area, because our users would like both numerics and symbolics to work hand in hand. So my point over here is that we have a beautiful system now of both symbolic and numerical integration for these areas. And very soon we start working on a course and a book for complex analysis based on this new functionality. Okay, now I come to a kind of utility function called truncate sum. And the question is, why is my team doing. We typically don't do language development. Well, what happened was that a long time ago, we start supporting PDs and dsolve around version 10.3. And then the question was, how do you return infinite Fourier series? So we started returning inactive or unevaluated sums. These are full sums, but you can't really evaluate them. And we also started doing same thing for asymptotic some time ago. So the question was, how do we tackle these? Well, early on we have some kind of trickery like, you know, slash dot, infinity goes to 40, something like that, which I loved, some of the people did not. So we had to have a new function do that. So truncate sum is a new function, which makes it easy to work with such results. In version 14, it's a very nicely designed function. You can say truncate sum. You can drop in a sum over here and it'll give you an approximation in this case to five terms. So you can truncate your series and work with it. So, for example, here is the series for the sine function, the full series. And of course you want a few terms. So you say truncate sum of the series up to eight Terms and you get back the first eight terms, terms of the series. Or you can say I want to have different approximations and plot them. And you can have different truncate sums over here and work out all the approximations, plot them. That's a typical picture which you might see in a differential equations textbook. So all this together is calculus. And now I move on to a big breakthrough for us, which is in the area of numerical equation solving or technically numerical algebraic geometry. So we have two functions. We've got solve, which finds symbolic solutions of equations, algebraic equations, and N solve numerical solutions. But both of them are kind of all or nothing. Either you can find all solutions after waiting a long time or you can't find them. Well, things are changing now. So in version 14 we are using a concept called monodromy to improve things for N solve. And the idea is really quite simple. It goes back to in fact, Bernard Riemann. Okay, so let's say you want to solve the equation Z cube equal to one, okay? The cube roots of unity. Of course you know one of them, one cube is one, but there are two more. So you introduce a parameter P, okay, And think of P as being a young man and Z as being an old man. So because Z cube is P, so when P runs around a circle, complete run, the Z moves only one third of the way. Okay? So the point is that if you start from one root of the unity, then you can go to the next cube root by going around one circle. So P can keep going around and, and finding more and more roots. And of course you can vary the contour, et cetera, the loop, and you can find lots more solutions. So how many more you can find many, many roots of large systems. And when I say many, I mean thousands, millions, whatever you like. But the point is you would rather not find them all. Who would want 1 billion solutions of systems equations? Well, we have an option called max roots which can be used to specify how many routes you want for your system. So here for example is a system with 1 trillion roots. Okay, that's X to 10,000, Y to 10,000, Z 10,000. Now just in case you don't believe me, you can take a give a few billion year and there doesn't matter very much. Okay, so your system with one equations, you can't wait for it to finish. Okay, so you say I want the first five roots, let's say, and very quickly you can see over here, you get back those five roots for the system. So together with the max root options, N solve is Now a really powerful solver for large systems of equations. Now the question is why this work come out where it came out from? Engineering robotics actually. And in fact it's the work done by one of our student ambassadors, arvind bhaskar. His PhD work at the University of Notre Dame and he'd be giving a very nice talk today. So I suggest they learn to attend the talk to understand his point of view. So N solve is now much more powerful. And another project that's kind of coming to maturity in version 14 is finite fields. So what are finite fields? Well, roughly speaking, they generalize clock arithmetic. So you can work, let's say modulo 12 on your clock. You can work modular prime field or whatever you like, but finite field go a bit beyond that and you can work with prime power. So you could work with let's say, three square or five cube or whatever. Okay, now in version 13.3 you could define a finite field with by saying finite field 17 comma 3 instead of 17 cube. But now thanks to Steven Woodrum, we actually support for this more intuitive notation where system figures out that this so called characteristic p is 17 and the external extension degree is 3, the n is 3 over here. So once you've done that, the next question is how do you generate elements of this finite field? Well, if you take an integer, Then in version 14 you can use to finite field to generate an element of the field. So that's another cumbersome procedure which has been made much, much simpler in this release. Or you might say, I want to find a point on a Fermat curve. Now we all know Fermat's last theorem. I'm sure as students if you did mathematics at some point you told yourself, I'm going to solve that theorem. And of course it was too difficult, so we didn't do it. But it has been proved now that if you have the equation x raised to n plus y, n equals 0 to n for n greater than 3 or 2 actually in this case. So then you don't have any solutions over the integers, but over a finite field you have no problem at all. And people like Lang and V and all that have actually worked quite hard to work out a theory of these equations over finite field. So you have solving the equation x raised to 50 plus y is 50 equals e is 50 over the finite field and you get back the answer. Okay, so the point is that this field is important because there are lots of applications of this area in cryptography, etc and to hear the complete story of That I recommended to go to an excellent talk. I've seen the talk by Adam Strasbonski right after this one, which is about finite fields and their applications. So I think that finite fields is a wonderful area for researchers etc to look at our functionality. Okay, moving on to linear algebra. So we have had the structured matrix program for a long time, like three release. And now we've got four new structured matrix, symmetric matrix, very important in practice. Statistical hermitian matrices, their complex cousins, orthogonal matrices which come at rotation, etc. And unitary matrices which are the complex cousins. So these four matrices can now be used all over system by using target structures. So you have an orthogonal matrix, it can show up in lots of places. You using target structure, for example. So as an example, your symmetric matrix, well, I give only the lower half and I tell symmetric matrix, find the whole matrix. It does that for you. You can check the matrix, you see, it's got a symmetric structure here. You can ask the matrix what are you good for? And it'll tell you what all its algorithms are. So there are lots of them. Symmetric matrix of course are very important in lots of applications. So it's all highly optimized. So here is a symmetric matrix of large order dimensions and the pseudo inverse compute quite easily over here. Or you can represent an orthogonal matrix, in this case the rotation matrix, using target structure orthogonal to get back a rotation matrix. And if you actually do a normal or a matrix form in this case, then you get back the structure which you normally see in practice that's a z axis rotation. And of course you can do the same thing for things like QR decomposition, etc. They will all work in just the same way. Okay, so another area we've been putting quite a lot of effort in is interval computation. So we have done that for special functions and this time we, we do it for matrices. So we have support for 12 functions which can now do matrix computation with intervals. Which means that you can have uncertain matrices in your input, like over here with intervals. And you get back the eigenvalues or whatever quite nicely with the corresponding errors. And you can see the actual eigenvalues just by the procedure of being a normal in this case. But the point over here is that we now have support for some kind of uncertainty in linear algebra, which might be very important for many people. And what we'd like to do is to extend this support to other areas as well. So I think that that's a big breakthrough to have interval computation in linear algebra. Okay, so that is almost Everything, but not quite. I must now talk about the very last theme on the algorithmic side, and that is the bilateral hypogemetric function. So we have had the hypogemetric function forever. It's got factorial, etc. Then we had the appel function 13.3, they are bivariate two variables. And now in version 14 we have the bilateral hyperisymmetric function, which is actually bilateral, just means that the series goes from minus infinity to plus infinity. So this bilateral function, bilateral hyperlink PFQ is a series, but of course you can evaluate by various tricks like analytic extension, et cetera, and Borell summation in the more general case. And when I saw it first, I said, wow, this is a nice way to, to evaluate doubly infinite sums. So as a developer sum, I built a new algorithm. And this example, for example, took 45 seconds, believe it or not, in version 13.3, now it takes 0.17 seconds. And the other two examples are also done in terms of hypergeometric PFQ. But now in the bilateral case, so you get back the bilateral PFQ simplified, in this case complete simplified, in this case a bit simplified, and in this case unsimplified. But we have now a new primitive which lets us do all the workforce on the symbolic summation side. So there'll be a very nice talk on the linear algebra, the matrix computation by Itay Sekiv, the big talk by me and Jan Mangeldan on structural race, and. And there'll be a talk on special functions With Focus on PFQs by Tigranes Khanyan today. That's a wonderful talk. All those three should be worth attending. Okay, so now talk about documentation. So we have two big pieces of documentation in the Wolfram language, really. We have our own reference pages which are kind of very, very well maintained. And we have Math World, a very popular website. Question was, can we make them interact a bit better? They do interact quite a lot, by the way, but can we make them even better in their interaction? So we have had a project in which we surveyed the coverage of these functions on Math World, and we've added on 150 new links to reference pages in version 14.0. So, for example, here is the Jacobi SN page in the Wolfram language, the reference function page, and it now links to Math World to the Jacobi Elliptic functions page. And of course we plan to make further improvements in the near future. So documentation has seen a major improvement in terms of this interaction, Math World, and lots of Other things in version 14. And finally I go on to online courses. Well, it's been a good year for us. We have had five interactive, I would say, math courses. In 2023 we had probability statistics, a beautiful multiple calculus course, a discrete math course, and finally a course on finite mathematics is coming up right now. So finite mathematics, by the way, is mathematics for business life and social sciences. So it worries me a lot when I look at what people say. The faculty seem to love finite mathematics. The students, not so much. This course was in fact designed at Dartmouth Business School a long time ago by Kemeny, who's the co discoverer of Basic Language. And it worries me that this subject is probably, probably somewhat unpopular with our students because it needs to be maybe taught better, a bit more with something like the Wolfram language. So we have a wonderful course coming up on finite mathematics. In fact, the study group first will begin next week and I strongly encourage you to attend it. Okay, so one last thing is that we have a course, Electric Circuits, which is being planned for spring 2024. We have the material ready for a long time and we now want to put it out to the public. So I do hope that you will participate in that study group for finite Mathematics and look forward to the electric circuits course. So with that, I am ready to conclude my talk. But it's been a great year. I'm thrilled with what the team achieved. We've had lots of support from Wolfram, you from video team, Deque, etc. We cannot get this kind of stuff done without our own excellent qa, for example. And I thank them all. But most of all, I thank you all for coming here today to listen to this talk. And if there are questions, I'll be happy to answer them. But I strongly encourage you to attend all the talks today. By Aram Manacelian on calculus control systems, by Adam Szabolsky on finite fields, by Itay Seguev on matrix computation by me and Yann Mangeldon, Linear algebra and Tigranish Khanya on special functions. So with those words, I'll close my talk over here. Thank you very much. It was a great pleasure to talk with you. If there are any questions, I'll wait for a few minutes. Other we'll move on to the next talk and listen to Adam Srzmonsky. Thank you very much. Okay. Question from Daniel about to solve large system equations. Okay. Huh? Yes. So Daniel says he's trying to use find root. Okay. I wonder the new ansol can manage. Yes, certainly do try it. If it doesn't work, let us know. We'll make it work. In fact, the whole system. The new system does exactly what you've been doing by hand. It starts with one seed root from find root and then use Monodrome to go back and forth. So for sure that's exactly a pass rate. If you can do it by default version 14, great. If not, write to us. We'll be thrilled to help you. Daniel, thank you very much. It's great to know that we'll solve your problem. Hopefully. Any other questions? Yes, we've done a lot of testing on N Solve with all the standard benchmarks. We are convinced this is a big breakthrough. But it's a tricky area because numeric. So who knows what's right and what's wrong, honestly. Okay, any other questions? Comments? I should say that the documentation for these functions really excellent in the in version 14. We've been very careful. So do look at it to learn what's really been done. These are all big pieces of functionality and we have done our best to update the reference page, for example NSolve page, to make it as nice as possible. And do look at the courses. Do let people know that the courses exist. It really does help us quite a lot. Okay, I'll stop over here and thank you very much everyone.
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






