JuliaCon 2025

Applying Taylor mode AD in nonlinear equations, ODEs and more
2025-07-23 , Main Room 2

Solving problems like nonlinear equations and differential equations can often benefit from higher-order derivative info. Using TaylorDiff.jl, we could efficiently compute higher-order derivatives in Taylor mode, thereby developing solvers with higher accuracy while maintaining a relatively low cost. We demonstrate a scalable nonlinear solver with third-order convergence and cost comparable to Newton's method, as well as ongoing work of high accuracy implicit Taylor solver for ODEs.


Taylor mode automatic differentiation (AD) presents a powerful tool for advancing numerical methods in scientific computation. This talk introduces novel applications of TaylorDiff.jl, a Julia package for Taylor-mode AD, in solving nonlinear equations and ordinary differential equations (ODEs) with higher efficiency, stability and scalability. TaylorDiff.jl is developed with symbolic-numeric techniques to automatically transform first-order AD rules to higher-order AD rules, which makes higher-order AD efficient and easy to maintain.

Nonlinear Solvers

Using TaylorDiff.jl, we developed implementations of Householder’s method and, specifically, its cubic-convergence variant, Halley’s method, for solving large-scale nonlinear equations. Traditional solvers like Newton’s method rely solely on first-order derivatives to achieve quadratic convergence, while Halley's method uses second-order directional derivatives to achieve cubic convergence, thereby reduces number of iterations to convergence. By leveraging Taylor-mode AD, we efficiently compute these derivatives, avoiding the computational bottleneck of full Hessian evaluations.

These solvers are evaluated on problems ranging from simple univariate functions to complex, large-scale nonlinear systems. Notably, Halley’s method demonstrates performance improvements over Newton’s method in both dense and sparse Jacobian settings. For instance, solving large ill-conditioned systems nonlinear systems arising from PDE discretizations shows that the higher convergence order reduces overall computational time while maintaining accuracy. In addition, we also see a performance improvement in using Halley's method to nonlinear equation solving steps within implicit ODE solvers.

Differential Equations

Since local solutions of ODEs can be obtained by expanding the equation as Taylor series of time, TaylorDiff.jl could also be applied in developing efficient solvers for ODEs, particularly stiff systems where implicit solvers are needed. We are currently extending the use of TaylorDiff.jl to develop efficient and stable implicit ODE solvers with advanced features like adaptive order, adaptive step and solution extrapolation.