What’s New in Calculus & Algebra

Adam Strzebonski and Devendra Kapadia, 
Wolfram Research, Inc.

Plan for the Talk

Improvements for optimization and solutions of equations/inequalities.

Enhanced derivatives, limits, and integral/summation transforms.

Benchmarking, Documentation, and Online Courses

Optimization

Variable replacement method for optimization of transcendental functions

Minimize[Sin[x (y+1)]+(y^2),{x,y}]

MaxValue[(E^(x+y)) Cos[2 x-y],{x,y}]

Univariate trig functions with commensurable function arguments

Minimize[Sin[(x^2)]+Cos[3 (x^2)],x]

MaxValue[Sin[(E^x)-x]+Cos[2 (E^x)-2 x+1],x]

g[(Subscript[f, 1]),...,(Subscript[f, n])] with (Subscript[f, 1]),...,(Subscript[f, n])  periodic with incommensurable periods (Subscript[p, 1]),...,(Subscript[p, n])

Requires 1/(Subscript[p, 1]),...,1/(Subscript[p, n])  to be linearly independent over the rationals.

MinValue[((Sin[x]+Cos[Cos[π x]])/(Cos[(π^2) x]+2)),x]

MaxValue[Sin[Sin[(Sqrt[2]) x]]+2 Cos[3 x]-Erf[2+Cos[2 (Sqrt[2]) x]],x]

g[(Subscript[f, 1]),...,(Subscript[f, n])] with (Subscript[f, 1]),...,(Subscript[f, n])  periodic with incommensurable periods (Subscript[p, 1]),...,(Subscript[p, n]) over the integers

Requires 1,1/(Subscript[p, 1]),...,1/(Subscript[p, n])  to be linearly independent over the rationals.

MaxValue[Sin[x],x,Integers]

Show[{ListPlot[Table[Sin[x],{x,0,10000}]],Graphics[{Red,Line[{{0,1},{10000,1}}]}]}]

MinValue[((Sin[π x]+Cos[Cos[E π x]])/(Cos[(Sqrt[3]) π x]+2)),x,Integers]

Show[{ListPlot[Table[((Sin[π x]+Cos[Cos[E π x]])/(Cos[(Sqrt[3]) π x]+2)),{x,0,10000}]],Graphics[{Red,Line[{{0,((Cos[1])/3)},{10000,((Cos[1])/3)}}]}]}]

MaxValue[Sin[(((Sqrt[2]) x)/3)]  Cos[3 x](E^(2+Sin[(Sqrt[2]) x])),x,Integers]

Show[{ListPlot[Table[Sin[(((Sqrt[2]) x)/3)]  Cos[3 x](E^(2+Sin[(Sqrt[2]) x])),{x,0,10000}]],Graphics[{Red,Line[{{0,(E^3)},{10000,(E^3)}}]}]}]

Univariate (tame elementary) functions over the integers

Minimize[(x^3) (E^x)+(E^(E^x)),x,Integers]

Maximize[{ArcTan[(x^2)-1]+((Log[x])/x),x>0},x,Integers]

Minimize[Sin[(1/(1+(x^2)))]+3 x (E^(-(x^2)))+(x^2),x,Integers]

Maximize/Minimize of Max/Min

This did not work in V11.1, because piecewise expansion of Min creates unsolvable inequalities.

Minimize[{Min[x y, Sin[x+y]],x^2+y^2≤1},{x,y}]

This takes 25 seconds in V11.1.

Maximize[{Max[x^3+y^3,x^7+y^7,3x y,x^5+y^2,y^5+x^2],x^2+y^2≤1},{x,y}]//Timing

Equation Solving

Topological operations on solution sets of real algebraic systems

Find cylindrical algebraic decompositions of the solution region and its boundary.

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y}]

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y},"Boundary"]

Find cylindrical algebraic decompositions of the solution region and its closure.

