Questions tagged [equation-solving]

763 questions
0
votes
1 answer

nls: Nonlinear Least Squares: model fitting done, now get stuck at finding x (y=0)

I have a series of experimental rT and T. I am using nls to fit my data to this formula: rT~exp(aa * T) - exp(aa * Tmax - (Tmax - T)/deltaT) + bb The nls fitting returned an nls object and gave me the estimated parameters aa, bb, Tmax, deltaT in the…
0
votes
0 answers

Solving Nonlinear system of equations in Mathematica (wolfram)

I'm Trying to solve a System of equations in Mathmatica with the Function of NSolve The Code should represent a Mass Balance of A factory, in one of the Flows im trying to change the Conc. of the Solvent and it work up to a certian point The Code…
0
votes
0 answers

Fastest way to solve non-negative linear diophantine equations

Let A be a list of n lists of m non-negative integers, such that for all j there is i with A[i][j] nonzero. Let V be a list of m positive integers. Question: What is the fastest way to find all the lists X of n non-negative integers such that for…
0
votes
1 answer

Solving coupled inequalities where the variables are array indices

I have a set of two arrays of numbers, and I need to find 3 indices of these arrays, such that 2 inequalities using the arrays are satisfied. We can assume the value of one index to simplify the problem to 2 inequalities, 2 unknown indices. However,…
0
votes
0 answers

Solving large sparse linear system of quations Python vs Matlab

I am trying to solve a large linear system of equations in Python, Ax=b type problem. A is square, not symmetric, 250.000x250.000, with 2e7 nonzero elements. Sparsity pattern(K) I solved it first in Matlab 2022a, with A\b or mldivide function. It…
0
votes
0 answers

Best way to numerically solve equation with multiple integrals

I am faced with an expression of the form: $\frac{F(x)}{(1+x)G(x)}=y(\theta).$ Given some set of parameters $\theta$, I can easily compute $y$. The functionals $F(x)$ and $G(x)$ are integrals of functions $f(x')$ and $g(x')$ and the limits of…
user3517167
  • 137
  • 1
  • 9
0
votes
2 answers

An algorithm to solve sets of relations

I am writing a program to process various equations. I have a list of equations, and a function that can solve a given equation for an unknown value. Eg: a + b + c = 0 -> can be solved for any variable, given the other 2. I now need to write an…
Delta qyto
  • 125
  • 8
0
votes
1 answer

How to get the result for the variables of the Eq using Sympy? - EDIT

I can't get the results o the next equation using Sympy, maybe I'm using the wrong tool for solve this kind of problems, this is the code i'm using: import sympy as sym ss1=4.16 as1=0.97 fs1=0.38 cs1=51.29 ss2=4.16 as2=0.95 fs2=0.37…
0
votes
1 answer

Solving a Combustion Chemical Equation for Product Molar Values using 10 different values for equivalence ratio (Phi)

I am trying to use Cantera to solve some thermodynamics problems. I cannot get this function to solve for b1, c1, d1, and e1 as functions of phi_rich. Basically I need to find these values at each value of Phi_rich. My function will not work. Here…
Will
  • 21
  • 2
0
votes
1 answer

How to solve this equation involving an absolute term in sympy?

from sympy import * x = symbols('x', real=True) solve(Abs(2 + 36/(x - 2)) - 6) I've already set real=True, but it still says solving Abs(2 + 36/(x - 2)) when the argument is not real or imaginary. However, solving Abs(36/(x - 2)) - 6 is…
k1eran
  • 3
  • 1
0
votes
1 answer

Does Sympy's error during solve "[...] undecidable set membership is found in every candidates" mean that no solution exists?

I'm trying to solve the following equation for variable x (in dependence on other symbols b, c, d): from sympy import symbols, sin, cos, solve, solveset, S b, c, d, x = symbols('b c d x', real=True) expr = sin(x)*sin(c - 2*d - x) - sin(2*b - 2*d…
a_guest
  • 34,165
  • 12
  • 64
  • 118
0
votes
1 answer

How to combine different equations automatically

I have 9 different equations that contain only 7 unknowns. I would like to generate a code that creates all the possible systems of 7 equations and return the cases in which all the variables have a positive result. The 9 equations are: eq1 =…
0
votes
2 answers

Solution to a system of non-linear equations in R^2

I am trying to find a solution to the following system where f and g are R^2 -> R^2 functions: f(x1,x2) = (y1,y2) g(y1,y2) = (x1,x2) I tried solving it using scipy.optimize.fsolve as follows: def eqm(vars): x1,x2,y1,y2 = vars eq1 = f([x1,…
McLovin
  • 1
  • 1
0
votes
0 answers

How can I code dynamic sets in GAMS environment?

I want to code a constraint in GAMS environment but I can't. The constraint that I want to code is seen in the image. In this constraint, x(i,m,t) is a binary variable but x(i,m,t) binary varible is changed as x(i,m,d) and as seen in the image…
0
votes
0 answers

How do I convert an abbreviated integer into an integer, in a string, in Java?

I have the following string as my input: (100m/10k) * 10k where m = 1,000,000 k = 1,000 I expect an output of (100000000/10000) * 10000 I'm having a difficult time figuring out how to replace the abbreviated integers with "real integers". I've…
uploak
  • 1