FOR STEM STUDENTS, ENGINEERS & EDUCATORS

Numerical Math Solver Done Right

Crisp input ● Deterministic solver ● Detailed output

Always Free. Built on more than 30 years of numerical-software experience, encouraged by CACHE at AIChE.
Start instantly as guest. Register to save programs.
Expert Built
Developed by Polymath veterans
Numeric Core
Deterministic solvers inside
STEM Focus
Equations, ODEs, curve-fits, etc.
Data Rich
Detailed solution analysis reports
Enter your model in concise and familiar notation. Get instant detailed solutions. Focus on what matters.

Solver Examples

Explore these examples to see the PolymathPlus program syntax and the generated solution reports.

Sample


                  

Download Local Desktop Solver

Download a lightweight, portable application that runs on your computer. Start it from a terminal, then open your favorite web browser at http://127.0.0.1:20208/. Keep the engine running while using the interface.
Windows
Which version should I download?
Open Settings > System > About and check System type. Choose x64 for Intel/AMD, or ARM64 for ARM processors.
First-Time Setup:
Extract the .zip, open PowerShell in that folder, and run:
Unblock-File -Path .\polymathplus.exe
Launch the Program:
1. Start the engine via PowerShell:
.\polymathplus.exe
2. Open the UI in your browser:   http://127.0.0.1:20208/
macOS
Which version should I download?
Open the Apple menu > About This Mac. Choose ARM64 if it shows an Apple chip, or x64 if it shows an Intel processor.
First-Time Setup:
Extract the .zip, open Terminal in that folder, and run:
chmod +x ./polymathplus xattr -d com.apple.quarantine ./polymathplus
Launch the Program:
1. Start the engine via Terminal:
./polymathplus
2. Open the UI in your browser:   http://127.0.0.1:20208/
Linux
Which version should I download?
Run uname -m in a terminal. Choose x64 for x86_64 or ARM64 for aarch64.
First-Time Setup:
Extract the .tar.gz, open Terminal in that folder, and run:
chmod +x ./polymathplus
Launch the Program:
1. Start the engine via Terminal:
./polymathplus
2. Open the UI in your browser:   http://127.0.0.1:20208/

For more details, see the setup guide.

SHA-256 Checksum Verification

Frequently Asked Questions

For technical questions and enhancement requests, sign in and select Contact Us from your user menu. If you’re reporting a problem, include your operating system, browser, and the exact error message, if any. Do not send confidential models or data.

Common questions are answered below.

1 What is PolymathPlus?

PolymathPlus is a math‑solving platform designed for students, scientists, and engineers. It handles a wide range of numerical problems, including nonlinear equations, ordinary differential equations, and linear, polynomial, and nonlinear regression.

At its core, PolymathPlus is a deterministic computational engine that applies rigorously validated numerical algorithms to solve mathematical and engineering models. Its deterministic design ensures reproducible results—an essential foundation for verification, traceability, and design confidence. While modern AI tools can offer valuable support for exploration and insight, PolymathPlus is purpose‑built to deliver consistent, numerically reliable outcomes for technical problem‑solving.

2 Is PolymathPlus free?

Yes. PolymathPlus is free for individuals, educators, engineers, and organizations, and it will remain free. The online solver and portable local application require no subscription or software license fee.

You can start using the online solver as a guest without creating an account.

Organizations and educational sites are requested to complete a free site registration to support administration and deployment. Site registration is not a purchase and does not affect free software access.

3 Why register online?

Free user registration lets you:

  • Save and manage programs locally in your browser.
  • Reduce wait times between online calculations.
  • Manage your profile and solver preferences.

Saved programs are stored in this browser on this device. They are not automatically synchronized across browsers or devices.

4 Where can I run PolymathPlus?

PolymathPlus runs online in modern web browsers on desktops, tablets, and smartphones.

chrome logo   safari logo   opera logo   firefox logo   edge logo

For offline or local use, the free, portable desktop application runs on Windows, macOS, and Linux. No installation or administrator privileges are required. Simply download the package, extract it, and run the application.

