Questions tagged [fsolve]
30 questions
3
votes
1 answer
How to solve an overdetermined non linear set of equations numerically in python?
I am trying to solve a system of 4 exponential equations with two variables. However If I use fsolve python will only allow me two use as many equations as I have variables. But as I have infinitely many pairs of solutions (if only two equations are…
user21056350
2
votes
1 answer
Gekko & Fsolve function - Inconsistency on results with python
I’m working on a nonlinear equation system with 12 parameters and 12 equations, I have started with FSolve but because results were different between application and computers, I move forward to Gekko… but the problem persists.
I have one routine…

Ricardo Castro
- 21
- 2
0
votes
0 answers
Error: Limits of integration must be double or single scalars. While solving equations numerically with symbolic integral limits
Problem Description:
The equation system to be solved {f1=0, f2=0, f3=0} contains variables pl and pr. The expressions for pl and pr involve integrals with variables as their limits (indicated by bold parts in the code). After processing through…
0
votes
0 answers
python fsolve says converge but excel says diverge case
i tried finding solutions of the data with python scipy.fsolve
my input data is here
(link removed)
but Excel's goal seek determines the data has no solution.
my entire code is below
import scipy as sco
from scipy.optimize import fsolve
import…

0in
- 13
- 3
0
votes
1 answer
Estimating parameters in q-Weibull distributions on Matlab
I am trying to test if the q-Weibull distribution is better at describing the behavior of certain data than other distributions. Since I am from a biological sciences background, math and coding are not my stronger suits, and I have been struggling…
0
votes
2 answers
Fsolve with multiple vector equations
I am trying to solve an equation similar to the simplified example
x / x.sum - b = 0
where x is an n-dimensional vector. Since one can multiply x with any constant without changing the equation, the solution is up to a normalization. Because of…

eigenvector
- 313
- 1
- 3
- 12
0
votes
0 answers
Using fsolve in Shooting Method for Boundary Value Problem results in "ValueError: setting and array element with a sequence."
I'm a professor of Modeling & Simulation for engineering undergraduates and one of the examples I used to teach while talking about boundary value problems is the following:
A ball is thrown from a height of 1.5 metres. The initial speed of the ball…

GFonseca
- 1
- 2
0
votes
1 answer
Guessing parameter values using fsolve to find solution values
I have a system of 3 equations - 3 unknowns that I can solve if I know the values of the parameters (z,a). The issue is that I don't know them. Is it possible to write a code that given a guess for (z,a) finds (x,y,w) such that the system of…

Ostrich
- 39
- 4
0
votes
0 answers
Can someone explain how to correctly pass a tuple as an input variable to fsolve in Python without encountering a NameError?
I am using Python.
I am trying to pass a tuple as an input variable ('myvar') to a function, which I then solve. The error message I receive is
NameError: name 'myvar' is not defined
Here the (minimal) snippet of the code I tried:
from…

night_owl89
- 101
- 2
0
votes
0 answers
Issues with Scipy.optimize.fsolve on a numba'd function
I'm working on trying to find zeros of a function that I've used numba for using scipy.optimize.fsolve. The function is below. The exact details aren't important, but the jist is that F_curr is a 2D numpy array that stores information on the…

Minty
- 1
0
votes
1 answer
Scipy fsolve doesn't converge to correct value
I'm trying to solve for the initial value of a simple differential equation (dh/dt, trying to find h at t=0). However, using fsolve, the value for the iterations…

CWHoule
- 3
- 2
0
votes
1 answer
How to improve function using fsolve?
I want to use the fsolve one by one for each iteration. Supposed I have DataFrame look like below:
PD Downturn
PD TTC
0.12
0.008
0.15
0.016
0.24
0.056
0.56
0.160
1.00
1.000
Here is the code I try:
result = []
for i in…

Sasiwut Chaiyadecha
- 183
- 1
- 1
- 10
0
votes
1 answer
Python (using SciPy) is unable to solve for a variable in an equation
I am having a problem solving for the variable x_Prime using the scipy.optimize.fsolve() function. Below is what I have:
import math
import scipy.optimize as so
c_val = 100
f_NFW_val = math.log(1+c_val)-c_val/(1+c_val)
psi_prime =…

ellipse314
- 47
- 3
0
votes
0 answers
fsolve Python for unknown variable finder
From the equation given in the attached photo I need to calculate alpha1, alpha2, alpha3, alpha4 and alpha5 as well as the root (x).
The code written so far is
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import…
0
votes
1 answer
Using openpyxl and scipy to solve non-linear system related to resistor network
I'm trying to do the right thing for my career by learning how to really use the data science tools and automate excel.
There is a pretty basic resistor circuit called a Pi attenuator.
On a particular component, two of the terminals are shorted…

Kritischer
- 13
- 4