CylindricalDecomposition[(x^4)>(x^2)+(y^2),{x,y}]

CylindricalDecomposition[(x^4)>(x^2)+(y^2),{x,y},"Closure"]

Find cylindrical algebraic decompositions of the solution region and its interior.

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y}]

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y},"Interior"]

Find cylindrical algebraic decompositions of the solution region and its exterior.

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y}]

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y},"Exterior"]

Find cylindrical algebraic decompositions of the solution region and its connected components.

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y}]

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y},"Components"]

Diophantine equations with non-rational coefficients

For algebraic number coefficients the method provides a complete reduction to systems of equations with rational coefficients.

Reduce[GoldenRatio (x^2)-(Sqrt[5]) (y^2)-z==(Sqrt[5])&&x>0&&y>0,{x,y,z},Integers]

Reduce[(x^2) (π+(Sqrt[2]))+(Sqrt[6]) x y z+π (y^2)+(π^2) (Sqrt[3]) (z^2) (t^2)-3 (Sqrt[3]) z t x-(Sqrt[3]) (z^3)+63 (Sqrt[3])==(Sqrt[2 (109+12 (Sqrt[3]))])+5 π+144 (Sqrt[3]) (π^2),{x,y,z,t},Integers]

Derivatives

Nth Derivatives

Compute the (n^th) derivative of Sin[x]:

D[Sin[x], {x, n}]

Table[%, {n, 0, 3}]

Compute  the billionth derivative:

D[Sin[x], {x, 10^9}]//Timing

Product rule for (n^th) derivatives:

productrule = D[f[x]g[x], {x, n}]

Activate[productrule/. {n->1}]

Chain rule for (n^th) derivatives:

chainrule = D[g[f[x]], {x, n}]

Activate[chainrule/. {n->1}]

Visualize the oscillations of higher derivatives for a Gaussian function:

nder = D[E^(-(x^2/2)), {x, n}]

Table[Plot[nder,{x,-3,3},Ticks->None,ImageSize->200,PlotStyle->Red],{n,{0,10,30,70}}]

Holonomic Derivatives

BesselJ and other special functions are holonomic sequences:

DifferenceRootReduce[BesselJ[n,x],n]

Using this fact, higher derivatives of BesselJ, etc. now return compact answers:

D[BesselJ[2, x], {x, 10}]

Indexed Differentiation

Compute the derivative of a sum with respect to an indexed variable:

Clear[f,x]

D[Sum[f[x[i]], {i, 1, n}], x[j]]

Find the derivative of an Inactive sum:

D[Inactive[Sum][f[x[i]], {i, 0, 10^5}], x[2]]

Activate[%]

Find the derivative of an Inactive sum:

D[Inactive[Table][x[i]^2, {i, 3}], x[2]]

Activate[%]

Limits

Function Limits

Evaluate a non-trivial exp-log limit:

Limit[((12 (E^(E^((16/(x^8))+(20/(x^(5/7)))+21 (x^(6/11))+((432 (x^(49/45)))/17)))))/(9 ((Log[Log[-Log[(4/(3 (x^(5/14))))]]])^(7/6)))), x -> Infinity]

Compute the max and min limits for a function:

s[x_]:=Sin[(1/x)]

Plot[s[x], {x, -1.2, 1.2},PlotStyle->Red]

The function oscillates between -1 and 1:

MaxLimit[s[x], x -> 0]

MinLimit[s[x], x -> 0]

Multivariate Limits

Define a function of two variables.

f[x_,y_]:=((x y)/((x^2)+(y^2)))

Plot the function.

Plot3D[f[x,y],{x,-4,4},{y,-4,4}]

The limiting  value at the origin depends upon the direction in which we approach it.

f[x,y]/.{y->m x}//Simplify

Table[%,{m,{-1,1/2,1/3,2}}]

Hence, the multivariate limit does not exist at {0,0}.

(Underscript[\[Limit], {x,y}->{0,0}])f[x,y]