The table below compares the two current options with the retired Windows MSI:

Edition Target Platforms Installation Execution Status
Online Solver
Windows macOS Linux Desktop or laptop Tablet Smartphone
None Runs in browser Active
Local Engine
Windows macOS Linux Desktop or laptop
Archive extract Runs locally (100% Offline) Active
Legacy MSI
Windows Desktop or laptop
MSI installer Windows Desktop App Retired
  • Active STD/PRO license holders may continue using the legacy MSI. We recommend switching to the faster, more capable Local Engine.
  • Programs saved in the Web Solver are always stored locally on the user's device.
5 Can I open the solver in its own app window?

Yes! Modern web browsers allow you to install any web-page as a standalone Progressive Web App (PWA) and pin it to your Taskbar, Start Menu, or macOS Dock:

  • chrome logo Chrome, edge logo Edge: Click the Install App icon in the address bar (or browser menu → Install PolymathPlus).
  • safari logo Safari (macOS): Select File → Add to Dock.

This launches the solver in its own dedicated desktop window with an official application icon.

When applying this to the online solver URL, you must be connected online at all times. When applying this to the local solver at http://127.0.0.1:20208/, you may use this even offline as long as the local engine has been started from the Terminal.

6 Where are my programs saved, and how do I back them up?

In the online web solver, saving programs requires free user registration.

Programs created in the web solver are saved locally in this browser on this device. Open, Save, Save As, Rename, and Delete all operate on the browser’s local program library. New programs are not saved to the PolymathPlus server.

Local programs do not automatically synchronize between different browsers or devices and may be lost if browser site data is cleared. Use File → Export Library to create a backup file, and File → Import Library to restore or transfer that library.

If you previously saved programs online (under the old storage system), export them from your Profile page and then import the exported file into the solver.

7 How can I disconnect or delete my account?

Accounts are automatically deleted after prolonged inactivity. To request earlier deletion, open 'My Profile' and click the 'Disable Account' button under 'Actions'. Your account will be permanently deleted after 7 days without signing in.

When an account is removed, all registration details and personal account information are permanently deleted. New programs are saved locally in your browser. Programs saved online under the previous storage system remain available for export from My Profile before your account is removed. If you want to keep your saved programs, export or back them up to a local file before the account is removed.

8 How can I use AI to help write PolymathPlus programs?

You can use an AI assistant ✨ such as ChatGPT, Gemini, Claude, Copilot, etc., to help convert a plain‑language engineering or math problem into PolymathPlus source code. This works especially well because PolymathPlus syntax is deliberately simple, making AI‑generated source much easier to review, validate, and work with than a full general‑purpose program such as Python or MATLAB.

For best results, first provide the context that teaches the AI the supported PolymathPlus program types, syntax rules, examples, and common repair steps. To copy the PolymathPlus AI context, use the button below.

Copy the PolymathPlus AI context

Once copied, paste that context into your AI assistant chat box, then describe the problem you want to solve in natural language. The AI should help you produce a valid PolymathPlus program.

ChatGPT Gemini Claude Copilot Python MATLAB PolymathPlus

This workflow combines the strengths of both tools: AI helps draft the source quickly, while PolymathPlus provides deterministic numerical solving for engineering-grade reliability, reproducibility, and precision.

9 What are the benefits of site registration for organizations?

Site registration is intended for administrators and IT contacts managing PolymathPlus for multiple users, such as students or staff. Individual users, including students, do not need to register a site.

Free site registration gives designated IT contacts access to the Site Admin page to manage site details and access deployment and provisioning instructions. Registered site administrators can also receive direct email support.

To register your organization for free, sign in and select Contact Us from your user menu. Send the following information:

  1. Organization or site name.
  2. Primary and backup IT contact email addresses.
  3. Organization email domains, such as asu.edu and student.asu.edu.
  4. Organization's postal address.

