Questions tagged [equation-solving]
763 questions
1
vote
3 answers
How to solve a symbolic system of equations in Matlab
I know it has to be a stupid error,but I really can't solve a system of this type:
b =
a2*cos(q1 + q2) + a1*cos(q1)
a2*sin(q1 + q2) + a1*sin(q1)
d1 + d4 + q3
>> solve(b,[q1,q2,q3,q4])
Warning: The solutions are parametrized by…

user1834153
- 330
- 5
- 20
1
vote
3 answers
Optimizing the equality and inequality operators
I have some structures that are very expensive to compare. (They are actually trees with distinct branches.) Computing hash values for them is also expensive.
I want to create a decorator for the eq operator that will cache some results to speed…

haael
- 972
- 2
- 10
- 22
1
vote
2 answers
What is the fastest way to numerically solve a system of multivariate nonlinear equations with binary variables?
How do you solve a system of multivariate nonlinear equations that has three equations and 5000-20000 variables that can either be 0 or 1?
The system probably has a lot of solutions, but I only need to find one of them.
Thanks

Jessica
- 2,335
- 2
- 23
- 36
1
vote
2 answers
Algorithm to solve an equation
I have this problem for the course "Algorithm and data structures"
You have a equation x^2+s(x)+200·x=N, where x and N are natural numbers and S(x) is the sum of digits of number x.
On the input we have N and A, B such that A≤B and A,…

Bojan Trajkovski
- 1,056
- 1
- 15
- 31
1
vote
2 answers
C - function to return curved result
I have a general programming challenge for you all. I've been scratching my head trying to figure out the best way to do this...
I'm working in C and I've got a "speed" value that is passed to my program. It ranges from 0-255. This speed value needs…

sscode
- 137
- 1
- 1
- 7
1
vote
2 answers
Solving an equation in Python. Calculating nth digit
I need to write a program in python that given an integer as input calculates the digit in a continuous row of natural numbers starting by 1 and continuing to infinite(ex. 12345678910111213141516171819202122 etc...) So for example if we input 17 it…

buster
- 167
- 1
- 5
- 11
1
vote
2 answers
Solving equation slow
I have an equation (5th order Polynomial) and I have to solve it every time for different variables A,B and Coeff as written down. And the coefficient are quite alot (100000) I had no other way than using the for loop to do it but it is incredibely…

Jack_111
- 881
- 5
- 14
- 26
1
vote
1 answer
Analytical gradient for bisection method nested within objective function
I'm attempting to fit parameters to a data set using optim() in R. The objective function requires iterative root-solving for equation G so that the predicted values p brings the values for G (nested within the objective function) to 0 (or as close…

Eric
- 166
- 5
1
vote
0 answers
Problems with multiplying lists in python
Consider a differential equation, do be precise, the Polanyi-Wigner equation:
dy/dt = - v*(y(t))^n * exp(-E/(kt))/b (*)
This equation describes the desorption behavior of particles from a surface. An experimental technique called thermal…

Phil Ipp
- 111
- 4
1
vote
2 answers
Custom transfer function based on system matrix
Background: I have a complex mechanical oscillation system. With analogies I transformed it into an electrical circuit (every element is a RLC-oscillator). The only way to calculate the circuit is nodal analysis and it's too complex to do it by…

Robert Seifert
- 25,078
- 11
- 68
- 113
1
vote
2 answers
Solving Equations with Python and Sympy and getting numerical answers
I'm trying to use sympy to solve equations, but I would like to get a straight numerical answer. My script is like this:
from sympy import…

user2632453
- 93
- 1
- 4
1
vote
1 answer
How to configure temporal / time linear programing constraints using PuLP?
I am trying to solve a hypothetical linear problem using PuLP. The problem aims at minimizing the costs of an operation over a 5 year horizon while maximizing product shape and condition. The problem must generate 5 costs, one for each year while…

dassouki
- 6,286
- 7
- 51
- 81
1
vote
3 answers
symbolic system of non linear equation matlab
I'm trying to solve symbolically the following system of equation:
Sys = [...
k1*x - y == 0,...
y - k2*z*w == 0,...
1 - x*k8 - y - w == 0,...
k3*q + k5*q*r - k2*w*z - k4*z*t == 0,...
1 - z - q == 0,...
k4*z*t - k5*r*q == 0,...
…

Yyrkoon
- 13
- 1
- 3
1
vote
1 answer
sensitivities using assimulo ida(from sundials)
I'm trying to solve a problem with sensibilities using ida with assimulo.
solving the problem without sensibilities works fine but now i want to do it with sensibilities in finaltime, initial values and controls(parameters that are used in my…

Annah
- 41
- 1
- 2
1
vote
1 answer
Quadratic functions in c
I have almost everything working except for solving for X in line 25 i keep getting an error saying " term does not evaluate to a function taking 1787 arguments" i had it giving me a 1 or a 0 but as i kept messing with it i lost where i was at and…

Pwoods
- 105
- 2
- 4
- 15