We have tested the new multivariate functionality using several Vector Calculus textbooks.

Discrete Limits

Compute the limit of a densely aperiodic sequence:

p[n_]:=(E^(((Sin[2 n])^2)/(2+Sin[n])))

DiscretePlot[p[n],{n,1,550,5}]

The limit does not exist:

DiscreteLimit[p[n], n -> Infinity]

The max limit is obtained using the real maximum:

DiscreteMaxLimit[p[n], n -> Infinity]

N[%]

The min limit is 1:

DiscreteMinLimit[p[n], n -> Infinity]

The new limit functionality has been tested on a large benchmark of W|A examples.

Summation and Integral Transforms

PeriodicTransforms

Laplace transform for  the product of a periodic function with an exponential function :

Plot[Sin[(1/10) Floor[t] 2 π],{t,0,30}]

LaplaceTransform[Sin[(1/10) Floor[t] 2 π] Exp[-t],t,s]

LogLogPlot[Evaluate[Abs[%/. s->I ω]],{ω,(1/10),(10^2)},Exclusions->None]

Compute a multivariate z-transform:

ZTransform[Mod[m+n,3],{m,n},{z,w}]

Hankel Transforms

The Hankel transform of a function f[r] is defined by (∫_0^∞)r f(r) (BesselJ[ν, r s])dr.

For example,

HankelTransform[(E^(-r)),r,s,0]

A radially symmetric 2D Fourier transform is equivalent to a Hankel transform. For example:

f[x_,y_]:=(E^(-(Sqrt[(x^2)+(y^2)])))

Plot3D[f[x,y],{x,-3,3},{y,-3,3},PlotRange->All,Mesh->False]

Compute the Fourier transform of f:

Timing[FourierTransform[f[x,y],{x,y},{p,q}]]

Plot3D[%[[2]],{p,-3,3},{q,-3,3},PlotRange->All,Mesh->False]

The corresponding Hankel transform is:

HankelTransform[(E^(-r)),r,s]/. {s->(Sqrt[(p^2)+(q^2)])}

Radon Transforms

The Radon transform of a function f(x,y) is defined to be (∫_(-∞)^∞)f(p cos(ϕ)-s sin(ϕ),p sin(ϕ)+s cos(ϕ))ds.

Compute the Radon transform of a polynomial-exponential function:

rad=RadonTransform[((x^2)+5 (y^2)) (E^(-(x^2)-(y^2))),{x,y},{p,ϕ}]

InverseRadonTransform[%,{p,ϕ},{x,y}]

Plot the function along with the transform:

{DensityPlot[((x^2)+5 (y^2)) (E^(-(x^2)-(y^2))),{x,-2,2},{y,-2,2},Frame->None,Ticks->None,PlotLabel->"Function"],DensityPlot[rad,{ϕ,-(π/2),(π/2)},{p,-3,3},Frame->None,Ticks->None,PlotLabel->"Transform"]}

Education

Benchmark for College Calculus

We have created a benchmark of examples for a typical college calculus course.

The benchmark is based on the popular textbook by James Stewart.

Around 5300 examples were accumulated through the benchmarking process.

Here are the table of contents and a sample notebook.

Reference Page Documentation

The reference pages for D and Limit have received a thorough update.

Work on updated reference pages for Integrate, Sum, and SumConvergence  is in progress.

Another major project is to add Scope examples to all pages for special functions.100 of these are already done.

Wolfram U Calculus

A draft for an Introduction to Calculus course was prepared during the Summer of 2017.

This includes 40 lessons, 10 problem sessions, 10 short quizzes, and a sample AP Calculus AB exam.

Here is the complete schedule for the course, and the first lesson.

We hope to offer this online course on Wolfram U soon.

Conclusion

Recent releases have featured many improvements in core areas of Calculus and Algebra .

Our current focus is on developing new Asymptotic solvers for equations, integrals, etc.