Equation Solver (eqnsolver) – SCILAB Toolbox

‘eqnsolver’ is a SCILAB toolbox that provides various functions to estimate the root of any equation by Numerical Methods.

The equation can be transcendental or algebraic.

It is available on the ATOMS: https://atoms.scilab.org/toolboxes/eqnsolver

There are 4 functions available for now, but I am still working on this toolbox so I may add a few more.

  • nrsolve – Finds the real or complex root of an equation using a Numerical Technique called Newton-Raphson Method.
  • sesolve – Finds the root of an equation using a Numerical Technique called Secant Method.
  • bsolve – Finds the root of an equation within a given interval using the Bisection Method
  • quadsolver – Finds the roots of a quadratic polynomial.


Using the toolbox is pretty straight-forward. There are help pages for each of the function. You can load help by typing “help eqnsolver” in the Scilab console.

Suppose you want to find a root of the equation “9x^3-81”. Then all you need to do is, first define a function:


And then simply use the function, bsolve, sesolve as follows:


However to use the Newton-Raphson Method, you will also need to provide the derivative of the equation, so define a function ‘df’ which is the derivative ‘f’:


And then call the nrsolve() which will return a root.


NOTE: The above functions never return all the root of the equation so you can adjust the initial guess that you give as arguments to get the different roots.


Toolbox: eqnsolver

Title: Equation Solvers (eqnsolver)

Summary: A toolbox with various functions for finding the roots of various algebraic or transcendental equations using Numerical Techniques.

Version: 1.0.0

Author: Manas Sharma

Maintainer: Manas Sharma

Category: Numerical Maths

License: Creative Commons Attribution-ShareAlike 3.0

ScilabVersion: >= 5.4


Author Notes:

A brand new #scilab  Module created by me that lets you find the root of any algebraic or transcendental equation by Numerical Methods.
Numerical Methods are iterative methods that rely on an initial guess to find the exact root.
They only return a single root at a time and one needs to change the initial values for different roots.
One of the functions in the modules uses Newton-Raphson Method which is the best availabe function to find the roots available in the toolbox.
It can even find complex roots if the inital guess is complex.

Hope you like it!
The module is still a work in progress and I’m working on more functionalities to calculate the more roots simultaneously.
Anyone is welcome to contribute to this project.

Will keep you updated on future developments.

PhD researcher at Friedrich-Schiller University Jena, Germany. I'm a physicist specializing in computational material science. I write efficient codes for simulating light-matter interactions at atomic scales. I like to develop Physics, DFT and Machine Learning related apps and softwares from time to time. Can code in most of the popular languages. Like to share my knowledge in Physics and applications using this Blog and a YouTube channel.
[wpedon id="7041" align="center"]

Leave a Reply

Your email address will not be published. Required fields are marked *