# How to solve simultaneous equations?

2 views (last 30 days)
Medhanand Kalluri on 13 Oct 2021
Answered: Bjorn Gustavsson on 14 Oct 2021
How to solve simultaionsequations such as this,
f1(x1,x2) = x1^2 + x1*x2 - 10;
f2(x1,x2) = x2 + 3*x1*x2^2 - 57;
with and without using symbolic functions for f1 and f2. Please do explain the process.
##### 2 CommentsShowHide 1 older comment
Medhanand Kalluri on 14 Oct 2021
Like is there no tool to solve two equations? I've used fzero for a single variable equation (not system of equations) (but to use that I first entered the function as a string; then used str2func to convert it into a function; then used fzero).
1) Similar to fzero, is there an inbuilt function available? If there is how do we use it for simultaeous functions?
2) For symbolic functions (i.e. if we create f1 and f2 with x1 and x2 defined as sym variables) we can't use fzero, then how do we find the roots?

Bjorn Gustavsson on 14 Oct 2021
Using symbolic tools you have solve - look at the help and documentation for that function for examlpes. Your problem should reduce to a cubic polynomial so should be possible to check "semi-manually".