We will provide a site ID and access key. To sign in to Site Admin, use these with the site’s primary or backup IT contact email address. User accounts and Site Admin access are managed independently, with separate registration, sign-in, and credential recovery processes—even when they share the same email address.

PolymathPlus remains free to use whether or not your organization registers a site.

10 Can we propose or fund a new capability?

Yes. Organizations can propose and fund new capabilities for the benefit of the entire community. Funding can support an agreed development scope and schedule, subject to review and agreement with the PolymathPlus team. See Fund Development for the process and funding terms.

Equations Solver

Linear Equations Solver

Enter simultaneous linear equations just as you would normally write them, without rearranging them or providing initial guesses. All equations must be linear, with numeric coefficients.

Here's an example of three linear equations being solved simultaneously:

a + 2c = 50
b = −2 + c
a + 23c = 12 + b

Enter the equations directly, almost exactly as written above:

1
2
3
a + 2c = 50
b = -2 + c
a + 23c = 12 + b

Press Solve to generate a detailed solution report. For this example, the solution is a = 54, b = -4, and c = -2.

We can also add comments and use explicit multiplication signs. The following program solves the same equations and gives the same result:

1
2
3
4
# Three linear equations
a + 2*c = 50
b = -2 + c
a + 23*c = 12 + b
Syntax Notes:
• Use # for comments. Everything after it on the same line is ignored.
• Both 2c and 2*c are valid. Implicit multiplication lets you omit * between a number and a variable.
• Coefficients must be numeric. Integers, decimals, and scientific notation are supported—for example, 2310, 2310.0, and 2.31E3 all represent the same value.

Nonlinear Equations Solver

As with linear equations, enter nonlinear equations as you normally write them. This time, also provide an initial guess for each unknown. PolymathPlus uses these guesses to search for values that satisfy all the equations simultaneously.

In this example, we solve two nonlinear equations simultaneously to find 𝑥 and 𝑦:

2⁢x + x⁢y +290 = y2 x⁢ log⁡ (y/2) + x⁢y =105

We now enter the equations directly, with initial guesses of x(0) = 2 and y(0) = 10:

1
2
3
4
5
6
7
# Two nonlinear equations
2x + x*y + 290 = y^2
x*log(y/2) + x*y = 105

# Initial guesses for x and y
x(0) = 2
y(0) = 10
Syntax Notes:
• Use # for comments. Everything after it on the same line is ignored.
• Use x*y to multiply x by y or else xy is read as a single variable name.
• Implicit multiplication lets you write 2x instead of 2*x when unambiguous.

The solution is x = 5 and y = 20. The Solution Report includes the calculated values and equation residuals, showing how closely the equations are satisfied.

Variable Value f(x) Initial Guess
x 5 -2.8e-12 2
y 20 1.3e-12 10

Explicit helper variables can make equations shorter and easier to maintain. Here, x*y appears in both equations. We can define t = x*y once and use t in both places. Since t is calculated from x and y, it is not an additional unknown and needs no initial guess:

1
2
3
4
5
6
7
8
9
10
# Same equations using a helper variable
2x + t + 290 = y^2
x*log(y/2) + t = 105

# Explicit helper variable
t = x*y

# Initial guesses for x and y
x(0) = 2
y(0) = 10

The solver still searches only for x and y. The solution is unchanged, and the report also shows t = 100.

PolymathPlus also supports the classic root form. Rearrange each nonlinear equation so that its expression equals zero at the solution, as in 𝑓(𝑥)=0. The variable in parentheses identifies the unknown associated with that equation. Provide an initial guess for each unknown. Here is the same example in classic root form, keeping the helper variable:

1
2
3
4
5
6
7
8
# Same equations in classic root form
f(x) = 2x + t + 290 - y^2
f(y) = x*log(y/2) + t - 105

t = x*y

x(0) = 2
y(0) = 10

Both syntax forms describe the same problem and give the same solution. Use whichever you find easier to read.

For one nonlinear equation in one unknown, with any number of explicit helper variables, you can use min/max search bounds instead of an initial guess. Bounds can find multiple solutions within the range; an initial guess finds at most one per run.
See the User Manual for details.

