Questions tagged [equation-solving]
763 questions
2
votes
1 answer
How to solve simultaneous non-linear equations with exponential functions?
I have a system of equations to solve for x1 and x2:
2*erf(A*x2)*exp(B*x1^2+C*x2^2)-D*erf(x1)=0
2*erf(D*x2)*exp(E*x1^2+F*x2^2)-G*erf(x1)-erf(H*x2)*exp(I*x1^2)=0
where B and C are negative while rest of the constants are positive.
I tried to solve…

Deepak
- 21
- 3
2
votes
2 answers
What are the best libraries or software to numerically solve a nonlinear system?
I have a system of 8 polynomial equations of 7th grade eight in 8 variables with constraints (minimum and maximum acceptable values).
In your experience and knowledge of what is the most efficient "package" to attack this kind of…

psmith
- 167
- 1
- 12
2
votes
1 answer
How to solve symbolic equation in matlab
I have an equation in Matlab according to X parameter . I want to find the amount of X for the random amounts of F(x) .
and I tried the code below . but It gives me two different results while my equation should have just one result .
even I tried…

Bahareh LV
- 53
- 2
- 8
2
votes
1 answer
C++ solving for quartic roots (fourth order polynomial)
As part of my project I need to solve a quartic polynomial in a closed form in C++.
A*x4 + B*x3 + C*x2 + D*x + E = 0
I found several links to this end. One of them is here. But it computes all roots, while I want just real roots. The algorithms…

batista cori
- 543
- 2
- 6
- 18
2
votes
1 answer
Solving equations in C
I need to solve the following equation in C:
a + ln(a) = x
I know the value of x and I need to find the value of 'a' that satisfies this equation. Can anyone suggest an efficient method for solving this equation. May be Newton Raphson, or anything…

Ashwin
- 90
- 2
- 10
2
votes
2 answers
Solve system of polynomials (4, second order) in C
I'm trying to solve a system of 4 second order polynomial equations using C++. What is the fastest method for solving the system, and if possible, could you link or write a little pseudocode to explain it? I'm aware of solutions involving a…

smörkex
- 336
- 3
- 18
2
votes
1 answer
Matlab: how to solve a binary system of equations?
I'm trying to solve a system of equation with the following form:
a5 + a6 + a7 + f5 + f6 + f7 = 11;
b5 + b6 + b7 + e5 + e6 + e7 = 100;
c5 + c6 + c7 + d5 + d6 + d7 = 100;
a5 + b5 + c5 + d5 + e5 + f5 = 11;
a6 + b6 + c6 + d6 + e6 + f6 = 100;
a7 + b7 +…

Samsky
- 438
- 5
- 11
1
vote
2 answers
Matlab Solve System of Equations with Quantized Variables
I am trying to use solve() to solve a system of equations of the following form
eq1=a1x+a2y;
eq2=b1x+b2y;
where a1 = .05 for values of x<5, .1 for values of 5
Is there a way to solve for this using solve? As in sol = solve(eq1,eq2);

user1265868
- 11
- 3
1
vote
1 answer
solutions for factor levels when using linear models in R
I am running linear models to look at the significance of independent factors involved.
The example model is: `
mymod1 <- lm(temp ~ bgrp+psex+tb,data=mydat)
summary(mymod1)`
I look at the summary to check out the significance of each…

baz
- 6,817
- 11
- 36
- 37
1
vote
1 answer
Python semiprime factorization equation solver issues
I am a farmer / novice number theory researcher. I happened to discover some years back a pattern that emerged in the distribution of the prime numbers that related the number of primes to the operation of 300 Fibonacci-like sequences. Well, as a…

J. W. Helkenberg
- 11
- 2
1
vote
2 answers
Calculating 4th power differences
I am using Modelica for solving a system of equations for heat transfer problems, and one of them is radiation which is written as
Ta^4-Tb^4
Can someone say if it is computationally faster solving a system with the equation written…

ruben baetens
- 2,806
- 6
- 25
- 31
1
vote
1 answer
Why does sympy struggle with solving lists of equations vs a single equation call?
I have the following minimal example:
import sympy as sp
eq = sp.S("-p**2*(3*p**2 - 9*p + 7)/(p**2 - 3*p + 3) + q")
# This eventually terminates after a few seconds
sp.solve(eq, dict=True)
# Result: [{q: p**2*(3*p**2 - 9*p + 7)/(p**2 - 3*p +…

WaveL
- 11
- 3
1
vote
1 answer
Solve linear system in R
I have a system of 3 equations :
g + v_1 = 8 +1/2 *v_1 +1/4 *v_2 + 1/4 *v_3
g + v_2 = 16 +1/2 *v_1 +0 *v_2 + 1/2 *v_3
g + v_3 = 7 +1/4 *v_1 +1/4 *v_2 + 1/2 *v_3
Setting v_3 = 0 one can obtain v_1=1.33,v_2 =7.47,v_3=0,g=9.2.
How can I solve this…

Homer Jay Simpson
- 1,043
- 6
- 19
1
vote
1 answer
How to use Sympy solve for a timeseries
How can I run sympy Solve for timeseries?
Lets say I want to Solve for X in the following equation (1+df['LTEPSG']) * df['TTMEPS']-X=0 and I want my solution for X to be a timeseries.
Dates LTEPSG TTMEPS
2022-09-01 0.13434 219.603…

user20856754
- 63
- 5
1
vote
2 answers
How to allocate a product using R
I want to solve the following problem using R, and I am struggling to find a good way to do so.
I have a sales forecasts for two products (Product 1 & Product 2), of which there are 2 variations each (A & B).
dat_forecast <- data.frame(
product =…

Johnny
- 751
- 12
- 24