Questions tagged [equation-solving]

The tag has no usage guidance.

-1
votes
2answers
31 views

Find maximum value of a function for a constrained boundary variable using Matlab or Matlab symbolic tool?

I am currently solving equations and I need to find the maximum value of a function. The equation is v = sqrt(u^2+2*a*s); where 0.1 <= a <= 1.5 and u = 2.75; s = 3.194; I have to solve a ...
0
votes
0answers
11 views

Needing help on the optimization of the solving of a set of non-linear equations that Sympy struggles to do

I am a beginner in Python, and a complete newcomer in Sympy. For a school project, I want to simulate a (surprisingly) complex movement. I have found 4 equations that I need to solve. The equations ...
-3
votes
0answers
39 views

Solve an equation with three variables in python? (only one equation available)

I want to solve the below equation using Python and any possible Library. y = c / ((x-α)^β) Variables are: α, β and c. I know this equation may have many possible answers, I want to calculate all ...
0
votes
1answer
25 views

How to return a finite (float) value with nonlinsolve in SymPy?

I am very new to programming, and had to use sympy for a school project. I think I get that using nonlinsolve to return an angle gives an ImageSet with the angle + 2n*pi. However I want it to return ...
0
votes
2answers
30 views

Find solutions of a system of equations as close as possible to the previous solutions

Currently I am using the vpasolve command to solve a system of 3 equations with 3 unknowns in it. These 3 equations are being used to model the kinematic motion of a robot manipulator, and the ...
0
votes
0answers
42 views

Non homogeneous heat equation

I have this code which solves the heat equation with non homogeneous boundary conditons: $$u_t=ku_{xx}$$ where k is the diffusion coefficient but now I want to add a constant which makes the equation ...
0
votes
1answer
40 views

Solve complex matrix equation

I have a complex equation involving matrices: R = expm(X)*A + (expm(X)-I)*inv(X)*B*U; where R, B and U are known matrices. I is an identity matrix. I need to solve for X. Is there any way to ...
0
votes
1answer
39 views

Solve a Quadratic Equation in two variables using Python

I have got two equations, one linear say, , where m and c are constants and the other quadratic say, , where x1, y1 and r are constants. Is there a way I can solve for x and y using Python ? ...
1
vote
4answers
55 views

Which algorithm to solve a system of equations where variables are bits and operation is xor?

I'm trying to solve a system of equations. Each equation is in the form: V1 xor V2 xor ... xor Vx = Sx Vx and Sx are single bits variables. The Sx are known and I need to find the value of all the ...
1
vote
0answers
52 views

Wolfram Mathematica Solve command for a nonlinear system of equations

I am trying to solve a nonlinear system of equations by using the Solve (and NSolve) command, but the evaluation get stuck. For a very similar system, basically the same but with the derivatives of ...
1
vote
1answer
42 views

Solve nonlinear equation symbolically in R with `Ryacas` package or an alternative

Out of pure curiosity I'm interested if there is a function/package that allows to solve simple nonlinear equations in R? Let's say I want to (symbolically) solve 0 = C + 1/x^2. The expected result ...
0
votes
1answer
37 views

Time varying input ODE solving

I'm trying to solve a set of ODE equations using ode45. A number of my parameters are already a function of time but I keep getting errors. function odo dx(1,1) = (vl+vr)/2*cos(x(3)); dx(2,1) = (vl+...
0
votes
0answers
33 views

How can I solve an unknown parameters between two equations in r

I have a problem. I have two equation like this. I want to take two parameters : N and n. Please, tell me how can get the parameters.
0
votes
0answers
50 views

How to calculate vector U from this equation? [duplicate]

I have this equation: P = K*U P & U are vectors with 6 arrays & K is a 6*6 matrix. Arrays of U are unknown & I want to compute them but don't know how to write the code. K= [38.25 9....
0
votes
0answers
34 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
1answer
69 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
2answers
50 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
0answers
25 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
2answers
105 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
0answers
48 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
2answers
29 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
1answer
48 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
1answer
53 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
0answers
14 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
3answers
55 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
2answers
88 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
1answer
70 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
1answer
29 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
1answer
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
1answer
89 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
2answers
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
0answers
19 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 ...
3
votes
1answer
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
0answers
67 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
0answers
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
1answer
50 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
0answers
112 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
1answer
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
1answer
53 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
1answer
37 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
1answer
52 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
2answers
88 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
2answers
160 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
2answers
54 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
0answers
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
0answers
19 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
2answers
133 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
0answers
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
2answers
65 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
0answers
22 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 ...

http://mssss.yulina-kosm.ru