Differential Equations

PolymathPlus is designed to solve initial value problems (IVPs) for systems of first-order ordinary differential equations (ODEs). Higher-order differential equations can be transformed into systems of first-order equations using standard mathematical techniques. Partial differential equations (PDEs) can also be approximated by systems of ODEs by discretizing the spatial variables using methods such as the method of lines.

Each differential equation must have the derivative of a dependent variable isolated on the left-hand side, with an expression involving the independent and dependent variables on the right-hand side.

Consider the following system of two first-order ordinary differential equations, where the dependent variables are x and y, and the independent variable is t:

{ x' = x + 4 t2 y' = y − x 5−y

With the following initial conditions and integration interval:

x0 = 1 , y0 = 4 , at t0 = 0 , with integration ending at tf = 1

The equations can be entered in PolymathPlus using the following syntax:

1
2
3
4
5
x' = x + 4*t^2
y' = sqrt(y) - x/(5-y)
x|1
y|4
t|0:1

You can also use either of the following two compatible syntax formats for the same problem:

1
2
3
4
5
6
d(x)/d(t) = x + 4*t^2
d(y)/d(t) = sqrt(y) - x/(5-y)
x(0) = 1
y(0) = 4
t(0) = 0
t(f) = 1
1
2
3
4
5
6
dx/dt = x + 4t^2
dy/dt = sqrt(y) - x/(5-y)
x(0) = 1
y(0) = 4
t(0) = 0
t(f) = 1

The Solution Report includes a table of variable values and a chart showing how they change over the integration interval.

  Initial Minimal Maximal Final Value
t 0 0 1 1
x 1 1 4.465 4.46453
y 4 3.736 4.22 3.73572
ode4_1a.svg

In addition to differential equations, PolymathPlus allows users to define explicit variables—algebraic expressions that depend on differential variables, the independent variable, and/or other explicit variables, provided no circular dependencies exist. These variables are computed directly from known values and can be used to simplify equations, define intermediate results, or support the overall structure of the model.

The example below illustrates a typical input format for solving a system of ordinary differential equations (ODEs) in PolymathPlus, including the use of explicit helper variables.

{ dXG dt = v dv dt = – cmv – kmXG m = 1 c = 0.2 k = m+0.05

Where the initial values of XG and v are 1, 0 respectively, and the boundary conditions of t are t0 = 0 and tf = 3.

The source code to solve this system of ordinary differential equations:

1
2
3
4
5
6
7
8
9
10
11
d(XG)/d(t) = v
d(v)/d(t) = -(c/m)*v - (k/m)*XG

m = 1
c = 0.2
k = m + 0.05

XG(0) = 1
v(0) = 0
t(0) = 0
t(f) = 3

When using implicit multipliers and shorter syntax, we can simplify the program to:

1
2
3
4
5
6
7
8
9
10
XG' = v
v' = -v(c/m) - XG(k/m)

m = 1
c = 0.2
k = m + 0.05

XG | 1
v | 0
t | 0 : 3

Curve Fitting

PolymathPlus supports curve fitting for linear, polynomial, multi-linear, and nonlinear regression. The report evaluates model variables, generates a regression chart and residual plots, and provides statistics on model accuracy.

When analyzing tabular data for curve fitting, choosing the correct regression model is essential for accurate forecasting and parameter estimation. The following examples use the same six-point dataset to demonstrate how PolymathPlus handles different regression commands, and how to use the solver's statistical output to determine the best model fit.

1. Linear Regression

When analyzing tabular data, the simplest approach is often a straight-line fit. By setting the polynomial order to 1, PolymathPlus performs a standard linear regression (y=a1x+a0).

The following example demonstrates how to use the polyfit command to perform a linear regression on the dataset enclosed by [ ]. The first row inside the dataset must be the variables names.

1
2
3
4
5
6
7
8
9
10
[
x    y
0.9  2.2
2.1  6.2
3    10.6
4    15.9
5.1  23.2
6.0  30.1
]
polyfit x y 1

The linear regression solution results are shown in the tables below:

y=a0+a1x

Variable Value 95% confidence
a0 -4.6405288 4.22502
a1 5.4996764 1.07763
R² R²adj Rmsd Variance
0.98046 0.97557 0.54942 2.71677
preg_sample_01.svg

Statistical Interpretation:

While the linear model yields a seemingly high R2 of 0.98, analyzing the parameter confidence intervals reveals a problem. The solver estimates the intercept a0 as -4.64, but the 95% confidence interval is extremely large (4.22). An error margin this large relative to the parameter's value indicates that the straight-line model struggles to fit the underlying mechanics of the data, which clearly contains curvature.

2. Polynomial Regression

To capture the curvature missed by the linear model, we increase the polynomial order to 2 to perform a quadratic regression (y=a2x2+a1x+a0). PolymathPlus calculates the optimal coefficients, including a free y-intercept parameter.

 
polyfit x y 2

The polynomial regression solution results are shown in the tables below:

y=a0+a1x+a2x2

Variable Value 95% confidence
a0 0.014488281 0.706117
a1 1.9324766 0.463760
a2 0.51325831 0.0652076
R² R²adj Rmsd Variance
0.999907 0.999845 0.0379046 0.0172411

Statistical Interpretation:

This model drastically improves the fit, achieving an R2 of 0.9998. However, looking closely at the parameters, the solver estimates the intercept a0 as 0.014, but its 95% confidence interval is 0.706. Because the confidence interval is larger than the parameter value itself, the intercept is statistically indistinguishable from zero. This tells us the model is over-parameterized and a0 should likely be dropped.

2.1. Polynomial Regression via the Origin

In many engineering problems, the model must pass exactly through zero. By appending the origin keyword to the command, PolymathPlus forces the y-intercept to zero, optimizing only the x and x2 coefficients.

 
polyfit x y 2 origin

The polynomial regression via the origin solution results are shown in the tables below:

y=a0x+a1x2

Variable Value 95% confidence
a0 1.9412543 0.135379
a1 0.5121377 0.0269368
R² R²adj Rmsd Variance
0.9999 0.9999 0.03793 0.01295
preg_sample_02.svg

Statistical Interpretation:

This is the strongest model. It maintains an excellent R2 (0.9999), and because we removed the unnecessary free intercept, the remaining parameters now show exceptional precision. The solver returns a0 (the x term) as 1.941 ± 0.135 and a1 (the x2 term) as 0.512 ± 0.0269. With tight 95% confidence bounds and high variance explained, this model fits the data very well.

3. Multilinear Regression

Polynomial regression is a special case of multiple linear regression in which nonlinear terms—such as x2—are computed beforehand and included as additional predictor variables. You can pre-calculate these transformed features and place them directly in your data table.

3.1. Pre-calculated Table Data

In this example, the x2 values appear as a separate column named x2. This approach is especially useful when working with raw datasets that already contain derived or interaction features.

Note: mlinfit requires listing all predictor variables first, followed by the dependent variable last.

1
2
3
4
5
6
7
8
9
10
[
x     x2     y
0.9   0.81   2.2
2.1   4.41   6.2
3     9      10.6
4     16     15.9
5.1   26.01  23.2
6     36     30.1
]
mlinfit x x2 y

The Multilinear regression model solution becomes:

y=a0+a1x+a2x2

Variable Value 95% confidence
a0 0.014488281 0.706117
a1 1.9324766 0.463760
a2 0.51325831 0.0652076
R² R²adj Rmsd Variance
0.99991 0.99985 0.037905 0.017241

Statistical Interpretation:

The solver treats x and x2 as independent predictor columns. Because the underlying data matrix is identical, the resulting R2 and parameter confidence intervals will match the polynomial fit polyfit x y 2 exactly.

3.2 Transformed Variables

PolymathPlus allows you to explicitly define mathematical transformations as helper variables outside the data table, and then feed them into the mlinfit command (same applies to the polyfit and nlinfit commands).
In this example, we define an explicit variable x2 as x2 and pass both predictors to the solver.

1
2
3
4
5
6
7
8
9
10
11
[
x    y
0.9  2.2
2.1  6.2
3    10.6
4    15.9
5.1  23.2
6.0  30.1
]
x2 = x^2
mlinfit x x2 y

The solver output for this model yields the exact same statistical results (R2 and confidence intervals) as the standard second-order polynomial fit polyfit x y 2, as well as the multilinear regression example above.

3.3. Multilinear Regression via the Origin

Just like the polyfit command, mlinfit also supports the origin keyword. By adding origin to the end of our transformed multilinear regression, we force the intercept of the multilinear plane to zero.

 
mlinfit x x2 y origin

The multiple linear regression via the origin solution becomes:

y=a0x+a1x2

Variable Value 95% confidence
a0 1.9412543 0.135379
a1 0.5121377 0.0269368
R² R²adj Rmsd Variance
0.99990 0.99988 0.037932 0.012949
mreg_sample_01.svg

Using x and x2 as predictors makes this model equivalent to a second-order polynomial fit through the origin. For this dataset, both approaches give the same fitted coefficients and narrow confidence intervals.

5. Nonlinear Regression

Below is an example of a data entry for solving nonlinear regression model for a given set of data points. The model variables to be found are a and b, for which we should also provide an initial guess.

The model eqaution to fit is as follows:

y = a ⁢ x b + x

The data entry for this nonlinear regression model is as follows:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Example: Nonlinear Regression
[
x     y     g
0.500 1.255 1.2
0.387 1.250 1.3
0.240 1.189 1.4
0.136 1.124 2.0
0.040 0.783 2.1
0.011 0.402 2.2
]

# Nonlinear regression model
nlinfit y = a * x / (b + x)

# Initial guess of the
# regression model variables a,b
m(a) = 2
m(b) = 1

The nonlinear regression solution becomes:

y=ax/(b+x)

Variable Initial guess Value 95% conf.
a 2 1.32753 0.02699
b 1 0.0264615 0.002853
R² R²adj Rmsd Variance
0.9988 0.9985 0.004406 0.0001747
nreg_sample_01.svg

6. Discrete Integration

PolymathPlus can calculate a definite integral from known discrete data points. The solver interpolates the supplied data, builds a continuous curve and calculates the area under the curve over the requested interval. This is useful when the function is known through measurements or simulation output tabulated data rather than through a closed-form equation.

In this example, PolymathPlus integrates y(x) from x = 3 to x = 8.6. The tabulated values of x are given explicitly in the data table, and the tabulated values of y are calculated from the values of t.

∫ 3.0 8.6 y(x)dx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[
x  t
1  1.7
2  2.9
3  4.9
4  8.4
5  14.2
6  24.1
7  41.0
8  69.8
9  118.6
]

y = t + 25

# Integration model
integrate y(x) 3.0 8.6

The solution report shows the integral calculated from the data points and a chart with the interpolated curve and the area from which the integration is derived.

∫ 3.0 8.6 y(x)dx = 312.0
160 120 80 40 0 1 3 5 7 9 x Integration Curve y

Internally the default algorithm implements the Akima interpolation with Simpson integration using 100 sub-sections. Optional command arguments to the integrate command provide direct control when needed: use integrate y(x) 2 3 90 akm for Akima interpolation over 2-3 with 90 sub-sections, integrate y(x) 1 2 50 ccs for CCS interpolation over 1-2 with 50 sub-sections, or integrate y(x) 5 9 80 lin for linear interpolation over 5-9 with 80 sub-sections.

The default settings are designed to work well in almost all practical cases. Advanced users can still override the defaults by choosing the interpolation method and the number of sub-sections used for the numerical integration. Increasing the number of sub-sections can improve accuracy for rapidly changing curves.

Constrained Optimization (NLP)

PolymathPlus solves constrained nonlinear programming (NLP) problems. It minimizes a nonlinear objective function by adjusting model variables within user-defined bounds and constraints. Once the lowest feasible objective value is found, the software generates summary reports, charts, and statistics to evaluate the quality of the model fit.

To set up an NLP problem, start by specifying the objective function you want to minimize using the min: keyword. Constraints are added as expressions that must equal zero for equality constraints (use ... = 0), or be greater than zero for inequality constraints (use ... > 0). Write each constraint as a mathematical expression followed by the appropriate comparison.
Please Note: Be sure to rewrite each constraint so that all terms appear on one side of the equation or inequality, leaving zero on the other side.

A key requirement for the NLP solver is to provide bounds for each variable. For every variable, you must enter an initial guess, a lower bound, and an upper bound in the following format: variable | guess lower_bound upper_bound
This helps the solver search only within the meaningful range for your model.

The following example demonstrates how to set up a constrained optimization problem. Here, the objective is to minimize a squared distance function subject to nonlinear inequality constraints that define the feasible region.

Mathematically, the problem is formulated as:

minimize: (x−2)2+(y−3)2 subject to: xy≥2 x2+y2≤25 0≤x,y≤10

The corresponding data entry and the solution report are as follows:

1
2
3
4
5
6
7
8
9
10
# objective function to minimize
min: (x - 2)^2 + (y - 3)^2

# region constraints
x*y - 2 > 0   
25 - x^2 - y^2 > 0

# Initial guess and bounds
x|1.6  0  10
y|1.3  0  10

the solution report shows the optimal values of the variables, the final minimized value of the objective function, and statistics on the quality of the fit.

Constrained Nonlinear Optimization
Optimization converged successfully after 47 iterations.
Final minimized value: 2.37e-9
Variable Initial Lower Upper Optimal
x 1.6 0 10 2.0000112
y 1.3 0 10 3.0000474
Fit Quality Score: 7 (Good)
Message: MARGINAL — usable result, but parameters have significant overlap.
Condition Number: 1
Eigenvalues: 2, 2
Var Score Grad StdErr RelStdErr
x 5 / 10 2.23E-5 0.707 35.4%
y 4 / 10 9.478E-5 0.707 23.6%

Convergence Analysis
Progress per iteration

4.0E0 3.0E0 2.0E0 1.0E0 0 0 2 4 6 8 10 Recorded checkpoint Objective F

Since the global minimum of the function is located at (2,3) and this point satisfies all constraints (where 2×3=6≥2 and 22+32=13≤25), the solver converges to the optimal value of min f*≈0.

LSQ Optimization

Least Squares (LSQ) optimization is a specific type of nonlinear programming (NLP) used to fit mathematical models to observed data. The main goal is to minimize the sum of squared differences (residuals) between the actual data points and the values predicted by the model. This approach is widely used in scientific modeling, as it provides a quantitative measure of how well the model matches the data under various equality and inequality constraints.

To perform LSQ optimization in PolymathPlus, you provide a set of observed data points and define a mathematical model that describes the relationship between variables. The solver then adjusts the model parameters to find the best fit, minimizing the total squared error.

Below is an example of how to enter data for a least squares optimization problem. In this example, the model uses a saturation kinetics form (which is commonly applied in enzyme kinetics and other scientific fields). The objective is to find the parameter values that make the model curve fit the data points as closely as possible.

The saturation kinetics form model:

y≈ Vmax⋅x Km+x

The equation above represents a common model used to describe how a response variable y changes with respect to an independent variable x, where - we seek to find the best fitting model variables Vmax (represented by a) and Km (represented by b), by minimizing the residuals of calculated ycalc values compared to the observed y data points.

ycalc = a ⋅ x / ( b + x )

In the PolymathPlus program, we should define the data-table of the known variable. We should also define the model expression to optimize using the fit: keyword followed by the math expression. In this case, we write fit: y = a*x/(b + x)

The program will attempt to find the best suited model variables a and b, by minimizing the sum of squared residuals:

minimize: ∑ ( ycalc − y ) 2

Here is the PolymathPlus program to solve the LSQ optimization problem described above:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[
x    y
0.05  0.1818
0.10  0.3333
0.20  0.5714
0.50  1.0000
1.00  1.3333
2.00  1.6000
]

# LSQ minimization fit
fit: y = a*x/(b + x)

# Initial guess and bounds
a|1.5   0  5
b|0.3   0  5

This is the solution result of the optimization process:

Optimization converged successfully after 2 iterations.
MinF*: 1.275e-9
Variable Ini Lower Upper Optimal
a 1.5 0 5 2.0000307
b 0.3 0 5 0.50004194
R² R²adj SSE RMSE σ² DOF
1 1 1.2e-9 1.5e-5 3.2e-10 4
Variable StdErr 95% Confidence
a 3.36e-4 1.85e-4
b 2.22e-4 1.28e-4

The verified solution for this dataset yields a ≈ 2.0 (representing Vmax) and b ≈ 0.5 (representing Km). By evaluating the residual plots provided in the report, users can confirm that the error is randomly distributed, indicating that the nonlinear model chosen is an appropriate fit for the data.

The program solution report includes charts to visualize the accuracy of the fit and the iterations for finding the optimal parameters:

1.6 1.2 0.8 0.4 0 0 0.5 1 1.5 2 x Calculated curve Observed data
1.5E-1 1.0E-1 5.0E-2 0 0 5 10 15 20 25 Recorded checkpoint Objective F

About Us

PolymathPlus was created to be the first-choice math solver for learners and professionals, combining advanced numerical methods with an intuitive interface.

It has evolved into a flexible numerical computing platform, available both as a web application and as a portable desktop application.

The development of our software has been encouraged by CACHE, the Computer Aids for Chemical Engineering Education Corporation.

Drawing on more than 25 years of software development and student feedback, we have created the current solver package. It is used by many universities, colleges, and institutions in the United States and around the world.

Development

Organizations can fund new capabilities or improvements that address their users’ needs. Participation provides an opportunity to define requirements, agree on scope, and establish a delivery schedule with the PolymathPlus team. Every proposal is reviewed for product alignment, community value, technical feasibility, and maintainability. Accepted, funded enhancements become part of free PolymathPlus for everyone.

How participation works
  1. Submit a proposal: Describe your organization, affected users, current problem, requested capability, expected result, target timing, and development investment range.
  2. Review and alignment: The PolymathPlus team evaluates the proposal and works with the organization to clarify requirements, priorities, dependencies, exclusions, and acceptance criteria.
  3. Agree on scope and funding: Both parties approve a written scope covering deliverables, estimated schedule, acceptance criteria, development investment, and other relevant terms. Development begins only after both parties accept the scope and funding arrangement.
  4. Develop and release: The accepted capability is implemented and verified under the agreed scope, then becomes part of PolymathPlus for the benefit of the entire community.

Development funding typically ranges from US$5,000 to US$50,000, depending on scope. The final amount depends on the accepted scope and may be higher for larger or more complex requirements.

A proposal does not guarantee acceptance or scheduling. Funding supports only the development effort. It does not provide a license, equity, ownership, exclusivity, or financial return.
Organizations help enhance the platform for the benefit of the broader community while keeping the software free for all users.

Do not include confidential models, data, credentials, or intellectual property in the initial proposal.

Ready to propose a capability?

Sign in and select Contact Us from your user menu. Tell us about your organization, users, current problem, and desired result.

Ready to solve your own model?

Start solving as a guest, then register for free to save programs locally and manage your profile.

Using an AI Assistant?

To build PolymathPlus programs with an AI assistant, first provide the full AI context ✨ in the chat box, then describe your problem and request the matching PolymathPlus code for it.


Terms and Conditions PolymathPlus does not warrant that the functions contained in the program will meet your requirements or that the operation of the program will be uninterrupted or error-free. In no event will PolymathPlus or its distributors or their dealers be liable to you for any damages, including any lost profit, lost savings, or other incidental or consequential damage. Please review the EULA link below for further details.