Daily Download 19: Solving polynomials

Today’s download provides analytic solutions to polynomial equations up to fourth order (that is quadratic, cubic and quartic equations) and an iterative method to solve equations of higher order.  All these functions are found in the download file:
http://interactiveds.com.au/software/Polynomial.zip

The links below describe these functions in more detail.  Several of the earlier links refer to other download files, but all of the functions are now included in the Polynomial.xlsb spreadsheet.

Solving cubic and quartic equations with Excel
Evaluating Polynomial Functions
Complex Numbers and Solving Quartic Polynomial Equations
Solving higher order polynomials
Evaluating higher order polynomials …
Polynomial Update

EvalPoly Function

Quadratic, Cubic, CubicC and Quartic functions

RPolyJT function used to solve a 60th order polynomial

Bottom of the input and output for the same function

Posted in Excel, Maths, Newton, UDFs, VBA | Tagged , , , , , , , , | 1 Comment

Daily Download 18: Simultaneous Equations and Matrix Arithmetic Functions

Today’s downloads collect several spreadsheets related to solution of simultaneous equations and matrix arithmetic, some of which were presented previously as part of the ALGLIB library (Daily Download 13).

Solving simultaneous equations described how to solve simultaneous equations using the Excel MInverse and MMult functions, and provided two VBA functions for solution of simultaneous equations.

In Solving simultaneous equations – Fortran dll the VBA function was converted to a compiled Fortran dll, offering much better performance, but see Distributing Silverfrost Fortran Applications for details of installation of the necessary run-time library, and note that this function may not work on Windows 7 systems*.
Download file: http://interactiveds.com.au/software/Simultaneous.zip

* Edit 8th Oct 2012 – “Windows Vista” changed to “Windows 7”; see also comment from cjberg at https://newtonexcelbach.wordpress.com/2008/12/01/linking-excel-to-fortran/#comment-4622

ALGLIB VBA matrix arithmetic functions were described in Installing AlgLib with Excel VBA, and c++ compiled versions in Compiled AlgLib Matrix Functions for Excel.  The functionality was further improved with a C# compiled version of the latest version of the library, including support for sparse matrices; see Compiled Matrix Functions for Excel.
Download files: http://interactiveds.com.au/software/AL-Matrix-xlsb.zip
http://interactiveds.com.au/software/AL-Matrix-xls.zip
http://interactiveds.com.au/software/AL-Matrixdll2.zip
http://www.interactiveds.com.au/software/Matrixdll-c%23.zip (latest version)
See also http://interactiveds.com.au/software/AL-Spline-Matrix03.zip and
http://interactiveds.com.au/software/AL-Spline-Matrix07.zip which also include the VBA matrix functions.

Solution of linear equations with compiled ALGLIB function

Posted in AlgLib, Excel, Link to dll, Maths, Newton, UDFs, VBA | Tagged , , , , , , , | Leave a comment

Daily Download 17: Numerical Integration

Some simple numerical integration functions (using the trapezoidal rule and Simpson’s Rule) were included in the Eval2 spreadsheet, presented on Daily Download Day 15, but for purposes were better accuracy and/or higher speed are required more sophisticated methods will do a much better job.

The spreadsheet Eval-Integration.xlsb combines the Eval function with a variety of high performance integration functions, including functions from the ALGLIB library, and the Tanh_Sinh function written by Graeme Dennes (of which more below).
Download file: http://www.interactiveds.com.au/software/Eval-Integration.xlsb

The development of the integration routines started with Gaussian Quadrature, followed by Eval.xls and the ALGLIB integration functions.  Graeme Dennes’ Tanh-Sinh functions made their first appearance in Faster Integration with the Tanh-Sinh Method, and these have had several updates with a variety of functions for special cases, and extensive documentation.  Post on this method include:
Tanh-Sinh Quadrature update
Tanh-Sinh Quadrature Update 2
Tanh-Sinh Quadrature V2.0
Tanh-Sinh Quadrature V2.1
Tanh-Sinh Quadrature V3.0
and the latest version: Tanh-Sinh Quadrature V4.0

Download file: http://interactiveds.com.au/software/Tanh-Sinh and DE Quadrature by Graeme Dennes.zip

Tanh_Sinh Integration Function, with associated graph

Posted in AlgLib, Excel, Maths, Newton, Numerical integration, UDFs, VBA | Tagged , , , , , , , | Leave a comment

Daily Download 16: Intersections, interpolations, and rotations

There is only one download file today:
http://interactiveds.com.au/software/IP2.ZIP

, but it contains a wealth of different functions dealing with 2D and 3D geometry, including intersections of lines, circles and spheres, simple interpolation functions, and functions for rotating points in 2D and 3D.

The original spreadsheet is described at: Intersections, interpolations, and rotations with updates at IP.xls updated and Another update to IP.xls.

Version 2 included: Finding Circle Centres in 3D , with later updates including:

Intersection points of two polylines

Perpendicular distance from points to a polyline

ArcCen Function

PView: Perspective projection of 3D Lines, showing IPPlanePlane output

Output of PView function

Posted in Coordinate Geometry, Drawing, Excel, Maths, Newton, UDFs, VBA | Tagged , , , , , , , | Leave a comment

Daily Download 15: Evaluation of formulas in text

VBA has an Evaluate function that returns the numerical value of any text string representing a mathematical formula, but this is not directly available from the spreadsheet.  Today’s download is a User Defined Function (UDF) to provide this functionality, together with examples of its application.

The original function was described in Evaluate Function and   Evaluate Function – update, together with an example using the function to perform numerical integration.
Download file: http://www.interactiveds.com.au/software/Eval.zip

A later version was published in More on the Excel Evaluate function, together with details of how to use the built-in Evaluate function with named ranges, without using VBA.  See below for the download files.

Finally this year the function was modified to deal with values using a comma as a decimal separator in Return of Excel – Evaluating commas 
Download files:  http://interactiveds.com.au/software/Eval2.xlshttp://interactiveds.com.au/software/Eval-Integration.xlsb

There is also a “unit aware” version of the Eval function, but this will be described in a few days when looking at unit conversion functions.

EvalInt Function

Eval function examples

Posted in Excel, Maths, Newton, Numerical integration, UDFs, VBA | Tagged , , , , , | 1 Comment