I have the following system of 3 nonlinear equations that I need to solve in(adsbygoogle = window.adsbygoogle || []).push({}); python:

7 = -10zt + 4yzt - 5yt + 4tz^2

3 = 2yzt + 5yt

1 = - 10t + 2yt + 4zt

Therefore I need to solve for y,z, and t.

Attempt to solve the problem:

But the thing is that if I want to useCode (Text):def equations(p):

y,z,t = p

f1 = -10*z*t + 4*y*z*t - 5*y*t + 4*t*z^2 - 7

f2 = 2*y*z*t + 5*y*t - 3

f3 = - 10*t + 2*y*t + 4*z*t - 1

return (f1,f2,f3)

y,z,t = fsolve(equations)

print equations((y,z,t))

scipy.optimize.fsolvethen I should input an initial guess. In my case, I do not have initial conditions.

Is there another way to solve 3 nonlinear equations with 3 unknowns in python?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# How to solve a system of nonlinear equations in python

**Physics Forums | Science Articles, Homework Help, Discussion**