# Solve Simultaneous Algebraic Equations (x eqns and x unknowns)

**URL:** <https://discourse.julialang.org/t/solve-simultaneous-algebraic-equations-x-eqns-and-x-unknowns/88060>\
**Category:** General Usage\
**Tags:** algebra\
**Created:** [September 30, 2022, 8:51pm UTC](https://discourse.julialang.org/t/solve-simultaneous-algebraic-equations-x-eqns-and-x-unknowns/88060 "2022-09-30T20:51:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwalters31](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rwalters31/32/25594_2.png) [@rwalters31](https://discourse.julialang.org/u/rwalters31)\
**Post date:** [September 30, 2022, 8:51pm UTC](https://discourse.julialang.org/t/solve-simultaneous-algebraic-equations-x-eqns-and-x-unknowns/88060/1 "2022-09-30T20:51:25Z")

</div>

I have been looking for a Julia package to solve simultaneous algebraic equations. A simple example for two equations and two unknowns might look like:  
x^{2}+y^{2}=5  
y=\frac{1}{2}x^{3}+3x^{2}-2x-3  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/0/7/077080e6bca92b353569a7f3ab0252e002fdc9d4.png)

Here is a plot of the two equations:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/b/6b1a19fc8cc29f08bf19da20c48ba6ac19b60295.png)

The packages that I have run across seem to be aimed at linear systems or ODEs. I apologize if there is a simple solution that I have missed.

---

<div class="post-metadata">

**Author:** ![Paulo\_Jabardo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paulo_jabardo/32/3196_2.png) [@Paulo\_Jabardo](https://discourse.julialang.org/u/Paulo_Jabardo)\
**Post date:** [September 30, 2022, 9:26pm UTC](https://discourse.julialang.org/t/solve-simultaneous-algebraic-equations-x-eqns-and-x-unknowns/88060/2 "2022-09-30T21:26:08Z")

</div>

There are a few packages that can do this.

- [NLsolve.jl](https://github.com/JuliaNLSolvers/NLsolve.jl)
- [NonlinearSolve.jl](https://github.com/SciML/NonlinearSolve.jl) This one uses the interface used by SciML
- If you are limited to polynomial equations, you can try [HomotopyContinuation.jl](https://www.juliahomotopycontinuation.org/)
- [https://github.com/ctkelley/SIAMFANLEquations.jl](https://github.com/ctkelley/SIAMFANLEquations.jl) Code for a [classic book (with a new edition coming out, using Julia)](https://my.siam.org/Store/Product/viewproduct/?ProductId=44313635).
- Try [IntervalRootFinding.jl](https://juliaintervals.github.io/IntervalRootFinding.jl/latest/) if you need to find all the roots in an interval.

I hope this helps

Paulo

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [October 1, 2022, 1:55am UTC](https://discourse.julialang.org/t/solve-simultaneous-algebraic-equations-x-eqns-and-x-unknowns/88060/3 "2022-10-01T01:55:01Z")

</div>

> [@Paulo\_Jabardo](#):
>
> If you are limited to polynomial equations, you can try [HomotopyContinuation.jl](https://www.juliahomotopycontinuation.org/)

This seems to be definitely the most robust option for systems of polynomial equations.
