Solve Equations in Excel
The following tutorials are an introduction to solving linear and nonlinear equations with Excel. The solution to linear equations is through matrix operations while sets of nonlinear equations require a solver to numerically find a solution.
Solve Linear Equations with Excel
Solve Nonlinear Equations with Excel
Linear and nonlinear equations can also be solved with MATLAB and Python. Click on the appropriate link for additional information and source code.
The APMonitor Modeling Language is optimization software for mixed-integer and differential algebraic equations. It is coupled with large-scale solvers for linear, quadratic, nonlinear, and mixed integer programming (LP, QP, NLP, MILP, MINLP). Modes of operation include data reconciliation, real-time optimization, dynamic simulation, and nonlinear predictive control. It is freely available through MATLAB, Python, Julia, or from a web browser interface.
Generative AI Learning
Use these prompts to test your understanding after completing the tutorial. Direct the AI - set up the solutions yourself; use it to check your reasoning.
Tip: A solver that reports "converged" has answered the question you typed, not necessarily the question you meant. Substituting the answer back into the original equations (a residual check) takes one row of the worksheet and catches most setup errors - make it a habit before you trust any solution, yours or an AI's.
What to Turn In
Submit a short report (PDF, 1-2 pages) with your homework that curates your results into a demonstration of what you learned. You may use Generative AI to help write the report, but you must guide it to the correct solutions, justifications, and assumptions. Answer these questions:
- Solve a linear system (3 equations or more) with matrix functions. Show the worksheet and a residual check: A x - b computed in the sheet, with every element near zero.
- Solve one nonlinear equation with Goal Seek or Solver. Report the starting value, the solution, and the residual after convergence.
- Repeat the nonlinear solve from at least two different starting values. Did you get the same root? Explain the result using the shape of f(x).
- From the prediction prompt: what did you predict about starting points and roots, and what did the experiment show?
- From the quiz prompt: one question you missed and the corrected answer.
