# Questions tagged [equation-solving]

The equation-solving tag has no usage guidance.

**0**

votes

**0**answers

20 views

### Solving equations programatically [duplicate]

My project: I want to develop a library that would solve equations. For example: Given input "3x+5=-1" I would like the output x=6
Why? Just for fun, I am learning and am interested in this topic.
...

**0**

votes

**1**answer

53 views

### Solving n linear systems efficiently

I have n (very large) independent linear systems (Ax = b_i). They all have the same A, but b_i is different for (i = 1, ..., n). I want to solve these n systems in parallel in CUDA.
I was thinking ...

**2**

votes

**2**answers

49 views

### Finding the odd point in a dataset without using loops

I am given a set of points (p1,q1) (p2,q2) ... (p20,q20) which satisfy the function q = 1/(ap + b)^2 except that one of these does not satisfy the given relation. The values of a and b are not given ...

**0**

votes

**0**answers

15 views

### How to solve overdetermined quadratic system in Circle Packing

I'm working on a program where I have to satisfy an overdetermined system of non-linear equations.
Basically, the program will add points dinamically, and every new point must be added where it ...

**0**

votes

**2**answers

95 views

### How to solve a linear system of a square matrix in C++ when the matrix has no LU-Decomposition?

I have been trying to develop a program to solve a system Ax=b for a square matrix A using LU-Decomposition. However, I realized that this decomposition does not always exist (one way to tell is if a ...

**2**

votes

**0**answers

36 views

### SymPy: solving overdetermined system of linear equations

I know that SymPy is able to solve overdetermined systems of linear equations, but I'm running into the following problem:
Let's start with something that works:
from sympy import *
x, y, z = ...

**2**

votes

**2**answers

27 views

### Trying to Convert Excel Equation to C#

I've got this Excel equation and I'm struggling to convert it into c#.
The "to the power of" and "log" parts are tripping me up.
The excel equation is as follows:
LOG((10^(PreSkillRating/400)/((-...

**4**

votes

**1**answer

44 views

### How to find the unique solution to norm(a,2)==c; when c is a scalar and a=[x abs(1/x);x+1 1/x]

I am trying to find the unique solution to the following equation using Matlab
norm(a,2)=0.11
when x is a variable and a=[x abs(1/x);x+1 1/x]. b is the exact formulation of norm(a,2),...

**0**

votes

**1**answer

52 views

### Haskell: How to find the number of integer solutions to equation for use in Sieve of Atkin?

I am currently trying to implement the Sieve of Atkin in Haskell
In step 3 on the Wikipedia article on the Sieve of Atkin I need to find the number of Integer solutions to multiple equations.
...

**0**

votes

**0**answers

9 views

### Q: WxMaxima trig system of equations gives [] as result

I just started using WxMaxima and cannot get a solution to the following system of trig equations.
Provided that alpha and beta are the only 2 variables in a system, how can I get the solutions in ...

**-3**

votes

**3**answers

48 views

### Iteration for x value in equation

I've been set a task to iteratively calculate the value of x of the given formula : x3 - 3x + 4 = 0** using trial and error.
The code will first plug in -1.5 as its first guess and then work up or ...

**0**

votes

**2**answers

80 views

### Solving a linear system of equations

I am working on using the finite element method to calculate heat flow through elements.
I'm currently stuck on solving a system of equations where there is variables on both side of the equality. A ...

**1**

vote

**1**answer

58 views

### Solve a system of boolean equations in Matlab

I have a set of boolean equations, i.e.
var1 = x AND y
var2 = x OR z
var3 = ...
var4 = ...
And the constraint that every output vari should equal 1.
I want every corresponding combination of input ...

**-1**

votes

**1**answer

28 views

### How to solve z = (((m / k) / j) / x) for x optimizing z towards 2ˣ

So say I have these variables:
m is the amount of memory available in bits
k is a dividing factor
j is another dividing factor, kept as a separate variable instead of combining with k
x is the value ...

**0**

votes

**1**answer

35 views

### How to generate an equation as a function of a specific variable from a set of symbolic equations?

after some search in the forum, I couldn't find the answer to my question.
Problem: I have a set of symbolic equations (more than 10). For simplicity reasons, let's say that my goal is to write the ...

**2**

votes

**1**answer

84 views

### What is the best way to solve a system of linear equations with infinite solutions?

I want to solve a system of linear equations (SLE, Ax=b, where A consists out of 8 rows and columns) but this system will always have infinite solutions. Many people refer to Eigen, when it comes down ...

**0**

votes

**2**answers

46 views

### Solving a 2-Variable function to only 1 of the variable doesnt work on arrays

I have found from StackOverflow how to solve a fucntion with two variables giving the one as constant/known.
This is the part of the code:
def R(gg,a):
return a-r0*g0**(1/2)*D(gg)/gg**(1/2)
def ...

**0**

votes

**0**answers

18 views

### How to solve linear systems that have probabilety variables with SymPy?

So say I have a simple system of equations:
x + y = 5;
y * x + P * x = 3;
And P is a variable that has some given, known distribution. I would like to solve this system for x and y relative to given ...

**4**

votes

**1**answer

119 views

### Solving multivariate equation for a subset of variables

I am using sympy to solve some equations and I am running into a problem. I have this issue with many equations but I will illustrate with an example. I have an equation with multiple variables and I ...

**0**

votes

**0**answers

53 views

### how to circumvent the 'singular matrix' error when numerically solving a multivariate system of equations using R rootSolve::multiroot

My system of equations contains an ifelse condition; I don't know if that is what's causing the singular matrix issue, because it sometimes works and sometimes doesn't work.
This works:
zf <- ...

**1**

vote

**0**answers

84 views

### How to solve function f(x,y) for either x or y (if the other is given)?

I started to work with mathjs and tried to rewrite some Python code using sympy for algebraic calculations. I implemented a fit function I got from a research article (see link in code snippet if ...

**1**

vote

**1**answer

43 views

### Solve simultaneous equations using Ryacas package (OldSolve) in R

I am trying to solve a system of 3 equations using Ryacas package in R.
library(Ryacas)
yacas("OldSolve({(f*Reg/(k + Reg)) - r*BB - ab * BB - a1*f1*BB*AA*P - fp*BB*P==0,(ab * BB + a1*f1*BB*AA*P)/e1 ...

**5**

votes

**0**answers

77 views

### Solve simultaneous equations in R with variables

I need to solve a system of four equations and solve for (Alg,Blg,C,D)..the others are simply variables.
dAlg = (ab*D + a1*f1*D*Alg*Blg + a2*f2*D*Alg*C)/e1 - m1*Alg;
dBlg = (f11*D*Blg)/eB - f1*Alg*...

**-1**

votes

**1**answer

47 views

### 10,25,50,100,250,500,1000 how to find this sequence equation to plot in a graph

10,25,50,100,250,500,1000..... How to find above number series equation.
I need to generate the number pattern like above to plot it in my graph.
I tried like 2x, 2x, 2x + x / 2, 2x, 2x, ..... 2n, ...

**0**

votes

**1**answer

52 views

### How to solve equation with rotation and translation matrices?

I working on computer vision task and have this equation:
R0*c + t0 = R1*c + t1 = Ri*c + ti = ... = Rn*c + tn ,
n is about 20 (but can be more if needs)
where each pair of R,t (rotation matrix and ...

**0**

votes

**1**answer

36 views

### get random number of parameters that satisfy given equation in Python

I'm new to Python and I would like to get 1000 of parameters that satisfy a given equation.
More precisely, below is the equation of the sphere, assume the position of the sphere center(x0, y0, z0) ...

**1**

vote

**1**answer

44 views

### Scipy equation system with multiple equations

Hello I have a problem using Scipy's fsolve function when I have an equation system.
My code only let's me have as much variables as there are equations in my system, but we all know that in practice,...

**1**

vote

**2**answers

84 views

### Solve A linear equation system b=0 Rstudio

i would solve a linear equation system like this:
x_1*3+x_2*4+x_3*5+x_4*6+x_6*2=0
x_1*21+x_2*23+x_3*45+x_4*37*+x_6*0=0
x_1*340+x_2*24+x_3*25+x_4*31+x_6*0=0
x_1*32+x_2*45+x_3*5+x_4*6+x_7*2=0
x_1*9+...

**0**

votes

**2**answers

113 views

### Linear equation with 3 variables in C

I am given my C class homework, which is:
A hyperloop track is built of individual pipe segments of certain length. The track starts and ends with a bulkhead, and there is a bulkhead in-between ...

**0**

votes

**2**answers

42 views

### Solving system of equations on MATLAB, when a constant exists in variable matrix?

How do I solve the following system of equations on MATLAB when one of the elements of the variable vector is a constant? Please do give the code if possible.
More generally, if the solution is to ...

**0**

votes

**0**answers

31 views

### Solving for power of a non linear equation in matlab

I have been trying to solve for n in the equation given below in matlab. All the rest of the values are known :
H_obs = 1*61 vector, dhdx = 1*61 vector, a = 1*61 vector. All the values of all the ...

**0**

votes

**0**answers

17 views

### Solving two nonlinear equations with nsolve

I am trying to solve two long nonlinear equations simultaneously using nsolve. I am getting a ZeroDivisionError, and I think this is because I have not set an initial guess for either variable. In the ...

**1**

vote

**2**answers

91 views

### Eliminate a variable to relate two functions in Python using SymPy

I have two equations that are parametrized by a variable "t". These look like:
X = p(t)
Y = q(t)
where p and q are polynomials in t. I want to use Python's SymPy library to eliminate the t variable ...

**0**

votes

**0**answers

13 views

### I would like to find all roots of a nonlinear equation in one variable, e.g., f(x) = 0

I would like to find all roots of a nonlinear equation in one variable, e.g., f(x) = 0.
The maximum possible number of solutions can be determined theoretically.
The unknown variable x is an angle, ...

**1**

vote

**2**answers

64 views

### Finding the root of an equation using iteration

I am attempting to find the root of the equation 3x3+x2-10 using iteration. Here is the code that I have so far, however I don't think I have implemented the while loop correctly since it the equation ...

**0**

votes

**0**answers

21 views

### Alternative to vpasolve and results arrangment

I'm triying to solve the following problem in Matlab:
I have two known matrices F and Q mxm (m=20), and I want to find a matrix L that satisfies the equation
F-(QL+LQ)/2 = 0
(I know it is a ...

**0**

votes

**1**answer

44 views

### Improve accuracy when solving a linear system where equations have coefficients ranging from E13 to E-18

i am doing some scientific calculations using python.I got into trouble when solving linear equations,where some coefficients are very large ~ E13 , some are very small ~E-69.It gives me a inaccurate ...

**1**

vote

**1**answer

68 views

### Solving a non-linear equation in python: the answer is the same as initial guess

So I have this complicated equation which I need to solve. I think that finally x should be of order 1E22. But the problem with this code is that it crashes my entire system. Is there a fix? I tried ...

**-2**

votes

**3**answers

99 views

### How to solve an equation for 4 variables

Say I have
a + 3b + 4c +2d =40;
how can I solve a,b,c and d.
I'm not sure where to start, I am coding this using c language. I know that one solution is a=9 b=3 c=2 d=7.
I forgot to add that ...

**0**

votes

**1**answer

30 views

### What would be the best algorithm to solve a track path in the quickest way?

Fun question.
Consider we have a race track with cars which need to start from point A to point B without going off track. The track will be a grid with nodes. What best algorithm would be fit for ...

**-1**

votes

**1**answer

88 views

### Solving large system of non linear equations

I'm trying to solve a system of 30 non linear equations (unknown variables sit inside exponential functions). I have exactly 30 variables and 30 unknowns. I'm trying to use scipy.optimize.fsolve but ...

**0**

votes

**1**answer

77 views

### How does one find a recurrence equation (for this pseudocode)?

I've been tasked with finding the answers for the questions below, but honestly I'm completely lost as where to start. I'm not looking for straight answers per say (although they would be appreciated),...

**0**

votes

**0**answers

23 views

### Generating random SoLE with certain conditions

I have to write an algorithm (using NumPy) that creates:
random system of 4 linear equations with 4 variables and integer
coefficients
two column vectors b_1, b_2 with integer numbers such that:
1) ...

**1**

vote

**1**answer

48 views

### Maxima: How can I get a variable as the sum of the function of other variables from a system of equations?

The problem is this; I have a system of equations, which describes the workings of a system. (In this case, an electronic system.) The system has inner variables, as well as input and output variables....

**0**

votes

**0**answers

31 views

### How can the user input an equation for the program to understand? [duplicate]

OK so I'm fairly new to c# in the big scheme of things. I have encountered one of the first things I'm not 100% sure on how to overcome. At the moment I have a program that asks the user to input a ...

**2**

votes

**3**answers

825 views

### Solving a non-linear system of equations in Python using Newton's Method

I am trying to solve this exercise for College. I have already submitted the code bellow. However, I am not completely satisfied with it.
The task is to build an implementation of Newton's method to ...

**0**

votes

**0**answers

82 views

### “Error using sym>convertChar” when solving an ODE system symbolically

I am trying to solve systems of equations that contain algebraic as well as differential equations. To do this symbolically, I need to combine dsolve and solve. Consider the following example:
We ...

**2**

votes

**2**answers

547 views

### how to solve trigonometric equations on python

I am trying to solve 3 of trigonometric equations in python. I used Sympy library but I got a error such as 'TypeError: can't convert expression to float'
Here is My Python Source code:
from sympy ...

**0**

votes

**0**answers

112 views

### Octave dsolve with some symbolic parameters

I want to solve the following equation with Octave:
syms y(t) k T T1 % k, T and T1 are constants.
eq1 = diff(y,t)-k*y+k*T == 0
cond=y(0)==T1
dsolve(eq1,cond)
but Octave runs it like this:
{
(sym)
...

**1**

vote

**0**answers

106 views

### How to solving a system of linear equations over $\mathbf{Z}_p$ in python

Let us consider a system of linear equations :
$$
a_0+a_1+a_2+a_3=5
a_0+2a_1+4a_2+8a_3=14
a_0+3a_1+9a_2+27a_3=33
a_0+4a_1+16a_2+64a_3=5
$$
I want to solve this above system of equations over the ...